<< 02-05-2025 >>

00:11:25FromDiscord<devlop_gaming> In reply to @griffith1deadly "(until you realize that": Wait wha..
00:19:41*skippy8 quit (Quit: WeeChat 4.5.2)
00:32:05*travis quit (Quit: Leaving)
01:07:20*beholders_eye quit (Ping timeout: 252 seconds)
03:56:37*derpydoo joined #nim
04:37:06FromDiscord<Phil> I mean, I can attest to nimble slowness, just the dependency download step takes around 3-4 minutes for a build container that otherwise takes overall around 5 minutes (atm)
04:38:19FromDiscord<Phil> (edit) "download" => "download/install"
05:42:45*strogon14 quit (Ping timeout: 248 seconds)
05:42:54*strogon14 joined #nim
06:02:52*derpydoo quit (Ping timeout: 252 seconds)
06:19:40*xet7 quit (Remote host closed the connection)
06:34:55*amadaluzia joined #nim
06:37:46*derpydoo joined #nim
06:39:37*derpydoo quit (Client Quit)
06:42:04*skippy8 joined #nim
06:46:18*ntat joined #nim
07:03:49*andy-turner joined #nim
07:26:42*amadaluzia quit (Ping timeout: 248 seconds)
07:34:53*amadaluzia joined #nim
07:58:37*amadaluzia quit (Ping timeout: 276 seconds)
09:17:05*beholders_eye joined #nim
10:01:33*beholders_eye quit (Ping timeout: 252 seconds)
11:18:14*beholders_eye joined #nim
11:30:46FromDiscord<aintea> In reply to @griffith1deadly "(until you realize that": The LSP is horrible to work with
11:30:53FromDiscord<aintea> The compiler is slow but honestly good enough
11:43:50FromDiscord<griffith1deadly> In reply to @aintea "The compiler is slow": yea
11:43:55FromDiscord<griffith1deadly> but lsp is a hell
12:24:13*skippy8 quit (Quit: WeeChat 4.5.2)
13:31:33FromDiscord<mr_rowboto> ~~who needs an LSP when all your code comes from an LLM?~~
13:54:42FromDiscord<jseb> in this part of the manual: https://nim-lang.org/docs/manual.html#types-object-variants
13:56:04FromDiscord<jseb> (edit) "in this part of the manual: https://nim-lang.org/docs/manual.html#types-object-variants ... " added ", what it the intVal, floatVal … in the object type selection ? Are they type ? Other thing ? IntVal (for example) is not defined in Nim (tried with `inim`)"
13:56:52FromDiscord<Phil> In reply to @jseb "in this part of": They are fields, just for me to make a decent analogy, do you know other programming languages that I could maybe reference?
13:57:14FromDiscord<jseb> i know C and Lua
13:57:15FromDiscord<Phil> (edit) "reference?" => "reference for an explanation?"
13:58:33FromDiscord<Phil> Okay I don't know those 😄↵So I'll try from scratch, object variants are discriminated type unions (I think that terminology fits).↵So the fields defined in those inline'd "of" blocks are conditional fields that only exist if the kind field has a specific value when it gets initialized
13:59:58FromDiscord<jseb> sent a code paste, see https://play.nim-lang.org/#pasty=NCZdxRGY
14:00:06FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#pasty=YrqYUgcV
14:00:32FromDiscord<jseb> aaaahhh it defines a field
14:00:41FromDiscord<jseb> (edit) "aaaahhh it defines a field ... " added "for the object"
14:00:48FromDiscord<Phil> Yeh, the fact the manual inline's the description there really makes it a confusing read
14:00:54FromDiscord<Phil> I think of it as a conditional fields
14:00:56FromDiscord<jseb> with your fromatting, i'm understanding :)
14:01:38FromDiscord<jseb> (edit) ":)" => ":)↵thank you (sometimes i despair with Nim /o\ )"
14:03:49FromDiscord<Phil> Note that you very much should check before accessing those fields because accessing those is a Defect which should be treated as equivalent to panics, aka instant program crashes
14:04:00FromDiscord<Phil> (edit) "Note that you very much should check before accessing those fields because accessing those ... is" added "when they don't exist"
14:05:51FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#pasty=CGeCaDKa
14:20:23FromDiscord<jseb> i thought `else` was mandatory in the nim case/of
14:34:30FromDiscord<Phil> In reply to @jseb "i thought `else` was": Not if your switch statement is exhaustive.↵In fact, not using else is beneficial in those cases because if you later add to the enum all switch statements where that else-case isn't being handled will not cause compiler-errors.↵From a maintenance perspective that's pretty good because it shows you all the places immediately that you need to take into account
14:49:29FromDiscord<jseb> ah i see, it's possible because enum usage in Nim is encouraged (with #define or just int values, that would be another story)
15:11:46FromDiscord<Phil> In reply to @jseb "ah i see, it's": Having half a dozen languages under my bolt, using enums to represent a finite list of values is encouraged pretty much everywhere 😄
15:11:51FromDiscord<Phil> (edit) "bolt," => "belt,"
15:13:10FromDiscord<Phil> At least the second the languages become even semi new
15:13:25FromDiscord<Phil> (edit) "At least the second the languages become even semi new ... " added "(meaning like... java, maybe C++ already has enums as well?)"
15:32:30FromDiscord<explosiveend> In reply to @aintea "The LSP is horrible": yeah it’s annoying, idk why tho
15:33:50FromDiscord<explosiveend> is it like a “it’s not important rn” kind of thing
15:34:01FromDiscord<explosiveend> or nobody wants to deal with it
15:34:57FromDiscord<aintea> A mix of both
15:35:28FromDiscord<aintea> It actually is important, it scored quite high in the last Nim poll but it looks like a chore to deal with
15:36:12FromDiscord<explosiveend> ooo nim poll? didnt know about that
15:36:15FromDiscord<explosiveend> where are those done
15:51:03*m5zs7k quit (Ping timeout: 244 seconds)
15:53:51*m5zs7k joined #nim
16:35:00FromDiscord<Phil> In reply to @explosiveend "where are those done": Typically they're posted in the forum.↵If you want to take a look at them, look at the blog and just browser-search for the word "survey"↵https://nim-lang.org/blog.html
16:35:39FromDiscord<Phil> The poll typically starts somewhere near the end of the year and results are published somewhere near the start of the year after
16:53:52*amadaluzia joined #nim
17:41:47FromDiscord<aintea> Also a lot of work is currently directed towards rewriting the compiler so it doesn't need to transpile to C before compiling to machine code, it'll compile directly to machine code
17:42:03FromDiscord<aintea> No idea when it will release but I'm pretty sure it will be in Nim 3
17:42:27FromDiscord<aintea> All while being retro compatible from what I understand
17:42:49FromDiscord<Phil> Which, given my backend is like 10k loc, is going to be interesting for me
17:43:07FromDiscord<Phil> But ey, problem for 2027 or sth
17:47:07*tiorock joined #nim
17:47:07*rockcavera is now known as Guest2496
17:47:07*Guest2496 quit (Killed (lead.libera.chat (Nickname regained by services)))
17:47:07*tiorock is now known as rockcavera
18:08:03*skippy8 joined #nim
18:53:55FromDiscord<Mason Wheeler> Looking at [the documentation for the memory-mapped files APIs,](https://nim-lang.org/docs/memfiles.html#mapMem%2CMemFile%2CFileMode%2Cint%2Cint) it says that when calling `mapMem`, the `offset` parameter must be a multiple of the OS's page size.↵↵Is there any cross-platform Nim way of finding out, at runtime, what that page size is?
19:07:24FromDiscord<Elegantbeef> I don't think so, just say it's 4096 and hope that it never bites you 😄
19:11:27*nils` joined #nim
19:42:50*skippy8 quit (Quit: WeeChat 4.5.2)
19:43:12*skippy8 joined #nim
20:22:18*beholders_eye quit (Ping timeout: 244 seconds)
20:30:42FromDiscord<aintea> Lmao
20:31:07FromDiscord<aintea> I mean what obscure OS would have page size set to other than 4096
20:33:21*disso-peach joined #nim
21:08:31*ntat quit (Quit: leaving)
21:12:21*andy-turner quit (Quit: Leaving)
21:15:31*andy-turner joined #nim
21:15:48*andy-turner quit (Remote host closed the connection)
21:49:58*beholders_eye joined #nim
22:09:02*beholders_eye quit (Ping timeout: 244 seconds)
22:20:26FromDiscord<heysokam> In reply to @stormhunter__ "Looking at [the documentation": you could write some C code to achieve that, that returns an int, and wrap your glue code into nim and call that from your code
22:20:56FromDiscord<heysokam> or wrap the C functions that you would use in that C code, and do the same in Nim
23:07:13*skippy8 quit (Quit: WeeChat 4.5.2)