<< 25-10-2024 >>

02:36:03*rockcavera quit (Remote host closed the connection)
03:31:56*lucasta quit (Remote host closed the connection)
03:46:56FromDiscord<bostonboston> If a proc takes an int as a parameter, what size is that int, and does the size change if the proc is annotated with exportc?
03:48:04FromDiscord<Elegantbeef> `int` is `sizeof(pointer)`
03:49:08FromDiscord<bostonboston> I was under the impression, that at least for variables, ints default to int32 and are promoted to int64 if needed. Is that information outdated and or has it always been wrong?
03:51:59FromDiscord<Elegantbeef> Always `sizeof(pointer)`
03:56:01FromDiscord<bostonboston> 👍
04:26:43*ntat joined #nim
04:40:33*ryuukk joined #nim
04:40:39*ryuukk_ quit (Read error: Connection reset by peer)
04:55:01FromDiscord<morgan (ping with reply)> so im switching stuff over to uncheckedarray, and wondering, if it was ref instead of ptr, how would i create it
04:55:14FromDiscord<morgan (ping with reply)> like ptr you just cast alloc0
04:55:18FromDiscord<Elegantbeef> `unsafeNew`
04:56:10FromDiscord<morgan (ping with reply)> ah
05:51:35*SchweinDeBurg quit (Quit: WeeChat 4.5.0-dev)
05:51:56*SchweinDeBurg joined #nim
07:25:07*ntat quit (Quit: Leaving)
07:26:41FromDiscord<morgan (ping with reply)> took me a min to realize that cast alloc with two levels of ptr ua doesn't init the inner layer because it's an array of pointers not just a fancy blob of memory all in one and that that was why i had a null ptr deref
07:27:17FromDiscord<morgan (ping with reply)> https://tenor.com/view/ah-eto-bleh-anime-bleh-gif-26784876
07:27:43FromDiscord<morgan (ping with reply)> classic 3 am brain
07:53:13*ntat joined #nim
07:58:11*disso-peach joined #nim
08:28:35FromDiscord<nocturn9x> used nimpretty today, it turned some if statements into syntactically invalid code
08:28:36FromDiscord<nocturn9x> oof
08:29:21FromDiscord<nocturn9x> it was just one statement in a 5.5kLOC project but still :|
08:29:49FromDiscord<Elegantbeef> I believe nph ensures the code parses after formatting
08:29:53FromDiscord<Elegantbeef> Though it's really opinionated
08:30:07FromDiscord<nocturn9x> I see
08:30:32FromDiscord<Elegantbeef> Just an alternative if you want something that might not explode in your face
08:31:31FromDiscord<nocturn9x> yeah thanks!
08:31:47FromDiscord<nocturn9x> personally the first thing I'd do when writing a formatter is ensuring the output is syntactically valid :P
08:31:51FromDiscord<nocturn9x> but that's just me .d
08:31:53FromDiscord<nocturn9x> (edit) ".d" => ":d"
08:31:55FromDiscord<nocturn9x> (edit) ":d" => ":D"
08:32:24*disso-peach quit (Quit: Leaving)
08:33:46FromDiscord<Elegantbeef> "PRs welcome"
08:42:35FromDiscord<intellij_gamer> https://github.com/nim-lang/Nim/pull/23057↵Seems someone already did
08:51:36FromDiscord<jns> Hi, I would like to dump the underlying compiler command when compiling nim to cpp, so the actual CXX compiler call with all args. is that possible?
08:58:30ehmryjns: look in you nim cache dir for json files
08:58:52ehmrythere should be descriptions of the build in there
09:25:43FromDiscord<k0ts> There's also `--listCmd`
10:07:31*traybutreal joined #nim
10:08:04*traybutreal quit (Remote host closed the connection)
11:35:01*ntat quit (Quit: Leaving)
12:06:25*beholders_eye joined #nim
12:12:39*beholders_eye quit (Ping timeout: 252 seconds)
12:14:44*beholders_eye joined #nim
12:30:23*ntat joined #nim
13:22:31*Deadm0th joined #nim
14:16:06FromDiscord<oluwafemifranchis> sent a long message, see https://pasty.ee/fTCXXaAv
14:16:35FromDiscord<_.heartlove._> <@&371760044473319454>
14:20:17FromDiscord<_.heartlove._> #science too
15:34:56*coldfeet joined #nim
15:54:51FromDiscord<aludayalu> I wanted to build a project that will take 5 years to maybe mature. Is Nim going to die before it? Probability wise yes or no?
15:56:18FromDiscord<aludayalu> <@&371760044473319454> we are actually starting today and we have been stuck between using Go, Zig and Nim. Zig does not have nice support for A LOT of things that we need. Go has a lot of performance overhead as you cannot disable things like nil checking on pointer dereferences which leaves us with Nim.
15:56:21FromDiscord<zumi.dxy> it's been around for a while so probably no↵expect some changes in the meantime :p
15:56:46FromDiscord<aludayalu> In reply to @aludayalu "<@&371760044473319454> we are actually": Are you really sure? Also how can I have preemptive green threads in Nim?
16:03:16FromDiscord<Phil> In reply to @aludayalu "<@&371760044473319454> we are actually": Please do not ping moderators for things that aren't related to moderating the discord server.↵As for your question, you're making a bet either way. Nim has been around since 2008 and I don't see a reason why it would stop being around within the next 5 years. I'd answer the same for the other languages though.
16:04:42FromDiscord<Phil> And I'm surprised to see neither C, nor C++, nor Rust in that list if zig is a possible choice, which is just as low-level.
16:05:48FromDiscord<Phil> God I wish nim's metaprogramming didn't spoil me so hard.
16:06:03FromDiscord<Phil> (edit) "hard." => "hard (unrelated tangent as I'm fighting in TS with some lib functionality)."
16:18:06FromDiscord<fabric.input_output> when ts don't have pattern matching
16:48:38FromDiscord<bubbly_avocado_86424> having looked briefly at Nim 1.x I'm now no longer able to hold myself and seek to explore Nim 2.x
16:48:57FromDiscord<bubbly_avocado_86424> (edit) "2.x" => "2.x↵could this be the 'perfect' language for me ?"
16:54:20Amun-Rayes
16:55:20FromDiscord<bubbly_avocado_86424> as I'm often involved with risk analysis, i'm curious how this distributed repository model works out in terms of security and manageability of code quality
16:59:58Amun-Rajail everything, she'll be right
17:00:00Amun-Ra;)
17:00:32FromDiscord<bubbly_avocado_86424> In reply to @Amun-Ra "jail everything, she'll be": @Amun-Ra no thanks
17:00:42*GnuYawk quit (Quit: The Lounge - https://thelounge.chat)
17:01:13*GnuYawk joined #nim
17:02:10Amun-RaI'm a sysadmin, I write nim code for fun
17:11:07FromDiscord<grumblygibson> sent a code paste, see https://play.nim-lang.org/#pasty=zvJIzOue
17:12:44Amun-Ragrumblygibson: what output do you expect?
17:15:33FromDiscord<grumblygibson> `ptr 0x56274ece0c60 --> 0`
17:16:35Amun-Rahmm, I don't remember that behavior
17:17:04FromDiscord<grumblygibson> Maybe I don't recall the code that does it, but the was this beautiful concise way to get a printout of the type, the address, and the value.. hmm okay.
17:25:44Amun-Raand I'm not known from having the best memory ;)
17:28:59FromDiscord<grumblygibson> 🤦‍♂️ turns out I probably had made a `repr` that returned what I wanted
17:45:43FromDiscord<aludayalu> In reply to @isofruit "Please do not ping": Sorry and thank you
17:52:34FromDiscord<grumblygibson> I just looked at the Nim Roadmap again, and got all super excited 😆↵Goal over winter (entering here): dip toe in Nim compiler contribution.
19:19:27*beholders_eye quit (Ping timeout: 246 seconds)
19:20:28*beholders_eye joined #nim
19:30:58*coldfeet quit (Remote host closed the connection)
21:04:00*ntat quit (Quit: Leaving)
21:41:27*beholders_eye quit (Ping timeout: 265 seconds)
21:51:13FromDiscord<guttural666> is async in Threads a thing or even possible in Nim?
22:38:51*xutaxkamay quit (Ping timeout: 252 seconds)
22:39:13*xutaxkamay joined #nim
23:05:44*beholders_eye joined #nim
23:44:24FromDiscord<morgan (ping with reply)> sent a code paste, see https://play.nim-lang.org/#pasty=dnXjcnHy
23:47:14FromDiscord<morgan (ping with reply)> maybe it's something dumb
23:47:16FromDiscord<morgan (ping with reply)> idk
23:49:26FromDiscord<Elegantbeef> Not related to why it's happening but `Slice[T]` as an alias to `HSlice[T, T]`
23:50:48FromDiscord<morgan (ping with reply)> yea
23:51:05FromDiscord<morgan (ping with reply)> oh it makes them the same
23:51:09FromDiscord<morgan (ping with reply)> ok yea ill switch to that
23:51:55FromDiscord<morgan (ping with reply)> same error but a little cleaner
23:52:21FromDiscord<Elegantbeef> You also likely want `SomeInteger` and not `Ordinal`
23:52:29FromDiscord<morgan (ping with reply)> ah yea
23:52:36FromDiscord<morgan (ping with reply)> it looks like it doesn't like something about the slices, which makes sense since it was working with 4 uints
23:53:41FromDiscord<morgan (ping with reply)> someinteger instead seems to have fixed it
23:54:10FromDiscord<morgan (ping with reply)> SomeHoweger
23:54:58FromDiscord<Elegantbeef> `Ordinal` is `Ordinal[T]` oddly
23:54:58FromDiscord<Elegantbeef> I mean in `system.nim` it's `Ordinal[T] {.magic: Ordinal.}`
23:54:59FromDiscord<Elegantbeef> I'm suspicious of the magic 😄
23:55:04FromDiscord<Elegantbeef> Now I do have to ask do you know that there is `packedset` in the stdlib?
23:55:05FromDiscord<Elegantbeef> I imagine it's an issue with how Ordinal works internally, as such best to just use non magic typeclasses
23:55:36FromDiscord<morgan (ping with reply)> In reply to @Elegantbeef "I mean in `system.nim`": oh huh yea
23:55:52FromDiscord<morgan (ping with reply)> In reply to @Elegantbeef "Now I do have": no what does it do?
23:56:02FromDiscord<Elegantbeef> Makes a sparse bitset
23:56:14FromDiscord<morgan (ping with reply)> ah well i need a non-sparse bitset
23:56:34FromDiscord<morgan (ping with reply)> the use is to do piece fitting in an extended version of blokus
23:57:03FromDiscord<morgan (ping with reply)> shifting either rows or bits and ANDing or ORing to basically check the whole board at once
23:57:18FromDiscord<Elegantbeef> Also is there a reason you're making your own sequence with Array2D?
23:57:32FromDiscord<Elegantbeef> `data: seq[T]` seems like a more reasonable approach 😄
23:58:03FromDiscord<morgan (ping with reply)> i mean, i don't need it to change with data in it, but yea that would prob be fine
23:58:50FromDiscord<morgan (ping with reply)> In reply to @morganalyssa "ah well i need": i technically don't need everything at the ends of the rows after, but default will prob be 14x14 for only 2 wasted bits per row so i don't need something sparse
23:59:33FromDiscord<Elegantbeef> Could always do`set[0..256]`
23:59:35FromDiscord<morgan (ping with reply)> or typical size