<< 20-03-2024 >>

00:33:55FromDiscord<girvo> sent a code paste, see https://play.nim-lang.org/#pasty=QwyXVvaOzFln
00:34:45FromDiscord<Robyn [She/Her]> In reply to @girvo "Is it possible to": You'd probably have to copy the code for the builder and modify that
00:34:52FromDiscord<girvo> Outputs `https://online-live1.services.u-blox.com/GetOnlineData.ashx?token=CxCQU8o4Qv-hti6f4VvCww&gnss=gps%2Cglo&datatype=eph%2Calm%2Caux`↵Expected `https://online-live1.services.u-blox.com/GetOnlineData.ashx?token=CxCQU8o4Qv-hti6f4VvCww&gnss=gps,glo&datatype=eph,alm,aux`
00:34:55FromDiscord<girvo> aw really? that sucks 😦
00:35:30FromDiscord<Robyn [She/Her]> You could always do `.replace("%2C", ",")` :P
00:35:48FromDiscord<Robyn [She/Her]> In reply to @girvo "aw really? that sucks": I say probably because idk how the API works, have the docs mentioned anything about it?
00:35:52FromDiscord<girvo> Yeah which would work, but is not ideal lol
00:35:56FromDiscord<girvo> sent a code paste, see https://play.nim-lang.org/#pasty=PfFllZfVQnCD
00:36:20FromDiscord<girvo> Thats the proc, I get what it's doing but it makes a tonne of valid query params invalid lmao
00:36:43FromDiscord<girvo> tbf, the server side should be smart enough to decode %2C, but sadly I don't control the server side here
00:37:32FromDiscord<girvo> Oh well, raw string concatention it is
00:44:15FromDiscord<Robyn [She/Her]> Fair oof
00:44:17FromDiscord<Robyn [She/Her]> Wait actually
00:44:23FromDiscord<Robyn [She/Her]> There should be a proc that decodes that iirc
00:45:13FromDiscord<Robyn [She/Her]> https://nim-lang.org/docs/uri.html#decodeUrl%2Cstring @girvo
00:46:41FromDiscord<girvo> Yeah I think the `?` will make that slightly wonky though as an infix? I'll revisit this later 🙂 thanks!
00:47:59FromDiscord<Robyn [She/Her]> No worries! ^^
01:07:37*rockcavera joined #nim
01:55:32*krux02_ quit (Remote host closed the connection)
02:01:51*jmdaemon quit (Ping timeout: 256 seconds)
02:12:08*syl quit (Ping timeout: 252 seconds)
02:12:27*syl joined #nim
02:16:19*syl_ joined #nim
02:17:05*syl quit (Ping timeout: 252 seconds)
02:37:53FromDiscord<user2m> sent a long message, see https://pasty.ee/bPmTEfruZrjn
02:41:19FromDiscord<Elegantbeef> If there is code that knows your secret on a remote PC the secret can be got
02:41:29FromDiscord<Elegantbeef> constant strings are just stored in a data section
02:42:56FromDiscord<user2m> In reply to @Elegantbeef "If there is code": good to know. I'll just use this lib instead then https://github.com/euantorano/dotenv.nim
03:27:04FromDiscord<bosinski2023> sent a code paste, see https://play.nim-lang.org/#pasty=uZmTgBDhRYyf
03:27:59FromDiscord<bosinski2023> (edit) "https://play.nim-lang.org/#pasty=OybgpehRRcdi" => "https://play.nim-lang.org/#pasty=iHBYZHHzBRsp"
03:29:04FromDiscord<Elegantbeef> Well have a single type definition
03:30:15FromDiscord<bosinski2023> In reply to @Elegantbeef "Well have a single": a unified type definition ? hmm, thats what i'm looking after ...
03:32:42FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=sbckLlkRUSAE
03:35:40FromDiscord<bosinski2023> sent a code paste, see https://play.nim-lang.org/#pasty=nxBnxXZuTyGX
03:36:11FromDiscord<Elegantbeef> Right then inside there you'd likely want a `when sizeof(T) ==...`
03:36:47FromDiscord<Elegantbeef> Using all the same field names so your destructors don't need to be specialised
03:39:19NimEventerNew thread by ITwrx: How to parse a multipart/form-data POST body string?, see https://forum.nim-lang.org/t/11255
03:40:06FromDiscord<bosinski2023> In reply to @Elegantbeef "Using all the same": yes, the member-names are unified, so it would be easy to write a destructor, but nim rejects the definition and forces me to have three destructors - not a big thing to have three, but surprising. Since i can - compiler agrees - have procs that work on the Sumtype, and i don't have to specialize..
03:40:29FromDiscord<Elegantbeef> I mean if you use my code it should just work
03:40:56FromDiscord<bosinski2023> In reply to @Elegantbeef "I mean if you": 😂 great, i'll try.. thx buddy
03:42:30FromDiscord<Elegantbeef> https://play.nim-lang.org/#pasty=jVuUrwFyOMHZ yea works fine
03:56:09FromDiscord<bosinski2023> In reply to @Elegantbeef "https://play.nim-lang.org/#pasty=jVuUrwFyOMHZ yea w": nice, `AccessCtl`provides one lock-bit per-Bucket and a free/occupied-mask with one bit for every slot of the bucket. this is a bit hairy for 8-byte-wide types since 4-bit/half-a-byte would be enough..
03:56:54FromDiscord<bosinski2023> (edit) "In reply to @Elegantbeef "https://play.nim-lang.org/#pasty=jVuUrwFyOMHZ yea w": nice, `AccessCtl`provides one lock-bit per-Bucket and a free/occupied-mask with one bit for every slot of the bucket. this is a bit hairy for 8-byte-wide types since 4-bit/half-a-byte would be enough.. ... " added "but maybe i can do such a nifty calculus as you showed for the bucket.."
04:04:42*rockcavera quit (Read error: Connection reset by peer)
04:05:05*rockcavera joined #nim
04:07:58*rockcavera quit (Remote host closed the connection)
04:09:54FromDiscord<girvo> sent a code paste, see https://play.nim-lang.org/#pasty=hlnMyQjPAOxW
04:10:09FromDiscord<Elegantbeef> Yes
04:10:25FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=tTYTDSEFBsBL
04:10:36FromDiscord<girvo> Oh!
04:10:37FromDiscord<girvo> Thanks 🙂
04:12:59FromDiscord<bosinski2023> sent a code paste, see https://play.nim-lang.org/#pasty=sNSHnbCeikqh
04:13:11FromDiscord<Elegantbeef> Stop using tuples
04:13:13FromDiscord<Elegantbeef> Use an object
04:13:19FromDiscord<bosinski2023> (edit) "https://play.nim-lang.org/#pasty=ixCbuNfUcJuC" => "https://play.nim-lang.org/#pasty=mjrvXFnCtXxn"
04:14:16FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=dTtassrRHUWE
04:18:06FromDiscord<bosinski2023> sent a code paste, see https://play.nim-lang.org/#pasty=JZmsTIQRZmxQ
04:19:19FromDiscord<bosinski2023> whats bad about tuples ? they worked nicely, lean, but no ?
04:19:38FromDiscord<Elegantbeef> You rarely want tuples
04:19:56FromDiscord<Elegantbeef> They cannot have destructors, they have an odd syntax, they're structually typed
04:20:04FromDiscord<bosinski2023> In reply to @Elegantbeef "You rarely want tuples": maybe a old pythonic reflex ..
04:28:08FromDiscord<girvo> Is there any real downside to having my `withReadLock` template wrap the received block in `{.gcsafe.}:`? I mean by defintion it is taking the lock required to access it
04:33:30FromDiscord<Elegantbeef> As long as you use guard for all your other locked types I don't see why not
04:34:49FromDiscord<girvo> Yep it does
04:41:36FromDiscord<bosinski2023> In reply to @Elegantbeef "They cannot have destructors,": hmm, i chose the tuple because having two 'variable-sized-members' in a struct, fails. And i was surprised that it did not fail using the tuple.. The playground-version compiles, though... i'm confused.
04:42:08FromDiscord<bosinski2023> (edit) "In reply to @Elegantbeef "They cannot have destructors,": hmm, i chose the tuple because having two 'variable-sized-members' in a struct, fails. And i was surprised that it did not fail using the tuple.. The playground-version compiles, though... i'm confused. ... " added "there is just one allowed and it has to be at the end of the struct.."
04:42:28FromDiscord<Elegantbeef> Right a `UncheckedArray[T]` has to be at the end of a object
04:43:18FromDiscord<bosinski2023> In reply to @Elegantbeef "Right a `UncheckedArray[T]` has": https://play.nim-lang.org/#pasty=amSOtnOCyHqt works, but should not ?
04:43:36FromDiscord<Elegantbeef> Correct
04:43:57FromDiscord<Elegantbeef> Multiple uncheckedarrays inside an object makes no sense
04:45:03FromDiscord<bosinski2023> In reply to @Elegantbeef "Multiple uncheckedarrays inside an": thats correct - they (might) overlap and nim cannot check sizes. But it worked with tubples and sure the size/access checks one has to take care of..
04:45:21FromDiscord<Elegantbeef> Right it's a bug with tuples
04:45:35FromDiscord<Elegantbeef> It's not "might overlap" they're overlapping
04:46:07FromDiscord<Elegantbeef> UncheckedArray is a `T val[]` in C those have to be the last value in a collection cause they have no size
04:46:11FromDiscord<Elegantbeef> in a data type\
04:46:22FromDiscord<bosinski2023> In reply to @Elegantbeef "It's not "might overlap"": that depends on the way you use them 🙂 but fair enough they overlap..
04:48:52FromDiscord<bosinski2023> In reply to @Elegantbeef "UncheckedArray is a `T": how come the playground accepts it, my local nim not ? ↵And you call it a bug - my alternative would be calculated C-style access on a chunk-of-data - with zero readabillity - therefore i liked the tuple-version - and it compiled..
04:49:13FromDiscord<Elegantbeef> Is your local nim 2.0?
04:49:47FromDiscord<bosinski2023> In reply to @Elegantbeef "Is your local nim": `Version 2.1.1 ` last weeks..
04:49:53FromDiscord<Elegantbeef> Why are they unchecked arrays? Isn't the sized known?
04:49:59FromDiscord<Elegantbeef> Well the playground is stable
04:50:31FromDiscord<bosinski2023> In reply to @Elegantbeef "Well the playground is": dynamic, self allocated, growable data-structure..
04:52:48FromDiscord<Elegantbeef> You might aswell just do `cast[ptr UncheckedArray[Atomic[uint8]](yourObj)[...]`
04:53:32FromDiscord<Elegantbeef> changing `ctl` to be a `ctl: pointer`
04:53:42FromDiscord<bosinski2023> i had this a couple of times : i'd like a compact layout and having one UArr at the end of the struct allows to allocate whole struct and have the data-region dynamic. In this case, i'm fine with a pointer, but i'd like one compact region for (mask and lock-bits) and a second-region for the bucket/data-items
04:54:49FromDiscord<Elegantbeef> Right but you're after a union
04:55:11FromDiscord<bosinski2023> In reply to @Elegantbeef "Right but you're after": jeez, there a pragma for that ?
04:55:36FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=xhKAFnKzEGZQ
04:55:37FromDiscord<Elegantbeef> Yes
04:56:09FromDiscord<bosinski2023> In reply to @Elegantbeef "Yes": you're my tuple/union/pargma - hero :))
05:07:21FromDiscord<myxi> sent a code paste, see https://play.nim-lang.org/#pasty=itDeeVlaGtbO
05:10:59FromDiscord<Elegantbeef> Did you run `install` before or after making a git tag?
05:11:22FromDiscord<myxi> after making and pushing the git tag
05:11:36FromDiscord<Elegantbeef> Secondly why are you including that file instead of importing?
05:11:55FromDiscord<myxi> I thought it'd be better for simpler stuff
05:11:58FromDiscord<Elegantbeef> Thirdly does `includes/version` work?
05:12:25FromDiscord<myxi> yes, you can see the second command inputs 0.1.8, before that command i had 0.1.7 installed
05:12:33FromDiscord<myxi> the project compiles just fine with nim
05:12:35FromDiscord<Elegantbeef> No
05:12:35FromDiscord<myxi> (edit) "the project compiles just fine with nim ... " added "c"
05:12:46FromDiscord<Elegantbeef> The command says it cannot find `src/includes/version`
05:13:52FromDiscord<myxi> I don't know where the problem is
05:14:15FromDiscord<Elegantbeef> Right i'm suggesting to try `import includes/version`
05:16:14FromDiscord<myxi> sent a code paste, see https://play.nim-lang.org/#pasty=hoSEbIwzHsYL
05:16:16FromDiscord<bosinski2023> sent a code paste, see https://play.nim-lang.org/#pasty=eqBdpsjGWsWN
05:17:42FromDiscord<myxi> sent a code paste, see https://play.nim-lang.org/#pasty=lAWlcinDxMUr
05:17:56FromDiscord<myxi> (edit) "https://play.nim-lang.org/#pasty=niErxzGqUEJt" => "https://play.nim-lang.org/#pasty=ffGfMupbdMVB"
05:19:16FromDiscord<Elegantbeef> @bosinski2023 context?
05:23:47FromDiscord<bosinski2023> sent a code paste, see https://play.nim-lang.org/#pasty=KSXRfQmhBuyo
05:24:54FromDiscord<Elegantbeef> I just tested on devel and stable it worked fine
05:26:05FromDiscord<bosinski2023> In reply to @Elegantbeef "I just tested on": really, the object definition from below... that would be awesome, cos' i can't do the `when`-trick with the tuple...
05:26:32FromDiscord<Elegantbeef> How are you using `AccessCtrl`?
05:26:37FromDiscord<Elegantbeef> It's pointer indirected yes?
05:30:36FromDiscord<bosinski2023> sent a code paste, see https://play.nim-lang.org/#pasty=oKhvStipAOiO
05:32:26FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=nqIsSODzzQgJ
05:33:24FromDiscord<bosinski2023> sent a code paste, see https://play.nim-lang.org/#pasty=uWQgJnvpdypM
05:33:40FromDiscord<Elegantbeef> Is that a Nim error or C compiler error?
05:35:39FromDiscord<bosinski2023> sent a code paste, see https://play.nim-lang.org/#pasty=RmrJZpfkUGrj
05:35:49FromDiscord<Elegantbeef> That's from your C compiler
05:36:26FromDiscord<bosinski2023> In reply to @Elegantbeef "That's from your C": Clang 15 - i can't upgrade to 17 - tried that last week - no f change
05:37:23FromDiscord<Elegantbeef> You are probably best to just cast the field which is a `pointer` to be fair
05:37:44FromDiscord<Elegantbeef> But it works with both gcc and clang here
05:38:08FromDiscord<bosinski2023> In reply to @Elegantbeef "But it works with": which Clang do you use ?
05:38:22FromDiscord<Elegantbeef> 17.0.6
05:40:06FromDiscord<bosinski2023> In reply to @Elegantbeef "17.0.6": but isn't that strange -i mean unions are nothing new - that should just work..
05:40:52FromDiscord<Elegantbeef> A union with a size of 0 is a scary thing 😄
05:40:56FromDiscord<bosinski2023> and why does clang accept two flexible-array-member within a tuple..
05:41:12FromDiscord<Elegantbeef> Probably cause Nim's tuple gen fucked up
05:41:42FromDiscord<bosinski2023> In reply to @Elegantbeef "Probably cause Nim's tuple": well done, pls leave it that way - seems to be my exit hatch..
05:41:54FromDiscord<Elegantbeef> Lol
05:41:57FromDiscord<Elegantbeef> Just use `pointer` and cast
05:42:13FromDiscord<Elegantbeef> That's the least sketchy solution
05:42:28FromDiscord<bosinski2023> In reply to @Elegantbeef "Just use `pointer` and": thats so ugly - it know how to do it, but really thats ugly..
05:43:28FromDiscord<bosinski2023> any chance to get GCC working aside Clang on a mac-machine ?
05:45:51FromDiscord<Elegantbeef> I mean you make it a distinct pointer and write some getters
05:45:52FromDiscord<Elegantbeef> No clue
05:45:53FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=SgvCwRJPrHXv
05:48:43FromDiscord<bosinski2023> In reply to @Elegantbeef "Really though just do": i'm overwhelmed here - big thx - so good to know that there exists a compiler that can translate it 🙂 and BTW during the lst two hours my code went from 400-LOC messy bloat to 200-LOC compact - big thx for that..
05:52:08FromDiscord<Elegantbeef> "Less is more" and other funny quotes
05:53:37FromDiscord<bosinski2023> In reply to @Elegantbeef ""Less is more" and": so true - but i'm afrais of the `distinct pointer` very afraid ..
05:54:21FromDiscord<Elegantbeef> Distinct is Nim's lovely solution for silly single field C structs 😄
05:56:43*ntat joined #nim
05:59:37FromDiscord<bosinski2023> sent a code paste, see https://play.nim-lang.org/#pasty=LEOHUubfwHPH
06:00:37FromDiscord<leorize> you have to dereference those
06:00:38FromDiscord<leorize> although why are you doing double pointer
06:02:33FromDiscord<bosinski2023> sent a code paste, see https://play.nim-lang.org/#pasty=lYFnAdWQVgqu
06:03:29FromDiscord<Elegantbeef> technically you don't need the (), but that should work
06:03:48FromDiscord<Elegantbeef> You also didn't make it `AccessCtrl[T]`
06:03:54FromDiscord<Elegantbeef> You made it `ptr AccessCtrl[T]`
06:03:59FromDiscord<Elegantbeef> So you have 2 pointers as leo said
06:04:12FromDiscord<Elegantbeef> We now made it so `AccessCtrl` is a pointer
06:07:43FromDiscord<bosinski2023> In reply to @Elegantbeef "We now made it": thx both of you - think i got it - still afraid of the `distinct thingy` but it seems to work 🙂 magic..
06:08:03FromDiscord<Elegantbeef> It's the least scary thing you're doing
06:08:22FromDiscord<Elegantbeef> You're overlapping data and using a single pointer to refer to two seperate types
06:11:05FromDiscord<bosinski2023> In reply to @Elegantbeef "You're overlapping data and": i know - and if somebody knows a way to make this safer or better readable, i'd do it right away. But it's a sophisticated construct, where the compiler cannot support me with sane range-checks etc. So i'm my own here, but readabillity is ok now - really nice..
06:15:31FromDiscord<bosinski2023> if i can finish this, it's gonna be a vectorized Set-type with cooperating threads during the grow-phase - i'll mention you in the dedication 🙂
06:29:48FromDiscord<bosinski2023> and maybe somebody - who knows the language - wants to have a chit-chat with Jan Wassenberg from to googles' brain-group ? He'd be happy to learn if there are plans on the nim-side regarding putting SIMD into the language [ https://github.com/google/highway/issues/1738#issuecomment-2003730948 ].
06:37:58FromDiscord<girvo> sent a code paste, see https://play.nim-lang.org/#pasty=obQKsPIWYbmB
06:38:30FromDiscord<girvo> If stmt includes a second guarded variable access, that gcsafe cast is going to break it no?
06:40:50FromDiscord<girvo> I wish there was a way to say "gcsafe but only for this guarded variable"
06:42:22FromDiscord<Elegantbeef> Alias a the global with a template
06:44:02FromDiscord<girvo> sent a code paste, see https://play.nim-lang.org/#pasty=SkZNVSFuXLyZ
06:44:41FromDiscord<Elegantbeef> Yea
06:45:25FromDiscord<Elegantbeef> though ideally your `withLock` template would be a macro and emit the templates internally
06:46:00FromDiscord<girvo> Yeah I think I'm going to go that route in the end
06:46:05FromDiscord<girvo> Doing this by hand feels wonky
06:46:59FromDiscord<Elegantbeef> `withReadLock(rw: RwLock, toLock: varargs[typed], body: untyped)` or however you need to write it
06:47:18FromDiscord<girvo> Yeah, taking in the guarded var is fine tbh
06:47:39FromDiscord<girvo> I'll write this the explicit way for now, and revisit this after the deploy on friday
06:47:57FromDiscord<Elegantbeef> No deploy on thursday change it to the macro then deploy
06:48:00FromDiscord<Elegantbeef> on friday
06:49:22FromDiscord<girvo> It's more none of this code will be deployed thursday or friday haha but I want to finish porting the Channel[T] to FreeRTOS Queue[T: NoRef] which means moving DeviceConfig to shared RwLock'ed memory
06:49:43FromDiscord<girvo> (and then I'm going to port `rwlocks` to use FreeRTOS mutexes with timeouts)
06:51:28FromDiscord<girvo> All sends, recvs, withLocks and direct-to-task notifs can all take timeouts now 😄
06:51:40FromDiscord<girvo> No more dead locks due to filled channels and so on
06:52:55FromDiscord<leorize> I'd have more things to be afraid about if you used channels in ways that gets deadlocked
07:13:57*PMunch joined #nim
07:24:53*advesperacit joined #nim
07:28:56FromDiscord<madonuko> nimsuggest not working…? https://media.discordapp.net/attachments/371759389889003532/1219910530400129065/aUY8joF.png?ex=660d0537&is=65fa9037&hm=0ebd0a6df979cf67b4770b2dbdfbc44d461a7fd6ccf1576cfe83e0beb5db0719&
07:29:10FromDiscord<madonuko> sent a code paste, see https://paste.rs/2gBpo
07:35:31*syl_ quit (Ping timeout: 272 seconds)
07:37:38FromDiscord<A2> lol sorry for replying with such lag; I've been a bit distracted and don't have notificatione on in this channel.↵Right now we're cross compiling with mingw. Not relying on anything Linux only, but getting the tooling to work is a bit of a hassle anyway. I think we got it to work yesterday though\: https://gitlab.com/nobodywho/nobody/-/merge_requests/78↵(@Robyn [She/Her])
07:47:06*syl joined #nim
08:02:00*xet7 quit (Ping timeout: 260 seconds)
08:07:08*ntat quit (Quit: Leaving)
08:11:57FromDiscord<Robyn [She/Her]> In reply to @A2 "lol sorry for replying": It's fine, no harm done! And that's fair, glad it's working now!
09:52:12*deadmarshal_ quit (Ping timeout: 255 seconds)
10:03:03PMunchHmm, so Futhark seems to have a bug with Clang17
10:03:40PMunchWhich is caused by the libclang-nim package missing an enum value
10:03:47PMunchMaybe I'll have to Futhark libclang
10:20:30FromDiscord<Robyn [She/Her]> In reply to @PMunch "Maybe I'll have to": Do it :P
10:21:35FromDiscord<Robyn [She/Her]> QEMU can run in QEMU, Nim is written in Nim, only makes sense for Futhark to use Futhark as the next step of evolution :P
10:28:26*une left #nim (#nim)
10:29:09*xet7 joined #nim
10:33:22PMunchIt's probably going to be a painful rewrite though :P
10:35:50FromDiscord<Robyn [She/Her]> Perhaps, but hey, better in the long run maybe?
10:37:24FromDiscord<Robyn [She/Her]> I should really find a library to wrap in Nim tbh
10:37:40FromDiscord<Robyn [She/Her]> In reply to @chronos.vitaqua "QEMU can run in": Oh wait, does libclang's API for C++ differ massively or no?
10:52:53PMunchWell I'd be wrapping the C library, same as the manual wrapper I use today
10:53:06PMunchBut I'm guessing they might've changed some names and/or types in the conversion
10:53:22PMunchWhich might cause all kinds of grief when porting to a Futhark'ed version
11:53:57*NimBot joined #nim
11:56:46*fallback joined #nim
12:19:42PMunchWelp, turns out it was fairly trivial :P
12:26:35*PMunch quit (Quit: Leaving)
12:30:14FromDiscord<pmunch> Version 0.12.4 now bootstraps itself (kinda)
12:34:12FromDiscord<Robyn [She/Her]> In reply to @PMunch "Welp, turns out it": Eyyy
12:40:09*ntat joined #nim
12:56:48*rockcavera joined #nim
13:12:04arkanoidwhat is the differece from "init(_: typedesc[Foo]: Foo" and "init(T: type Foo): T" ?
13:12:53FromDiscord<odexine> Nothing, except to note that using “type” in that context is IIRC outdated
13:13:21arkanoidthanks!
13:15:27arkanoidthe result of typedesc is always a concrete type, or it might well be a typeclass/concept?
13:49:24NimEventerNew thread by elcritch: Experimenting with a SharedRc type, see https://forum.nim-lang.org/t/11263
13:53:54*deadmarshal_ joined #nim
14:16:38*casaca quit (Remote host closed the connection)
14:16:38*mronetwo quit (Remote host closed the connection)
14:16:39*robertmeta quit (Remote host closed the connection)
14:16:39*adigitoleo quit (Remote host closed the connection)
14:16:41*ursa-major quit (Write error: Broken pipe)
14:16:41*noeontheend quit (Remote host closed the connection)
14:17:22*mronetwo joined #nim
14:17:32*robertmeta joined #nim
14:17:32*ursa-major joined #nim
14:17:32*noeontheend joined #nim
14:17:37*adigitoleo joined #nim
14:29:37FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#pasty=ewxoMVnkOYkN
14:29:42FromDiscord<albassort> what are the chances this is my fault
14:30:13FromDiscord<albassort> idr wanna step through it atm, is this known?
14:38:13*systemds1cks is now known as systemdsucks
15:25:43FromDiscord<myxi> you're probably just reading from nil like it hints
15:25:51FromDiscord<myxi> it happened to me two days ago
15:26:14FromDiscord<myxi> and indeed, it turned out that I was reading from nil
15:26:50*derpydoo joined #nim
15:27:03FromDiscord<myxi> you don't have to step through everything, just use `echo fmt"{identifier=}"` to see each an identifier's value
15:27:11FromDiscord<myxi> that's what I did back then
15:32:02FromDiscord<albassort> This program has been working for like a year
15:32:06FromDiscord<albassort> so it would be wird
15:32:11FromDiscord<albassort> (edit) "wird" => "weird"
15:32:16FromDiscord<albassort> i will investigate
15:32:33FromDiscord<myxi> you're running it in a newer version than before?
15:32:39FromDiscord<myxi> (edit) "you're running it in a newer version ... than" added "of nim"
15:32:50FromDiscord<albassort> no i had it precompilled on my system
15:33:07FromDiscord<albassort> is there any symbolic link to re that could cause it?
15:36:04FromDiscord<myxi> IDK much about Nim TBH. I only began speeding through the docs two days ago. But I did see mentions of a debugger in the documentation
15:36:14*ntat quit (Read error: Connection reset by peer)
15:36:23FromDiscord<myxi> and since it's just a segmentation fault, you could probably figure out what's wrong with a debugger
15:36:31*ntat joined #nim
15:36:35FromDiscord<myxi> (edit) "and since it's just a segmentation fault, you could probably figure out what's wrong ... with" added "in the code"
15:36:50FromDiscord<myxi> found an article on it as well: https://internet-of-tomohiro.netlify.app/nim/gdb.en.html
15:37:23advesperacitperhaps you are trying to access a capture group that has not been matched?
15:38:41advesperacitiirc that would be either segfault or some index exception depending on compile options
15:40:01FromDiscord<albassort> hm ok, likely my fault
15:40:03FromDiscord<albassort> i'll work on it
16:05:00*ntat quit (Remote host closed the connection)
16:06:09*ntat joined #nim
16:22:56FromDiscord<ambient3332> Maybe I'm dumb but I can't figure out how to convert array[4, Envelope] into an openArray[Envelope] so I can feed it to a function that modifies it
16:23:16FromDiscord<ambient3332> by convert i mean cast
16:23:20FromDiscord<ambient3332> (no memory copy)
16:24:26FromDiscord<saint.___.> In reply to @myxi "IDK much about Nim": Where's your pfp from? Just wondering!
16:25:31FromDiscord<myxi> In reply to @saint.___. "Where's your pfp from?": I honestly have no idea. I picked it off Pinterest about seven months ago, then it kept around because I like it. I think I should finally found that as well. I will report back in some time.
16:25:32FromDiscord<griffith1deadly> In reply to @ambient3332 "(no memory copy)": https://nim-lang.org/docs/system.html#toOpenArray%2Carray%5BI%2CT%5D%2CI%2CI
16:25:45FromDiscord<myxi> (edit) "it" => "I"
16:25:59FromDiscord<myxi> (edit) "found" => "find" | "findthat ... as" added "out"
16:29:02FromDiscord<saint.___.> In reply to @myxi "I honestly have no": Ooh gotcha!
16:37:35FromDiscord<ambient3332> sent a code paste, see https://play.nim-lang.org/#pasty=mXinugOIyOIs
16:43:17FromDiscord<griffith1deadly> sent a code paste, see https://play.nim-lang.org/#pasty=GvKePwoMXDAT
16:43:20advesperacitopenarray is only a type for use in parameter https://nim-lang.github.io/Nim/manual.html#types-open-arrays
16:43:55FromDiscord<ambient3332> So I can't feed an array[ObjectType] into function that takes openArray[ObjectType]?
16:44:45advesperacit"Any array with a compatible base type can be passed to an open array parameter"
16:44:48FromDiscord<griffith1deadly> In reply to @ambient3332 "So I can't feed": you can, but without storing it into variable
16:45:10FromDiscord<ambient3332> Yeah but the function modifies the array
16:48:29FromDiscord<myxi> is httpclient.HttpClient supposed to created on each request? I forward only one instance of it and I my program crashes with `unhandled exception: Connection was closed before full request has been made` if I make a request after some time later
16:48:56FromDiscord<myxi> (edit) "to" => "tobe"
16:48:59FromDiscord<sirolaf> In reply to @griffith1deadly "you can, but without": You actually can store it with this experimental feature enabled https://nim-lang.org/docs/manual_experimental.html#view-types but not needed for most cases
16:49:05FromDiscord<myxi> (edit) "tobe" => "to be"
16:49:58advesperacit@myxi I've had nothing but misery and pain dealing with httpclient, I suggest you use puppy instead
16:50:03*derpydoo quit (Ping timeout: 260 seconds)
16:51:03FromDiscord<myxi> Thank you. I guess I have to give up on my no external dependencies mission lol
16:51:35advesperacitI started using nim with that mindset as well, but its turned out to be a mistake
16:53:47advesperacitIf you want to stick with httpclient then close/open after each request far between, else you can make some timer logic that will close/open after some reasonable time has passed
16:54:57advesperacitI've done that and it works alright for the most part, but I'll use puppy in future stuff
16:55:04FromDiscord<myxi> thankfully, puppy has a simple file structure, i should probably copy-paste the the license and repo URL on their main then copy the entire code into my src folder, because my CI file currently relies `nim c` to build the binaries and it works pretty nicely so I would rather not mess with the structure
16:55:06*blackbeard420 quit (Quit: ZNC 1.8.2 - https://znc.in)
16:55:12FromDiscord<myxi> (edit) "thankfully, puppy has a simple file structure, i should probably copy-paste the the license and repo URL on their main ... then" added "file"
16:55:26FromDiscord<myxi> (edit) "folder," => "folder."
16:56:03FromDiscord<sirolaf> sent a code paste, see https://play.nim-lang.org/#pasty=WKvYxfTRNclU
17:00:55FromDiscord<kiloneie> Is there a way to get the name of a variable at runtime ?
17:02:34FromDiscord<ambient3332> sent a code paste, see https://play.nim-lang.org/#pasty=yUBnlGollYse
17:11:33arkanoid"import foo {.all.} except bar, baz" seems to import bar, baz
17:22:06FromDiscord<Elegantbeef> All probably does not care about `except`
17:22:12FromDiscord<Elegantbeef> So... either issue or stop using all 😄
17:32:14FromDiscord<myxi> btw, my project that's only using the stdlib doesn't compile with tcc (from ubuntu 22.04 repos), is it not maintained?
17:36:46FromDiscord<Elegantbeef> Tcc is not supposed to be supported but you can just do `--threads::off`
17:44:43FromDiscord<ambient3332> sent a code paste, see https://play.nim-lang.org/#pasty=UaDjOnTEnSYl
17:45:05FromDiscord<ambient3332> (it makes a copy and runs render on that, not the original)
18:35:22FromDiscord<Robyn [She/Her]> In reply to @kiloneie "Is there a way": Why would you need a variable name at runtime?
18:42:28FromDiscord<kiloneie> In reply to @chronos.vitaqua "Why would you need": Just seeing if it's possible
18:49:00FromDiscord<odexine> In reply to @chronos.vitaqua "Why would you need": it has a use
18:49:03FromDiscord<odexine> In reply to @kiloneie "Just seeing if it's": astToStr?
18:52:21*ntat_ joined #nim
18:53:14*ntat quit (Ping timeout: 264 seconds)
19:05:36*ntat_ is now known as ntat
19:09:22FromDiscord<Robyn [She/Her]> In reply to @odexine "it has a use": I'm just curious about the use honestly
19:29:02Amun-Rait's possible, use std/tables
19:29:58FromDiscord<kiloneie> In reply to @odexine "astToStr?": I actually tried that several times, but for some reason i was trying this in a template... brain fog
19:29:59Amun-Ra;)
19:32:06Amun-RaI don't think asttostr would be of much help
19:33:14FromDiscord<kiloneie> ? it's very useful for debugging, instead of typing the 10 variables you want printed pretty 10x times, you just make a proc with astToStr
19:33:38FromDiscord<kiloneie> im sure it has other uses too
19:35:29Amun-RaI'm courious about the runtime usage of asttostr
19:40:06FromDiscord<Elegantbeef> It turns into a static string
19:40:14FromDiscord<Elegantbeef> So there is not much benefit to runtime usage
19:40:25Amun-Raes
19:40:27Amun-Rayes*
19:46:37*ntat quit (Quit: Leaving)
19:47:29FromDiscord<Elegantbeef> there is also `locals` one can use
19:47:33FromDiscord<Elegantbeef> so you can do `echo locals()`
19:48:06FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=DhlSRpveFqcX
20:11:02NimEventerNew thread by devosalain2: Nim & vscode , freebsd vs artix(arch) linux, see https://forum.nim-lang.org/t/11268
20:38:50*advesperacit quit ()
20:40:59*advesperacit joined #nim
21:01:01*SchweinDeBurg quit (Quit: WeeChat 4.3.0-dev)
21:01:26*SchweinDeBurg joined #nim
21:18:26FromDiscord<morgan> `futhark.nim(886, 24) Error: type expected` idk what i did but i got this error in futhark https://media.discordapp.net/attachments/371759389889003532/1220119281791008830/image.png?ex=660dc7a1&is=65fb52a1&hm=d44f3dac0028b2661e856a78a9d282607631e433b6591823c9ca3a0f402f6631&
21:18:49FromDiscord<morgan> idk why futhark had been working and now isnt
21:19:00FromDiscord<morgan> i didn't change the c im wrapping
21:19:11FromDiscord<morgan> i did define new types
21:20:16FromDiscord<morgan> oh now the error is in the generated code from futhark
21:20:54FromDiscord<morgan> oh maybe its my converters
21:21:00FromDiscord<morgan> i think that might be a name collision
21:22:03FromDiscord<morgan> yeah that was it
21:31:21*advesperacit quit ()
22:56:12*disso-peach quit (Remote host closed the connection)
22:56:35*disso-peach joined #nim
23:23:58*johuck joined #nim
23:24:45*casaca joined #nim
23:45:19*marcus quit (Remote host closed the connection)
23:46:00*marcus joined #nim