00:03:16 | FromDiscord_ | <JGiraffe> So you want to look within strings to identify an int to then use that as a condition? |
00:03:52 | * | vlad1777d quit (Ping timeout: 246 seconds) |
00:04:59 | FromGitter | <zetashift> @PusiteGA https://nim-lang.org/docs/strutils.html#isDigit%2Cchar |
00:10:21 | FromDiscord_ | <PusiteGA> @JGiraffe yep example i have "B2A" i want to check if B is an int if its not nothing, then i check next char 2 if its int .... |
00:10:49 | FromDiscord_ | <PusiteGA> try zetashift 😃 |
00:10:58 | FromDiscord_ | <PusiteGA> *ty zetashift |
00:12:08 | FromGitter | <zetashift> np! |
00:32:24 | FromDiscord_ | <PusiteGA> is there some online compiler for nim |
00:32:54 | FromDiscord_ | <PusiteGA> found it |
00:35:05 | FromGitter | <zetashift> several! |
00:35:36 | FromGitter | <zetashift> Man I gotta calm down with these exclamation marks. Also anybody know where I can download v0.18 of the nim compiler? |
00:36:38 | FromDiscord_ | <PusiteGA> hmm, is there a short way to write multyple write chars to string or do i have to for loop it , example i have a 'A' and i want to write it 20 times i tryed string = 'A' * 20 but it dosent work ofc |
00:42:02 | FromGitter | <zetashift> @PusiteGA https://nim-lang.org/docs/strutils.html#repeat%2Cstring%2CNatural this maybe? |
00:42:32 | FromGitter | <zetashift> instead of 'A' drop "A" in it |
00:44:23 | * | mech422__ joined #nim |
00:45:22 | * | skunkz joined #nim |
00:48:04 | * | mech422_ quit (Ping timeout: 272 seconds) |
00:49:52 | * | nsf quit (Quit: WeeChat 2.3) |
00:57:48 | FromDiscord_ | <PusiteGA> late i allredy for looped it, but sound better for future stuff |
00:58:22 | FromDiscord_ | <PusiteGA> i like this exercism.io its derusting my brain |
01:07:34 | FromGitter | <zacharycarter> got my nim t shirt in today |
01:07:38 | FromGitter | <zacharycarter> will post a pic wearing it tomorrow |
01:07:50 | FromGitter | <zacharycarter> coffee mug should be in next week |
01:09:14 | FromGitter | <zacharycarter> @zetashift - the nim compiler? or the nim project? |
01:09:32 | FromGitter | <zacharycarter> just checkout the hash and build from source |
01:09:51 | FromGitter | <zacharycarter> I'm pretty sure choosenim can install 0.18 |
01:09:59 | FromGitter | <zacharycarter> last but not least - there should be a download for that version of Nim on the website |
01:13:21 | FromGitter | <zetashift> I couldn't get choosenim to work on x64 windows |
01:13:52 | FromGitter | <zetashift> I just clicked on the releases tag on the github and building it now :P |
01:14:19 | FromGitter | <zetashift> I couldn't find the 0.18 version specific, only found 0.19 |
01:14:56 | FromGitter | <zetashift> I switched over to arch for a bit for choosenim and godotnim it was just so smooth. But this week I don't have access to my laptop |
01:16:18 | FromGitter | <zacharycarter> ah gotcha |
01:16:21 | FromGitter | <Varriount> JGiraffe: Have you looked at the original Pokemon source code? |
01:16:22 | FromGitter | <zacharycarter> yeah - I'm done with godot |
01:16:32 | FromGitter | <zacharycarter> going to start working on my own engine again - actually started a few days ago |
01:16:38 | FromGitter | <zacharycarter> hi @Varriount |
01:16:46 | FromGitter | <zetashift> You gotta finish your beautiful engines man ;( |
01:17:03 | FromGitter | <zetashift> I'm sticking with godot thought the desire is strong to get dirty with SDL2 and nim |
01:17:03 | FromGitter | <zacharycarter> well - they're all kind of iterations / experiments / learnings |
01:17:09 | FromGitter | <zacharycarter> thank you for that though :) |
01:17:21 | FromGitter | <zacharycarter> this next one I hope to bring to a point of actually being somewhat usable |
01:17:35 | FromGitter | <zetashift> but I'm way more productive(read: the beginner resources for godot help me a lot more than other engines) in godot-nim |
01:18:19 | FromGitter | <zacharycarter> I don't even want to call what I'm building an engine |
01:18:30 | FromGitter | <zacharycarter> I have a specific goal in mind for a game this time - so I'm going to build the tech to support that |
01:18:43 | FromGitter | <zetashift> You seem to be more of an engine dev than a gamedev then :P |
01:18:52 | * | Snircle joined #nim |
01:19:05 | FromGitter | <zacharycarter> well - I'm more into tooling development than actual game development I think, that's for sure |
01:19:18 | FromGitter | <zetashift> I saw this I think yesterday: https://github.com/grz0zrg/fbg and was like so when is zach making a the nim++ version of it |
01:20:07 | FromGitter | <zacharycarter> interesting - hadn't seen that yet - thank you for sharing :) |
01:20:12 | FromGitter | <zacharycarter> actually |
01:20:33 | FromGitter | <zacharycarter> I'm working on a few bindings now - using nimgen |
01:20:37 | FromGitter | <zacharycarter> one for bgfx |
01:20:44 | FromGitter | <zacharycarter> and then if I can figure out a way to get it to work - one for bullet3d |
01:21:28 | FromGitter | <zacharycarter> I'm definitely done with web dev for a while - this tweet and resulting thread, convinced me of that lol - https://twitter.com/beeman_nl/status/1063563907799887874 |
01:23:52 | FromGitter | <zetashift> Well what else would one expect discussing webdev on social media. You should've just plugged karax and walk away |
01:24:09 | FromGitter | <zacharycarter> no - it wouldn't have been wise to plug karax in that thread |
01:24:23 | FromGitter | <zacharycarter> that thread was fucked from the start and so is anyone agreeing with it's sentiment |
01:24:38 | FromGitter | <zacharycarter> learn these 3 buzz techs to stay relevant as a software dev |
01:25:08 | FromGitter | <zacharycarter> hell - one is a spec that has been fighting for survival for several years, one is a library from facebook and the other is arguably not very useful |
01:25:19 | FromGitter | <zetashift> yea just throw in karax as a ruse |
01:25:23 | FromGitter | <zacharycarter> meh |
01:25:45 | FromGitter | <zacharycarter> I'll just let them all become irrelevant by focusing on those techs |
01:25:49 | FromGitter | <zacharycarter> more jobs for me |
01:25:53 | FromGitter | <zetashift> But exactly how does one learn webasm? Memorize the bytecode? It's just a platform a lang can compile to |
01:27:32 | FromGitter | <zacharycarter> yeah the whole original tweet was ridiculous |
01:27:48 | FromGitter | <zacharycarter> and then the arguments against my reply are even more ridiculous |
01:27:53 | FromGitter | <zacharycarter> "Might as well go learn fortran" |
01:28:12 | FromGitter | <zacharycarter> Guess what? You can get a job programming fortran today if you want - can't say the same about knowing what WASM is |
01:28:41 | FromGitter | <zacharycarter> There are no developers, suffering more from imposter syndrome - than those that choose to focus only on JS |
01:28:52 | FromGitter | <zacharycarter> and it's self-inflicted |
01:29:13 | FromGitter | <zetashift> getting off-topic here btw. Even though I agree with you |
01:30:06 | FromGitter | <zacharycarter> I know - but it's that time of night too |
01:30:14 | FromGitter | <zacharycarter> might as well talk about something until there's something Nim related to talk about |
01:30:26 | shashlick | Good to see a nimgen consumer |
01:30:35 | FromGitter | <zacharycarter> yeah - nimgen is awesome |
01:31:01 | FromGitter | <zacharycarter> and now I also get hungry whenever I see your name |
01:31:25 | FromGitter | <zacharycarter> I now have like 2-3 game projects i want to explore with nim |
01:31:29 | FromGitter | <zetashift> I still haven't been able to install v0.18 :P, after the csources step it seems to pick v0.19 |
01:31:32 | FromGitter | <zacharycarter> one is way simpler graphically probably |
01:32:04 | FromGitter | <zetashift> I was thinking of using c2nim/nimgen to make a basic port of raylib but I'm scared since I know jackshit of C and only the basics of pointers etc |
01:32:12 | FromGitter | <zetashift> well I know a bit of C |
01:32:41 | FromGitter | <zacharycarter> if you want to use raylib |
01:32:57 | FromGitter | <zacharycarter> I can give you a commit hash of zengine to fork from |
01:33:06 | FromGitter | <zacharycarter> before the codebase got messy because of other's involvement |
01:33:14 | FromGitter | <zacharycarter> and also because of me adding WASM support |
01:33:20 | FromGitter | <zacharycarter> zengine is basically a fork of raylib |
01:33:25 | FromGitter | <zacharycarter> but it doesn't have all of raylib either |
01:33:35 | FromGitter | <zacharycarter> I want to explore creating something like this - https://www.wargamer.com/articles/tabletop-simulator-war-games/ - with nim |
01:33:41 | FromGitter | <zacharycarter> because I want to get back into tabletop wargaming |
01:33:59 | shashlick | I can help with wrappers |
01:34:16 | FromGitter | <zacharycarter> http://www.vassalengine.org/ |
01:34:18 | shashlick | Though am actively working on next gen nimgen |
01:34:20 | FromGitter | <zacharycarter> is actually more of what I'm after |
01:34:46 | FromGitter | <zetashift> @zacharycarter I mostly thought it be handy since raylib has nice examples and would be a great beginners project |
01:35:11 | FromGitter | <zacharycarter> well - zengine has a lot of those same examples |
01:35:16 | FromGitter | <zacharycarter> and it's 100% nim |
01:35:24 | FromGitter | <zacharycarter> but up to you |
01:35:25 | FromGitter | <zetashift> and there is this: https://github.com/Skrylar/raylib-nim |
01:35:37 | FromGitter | <zacharycarter> yeah - those probably work |
01:35:43 | FromGitter | <zacharycarter> Skrylar is a good dev |
01:35:48 | FromGitter | <zetashift> oh I didn't see much of that yea in that case lemme check it out |
01:35:55 | FromGitter | <zetashift> I <3 samples |
01:37:33 | FromGitter | <zacharycarter> it also might be a lot ot fix |
01:37:35 | FromGitter | <zacharycarter> to fix* |
01:37:56 | FromGitter | <zacharycarter> to bring it up to 0.19.0 - so raylib might be a better option unless you want to deal with a pre-existing codebase someone else authored |
01:37:59 | FromGitter | <zacharycarter> that isn't very well documented :P |
01:38:36 | FromGitter | <zetashift> I think c2nim/nimgen would be best for me, terms of getting more comfortable in nim |
01:38:43 | FromGitter | <zacharycarter> anyway - going to work on these bgfx bindings and try to get something done tonight |
01:38:46 | FromGitter | <zacharycarter> yeah probably |
01:38:47 | FromGitter | <zetashift> (and it's ecosystem) |
01:38:56 | FromGitter | <zetashift> and I'm stuck on v18 anyway with no choosenim |
01:39:12 | FromGitter | <zetashift> for a week actually then I'll probably switch to arch |
01:40:01 | FromGitter | <zacharycarter> can't wait to build my new mini itx |
01:40:04 | FromGitter | <zacharycarter> and slap windows on that bad boy |
01:40:22 | FromGitter | <zacharycarter> and be done with osx for a while |
01:41:43 | * | leorize joined #nim |
01:47:32 | * | shpx joined #nim |
01:50:16 | FromGitter | <metasyn> i've noticed some libraries use the `when` keyword a lot, which i thought meant its evaluated at compile time, e.g. `when defined(debug)` - is there a standard place where you would normally declare `let debug = true` or something to enable all those branches to be hist? |
01:50:24 | * | zachk quit (Quit: Leaving) |
01:50:55 | FromGitter | <zetashift> So I have the 0.18 sources right now how do I get it to build? For some reason getting the csources and then running build64.bat gets me the v0.19 compiler version |
01:52:54 | FromGitter | <zacharycarter> @metasyn - you generally pass it as a flag to the compilter |
01:52:56 | FromGitter | <zacharycarter> so |
01:53:06 | FromGitter | <zacharycarter> nim c -d:someDefine foo.nim |
01:53:25 | FromGitter | <zacharycarter> then when foo.nim is compiled the - `when someDefine:` condition will evaluate to true |
01:53:48 | FromGitter | <metasyn> so foo.nim would hold `let debug = true `in this case? |
01:54:12 | FromGitter | <zacharycarter> no - because let isn't evaluated at compile time |
01:54:26 | FromGitter | <zacharycarter> this would be a flag passed to the compiler |
01:54:38 | FromGitter | <zacharycarter> it's not going to modify your code at all |
01:54:59 | FromGitter | <zacharycarter> @zetashift - yeah I feel like I ran into this issue before - the way to compile Nim changed |
01:55:13 | FromGitter | <zacharycarter> it didn't used to be as simple as executing a shell script - like it is now |
01:55:21 | FromGitter | <zacharycarter> I can't remember how I fixed it either |
01:55:57 | FromGitter | <metasyn> Oh thats so much simpler than I thought. I knew I was missing something. Thanks @zacharycarter :) |
01:56:02 | FromGitter | <zacharycarter> np! |
01:58:42 | FromGitter | <Varriount> @zacharycarter You and I should meet up again at some point. |
01:58:59 | FromGitter | <zetashift> Pretty sure I'm just missing a step to get it to compile 0.18 |
02:00:22 | FromGitter | <zacharycarter> @Varriount - agreed |
02:00:23 | FromGitter | <zacharycarter> lololol |
02:00:57 | FromGitter | <zacharycarter> reply to me after apologizing to that guy and explaining why I went off about his assertion that everyone needed to learn GQL / WASM / web components to stay relevant - ⏎ ⏎ ```You are the stereotype non-considerate autistic nerd that gives us developer such a bad name. Please stay far away from me, my tweets an anything related to me because I hate people like you and the entitled attitude you have.``` |
02:01:04 | FromGitter | <zetashift> https://nim-lang.org/download/nim-0.19.0_x64.zip changed this to 0.18 worked |
02:06:13 | FromGitter | <zacharycarter> @Varriount - not sure what your schedule is looking like next week - but I have some time off for Tgiving |
02:06:27 | FromGitter | <zacharycarter> and certainly can find some time next weekend if you're down |
02:07:20 | FromGitter | <Varriount> @zacharycarter I know about WASM, and I'm assuming web components means React/Vue/etc, but what's GQL? |
02:07:39 | FromGitter | <zetashift> One of the bigger complaints in the JS/Node ecosystem is that there is a new framework every X months and a new major breaking version too(though recently it's mostly been Angular/React/Vue) How is webasm gonna help that I wonder. Since everyone in and their dog will use a language that will compile to webasm and make a new framework? |
02:07:41 | FromDiscord_ | <JGiraffe> @ Varriount the only code I've looked at for Pokemon is the damage calculation formula and the experience formula. Do you think the modifiers for the damage would be accessible somewhere? |
02:07:48 | FromGitter | <Varriount> Yep |
02:08:02 | FromGitter | <zetashift> ```GraphQL is a query language for your API, and a server-side runtime for executing queries by using a type system you define for your data. GraphQL isn't tied to any specific database or storage engine and is instead backed by your existing code and data.``` |
02:08:14 | FromGitter | <zetashift> some alternative to REST basically |
02:09:02 | FromGitter | <zetashift> and web components isn't like React I think, more so like pre-build widgets independant of design-code ? |
02:09:02 | FromGitter | <Varriount> Ah, GraphQL |
02:09:12 | FromGitter | <Varriount> JGiraffe: https://github.com/pret/pokered/blob/master/data/type_effects.asm |
02:10:14 | * | theelous3 quit (Ping timeout: 244 seconds) |
02:10:22 | FromGitter | <zacharycarter> @Varriount web components aren't react / vue etc |
02:10:43 | FromGitter | <zacharycarter> in fact react was written in response to web components and angular was built because web components weren't ready |
02:11:30 | FromGitter | <zacharycarter> GQL isn't even a replacement for rest |
02:11:45 | FromGitter | <zacharycarter> it has no use beyond the browser - if you're using GQL b/w servers you're misusing it |
02:11:56 | FromGitter | <zacharycarter> it's basically RPC with a default query procedure |
02:12:18 | FromGitter | <zacharycarter> with some extra features that make it shine in certain use cases |
02:12:33 | FromGitter | <Varriount> JGiraffe: It's basically an `array[high(TypeEnum)..low(TypeEnum), tuple[TypeEnum, TypeEnum, int8]] |
02:12:35 | FromGitter | <zacharycarter> but the notion that without learning these three technologies - that you won't be relevant anymore - is stupid |
02:12:54 | FromGitter | <Varriount> Well, maybe if you're a web developer. |
02:13:03 | FromGitter | <zacharycarter> well he said software developer |
02:13:09 | FromGitter | <Varriount> O_o |
02:13:22 | FromGitter | <zacharycarter> and this is the overall problem with the web dev world |
02:13:32 | FromGitter | <zacharycarter> they don't want to learn or work with more complex problem domains |
02:13:45 | FromGitter | <zacharycarter> so they pretend they don't exist and they act like we're calling them out as imposters |
02:13:55 | FromGitter | <Varriount> I thought the problem in the web dev world was that it's composed of a huge, teetering stack of abstractions. |
02:13:57 | FromGitter | <zacharycarter> when in reality - they're choosing that themselves lol |
02:14:02 | FromGitter | <zacharycarter> that's a problem too |
02:14:17 | FromGitter | <zacharycarter> the developers are a problem, the technology is a problem |
02:14:19 | FromGitter | <zacharycarter> it's a giant mess |
02:14:30 | FromGitter | <zacharycarter> the web was fine without web developers for a long time |
02:14:52 | FromGitter | <Varriount> I do think WASM is an interesting technology... but it's nothing really *new* |
02:14:56 | FromGitter | <zacharycarter> yeah |
02:15:00 | FromGitter | <zacharycarter> people want to pretend it is though |
02:15:03 | FromGitter | <zacharycarter> out of ignorance |
02:15:18 | FromDiscord_ | <JGiraffe> Do you think it's better to list everything that isn't *1.0 like that code or do the 18x18 array? |
02:15:21 | FromGitter | <zacharycarter> but when you bring these things to light |
02:15:40 | FromGitter | <zacharycarter> you're an autistic self-entitled nerd that's everything wrong with software development :P |
02:16:20 | FromGitter | <Varriount> Hrm... I take offense at such name-calling. |
02:16:24 | FromGitter | <zetashift> But then again the web is used for a lot of more shit nowadays |
02:16:45 | FromGitter | <zetashift> as a dutch person can attest to people calling rude behaviour autistic |
02:16:49 | FromGitter | <zetashift> here* |
02:17:19 | FromGitter | <zacharycarter> well |
02:17:29 | FromDiscord_ | <JGiraffe> For some reason it's only an insult I see online |
02:17:30 | FromGitter | <zacharycarter> I have no idea whether I'm on the spectrum or not - I very well could be |
02:17:47 | FromGitter | <zacharycarter> but I mean - it's ironic that he's trying to play the victim card when I didn't do any name calling |
02:17:58 | FromGitter | <zacharycarter> and he's turning around and calling me an autistic nerc |
02:18:07 | FromGitter | <zetashift> yea he's calling you out for rude while being rude |
02:18:12 | FromGitter | <zacharycarter> because of his inadequacies |
02:18:32 | FromGitter | <zacharycarter> all I said was JS devs should go live on bizzaro world if they think they're building anything useful or novel |
02:18:37 | FromGitter | <zetashift> people use it here in real life often @JGiraffe not sure how this came about |
02:18:39 | FromGitter | <zacharycarter> after he told me I might as well live in a cave |
02:18:58 | FromGitter | <zacharycarter> because I advocated that sticking with C/C++ would keep you relevant |
02:19:05 | FromGitter | <zacharycarter> again - it's imposter syndrome |
02:19:07 | FromGitter | <zetashift> I'm gonna be honest though I'd rather live in a cave than program C++ *shudders* |
02:19:25 | FromGitter | <zacharycarter> and he's lashing out because of it |
02:19:49 | FromDiscord_ | <JGiraffe> I've read c++ is not easy to understand |
02:20:00 | FromDiscord_ | <JGiraffe> But I've never actually tried reading it |
02:20:02 | FromGitter | <zetashift> whoop whoop finished my 4th godot-nim sample game |
02:20:12 | FromGitter | <zetashift> I think I'm ready to finish something original now |
02:20:18 | FromGitter | <zacharycarter> well C++ has its intricacies for sure |
02:20:26 | FromGitter | <zacharycarter> probably more than most languages |
02:20:38 | FromDiscord_ | <JGiraffe> Got a bunch more fundamentals to practice before I go learning any other languages |
02:20:44 | FromGitter | <zacharycarter> and it has an ever evolving language specification |
02:20:56 | FromGitter | <zacharycarter> but it's still the most used programming language in a lot of problem domains |
02:21:06 | FromGitter | <zacharycarter> game / engine development for instance |
02:21:17 | FromDiscord_ | <JGiraffe> Zetashift what is the game you finished about? |
02:21:26 | FromGitter | <zacharycarter> congrats @zetashift ! |
02:21:47 | FromGitter | <zetashift> @JGiraffe as beginner too learning programming I'd recommend taking a look at Scala. It ain't the prettiest but the beginner resources are excellent and really taught me how to structure programs a lot better |
02:22:10 | FromGitter | <zetashift> thanks and the game is a short simple game collecting coins before the time runs out |
02:22:26 | FromGitter | <zacharycarter> Scala is high level |
02:22:28 | FromGitter | <zetashift> it's the first one in the godot projects book but instead of gdscript I just use Nim |
02:22:29 | FromGitter | <zacharycarter> and has a GC |
02:22:37 | FromGitter | <zacharycarter> I might recommend C instead |
02:22:40 | FromGitter | <zetashift> ^ |
02:22:54 | FromDiscord_ | <JGiraffe> Like OG C? |
02:23:04 | FromGitter | <zacharycarter> https://www.amazon.com/Programming-Language-Brian-W-Kernighan-ebook/dp/B009ZUZ9FW |
02:23:05 | FromGitter | <zacharycarter> yes |
02:23:06 | FromGitter | <zetashift> I thought about learning C but honestly I don't think I'll ever use it |
02:23:24 | FromGitter | <zacharycarter> it's not so much about using C |
02:23:33 | FromGitter | <zetashift> and most pointer/how memory works I learned from Rust :D |
02:23:34 | FromGitter | <zacharycarter> it's more that you're going to understand a lot more about programming by learning C |
02:23:38 | FromGitter | <zacharycarter> well yeah |
02:23:44 | FromGitter | <zacharycarter> Rust is fine too - but Rust is more complicated than C |
02:23:54 | FromGitter | <zacharycarter> and Rust also has a lot of abstractions not present in C |
02:24:15 | FromDiscord_ | <JGiraffe> By high level do you mean more abstract? |
02:24:16 | FromGitter | <zacharycarter> C is still widely used and is one of the most portable native languages |
02:24:20 | FromGitter | <zacharycarter> yes |
02:24:37 | FromGitter | <zacharycarter> C is low level - next to forth and assembly language |
02:24:49 | FromGitter | <zacharycarter> you could learn Forth too - but that's a very different programming paradigm |
02:24:49 | FromGitter | <zacharycarter> or Scheme |
02:24:59 | FromGitter | <zacharycarter> but I'd recommend C as first programming language to learn |
02:25:03 | FromDiscord_ | <JGiraffe> If I learn C will that make C++ easy? |
02:25:04 | FromGitter | <zacharycarter> I regret that it wasn't mine |
02:25:08 | FromGitter | <zacharycarter> it will make it easier |
02:25:14 | FromGitter | <zacharycarter> C++ is built on top of C |
02:25:14 | FromDiscord_ | <exelotl> I like C, would rather write it than C++ |
02:25:32 | FromGitter | <zetashift> Oh man I'm really glad I didn't learn C first |
02:25:42 | FromGitter | <zacharycarter> I'm not |
02:25:44 | FromGitter | <zetashift> that is too spartan for me |
02:26:01 | FromGitter | <zetashift> I'd be nope'd out of programming a lot sooner |
02:26:06 | FromGitter | <zacharycarter> well - IMO - it doesn't do you any benefit to learn higher level concepts before lower level ones |
02:26:15 | FromGitter | <zacharycarter> learning it first doesn't mean you're forever stuck with it |
02:26:29 | FromGitter | <zacharycarter> but you are forever stuck with the concepts or lack of understanding by not learning C first |
02:26:46 | FromGitter | <zetashift> I get what you mean, however I was kind of young when I learned Python and I think if I learned C I'd be worse off |
02:26:55 | FromGitter | <zacharycarter> I get that |
02:27:05 | FromGitter | <zacharycarter> computers in general are tough for a younger person |
02:27:09 | FromGitter | <zetashift> maybe in the long run I'd be better off yeah |
02:27:10 | FromGitter | <zacharycarter> there's a lot to them |
02:27:19 | FromGitter | <zacharycarter> if you just want to get cranking on something - C isn't the right language |
02:27:25 | FromGitter | <zacharycarter> if you want to learn - that's another story |
02:27:30 | FromDiscord_ | <JGiraffe> Well I'm finishing this Nim tutorial first then I'll have plenty of options. I do want to use Godot or another Nim-compatible engine for the game I'm developing. |
02:27:50 | FromGitter | <zacharycarter> I think Godot is your only real solid option there |
02:27:56 | FromGitter | <zacharycarter> unless you're just doing 2d and can get away with using SDL |
02:28:02 | FromGitter | <zacharycarter> or CSFML or something |
02:28:26 | FromGitter | <zetashift> I recently saw people starring my samples repo and was like people actually starred that my atrocious piece of code? |
02:28:51 | FromGitter | <zetashift> nimgame2 is also really solid btw |
02:28:55 | FromGitter | <zetashift> not sure if it works on 0.19 |
02:29:02 | FromDiscord_ | <JGiraffe> I think it'll be 2d but with quite a lot of bool states and recurring, cyclic events that need to be tracked. |
02:29:20 | FromGitter | <zetashift> but yea for beginners I like engines like godot or love2d |
02:30:07 | FromDiscord_ | <JGiraffe> There are a crazy amount of engines out there I've never heard of |
02:30:12 | FromGitter | <zetashift> oh you want to keep it Nim, then yeah godot or nimgame2 |
02:30:46 | FromGitter | <zacharycarter> often times engines like Godot / Unity etc - can be more complicated than just using something like SDL2 |
02:30:56 | FromGitter | <zacharycarter> they also tend to have way better documentation / tutorials |
02:31:02 | FromGitter | <zetashift> I spent a good time just hopping from engine to engine without getting shit done, at a certain point you realize it doesn't matter and you need to get dirty and just code |
02:31:22 | FromDiscord_ | <JGiraffe> Nearly every acronym I've seen today in this server is unknown to me. Such as this SDL2 |
02:31:40 | FromGitter | <zetashift> https://www.libsdl.org |
02:31:55 | FromGitter | <zetashift> and related nim port: https://github.com/nim-lang/sdl2 |
02:33:02 | FromGitter | <zetashift> nim should be added to this list :( https://www.libsdl.org/languages.php |
02:33:42 | FromGitter | <zacharycarter> sdl2 was created by valve |
02:33:50 | FromGitter | <zacharycarter> as was the original sdl |
02:34:36 | FromGitter | <zacharycarter> it's basically a series of libraries that abstracts away differences between operating systems for performing most of the necessary task a game might need |
02:34:48 | FromGitter | <zacharycarter> it also provides an abstraction over OpenGL |
02:34:57 | FromGitter | <zetashift> Was it really created by valve? |
02:34:59 | FromGitter | <zacharycarter> but this abstraction is limited and shouldn't be used for anything that needs serious performance |
02:35:01 | FromGitter | <zacharycarter> yes |
02:35:14 | FromGitter | <zetashift> Thought the dude made 1.x on his own then as 2.0 came about he joined valve? |
02:35:33 | FromDiscord_ | <JGiraffe> So "cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D" is not what all engines do? |
02:35:42 | FromGitter | <zacharycarter> oh maybe |
02:35:57 | FromGitter | <zacharycarter> I just know the maintainers are working for valve / associated with it |
02:36:19 | FromGitter | <zacharycarter> it's quite impressive if the first SDL was a solo job |
02:36:26 | FromGitter | <zacharycarter> that's actually quite crazy / insane haha |
02:36:45 | FromGitter | <zacharycarter> JGiraffe - most engines probalby use SDL or a similar library to some capacity |
02:36:49 | FromGitter | <zetashift> @JGiraffe yes game engines add a little bit more special sauce to it like resource management and asset loading and high level graphics stuff |
02:36:52 | FromGitter | <zacharycarter> or they're basically writing a lot of what SDL2 offers on their own |
02:37:08 | FromGitter | <zetashift> @zacharycarter https://en.wikipedia.org/wiki/Simple_DirectMedia_Layer#History |
02:37:50 | FromGitter | <zacharycarter> thanks for sharing that - pretty awesome / impressive to learn that fact |
02:37:54 | FromGitter | <zetashift> I like how most big things in gamedev history are related to DOOM 1 |
02:38:03 | FromGitter | <zetashift> the original DOOM* |
02:38:40 | FromDiscord_ | <exelotl> I much prefer the 'sdl2_nim' bindings, they're just... a lot more consistent and better documented than the official bindings |
02:38:51 | FromGitter | <zacharycarter> haha yeah |
02:39:09 | FromGitter | <zacharycarter> they are - but I've done fine with the official nim bindings tbh |
02:39:19 | FromGitter | <zacharycarter> i think @krux02 is using the sdl2_nim bindings now htough |
02:39:33 | FromDiscord_ | <JGiraffe> Well my main engine/language requirement is having the least amount of latency possible on even lower-end devices. |
02:39:35 | FromGitter | <zacharycarter> and if you want to use SDL2 / OpenGL - you should listen to that man |
02:39:59 | FromGitter | <zetashift> @JGiraffe can't go wrong with sdl2 then runs on toasters basically |
02:40:03 | FromGitter | <zacharycarter> well without something like godot - you're going to get into the whole cross compiling hell that comes with using a language like Nim |
02:40:11 | FromGitter | <zacharycarter> but I mean - it's doable |
02:40:16 | FromGitter | <zacharycarter> it's just tough to automate |
02:40:25 | FromDiscord_ | <JGiraffe> While having a very pretty 2d game of course |
02:40:32 | FromGitter | <zacharycarter> I don't actually know how much easier Godot makes that |
02:40:40 | FromGitter | <zacharycarter> Unity / UE4 definitely make it easier |
02:40:52 | FromGitter | <zacharycarter> but you can't use Nim with unity and I doubt the UE4 stuff still works |
02:41:13 | FromGitter | <zacharycarter> well - you can use it with unity - you just can't use it as a gameplay code language |
02:41:39 | FromDiscord_ | <JGiraffe> For me free engines > license engines |
02:42:44 | FromGitter | <zetashift> Well pretty 2d all depends on the artist then, since optimizing 2D is mostly considered a solved problem |
02:42:52 | FromDiscord_ | <JGiraffe> Sweet |
02:43:18 | FromGitter | <zetashift> Do you want/need mobile support? |
02:43:22 | FromDiscord_ | <JGiraffe> Even with constantly animated sprites? |
02:43:28 | FromGitter | <zetashift> yes! |
02:43:49 | * | shpx quit (Quit: Textual IRC Client: www.textualapp.com) |
02:44:12 | FromGitter | <zacharycarter> there are also some things Unity is doing that is really separating it's potential from Godot |
02:44:27 | FromGitter | <zacharycarter> Unity's embracing data-oriented design finally |
02:44:41 | FromGitter | <zacharycarter> much like the Stingray guys were doing / pioneering |
02:45:10 | FromGitter | <zacharycarter> if you ask me - Godot is a giant mess, but it's the best option we have right now in terms of being able to write gameplay code with Nim |
02:45:19 | FromGitter | <zacharycarter> if you don't care about using Nim - I'd just go with Unity and C# |
02:45:32 | FromDiscord_ | <JGiraffe> Although I don't need to decide 100% right this moment I'm leaning away from mobile. I feel like not enough of the game would be visible at once on a lot of phones. |
02:45:33 | FromGitter | <zetashift> data-oriented seems to be the new ECS ? Not saying it's bad but hey I feel like people are gonna use it randomly |
02:45:47 | FromGitter | <zacharycarter> data-oriented design isn't new |
02:46:00 | FromGitter | <zacharycarter> again - the stingray guys were doing it a long time ago |
02:46:04 | FromGitter | <zacharycarter> if you want a good talk on it |
02:46:12 | FromDiscord_ | <JGiraffe> Data-oriented as opposed to what? |
02:46:15 | FromGitter | <zetashift> @JGiraffe then you'll be fine with godot-nim and sdl2_nim for your needs |
02:46:24 | FromGitter | <zacharycarter> https://www.youtube.com/watch?v=p65Yt20pw0g |
02:46:38 | FromGitter | <zacharycarter> object oriented |
02:46:42 | FromGitter | <zetashift> @zacharycarter I know the stingray engine and I know it existed for a long time I just ment recently it gotten the buzzz |
02:46:50 | FromGitter | <zacharycarter> oh yes |
02:46:58 | FromGitter | <zetashift> Just like how ML is known so long and recently gotten the buzz |
02:46:59 | FromGitter | <zacharycarter> yes it's now a hot buzz word in game engine programming |
02:47:07 | FromGitter | <zacharycarter> but it also already has been for those in the know haha |
02:47:14 | FromDiscord_ | <JGiraffe> Oh right most popular languages are object oriented if I understand right |
02:47:36 | FromGitter | <zacharycarter> well the languages are OO |
02:47:43 | FromGitter | <zacharycarter> you can accomplish DoD with OO languages |
02:47:46 | FromGitter | <zacharycarter> it's how you write your code |
02:48:03 | FromGitter | <zacharycarter> that talk explains the topic very well |
02:48:14 | FromGitter | <zetashift> @JGiraffe yes and personally it's scary how easy your game design maps to object orientated code, initially... |
02:48:33 | FromGitter | <zacharycarter> yup |
02:49:27 | * | Cthalupa quit (Ping timeout: 240 seconds) |
02:49:56 | FromGitter | <zetashift> @zacharycarter on the note of godot not being great I saw a really nice reddit post that pointed out several flaws of the recent 3D example but still managed to be constructive |
02:50:14 | FromGitter | <zetashift> some related to the renderer which i recall you not being a fan of :P |
02:50:28 | * | Cthalupa joined #nim |
02:50:35 | FromGitter | <zacharycarter> I'm not a fan of a lot of Godot' subsystems |
02:50:44 | FromGitter | <zacharycarter> or its overall codebase |
02:51:10 | FromGitter | <zacharycarter> the developers seem to often use the excuse "we'd like to do this properly, but we aren't willing, so we've settled for this lesser than ideal implementaion" |
02:51:30 | FromGitter | <zacharycarter> https://github.com/dbartolini/crown - example of a well-architected open source DoD engine |
02:51:44 | FromGitter | <zacharycarter> and very clean C++ |
02:53:36 | FromGitter | <zacharycarter> https://github.com/aras-p/dod-playground |
02:53:44 | FromGitter | <zacharycarter> project for learning more abut DoD and ECS |
02:55:53 | FromGitter | <zetashift> I wish stingray wasn't handles by autodesk |
02:56:31 | FromGitter | <zetashift> I've only saw that engine and amethyst so i don't know THAT much about DoD. I will watch that through the week |
02:56:46 | FromDiscord_ | <JGiraffe> By "your game design" did you mean my game or anyone's game? |
02:57:09 | FromGitter | <zetashift> a beginners game design |
02:57:35 | FromDiscord_ | <JGiraffe> Ah ok so the beginner programming mindset is usually object oriented |
02:57:40 | FromGitter | <zetashift> So when someone starts object orientated program works very well but as you progress you get some really tight coupling there |
02:57:53 | FromGitter | <zacharycarter> stingray's dead now |
02:57:58 | FromGitter | <zacharycarter> they're now our machienry |
02:58:08 | FromGitter | <zetashift> I blame autodesk x) |
02:58:16 | FromGitter | <zacharycarter> https://ourmachinery.com/ |
02:58:19 | FromGitter | <zacharycarter> I want to go work for them |
02:58:29 | FromGitter | <zacharycarter> need to do more studying / learning first |
02:58:54 | FromGitter | <zacharycarter> and don't forget - bitsquid was their baby before stingray |
02:58:58 | FromGitter | <zetashift> oh lmao I thought `they're now our machinery` was some prophetic line about abandoned products |
02:59:05 | FromGitter | <zacharycarter> and bitsquid had some amazing code |
02:59:23 | FromDiscord_ | <JGiraffe> So unless an engine states that it supports dod then it probably doesn't I assume |
02:59:28 | FromGitter | <zacharycarter> https://bitbucket.org/bitsquid/foundation |
02:59:37 | FromGitter | <zacharycarter> you won't know |
02:59:47 | FromGitter | <zacharycarter> because DoD needs to be baked into the design / architecture of the engine |
03:00:02 | FromGitter | <zacharycarter> it's not about supporting it at a feature-level - at least that's not the only part |
03:00:18 | FromGitter | <zacharycarter> it's more about how the engine passes data around between subsystems and organizes its data in and out |
03:00:47 | FromGitter | <zacharycarter> that library I just linked was written with focus on DoD principles |
03:01:03 | FromDiscord_ | <JGiraffe> Ok then unless an engine mentions it when explaining it's construction, it isn't a viable way to program |
03:01:09 | FromGitter | <zacharycarter> and it's actually very readable / easy code to reason about |
03:01:27 | FromDiscord_ | <JGiraffe> Ok then unless an engine mentions it when explaining its construction, it isn't a viable way to program |
03:01:32 | FromGitter | <zacharycarter> well - it just seems to be that engines that want to survive are catching on |
03:01:39 | FromGitter | <zacharycarter> for instance - look at the hot rust engine |
03:01:52 | FromGitter | <zacharycarter> https://github.com/amethyst/amethyst |
03:02:26 | FromGitter | <zacharycarter> DoD / eCs has been around for a while - it's just now people are realizing how necessary and important it is |
03:02:26 | FromGitter | <citycide> is it intended that `jsffi.{}` (https://nim-lang.org/docs/jsffi.html#%7B%7D.m%2Ctypedesc%2Cvarargs%5Buntyped%5D) allows fields that aren't defined in its `typ` argument? doesn't seem very type safe unless you wrap it in a proc or something |
03:02:35 | FromGitter | <zetashift> You know I dislike C++ but that foundation lib is cleaaaann |
03:02:56 | FromGitter | <zacharycarter> that's because - https://gist.github.com/bkaradzic/2e39896bc7d8c34e042b |
03:03:10 | FromGitter | <zacharycarter> and the guy that wrote that gist is the author of bgfx |
03:03:13 | FromGitter | <zacharycarter> another fantastic library |
03:03:21 | FromGitter | <zacharycarter> @citycide yes |
03:03:40 | FromGitter | <zacharycarter> I think so anyway |
03:03:57 | FromGitter | <zacharycarter> my understanding is since JS can do that with object declarations, it's a mirror of that feature |
03:04:02 | FromGitter | <citycide> then why bother provided a typedesc at all? |
03:04:16 | FromGitter | <zacharycarter> yeah - traditionally I haven't when using that macro |
03:04:31 | FromGitter | <zacharycarter> but the docs include it |
03:04:32 | FromGitter | <citycide> if it doesn't constrain your object what's the point |
03:04:33 | FromGitter | <zacharycarter> it's a good question tbh |
03:04:44 | FromGitter | <zacharycarter> I feel like that's the idea behind the macro in the first place |
03:04:58 | FromGitter | <zacharycarter> but you're right - having the typedef doesn't make sense in that case |
03:05:06 | FromGitter | <zacharycarter> it's a good question for sure |
03:05:14 | FromGitter | <zetashift> Yeah I saw you were using it in FRAG but I really looked into it when Apple announced OpenGL deprecation |
03:05:15 | FromDiscord_ | <JGiraffe> So a clean library is one without unnecessary ...stuff? |
03:05:16 | FromGitter | <citycide> sure it's great that you can create arbitrary objects because in JS you'll need to but that should be an escape hatch really |
03:05:34 | FromGitter | <zacharycarter> @citycide I agree |
03:05:37 | * | banc quit (Quit: ZNC - http://znc.in) |
03:05:42 | FromGitter | <citycide> if you provide a type it should at the very least constrain the object's field names |
03:05:56 | FromGitter | <zacharycarter> @citycide could you file an issue for this? |
03:06:04 | FromGitter | <zetashift> @JGiraffe gamedev isn't always clean, if you're just beginning I wouldn't sweat the details too much but be aware of the patterns |
03:06:05 | FromGitter | <citycide> sure |
03:06:06 | FromGitter | <zacharycarter> at the very least - it'd give us an answer |
03:06:14 | FromGitter | <zacharycarter> thank you :D |
03:06:38 | FromGitter | <zacharycarter> JGiraffe: http://gameprogrammingpatterns.com/ is a great book to refer to |
03:06:53 | FromGitter | <zacharycarter> and the author is an amazing person |
03:07:00 | FromGitter | <zetashift> How many bgfx nim wrappers are there anyway the bgfx main repo points to a 2017 one, I remember AlexMax used nimgen recently to port it |
03:07:17 | FromGitter | <zacharycarter> maybe I should look up AlexMax's repo then |
03:07:33 | FromGitter | <zacharycarter> well the first guy that made one - I wasn't too in love with that dude |
03:07:42 | FromGitter | <zacharycarter> his bindings never worked fully in the first place |
03:07:57 | FromGitter | <zacharycarter> and he wasn't willing to figure out the issues with them - and he was also asking for donations / money |
03:08:07 | FromGitter | <zacharycarter> so I wrote some against the C API BGFX exposes |
03:08:10 | FromDiscord_ | <exelotl> yeah that book is fantastic, but it's not exactly for people who are new to programming |
03:08:15 | FromGitter | <zacharycarter> which actually worked and I built frag on top of |
03:08:45 | FromGitter | <zacharycarter> but if AlexMax has working bindings to BGFX using Nimgen - I'll forego working on mine and just use his |
03:08:58 | FromGitter | <zacharycarter> just need to find them now :) |
03:09:46 | FromDiscord_ | <JGiraffe> I would like to know what type safe and wrapping in a proc means. |
03:10:19 | FromDiscord_ | <JGiraffe> I think type safe refers to avoiding errors |
03:12:24 | FromDiscord_ | <exelotl> type safe is usually referring to how you can't do things like `var x:int = 1.5` because the type system knows that x is an int and 1.5 is a float |
03:12:30 | FromGitter | <zetashift> @JGiraffe you know how Nim has types? It basically means making your data into a type so when you deal with it you can deal with it predictably |
03:15:05 | FromGitter | <zetashift> can't seem to find the bgfx binding either I clearly remember shashlick/genotrance and alexmax talking about it |
03:15:10 | * | dddddd quit (Remote host closed the connection) |
03:15:24 | FromGitter | <zetashift> well it's 04:15 morning here I need to sleep badly gnight y'all |
03:15:49 | FromDiscord_ | <exelotl> oh yeah same lol |
03:16:47 | FromGitter | <zacharycarter> maybe it was the nuklear bindings? |
03:17:02 | FromGitter | <zacharycarter> that's another hot library that has too many bindings :P |
03:17:16 | FromGitter | <zacharycarter> night! |
03:18:10 | * | wildlander quit (Quit: Konversation terminated!) |
03:20:46 | * | ircuser joined #nim |
03:21:23 | * | nc-x joined #nim |
03:22:08 | * | ircuser50 joined #nim |
03:22:12 | * | ircuser50 left #nim (#nim) |
03:22:29 | * | ircuser quit (Client Quit) |
03:23:06 | FromGitter | <zetashift> @zacharycarter oh yea that might be very well possible sorry! |
03:23:50 | FromGitter | <citycide> @JGiraffe by wrapping in a proc I meant creating a proc (function) to simply construct an object |
03:24:04 | nc-x | shashlick: Araq: regarding c2nim issue, maybe revert the commit https://github.com/nim-lang/c2nim/commit/be3e8b9ab81c25cc0cb10b1ae117da57f71560e3 and reopen the issue? Or open new issue for the typedef struct issue. I have my exams going on so I can't give it a look atm. |
03:25:00 | * | banc joined #nim |
03:25:37 | * | V-X quit (Remote host closed the connection) |
03:25:51 | * | V-X joined #nim |
03:32:38 | FromGitter | <zacharycarter> np |
03:33:17 | * | nc-x quit (Ping timeout: 256 seconds) |
03:37:52 | shashlick | No worries nc-x |
03:38:27 | shashlick | I'm unsure if it is a c2nim issue or a Nim issue |
03:39:19 | shashlick | @zacharycarter: AlexMax worked on nimnuklear with me |
03:39:54 | shashlick | Cause the existing one was quite old I was told |
03:47:11 | FromGitter | <zacharycarter> it is |
03:47:25 | FromGitter | <zacharycarter> I'm just not sure if nimnuklear is working / right yet either |
03:47:43 | FromGitter | <zacharycarter> going to go to sleep - but when I have time I can help with nim nuklear |
03:47:58 | FromGitter | <zacharycarter> although I'd also like to see us have proper support for Dear IMGUI |
03:48:07 | FromGitter | <zacharycarter> seems to be a much more used library / much easier to find examples for |
03:48:16 | FromGitter | <zacharycarter> anyway night all |
03:54:58 | shashlick | Cool talk to you later |
04:10:45 | FromGitter | <citycide> oh ok so `jsffi.{}` *does* type check but its error message, while true, isn't *great* if you provide a field that isn't declared on the object, ie: `Error: type mismatch: got <Foo, string, bool>` where the middle type is always `string` for undeclared fields and the third is the type you've provided as a value |
04:21:08 | * | vlad1777d joined #nim |
04:44:16 | * | skunkz quit (Quit: WeeChat 2.2) |
04:47:49 | * | king3vbo joined #nim |
05:09:44 | * | shpx joined #nim |
05:21:30 | * | V-X quit (Remote host closed the connection) |
05:21:55 | * | V-X joined #nim |
05:47:46 | * | leorize quit (Ping timeout: 260 seconds) |
05:48:11 | * | leorize joined #nim |
05:48:27 | * | shpx quit (Ping timeout: 240 seconds) |
06:14:49 | * | cavariux quit (Ping timeout: 268 seconds) |
06:15:22 | * | cavariux joined #nim |
06:34:22 | * | narimiran joined #nim |
06:58:26 | * | kapil____ joined #nim |
06:59:22 | * | mech422_ joined #nim |
07:02:55 | * | mech422__ quit (Ping timeout: 268 seconds) |
07:08:10 | * | Trustable joined #nim |
07:08:27 | * | ftsf joined #nim |
07:48:20 | * | nsf joined #nim |
08:12:22 | * | nsf quit (Quit: WeeChat 2.3) |
08:41:23 | * | Trustable quit (Remote host closed the connection) |
08:42:25 | shashlick | using `quote do:` to add pragmas doesn't work |
08:43:09 | shashlick | prints garbage for backtick values |
08:43:44 | narimiran | shashlick: can you share a minimal example? |
08:44:24 | * | leorize quit (Quit: WeeChat 2.2) |
08:49:34 | * | leorize joined #nim |
08:52:09 | * | Yardanico_ joined #nim |
08:52:48 | * | Yardanico quit (Quit: Free ZNC Powered by LunarBNC) |
08:53:12 | * | Yardanico_ quit (Client Quit) |
08:53:22 | * | Yardanico joined #nim |
08:53:24 | * | Yardanico is now known as Yardanico_ |
08:53:33 | * | Yardanico_ is now known as Yardanico |
08:53:39 | * | Yardanico quit (Client Quit) |
08:53:46 | * | Yardanico joined #nim |
08:54:21 | * | Yardanico quit (Client Quit) |
08:54:36 | * | Yardanico joined #nim |
08:55:24 | * | Yardanico quit (Client Quit) |
08:55:51 | * | Yardanico joined #nim |
08:57:42 | * | stefanos82 joined #nim |
09:23:03 | FromGitter | <alehander42> possible, you probably need to construct it manually |
09:30:01 | * | nsf joined #nim |
10:15:34 | Araq | yay, a cyclic tree was produced somewhere |
10:18:39 | * | nc-x joined #nim |
10:21:41 | nc-x | narimiran: regarding https://github.com/nim-lang/Nim/issues/3119, I don't remember any commits related to this. Maybe in the 3 years since the bug was opened html of http://lib.haxe.org/all changed. AFAIK bug is not fixed and htmlparser still does not use HTML5 parsing algorithm (https://github.com/nim-lang/Nim/issues/3119#issuecomment-122092741) |
10:22:29 | * | nc-x quit (Client Quit) |
10:23:46 | * | echotangoecho joined #nim |
10:24:59 | narimiran | nc-x: well, i cannot reproduce the issue with the code posted. if you can make an example which fails, that would be helpful |
10:30:23 | * | gangstacat quit (Quit: Ĝis!) |
10:32:15 | * | nograve joined #nim |
10:36:06 | * | nograve quit (Client Quit) |
10:36:22 | * | nograve joined #nim |
10:37:37 | * | nc-x joined #nim |
10:50:22 | * | nsf quit (Quit: WeeChat 2.3) |
10:52:19 | nc-x | I had a project which had similar html parsing issues. But well, I get `Error: unhandled exception: Connection was closed before full request has been made [ProtocolError]` before I could reach the parsing stage. I am on linux right now. Will try on Windows later. |
10:53:11 | nc-x | Or maybe I should just save the page as html and try on it. |
10:54:50 | narimiran | i'm on linux too, so if you can make a short reproducible example, please post it |
11:04:21 | * | nc-x quit (Ping timeout: 256 seconds) |
11:16:05 | FromDiscord_ | <PusiteGA> is there some proc for converting sec to DateTime or am i blind |
11:17:12 | sendell[m] | the manual is contradictory about the ".this" pragma. First "The .this pragma is deprecated and should not be used anymore." and then "{.this: self.} will become the default directive for the whole language eventually." |
11:18:23 | narimiran | @PusiteGA times.nim is not of help to you? |
11:24:24 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
11:27:34 | * | kapil____ quit (Quit: Connection closed for inactivity) |
11:28:39 | FromDiscord_ | <PusiteGA> was blind but started line by line and i found it |
11:39:53 | Araq | sendell[m]: true, the deprecation is the truth |
11:42:36 | * | Snircle joined #nim |
11:45:52 | narimiran | i'll fix it (delete the wrong claim) |
11:50:15 | sendell[m] | @ara |
11:50:32 | sendell[m] | Araq: thx, what was the issue with it? :) |
11:54:48 | narimiran | sendell[m]: pushed the fix, but it won't be 'public' until the next Nim version is published |
11:55:42 | sendell[m] | good :) |
11:57:58 | FromDiscord_ | <PusiteGA> hmm am i retarded or whats, in Nim there is % operator right? |
11:58:17 | * | echotangoecho quit (Quit: leaving) |
11:58:21 | FromDiscord_ | <PusiteGA> if (yr % 4==0): undeclared identifier: '%' WTF |
11:58:25 | narimiran | @PusiteGA yes :D :D |
11:58:55 | narimiran | if you want a modulo, you use `if (yr mod 4 == 0)` |
11:59:17 | FromDiscord_ | <PusiteGA> oh so cant use % iin if or at all? |
12:00:19 | narimiran | nope |
12:06:45 | * | nsf joined #nim |
12:24:37 | Yardanico | @PusiteGA it might seem at the start that nim is a lot like python, but in reality it's not ;) |
12:26:56 | * | gangstacat joined #nim |
12:30:30 | FromDiscord_ | <PusiteGA> i come from c# not python, anywya does return terminate fuction and sends result or did i live in ilusion whole time |
12:30:43 | narimiran | i does |
12:30:50 | narimiran | *it |
12:31:16 | FromDiscord_ | <PusiteGA> oh my bad logic mistake i thikend for sec WTF |
12:37:57 | * | Vladar joined #nim |
12:40:08 | * | kungtotte quit (Quit: WeeChat 2.3) |
12:41:58 | FromDiscord_ | <PusiteGA> is there a simpler way to check if string contains letter expet letter at pos 5, atm i am doubling string then owerwriting letter like string[5]='?' and then check agains that new string |
12:42:29 | FromDiscord_ | <PusiteGA> is there some substring proc that will return me string just whitout char at pos5 |
12:42:46 | narimiran | let a = "my string"; echo 'y' in a |
12:46:15 | narimiran | string without some character: http://ix.io/1skq/ |
12:46:45 | narimiran | replace 'z' with something that is in `a`, and it will work like you want |
12:52:04 | * | nograve quit (Read error: Connection reset by peer) |
12:53:53 | * | kapil____ joined #nim |
12:55:26 | FromDiscord_ | <PusiteGA> am allready replacing, just thinked if there was some less code option |
12:55:27 | FromDiscord_ | <PusiteGA> https://pastebin.com/6meRwBGw |
13:00:50 | narimiran | "An isogram (also known as a "nonpattern word") is a logological term for a word or phrase without a repeating letter" |
13:01:07 | narimiran | what data structure doesn't have repeating members? |
13:01:56 | narimiran | if you know the answer to this, you'll know how to solve your task |
13:07:17 | * | theelous3 joined #nim |
13:13:14 | sendell[m] | is there a way to enforce a seq to be indexed using a distinct int type ? |
13:13:46 | Araq | via a distinct seq type and a custom indexing operator |
13:14:03 | sendell[m] | oh nice, will try that thx |
13:14:51 | sendell[m] | but then will I have to borrow everything else? |
13:15:11 | sendell[m] | I guess so |
13:18:37 | Araq | seems like it, you can also try |
13:19:04 | Araq | proc `[]`(s: MaSeq; i: int) {.error.} |
13:19:43 | Araq | template `[]`(s: MaSeq; i: MaIndex): untyped = system.`[]`(s, int(i)) |
13:34:27 | FromDiscord_ | <PusiteGA> narimiran , my solution works, but i guess if i know what data structure its is i can try to convert to it and if that fails then it not isogram too |
13:35:35 | narimiran | yup |
13:36:27 | narimiran | well, what you basically need to do is check if the length of your string is the same as the length of a <something> which has only unique letters from your string |
13:36:52 | narimiran | oneliner solution ;) |
13:40:08 | narimiran | @PusiteGA is that by any chance advent of code 2017, day 4? :) |
13:41:03 | FromGitter | <Varriount> @Araq Is there any documentation on the `lent`? |
13:42:26 | Araq | might be covered by my destructors RFC but here is what it is: |
13:43:06 | Araq | only valid as routine's return type it creates a readonly view into the data |
13:43:20 | Araq | avoiding a copy of the data |
13:43:48 | FromGitter | <Varriount> Nice |
13:44:12 | Araq | like 'sink' it's an optimizing annotation. |
13:46:11 | * | ftsf quit (Ping timeout: 244 seconds) |
13:46:31 | FromDiscord_ | <PusiteGA> narimiran am doing exercism.io duno from where they got those questions |
13:48:46 | FromDiscord_ | <PusiteGA> i guess i can check distinct tought would need to find that |
13:49:26 | FromGitter | <Varriount> Araq: I'm curious - is there any technical reason why var/let/sink couldn't be inferred through static analysis? |
13:49:49 | * | omniphage quit (Ping timeout: 256 seconds) |
13:49:51 | FromGitter | <Varriount> What I mean is, is it theoretically possible? |
13:51:20 | Araq | yeah but inter-procedural analysis makes "experts" nervous |
13:53:25 | Araq | there is also a nice cheap way to do it by relying on Nim's idioms (every [] getter returns a 'lent T', every constructor takes 'sink T' parameters) |
13:54:22 | Araq | but first these features need to become stable before we add sugar for them |
13:56:08 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
13:58:58 | * | vlad1777d quit (Ping timeout: 246 seconds) |
13:59:47 | FromDiscord_ | <PusiteGA> narmiran i found deduplicated but issue is i am allowed to have duplcate '-' , ' ' so guess will keep my solution |
14:01:45 | FromDiscord_ | <PusiteGA> hmm just checked community, let letters = toSeq(s.toLower.runes).filter(isAlpha) , frogot i could filter it 😦 |
14:02:10 | FromDiscord_ | <PusiteGA> but anyway i like this exercises they spoon learn me xD |
14:02:25 | narimiran | ok, i guess i should say it out loud: use sets ;) |
14:04:21 | Araq | bbl |
14:11:39 | FromDiscord_ | <PusiteGA> hmm, i allready submited my exercise but will check sets too |
14:24:15 | FromGitter | <alehander42> Araq, I decided to use my own minilang for pseudo instead of subset of nim after all, it just gives me more freedom(and field to learn/experiment) |
14:28:15 | FromGitter | <alehander42> but I'll try to at least make a simple nim parser generator for it (I couldn't find any which is weird) |
14:29:07 | FromGitter | <gogolxdong> that nimble issue need NIMBLE_DIR environment |
15:14:28 | FromGitter | <yyyc514> Any idea where I might find an example of answering a reqeust in one thread and then passing it off to another thread for processing? |
15:14:44 | FromGitter | <yyyc514> is that even possible? |
15:15:19 | leorize | in theory, yes |
15:15:31 | FromGitter | <yyyc514> i just need to send the socket variable between threads? |
15:15:36 | * | dddddd joined #nim |
15:16:11 | leorize | try it |
15:16:33 | FromGitter | <yyyc514> using a Channel the fast/clean way to hand off the socket? |
15:18:21 | leorize | aren't socket just some number? |
15:18:29 | leorize | you can just pass it normally I think |
15:18:56 | * | NimBot joined #nim |
15:20:07 | FromGitter | <yyyc514> oh no idea |
15:20:24 | FromGitter | <yyyc514> need to play around with the async/await stuff a lot more |
15:21:39 | dom96 | Are you sure you need threads? |
15:21:57 | FromGitter | <yyyc514> No, but i want them at some point :) |
15:22:20 | FromGitter | <yyyc514> too many CPUs |
15:22:32 | FromGitter | <Varriount> Araq: Are the optimizations for `lent` return types implemented? Could I get string views from them? |
15:25:14 | * | a_chou joined #nim |
15:25:51 | * | a_chou quit (Client Quit) |
15:26:17 | * | a_chou joined #nim |
15:28:30 | * | a_chou quit (Client Quit) |
15:28:57 | * | a_chou joined #nim |
15:29:27 | * | a_chou quit (Client Quit) |
15:29:52 | * | a_chou joined #nim |
15:30:50 | * | nsf quit (Quit: WeeChat 2.3) |
15:39:40 | narimiran | @yyyc514: what dom96 said ;) |
15:40:06 | narimiran | async-await and threads serve different purposes |
15:42:39 | FromGitter | <yyyc514> I know :) |
15:42:51 | FromGitter | <yyyc514> I'm just spoiled by Elixir |
15:43:15 | FromGitter | <yyyc514> Trying to think of the best way to deal with lots of websockets |
15:43:46 | FromGitter | <yyyc514> i was going to have the websockets in a sep thread from the main webserver though |
15:44:51 | narimiran | when you make it work, post it somewhere and/or write an article about it. i think this is a common question |
15:49:06 | * | a_chou quit (Ping timeout: 264 seconds) |
15:58:46 | * | wildlander joined #nim |
16:11:43 | * | Sembei joined #nim |
16:13:46 | FromGitter | <zacharycarter> is there any way to get the discord OT channel linked up with the twitch one? |
16:15:06 | FromGitter | <zacharycarter> @yyyc514 if you don't need Nim's default GC implementation - working with threads becomes a bit easier |
16:17:11 | FromGitter | <zacharycarter> this is a good thread on Nim's memory model as it pertains to multiple threads - https://forum.nim-lang.org/t/4369 |
16:26:06 | * | Trustable joined #nim |
16:37:17 | dom96 | https://forum.nim-lang.org/t/4388 |
16:37:53 | FromDiscord_ | <Zachary Carter> please no |
16:38:04 | FromDiscord_ | <Zachary Carter> but I will reply to the thread with thoughts when I have them organized better |
16:38:38 | FromDiscord_ | <Zachary Carter> people wince regarding it before having used Nim - and then later come to appreciate it |
16:39:17 | FromDiscord_ | <Zachary Carter> I think the real question is - has it ever caused anyone any issues? |
16:40:20 | narimiran | dom96: wow! the biggest nim change since.... well, i don't know when :) |
16:41:29 | narimiran | should style insensitivity be kept behind some pragma? (for backward compatibility) |
16:42:00 | leorize | style insensitivity is awesome to me... |
16:45:55 | FromGitter | <Vindaar> Imo style insensitivity won't be the reason why Nim will or won't become a very popular programming language. I love it, hence I'm against removing it. |
16:49:30 | FromGitter | <zetashift> Added my response, I don't really post on the forum, but it might be nice for future references when people look at the debate and see some discussion about it |
16:50:22 | narimiran | btw dom96, have in mind that the opinions will be biased — people who are/were repulsed by insensitivity don't use nim and you won't be hearing their opinions |
16:53:39 | FromGitter | <alehander42> the problem is that people don't get that it improves consistency , as it's mostly for normalizing naming of imported code |
16:54:21 | leorize | people worries about co-operation, when muliple authors are concerned and they break the rules |
16:54:26 | leorize | I never see it as a problem |
16:54:32 | leorize | but people bring it up all the time |
16:54:39 | dom96 | narimiran: yeah, I know. I was going to create a binding vote straight off but Araq didn't allow me :( |
16:54:52 | dom96 | So we have a vote for a vote |
16:55:02 | FromGitter | <alehander42> maybe if we have a good formatter, it would be easier to say "if you use the formatter your code is exactly as consistent as normal langs" |
16:55:20 | FromGitter | <alehander42> the problem is, it isn't easy to explain the feature in 3-4 words |
16:55:33 | FromGitter | <alehander42> so most people will just ignore a complicated reasoning |
16:55:42 | dom96 | I used to not care, but speaking with people about it makes me feel silly to be a proponent of it in most cases |
16:57:22 | dom96 | I think I would prefer to go to the case sensitivity extreme: enforce a convention |
16:57:52 | dom96 | than to have this mish-mash of: first letter is case sensitive, but then the rest is case insensitive *and* underscore insensitive |
16:58:25 | FromGitter | <zetashift> isn't case insensitivity also really handy for lib bindings? |
16:58:55 | FromGitter | <alehander42> well, that sounds scary, but it's simply ⏎ ⏎ non-type names start with a small letter + ⏎ snake_case <=> camelCase for them [https://gitter.im/nim-lang/Nim?at=5bf19a4f80652945c3807d4f] |
16:59:14 | FromGitter | <alehander42> does somebody use _ for types |
16:59:51 | FromGitter | <zetashift> you mean a type that starts with an underscore? Never seen that in my whole life |
16:59:59 | FromGitter | <zetashift> just some weird getter/setter stuff in C# |
17:00:59 | FromGitter | <yyyc514> i think the issue with async/await is it can't be waiting two things, right? I need the websocket to be waiting for input from the client but also be waiting for messages from another thread... I guess you could do that with polling each periodically but not sure there is a way to wait [this or that] ? |
17:01:36 | FromGitter | <barcharcraz> Case insensitivity has also been used in a TON of languages with few problems. I think even ada is case insensitive |
17:02:21 | FromGitter | <alehander42> no, a T_U.. type |
17:02:44 | FromGitter | <yyyc514> i need to write an example and see what code the comiler actually generates for await... that might help |
17:02:59 | FromGitter | <yyyc514> the async stuff is all pure Nim right, no magic? it's just rewriting things into callbacks? |
17:03:23 | leorize | yea |
17:03:33 | leorize | look at the asyncmacros module |
17:03:41 | FromGitter | <yyyc514> yeah i have :) it hurts my eyes lol |
17:04:16 | shashlick | In my opinion having a convention and insensitivity is weird |
17:04:43 | leorize | yyyc514: try debugging with a debugger |
17:04:55 | leorize | you'll have better luck with `echo` statements :P |
17:04:56 | shashlick | Insensitivity means user gets flexibility to exercise their preferences |
17:05:14 | shashlick | But then you get feedback that you don't adhere with nep1 |
17:06:00 | FromGitter | <yyyc514> channels aren't really intended for use with async are they?you'd have to use isready witih sleep or something, yes? |
17:06:16 | FromGitter | <yyyc514> I dont' see any Channel that returns a Future |
17:06:41 | leorize | Channel are designed for threads |
17:07:12 | FromGitter | <yyyc514> well i mean if i have a thread doing async/await stuff and i try to send something to it on a channel... |
17:07:26 | FromGitter | <yyyc514> `recv` says it blocks |
17:07:58 | leorize | the entire point of channels is to block :P |
17:08:03 | FromGitter | <yyyc514> i guess i could look into the implimentation of runForever ? |
17:08:07 | leorize | think of them as pipes in Unix |
17:08:22 | leorize | you can, it's only 3 lines IIRC |
17:08:39 | FromGitter | <alehander42> @dom96 I don't know, many languages makes such very unusual choises: go fights of people wanting generics for 10 years, python does 1-expression lambdas only, java wants you to use only one class in a file etc |
17:08:50 | FromGitter | <yyyc514> while true: poll() |
17:09:55 | shashlick | I like Nim's flexibility but it would be nice to go all the way - not care about tabs or allow picking both, allowing code with {} |
17:10:34 | shashlick | That way an organization can decide their convention instead of Nim forcing it on you |
17:10:41 | shashlick | Than |
17:11:22 | leorize | I'm surprised that people yell about style insensitivity when Nim has 3 different ways to call a function |
17:11:34 | FromGitter | <yyyc514> hmmmm, where is `poll`? |
17:11:40 | leorize | I know it's reasonable, but people don't |
17:11:52 | leorize | yyyc514: in some async stuff |
17:12:16 | FromGitter | <yyyc514> oh now i found it not sure why i failed the first time |
17:13:05 | dom96 | yyyc514: await thisFut or thatFut # Is possible |
17:13:53 | dom96 | yyyc514: yes, async is just a macro rewriting a procedure into an iterator |
17:14:38 | dom96 | You don't need channels for async |
17:14:51 | dom96 | you can just share memory |
17:15:31 | dom96 | shashlick: Personally I always get annoyed when library's don't follow conventions |
17:15:43 | dom96 | if Nim allows and encourages people to choose between {} and indentation that would be my nightmare |
17:16:56 | FromGitter | <yyyc514> @dom96: Yeah I know for pure async you don't need channels. I'm trying to figure out how to mix async and threads in a way that makes sense |
17:19:39 | narimiran | @yyyc514 here's a recent issue where it is shown that threads leak memory: https://github.com/nim-lang/Nim/issues/9716 |
17:20:22 | FromDiscord_ | <exelotl> I wonder how much overlap there is between people who avoid Nim because it's style insensitive, and people who avoid Lua because arrays start from 1 |
17:22:57 | FromGitter | <yyyc514> narimiran: Thanks though I presume if it's truly a Nim bug eventually it will be resolved :) |
17:23:17 | FromGitter | <zacharycarter> I think we should just better explain why style insensitivity exists in the language in the first place |
17:23:22 | FromGitter | <zacharycarter> and provide some examples of how it can be beneficial |
17:23:52 | narimiran | @yyc514 eventually :) |
17:24:01 | FromGitter | <zacharycarter> you're obviously never going to convert everyone - but if you can at least explain the rationale behind the design decision |
17:24:20 | narimiran | but other than the bug, maybe you can get the idea from there how to use async in your case |
17:24:28 | FromGitter | <zacharycarter> people will probably be less likely to just throw their nose up in the air and relegate you to the dumpster |
17:26:27 | shashlick | dom96: but that's exactly what style insensitivity was added for right |
17:26:41 | shashlick | To live and let live so to speak |
17:27:13 | shashlick | You get these glimpses of non opinion |
17:27:13 | dom96 | Perhaps. Araq only knows. |
17:27:16 | * | a_chou joined #nim |
17:27:27 | dom96 | There is still a convention though |
17:27:32 | dom96 | And you're expected to stick to it |
17:27:56 | dom96 | I believe Araq's dream was to allow people to render the Nim code in whatever convention they wish |
17:28:01 | dom96 | but style insensitivity isn't necessary for this |
17:28:08 | Araq | it is |
17:28:23 | Araq | you cannot render foo_bar as fooBar if fooBar is different from foo_bar |
17:28:35 | shashlick | Why waste time discussing this when you can have flexibility and mic drop :) |
17:28:56 | dom96 | shashlick: Because it stops real people from adopting Nim |
17:29:18 | shashlick | Well it took me some time but I got it |
17:29:31 | dom96 | Araq: That's a valid point. But if you've got foo_bar and fooBar in the same program then you've got a problem anyway. |
17:29:36 | shashlick | Nim as a project can pick its own convention |
17:29:49 | shashlick | But then consumers can do what they want |
17:30:10 | Araq | and yeah, I still want editors that shows 'end if' or {}, there is no reason these important little things require the switching of the fullblown programming language |
17:31:08 | dom96 | Araq: The language doesn't need to have support for it for editors to support it |
17:31:54 | * | PMunch joined #nim |
17:32:51 | PMunch | Who stops using Nim because of style insensitivity? It's great! So good to be able to keep my source code all in one style |
17:32:56 | shashlick | Araq I'm exaggerating |
17:33:27 | shashlick | But it's an interesting idea since such things are mostly argued about due to personal preferences |
17:33:40 | Araq | well you asked for a reason, I gave you a reason |
17:33:46 | PMunch | Being style sensitive is all fine and dandy on paper, but people prefer their own style and you'll just end up with every project being a style mismatch |
17:33:46 | shashlick | Which cannot but overcome by rationale |
17:33:58 | * | a_chou quit (Quit: a_chou) |
17:34:20 | shashlick | PMunch: but that's fine - how does it affect you when you can use the project in your style |
17:34:45 | dom96 | I can't though. Because the first letter is case sensitive |
17:34:50 | shashlick | Each project can and does pick its own style across the board |
17:35:03 | PMunch | Yeah that's my point, style insensitivity is great because I can type it however I like |
17:35:13 | dom96 | So if someone decides to name their types with a lower case letter I am forced to follow :/ |
17:35:19 | PMunch | @dom96, yeah that's true |
17:35:23 | dom96 | Which is what someone did recently for their wxWidget's wrapper |
17:35:34 | * | voice_ftp quit (Read error: Connection reset by peer) |
17:35:42 | PMunch | Ah.. |
17:35:48 | dom96 | It just feels like a bit of a mess |
17:35:57 | shashlick | That's then a Nim limitation of the insensitivity ideal |
17:36:09 | PMunch | It's better than not having it imho |
17:36:24 | dom96 | It started out fine, but grown with workarounds and I cannot tell people with a straight face that it's a great feature |
17:37:06 | shashlick | So is that the only limitation? Can it be removed? |
17:37:12 | PMunch | Well there is only the first letter that's a workaround isn't it? |
17:37:22 | shashlick | First letter? |
17:37:30 | narimiran | dom96: " if someone decides to name their types with a lower case letter I am ..." ...allowed to tell them to burn in hell |
17:37:31 | Araq | I still like it better than the alternatives and we cannot change the language for every bad thing somebody does with it |
17:38:00 | PMunch | shashlick, removing it would break a lot of older code I think.. |
17:38:14 | shashlick | No I mean removing the first letter limitation |
17:38:25 | narimiran | type names with lower first letter is monstrosity |
17:38:43 | PMunch | narimiran, agreed |
17:39:19 | PMunch | Oh well, I have to go |
17:39:24 | * | PMunch quit (Quit: Bye) |
17:39:41 | narimiran | you can have it your way if you want to use ALL_CAPS or not for constants, but there should be no discussion about type names. |
17:40:07 | narimiran | if you want to change "sensitivity" of nim, then make it illegal to have a type with lower first letter |
17:40:09 | dom96 | PMunch: narimiran: please tell this person to change their mind then: https://forum.nim-lang.org/t/4374#27242 |
17:40:36 | narimiran | dom96: i know that thread and person even before i click on the link ;) |
17:40:45 | dom96 | :D |
17:41:33 | * | ng0 quit (Quit: WeeChat 1.6) |
17:41:37 | Araq | Python is growing, whenever Python comes up somebody brings up "boo! significant whitespace sux because it's different", people don't care and use Python anyway because it has the libraries |
17:42:18 | Araq | to grow Nim we need to keep adding good libs and ensure these libs continue to work |
17:42:29 | narimiran | significant whitespace sucks for mindless copy-pasters |
17:42:33 | Araq | which implies language stability. |
17:42:54 | narimiran | the rest of us really don't mind (and some of us prefer it) |
17:43:13 | narimiran | agreed for libs, and i'll add to that: good documentation all over |
17:44:43 | narimiran | btw, dom96, before adding a package to nimble, check that it has informative readme? |
17:45:10 | narimiran | i know it is more work, but it might increase the quality of the packages |
17:45:44 | FromGitter | <zacharycarter> well - good libraries and libraries that continue working tends to come with adoption |
17:46:06 | FromGitter | <zacharycarter> if seemingly no one is using the library - it's much easier for it to be abandoned |
17:46:11 | FromGitter | <zacharycarter> it's a chicken-egg scenario |
17:46:51 | FromGitter | <zacharycarter> I don't know if this is possible - but it'd be neat to require that libraries added to nimble support some form of CI |
17:46:58 | dom96 | I think we just need some good metrics for package quality |
17:47:05 | FromGitter | <zacharycarter> and then if those libraries fail tests for a certain length of time |
17:47:08 | dom96 | We have very few people adding package |
17:47:11 | FromGitter | <zacharycarter> they are kicked out of nimble |
17:47:13 | dom96 | refusing them would be counter productive to adoption |
17:47:21 | Araq | that is true, but you don't get adoption by "today we changed how identifiers work" and "tomorrow we added a new way how to write lambdas" |
17:47:28 | FromGitter | <zacharycarter> yes I agree |
17:47:34 | FromGitter | <zacharycarter> we need to stop being subject to feature creep as well |
17:47:34 | * | kapil____ quit (Quit: Connection closed for inactivity) |
17:47:40 | * | ng0 joined #nim |
17:47:44 | FromGitter | <zacharycarter> let what we have stabilize and then start adding more |
17:48:18 | FromGitter | <zacharycarter> IMO - the beauty of Nim - is it's small simple core, but we haven't given that time to mature before we want to extend things in every imaginable way possible |
17:48:48 | narimiran | dom96: commenting on their PR with "please add an informative readme (with example(s) how to use your package) before we can merge this" is not a rejection |
17:48:58 | FromGitter | <zacharycarter> it leads to language churn as well as user churn |
17:49:07 | FromGitter | <zacharycarter> users have to adapt to new features / implementations constantly |
17:49:19 | FromGitter | <zacharycarter> and the language has to as well |
17:49:31 | dom96 | narimiran: Sure. We can do that. If we could make this automatic that would be ideal |
17:49:38 | FromGitter | <zacharycarter> I think that we should get into 1.0 what is absolutely necessary for the language to stay competitive |
17:49:49 | FromGitter | <zacharycarter> that's destructors and ownership |
17:50:05 | FromGitter | <zacharycarter> beyond that IMO - most things can wait |
17:50:40 | narimiran | dom96: well, we can have a template for PRs, just like we have now for issues in Nim repo, where we can list what steps are needed before submitting a PR? |
17:51:13 | dom96 | Sure, anything that helps people |
17:51:20 | dom96 | Keep in mind though that most newbies use `nimble publish` |
17:51:28 | FromGitter | <yyyc514> Anyone have an exampel of using asyncdispatch#addEvent ? |
17:51:46 | narimiran | dom96: ok, i'll work on it (if you don't have time) |
17:53:03 | narimiran | oh, i didn't know about `nimble publish`, i've been using the manual way |
17:55:39 | FromGitter | <zacharycarter> this is neat - https://twitter.com/paniq/status/1064214278364938241 |
17:56:50 | dom96 | narimiran: Please do. I have very little time these days :( |
17:57:05 | FromGitter | <yglukhov> @dom96 @PMunch @narimian please leave styling alone :) |
17:57:40 | narimiran | dom96: yeah, i've seen when you mentioned on the forum (and people started to worry :)). will the situation ever change or this is now your adult life? :) |
17:57:58 | FromGitter | <alehander42> @zacharycarter ha smart |
17:57:59 | xace | zacharycarter: are you going to make a lib of it? |
17:58:34 | FromGitter | <zacharycarter> would seem simple enough to do |
17:58:37 | dom96 | narimiran: Might change a bit. I'm still setting up my study in my new home. But unless I quit my full-time job it'll mostly be like this :) |
17:58:50 | FromGitter | <zacharycarter> the guy that authored that tweet is the guy that is building - https://bitbucket.org/duangle/scopes/wiki/Home |
17:58:56 | dom96 | yglukhov: Die hard style insensitivity fan? :) |
17:59:33 | Araq | yglukhov: how did you fix https://github.com/nim-lang/Nim/issues/9694 ? |
17:59:55 | Araq | it confuses the heck out of me... |
18:02:47 | shashlick | Araq, narimiran, alehander42: issue with `quote do:` I mentioned earlier |
18:02:55 | shashlick | http://ix.io/1smc |
18:03:30 | FromGitter | <yglukhov> @dom96: Die hard about improving smth and not arbitrarily changing something that does work good already. |
18:03:43 | shashlick | output: ``` |
18:03:44 | shashlick | type |
18:03:45 | shashlick | ABC {.importc: 3.} = object |
18:03:46 | shashlick | ``` |
18:04:04 | shashlick | you get a 3 for some reason instead of "struct ABC" |
18:06:59 | FromGitter | <yglukhov> Araq: maybe I should have separated it into a dedicated `of nkObjConstr` branch. But the idea is trivial. in nkExprColonExpr nodes (`ident: value`) we want to split only the `value`, so the result is `ident: expressionPart(value)` |
18:07:11 | dom96 | yglukhov: Whether it works well is up for debate, from the perspective of Nim adoption at least. In a tech sense it might be sound, but that doesn't change the fact that it dissuades people from adopting Nim. What I think we need to discuss is to what extent it discourages users. |
18:08:44 | narimiran | dom96: i'm sure "not yet 1.0" is more discouraging than case insensitivity or any other thing |
18:09:11 | narimiran | i know "it is just a number", but general population doesn't think so |
18:10:24 | * | nsf joined #nim |
18:10:26 | dom96 | Of course it is |
18:10:41 | dom96 | But that's not a question of "if", but "when" |
18:10:46 | dom96 | 1.0 will happen |
18:11:02 | dom96 | I want to make sure Nim's 1.0 is as great as it can be |
18:12:47 | narimiran | leave something for 1.1 ;) |
18:12:49 | FromGitter | <yglukhov> @dom96. So should Haskell introduce mutable variables, to attract more passers by? But you're right, it's just my opinion based on my experience, which I consider significant enough. |
18:13:53 | dom96 | mutable variables in Haskell and style insensitivity in Nim aren't equivalent IMO |
18:14:00 | dom96 | You can't compare them this way |
18:14:21 | dom96 | Haskell is pretty much built around the idea of pure functional programming (which is immutability all the way) |
18:14:24 | shashlick | araq, narimiran, alehander42: https://github.com/nim-lang/Nim/issues/9745 |
18:14:37 | dom96 | style insensitivity in Nim is just this little quirk in the language, that it could really do without |
18:14:53 | FromGitter | <alehander42> well, how would you deal with the breakage |
18:15:08 | narimiran | shashlick: i'm able to reproduce, and i'm currently playing with it (in my case it gives 4, not 3, btw) |
18:15:10 | dom96 | I don't like the way this is going though. I don't want to argue for removing style insensitivity |
18:15:15 | dom96 | Because I myself am undecided |
18:15:29 | FromDiscord_ | <cat 🇵🇱💯> haskell's like math |
18:15:48 | dom96 | I just want us to have a realistic discussion. Either have a vote, or come to some sort of consensus why style insensitivity should stay or be removed. |
18:16:05 | narimiran | shashlick: have you tried to do it without `quote do`? does it work that way? |
18:16:12 | dom96 | We are all biased for it, as narimiran said. |
18:16:37 | FromGitter | <alehander42> is the forum the place to vote |
18:17:26 | dom96 | yes, but keep in mind that my thread is about whether a vote should take place |
18:17:33 | dom96 | Not whether to remove/keep style insensitivity |
18:18:01 | FromGitter | <alehander42> how would such a vote work at all? who gets to vote |
18:18:48 | FromGitter | <yglukhov> @dom96. This is a not obvious design decision, true. When I read about it in the manual/tutorial, it was also surprising to me, but I thought "well it might be a good idea, let's see". What I'm saying is if style insensitivity is an excuse to not try nim, you would easily find the next excuse once style insensitivity is "fixed". It's not about insensitivity per se. It's about "how do I justify the language I currently |
18:18:48 | FromGitter | ... use? let's take the weirdest thing about nim, and shout it out loud!". |
18:19:20 | dom96 | I was thinking strawpoll, with an additional option to allow significant contributors to have a more significant say (maybe they could get 2 votes or more) |
18:19:52 | Araq | yglukhov: The fix is obvious but the stack trace is super confusing and hints to a more fundamental problem with the transformation |
18:20:39 | Araq | in Object(field: expression) why exactly is the transformation recursive harmful for the 'field' part |
18:20:43 | Araq | ? |
18:21:59 | shashlick | narimiran what other way? |
18:23:26 | narimiran | shashlick: by using the result of `dumpAstGen`. i'll show you under your issue |
18:23:26 | dom96 | yglukhov: Sure, there are plenty of people like that. But not everyone is like that, for people who are discovering a language, misfeatures add up and style insensitivity can easily push them over the edge of giving up on Nim. |
18:24:00 | dom96 | This can happen at various stages. Maybe they have been trying to get their program working for hours and then they realise that Nim is style insensitive and think "wtf, I'm done with this". |
18:24:54 | dom96 | Now consider the advantages that style insensitivity brings, can you really say that it's a huge feature that you cannot live without? |
18:26:28 | FromGitter | <yglukhov> Araq: well. it's not harmful. it is useless. I'm starting to understand your confusion. The first for loop can be reverted. Is that what you mean? |
18:26:53 | narimiran | shashlick: posted there |
18:29:47 | Araq | which for loop? |
18:30:07 | Araq | and how can it be "not harmful", it causes an infinite recursion. |
18:31:08 | FromGitter | <yglukhov> dom96: I probably will be able to live without it. but I assure you there were quite a few times when I was happy about style insensitivity because I didn't remember exactly how to spell smth, and I didn't have to spend time to recheck. Use-case 1 - foreign lang bindings. usecase 2 - `RunLoop` vs `Runloop`, `Database` vs `DataBase`, etc. |
18:31:48 | narimiran | shashlick: i remember when i discovered `quote do` and was excited about it, somebody said to me "it is very nice, but it is buggy", so i guess that applies here too |
18:32:22 | Araq | it's actually everywhere because English is NOT case sensitive and in practice it always comes up, filename vs fileName, Linux uses 'sendfile' instead of 'send_file' |
18:33:04 | Araq | not to mention that whenever I type 'gcc' on the command line it's a workaround for Unix design bug. Objectively. |
18:33:19 | FromGitter | <yglukhov> another thing, is fast iterating for debugging, and it happens to me a lot that I do a typo like `smthNotcapitalized` and hit "build", and then notice this typo when build has started, and i'm fixing it, but still super happy to not interrupt the build |
18:33:22 | Araq | because this thing is "really" actually called "GCC". |
18:41:32 | Araq | yglukhov ...? |
18:42:40 | FromGitter | <yglukhov> Araq: let me think |
18:48:26 | xace | how do i define a null char? '\0' doesnt seem to work |
18:50:18 | * | kapil____ joined #nim |
18:53:58 | FromGitter | <tim-st> '\0' should work, otherwise 0.char |
18:54:28 | FromGitter | <tim-st> or maybe you need cuchar? |
18:54:32 | * | vlad1777d joined #nim |
18:55:26 | xace | tim-st: yeah you were right, i made a mistake of char[] vs array[] |
18:55:29 | * | miran joined #nim |
18:57:58 | * | narimiran quit (Ping timeout: 245 seconds) |
18:58:11 | * | miran is now known as narimiran |
19:02:50 | xace | newStringOfCap() if my intended string is "asd" should I set it to 3 or 4 ? (im guessing 4 because of the ending nullchar |
19:04:46 | narimiran | 3 |
19:09:23 | dom96 | yglukhov: But then you end up with an inconsistent style everywhere :( |
19:20:31 | FromGitter | <yglukhov> @dom96, i fix it later if i notice inconsistencies, and from my experience it doesn't happen often. The advantage is that styling doesn't distract me from the problem i'm solving. You know, context switching and stuff :) |
19:21:34 | * | V-X quit (Remote host closed the connection) |
19:21:50 | * | V-X joined #nim |
19:51:59 | FromGitter | <tim-st> xace: I think the min cap is 8 |
19:56:21 | xace | Good to know :). |
20:44:46 | * | Shadow__ joined #nim |
20:45:36 | * | Trustable quit (Remote host closed the connection) |
20:48:59 | * | nsf quit (Quit: WeeChat 2.3) |
21:18:35 | Araq | yglukhov; ok, I think I got it. |
21:19:04 | FromGitter | <yglukhov> Araq: I've just pushed an update |
21:19:09 | FromGitter | <yglukhov> along with a comment |
21:19:58 | FromGitter | <yglukhov> your concern was correct actually, so I fixed the misdesign :) |
21:20:44 | Araq | is it now clearly a two phase construction? |
21:21:03 | Araq | no other lowerStmtListExprs in transformClosureIteratorBody? |
21:21:26 | FromGitter | <yglukhov> yes |
21:21:45 | FromGitter | <arnetheduck> arguably, you get good libraries if the language promotes good practices for libraries.. if the language is prone to throwing library authors under the bus or promotes hacks instead of library-worthy practices, hacky shitty libraries is what you get... |
21:22:29 | Araq | yglukhov, ok, that should also improve the transformation's efficiency |
21:22:38 | Araq | good. |
21:23:05 | FromGitter | <yglukhov> Araq: indeed, that's what I've mentioned in the comment :) |
21:24:07 | Araq | very nice |
21:32:45 | FromGitter | <arnetheduck> > The advantage is that styling doesn't distract me from the problem i'm solving ⏎ ⏎ you can get both worlds with a good style tool.. this is what happens to places where `clang-format` has been introduced.. you just type, and the tool fixes everything. totally best invention since code highlighting |
21:34:35 | FromGitter | <yglukhov> @arnetheduck, sure, and that you can do regardless :) |
21:35:20 | FromGitter | <arnetheduck> it also has an excellent effect on style guides: you just say "whatever the tool does" and nobody argues :) |
21:41:15 | FromGitter | <yglukhov> auto-styling is great. but choosing between nim-style-insensitivity (now) and auto-styling-linting-tools-that-really-just-work-and-integrated-into-most-popular-editors (how long from now?), guess what I prefer? :) |
21:46:43 | * | Vladar quit (Remote host closed the connection) |
22:00:12 | federico3 | that's why we need auto-styling for Nim as well |
22:03:12 | * | V-X quit (Remote host closed the connection) |
22:07:01 | * | stefanos82 quit (Quit: Quitting for now...) |
22:10:44 | * | shashlick_ joined #nim |
22:14:17 | shashlick_ | testing quassel |
22:16:11 | * | sknebel joined #nim |
22:22:39 | * | narimiran quit (Remote host closed the connection) |
22:51:47 | FromGitter | <yyyc514> so something claled from addTimer can't do it's own async stuff? too deep in the rabit hole? |
23:01:12 | xace | https://nimble.directory/ # is this official? |
23:01:32 | FromGitter | <zetashift> Yeah it got it's blessings |
23:02:13 | xace | i find it very convenient |
23:19:33 | FromDiscord_ | <exelotl> I actually hate auto formatters. I'd like to think I make reasonable decisions about spacing and such when I'm writing my code. The computer thinks it knows better but it doesn't. |
23:24:10 | FromDiscord_ | <exelotl> the other month I defined an array of objects in JS, around 30 objects each with about 10 fields. I arranged it into this neatly packed table layout where each object is on a single line, so you can easily see all the information about all the achievements in the game in one place. |
23:24:34 | FromDiscord_ | <exelotl> my colleague needed to edit the file and his formatter kicked in and turned 30 lines into 300 lines |
23:36:20 | * | PMunch joined #nim |
23:38:26 | * | PMunch quit (Remote host closed the connection) |
23:38:45 | * | PMunch joined #nim |
23:43:52 | FromGitter | <arnetheduck> exelotl, sounds like you're using a shitty formatter then. modern formatters are able to adapt to the situation by using a cost function for how bad different formatting functions are and minimize that cost - it leads to formatting that's consistently better than what any human would be able to maintain over time (since code changes) - sure, there will be a case or two where it comes out ugly, and then you switch it |
23:43:52 | FromGitter | ... off for that section - that easy |
23:45:27 | FromGitter | <arnetheduck> dumb formatters that just linebreak blindly - sure, these tend to suck |
23:47:44 | sendell[m] | about case insensivity: dom96 is 100% right about the fact that it repels new users. I used to be annoyed about it when I discovered nim, didn't stop me though. Few time later I showed the language to a passionate (and opinionated) colleague of mine, and the case insensivity had kept him away, unfortunatelly. |
23:48:41 | FromGitter | <zacharycarter> did you explain to him why it could be a benefit? |
23:48:55 | FromGitter | <zacharycarter> sendell[m] ? ^ |
23:50:18 | sendell[m] | no, since I didn't like it either ahah :) Still not sure what to think about it now, I'm not really "using" it, but it's not anoying either |
23:50:34 | FromGitter | <zacharycarter> I think that's the issue then |
23:51:14 | FromGitter | <zacharycarter> it does have it's benefits and any inconsistencies it introduces are fixable by the author |
23:51:38 | FromGitter | <zacharycarter> if you write idiomatic Nim and follow style conventions - it's really not at all an issue IMO |
23:51:45 | FromGitter | <zacharycarter> and it saves a lot of time when grepping |
23:51:51 | FromGitter | <zacharycarter> or it can anyway |
23:52:59 | * | PMunch quit (Remote host closed the connection) |
23:57:11 | FromGitter | <arnetheduck> only `nimgrep` is able to grep according to nim naming rules, not sure how learning a custom tool and not being able to use the search in your editor "saves" time (if you're trying to find all uses of an identifier, for example) |
23:57:39 | FromGitter | <zacharycarter> fair |
23:58:58 | FromGitter | <Varriount> The case inconsistency isn't something that's used within a project though. |
23:59:23 | FromGitter | <Varriount> It's used more when interfacing with other projects (libraries). |