| 00:33:55 | FromDiscord | <girvo> sent a code paste, see https://play.nim-lang.org/#pasty=QwyXVvaOzFln |
| 00:34:45 | FromDiscord | <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:52 | FromDiscord | <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:55 | FromDiscord | <girvo> aw really? that sucks 😦 |
| 00:35:30 | FromDiscord | <Robyn [She/Her]> You could always do `.replace("%2C", ",")` :P |
| 00:35:48 | FromDiscord | <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:52 | FromDiscord | <girvo> Yeah which would work, but is not ideal lol |
| 00:35:56 | FromDiscord | <girvo> sent a code paste, see https://play.nim-lang.org/#pasty=PfFllZfVQnCD |
| 00:36:20 | FromDiscord | <girvo> Thats the proc, I get what it's doing but it makes a tonne of valid query params invalid lmao |
| 00:36:43 | FromDiscord | <girvo> tbf, the server side should be smart enough to decode %2C, but sadly I don't control the server side here |
| 00:37:32 | FromDiscord | <girvo> Oh well, raw string concatention it is |
| 00:44:15 | FromDiscord | <Robyn [She/Her]> Fair oof |
| 00:44:17 | FromDiscord | <Robyn [She/Her]> Wait actually |
| 00:44:23 | FromDiscord | <Robyn [She/Her]> There should be a proc that decodes that iirc |
| 00:45:13 | FromDiscord | <Robyn [She/Her]> https://nim-lang.org/docs/uri.html#decodeUrl%2Cstring @girvo |
| 00:46:41 | FromDiscord | <girvo> Yeah I think the `?` will make that slightly wonky though as an infix? I'll revisit this later 🙂 thanks! |
| 00:47:59 | FromDiscord | <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:53 | FromDiscord | <user2m> sent a long message, see https://pasty.ee/bPmTEfruZrjn |
| 02:41:19 | FromDiscord | <Elegantbeef> If there is code that knows your secret on a remote PC the secret can be got |
| 02:41:29 | FromDiscord | <Elegantbeef> constant strings are just stored in a data section |
| 02:42:56 | FromDiscord | <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:04 | FromDiscord | <bosinski2023> sent a code paste, see https://play.nim-lang.org/#pasty=uZmTgBDhRYyf |
| 03:27:59 | FromDiscord | <bosinski2023> (edit) "https://play.nim-lang.org/#pasty=OybgpehRRcdi" => "https://play.nim-lang.org/#pasty=iHBYZHHzBRsp" |
| 03:29:04 | FromDiscord | <Elegantbeef> Well have a single type definition |
| 03:30:15 | FromDiscord | <bosinski2023> In reply to @Elegantbeef "Well have a single": a unified type definition ? hmm, thats what i'm looking after ... |
| 03:32:42 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=sbckLlkRUSAE |
| 03:35:40 | FromDiscord | <bosinski2023> sent a code paste, see https://play.nim-lang.org/#pasty=nxBnxXZuTyGX |
| 03:36:11 | FromDiscord | <Elegantbeef> Right then inside there you'd likely want a `when sizeof(T) ==...` |
| 03:36:47 | FromDiscord | <Elegantbeef> Using all the same field names so your destructors don't need to be specialised |
| 03:39:19 | NimEventer | New thread by ITwrx: How to parse a multipart/form-data POST body string?, see https://forum.nim-lang.org/t/11255 |
| 03:40:06 | FromDiscord | <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:29 | FromDiscord | <Elegantbeef> I mean if you use my code it should just work |
| 03:40:56 | FromDiscord | <bosinski2023> In reply to @Elegantbeef "I mean if you": 😂 great, i'll try.. thx buddy |
| 03:42:30 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#pasty=jVuUrwFyOMHZ yea works fine |
| 03:56:09 | FromDiscord | <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:54 | FromDiscord | <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:54 | FromDiscord | <girvo> sent a code paste, see https://play.nim-lang.org/#pasty=hlnMyQjPAOxW |
| 04:10:09 | FromDiscord | <Elegantbeef> Yes |
| 04:10:25 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=tTYTDSEFBsBL |
| 04:10:36 | FromDiscord | <girvo> Oh! |
| 04:10:37 | FromDiscord | <girvo> Thanks 🙂 |
| 04:12:59 | FromDiscord | <bosinski2023> sent a code paste, see https://play.nim-lang.org/#pasty=sNSHnbCeikqh |
| 04:13:11 | FromDiscord | <Elegantbeef> Stop using tuples |
| 04:13:13 | FromDiscord | <Elegantbeef> Use an object |
| 04:13:19 | FromDiscord | <bosinski2023> (edit) "https://play.nim-lang.org/#pasty=ixCbuNfUcJuC" => "https://play.nim-lang.org/#pasty=mjrvXFnCtXxn" |
| 04:14:16 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=dTtassrRHUWE |
| 04:18:06 | FromDiscord | <bosinski2023> sent a code paste, see https://play.nim-lang.org/#pasty=JZmsTIQRZmxQ |
| 04:19:19 | FromDiscord | <bosinski2023> whats bad about tuples ? they worked nicely, lean, but no ? |
| 04:19:38 | FromDiscord | <Elegantbeef> You rarely want tuples |
| 04:19:56 | FromDiscord | <Elegantbeef> They cannot have destructors, they have an odd syntax, they're structually typed |
| 04:20:04 | FromDiscord | <bosinski2023> In reply to @Elegantbeef "You rarely want tuples": maybe a old pythonic reflex .. |
| 04:28:08 | FromDiscord | <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:30 | FromDiscord | <Elegantbeef> As long as you use guard for all your other locked types I don't see why not |
| 04:34:49 | FromDiscord | <girvo> Yep it does |
| 04:41:36 | FromDiscord | <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:08 | FromDiscord | <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:28 | FromDiscord | <Elegantbeef> Right a `UncheckedArray[T]` has to be at the end of a object |
| 04:43:18 | FromDiscord | <bosinski2023> In reply to @Elegantbeef "Right a `UncheckedArray[T]` has": https://play.nim-lang.org/#pasty=amSOtnOCyHqt works, but should not ? |
| 04:43:36 | FromDiscord | <Elegantbeef> Correct |
| 04:43:57 | FromDiscord | <Elegantbeef> Multiple uncheckedarrays inside an object makes no sense |
| 04:45:03 | FromDiscord | <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:21 | FromDiscord | <Elegantbeef> Right it's a bug with tuples |
| 04:45:35 | FromDiscord | <Elegantbeef> It's not "might overlap" they're overlapping |
| 04:46:07 | FromDiscord | <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:11 | FromDiscord | <Elegantbeef> in a data type\ |
| 04:46:22 | FromDiscord | <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:52 | FromDiscord | <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:13 | FromDiscord | <Elegantbeef> Is your local nim 2.0? |
| 04:49:47 | FromDiscord | <bosinski2023> In reply to @Elegantbeef "Is your local nim": `Version 2.1.1 ` last weeks.. |
| 04:49:53 | FromDiscord | <Elegantbeef> Why are they unchecked arrays? Isn't the sized known? |
| 04:49:59 | FromDiscord | <Elegantbeef> Well the playground is stable |
| 04:50:31 | FromDiscord | <bosinski2023> In reply to @Elegantbeef "Well the playground is": dynamic, self allocated, growable data-structure.. |
| 04:52:48 | FromDiscord | <Elegantbeef> You might aswell just do `cast[ptr UncheckedArray[Atomic[uint8]](yourObj)[...]` |
| 04:53:32 | FromDiscord | <Elegantbeef> changing `ctl` to be a `ctl: pointer` |
| 04:53:42 | FromDiscord | <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:49 | FromDiscord | <Elegantbeef> Right but you're after a union |
| 04:55:11 | FromDiscord | <bosinski2023> In reply to @Elegantbeef "Right but you're after": jeez, there a pragma for that ? |
| 04:55:36 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=xhKAFnKzEGZQ |
| 04:55:37 | FromDiscord | <Elegantbeef> Yes |
| 04:56:09 | FromDiscord | <bosinski2023> In reply to @Elegantbeef "Yes": you're my tuple/union/pargma - hero :)) |
| 05:07:21 | FromDiscord | <myxi> sent a code paste, see https://play.nim-lang.org/#pasty=itDeeVlaGtbO |
| 05:10:59 | FromDiscord | <Elegantbeef> Did you run `install` before or after making a git tag? |
| 05:11:22 | FromDiscord | <myxi> after making and pushing the git tag |
| 05:11:36 | FromDiscord | <Elegantbeef> Secondly why are you including that file instead of importing? |
| 05:11:55 | FromDiscord | <myxi> I thought it'd be better for simpler stuff |
| 05:11:58 | FromDiscord | <Elegantbeef> Thirdly does `includes/version` work? |
| 05:12:25 | FromDiscord | <myxi> yes, you can see the second command inputs 0.1.8, before that command i had 0.1.7 installed |
| 05:12:33 | FromDiscord | <myxi> the project compiles just fine with nim |
| 05:12:35 | FromDiscord | <Elegantbeef> No |
| 05:12:35 | FromDiscord | <myxi> (edit) "the project compiles just fine with nim ... " added "c" |
| 05:12:46 | FromDiscord | <Elegantbeef> The command says it cannot find `src/includes/version` |
| 05:13:52 | FromDiscord | <myxi> I don't know where the problem is |
| 05:14:15 | FromDiscord | <Elegantbeef> Right i'm suggesting to try `import includes/version` |
| 05:16:14 | FromDiscord | <myxi> sent a code paste, see https://play.nim-lang.org/#pasty=hoSEbIwzHsYL |
| 05:16:16 | FromDiscord | <bosinski2023> sent a code paste, see https://play.nim-lang.org/#pasty=eqBdpsjGWsWN |
| 05:17:42 | FromDiscord | <myxi> sent a code paste, see https://play.nim-lang.org/#pasty=lAWlcinDxMUr |
| 05:17:56 | FromDiscord | <myxi> (edit) "https://play.nim-lang.org/#pasty=niErxzGqUEJt" => "https://play.nim-lang.org/#pasty=ffGfMupbdMVB" |
| 05:19:16 | FromDiscord | <Elegantbeef> @bosinski2023 context? |
| 05:23:47 | FromDiscord | <bosinski2023> sent a code paste, see https://play.nim-lang.org/#pasty=KSXRfQmhBuyo |
| 05:24:54 | FromDiscord | <Elegantbeef> I just tested on devel and stable it worked fine |
| 05:26:05 | FromDiscord | <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:32 | FromDiscord | <Elegantbeef> How are you using `AccessCtrl`? |
| 05:26:37 | FromDiscord | <Elegantbeef> It's pointer indirected yes? |
| 05:30:36 | FromDiscord | <bosinski2023> sent a code paste, see https://play.nim-lang.org/#pasty=oKhvStipAOiO |
| 05:32:26 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=nqIsSODzzQgJ |
| 05:33:24 | FromDiscord | <bosinski2023> sent a code paste, see https://play.nim-lang.org/#pasty=uWQgJnvpdypM |
| 05:33:40 | FromDiscord | <Elegantbeef> Is that a Nim error or C compiler error? |
| 05:35:39 | FromDiscord | <bosinski2023> sent a code paste, see https://play.nim-lang.org/#pasty=RmrJZpfkUGrj |
| 05:35:49 | FromDiscord | <Elegantbeef> That's from your C compiler |
| 05:36:26 | FromDiscord | <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:23 | FromDiscord | <Elegantbeef> You are probably best to just cast the field which is a `pointer` to be fair |
| 05:37:44 | FromDiscord | <Elegantbeef> But it works with both gcc and clang here |
| 05:38:08 | FromDiscord | <bosinski2023> In reply to @Elegantbeef "But it works with": which Clang do you use ? |
| 05:38:22 | FromDiscord | <Elegantbeef> 17.0.6 |
| 05:40:06 | FromDiscord | <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:52 | FromDiscord | <Elegantbeef> A union with a size of 0 is a scary thing 😄 |
| 05:40:56 | FromDiscord | <bosinski2023> and why does clang accept two flexible-array-member within a tuple.. |
| 05:41:12 | FromDiscord | <Elegantbeef> Probably cause Nim's tuple gen fucked up |
| 05:41:42 | FromDiscord | <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:54 | FromDiscord | <Elegantbeef> Lol |
| 05:41:57 | FromDiscord | <Elegantbeef> Just use `pointer` and cast |
| 05:42:13 | FromDiscord | <Elegantbeef> That's the least sketchy solution |
| 05:42:28 | FromDiscord | <bosinski2023> In reply to @Elegantbeef "Just use `pointer` and": thats so ugly - it know how to do it, but really thats ugly.. |
| 05:43:28 | FromDiscord | <bosinski2023> any chance to get GCC working aside Clang on a mac-machine ? |
| 05:45:51 | FromDiscord | <Elegantbeef> I mean you make it a distinct pointer and write some getters |
| 05:45:52 | FromDiscord | <Elegantbeef> No clue |
| 05:45:53 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=SgvCwRJPrHXv |
| 05:48:43 | FromDiscord | <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:08 | FromDiscord | <Elegantbeef> "Less is more" and other funny quotes |
| 05:53:37 | FromDiscord | <bosinski2023> In reply to @Elegantbeef ""Less is more" and": so true - but i'm afrais of the `distinct pointer` very afraid .. |
| 05:54:21 | FromDiscord | <Elegantbeef> Distinct is Nim's lovely solution for silly single field C structs 😄 |
| 05:56:43 | * | ntat joined #nim |
| 05:59:37 | FromDiscord | <bosinski2023> sent a code paste, see https://play.nim-lang.org/#pasty=LEOHUubfwHPH |
| 06:00:37 | FromDiscord | <leorize> you have to dereference those |
| 06:00:38 | FromDiscord | <leorize> although why are you doing double pointer |
| 06:02:33 | FromDiscord | <bosinski2023> sent a code paste, see https://play.nim-lang.org/#pasty=lYFnAdWQVgqu |
| 06:03:29 | FromDiscord | <Elegantbeef> technically you don't need the (), but that should work |
| 06:03:48 | FromDiscord | <Elegantbeef> You also didn't make it `AccessCtrl[T]` |
| 06:03:54 | FromDiscord | <Elegantbeef> You made it `ptr AccessCtrl[T]` |
| 06:03:59 | FromDiscord | <Elegantbeef> So you have 2 pointers as leo said |
| 06:04:12 | FromDiscord | <Elegantbeef> We now made it so `AccessCtrl` is a pointer |
| 06:07:43 | FromDiscord | <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:03 | FromDiscord | <Elegantbeef> It's the least scary thing you're doing |
| 06:08:22 | FromDiscord | <Elegantbeef> You're overlapping data and using a single pointer to refer to two seperate types |
| 06:11:05 | FromDiscord | <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:31 | FromDiscord | <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:48 | FromDiscord | <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:58 | FromDiscord | <girvo> sent a code paste, see https://play.nim-lang.org/#pasty=obQKsPIWYbmB |
| 06:38:30 | FromDiscord | <girvo> If stmt includes a second guarded variable access, that gcsafe cast is going to break it no? |
| 06:40:50 | FromDiscord | <girvo> I wish there was a way to say "gcsafe but only for this guarded variable" |
| 06:42:22 | FromDiscord | <Elegantbeef> Alias a the global with a template |
| 06:44:02 | FromDiscord | <girvo> sent a code paste, see https://play.nim-lang.org/#pasty=SkZNVSFuXLyZ |
| 06:44:41 | FromDiscord | <Elegantbeef> Yea |
| 06:45:25 | FromDiscord | <Elegantbeef> though ideally your `withLock` template would be a macro and emit the templates internally |
| 06:46:00 | FromDiscord | <girvo> Yeah I think I'm going to go that route in the end |
| 06:46:05 | FromDiscord | <girvo> Doing this by hand feels wonky |
| 06:46:59 | FromDiscord | <Elegantbeef> `withReadLock(rw: RwLock, toLock: varargs[typed], body: untyped)` or however you need to write it |
| 06:47:18 | FromDiscord | <girvo> Yeah, taking in the guarded var is fine tbh |
| 06:47:39 | FromDiscord | <girvo> I'll write this the explicit way for now, and revisit this after the deploy on friday |
| 06:47:57 | FromDiscord | <Elegantbeef> No deploy on thursday change it to the macro then deploy |
| 06:48:00 | FromDiscord | <Elegantbeef> on friday |
| 06:49:22 | FromDiscord | <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:43 | FromDiscord | <girvo> (and then I'm going to port `rwlocks` to use FreeRTOS mutexes with timeouts) |
| 06:51:28 | FromDiscord | <girvo> All sends, recvs, withLocks and direct-to-task notifs can all take timeouts now 😄 |
| 06:51:40 | FromDiscord | <girvo> No more dead locks due to filled channels and so on |
| 06:52:55 | FromDiscord | <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:56 | FromDiscord | <madonuko> nimsuggest not working…? https://media.discordapp.net/attachments/371759389889003532/1219910530400129065/aUY8joF.png?ex=660d0537&is=65fa9037&hm=0ebd0a6df979cf67b4770b2dbdfbc44d461a7fd6ccf1576cfe83e0beb5db0719& |
| 07:29:10 | FromDiscord | <madonuko> sent a code paste, see https://paste.rs/2gBpo |
| 07:35:31 | * | syl_ quit (Ping timeout: 272 seconds) |
| 07:37:38 | FromDiscord | <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:57 | FromDiscord | <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:03 | PMunch | Hmm, so Futhark seems to have a bug with Clang17 |
| 10:03:40 | PMunch | Which is caused by the libclang-nim package missing an enum value |
| 10:03:47 | PMunch | Maybe I'll have to Futhark libclang |
| 10:20:30 | FromDiscord | <Robyn [She/Her]> In reply to @PMunch "Maybe I'll have to": Do it :P |
| 10:21:35 | FromDiscord | <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:22 | PMunch | It's probably going to be a painful rewrite though :P |
| 10:35:50 | FromDiscord | <Robyn [She/Her]> Perhaps, but hey, better in the long run maybe? |
| 10:37:24 | FromDiscord | <Robyn [She/Her]> I should really find a library to wrap in Nim tbh |
| 10:37:40 | FromDiscord | <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:53 | PMunch | Well I'd be wrapping the C library, same as the manual wrapper I use today |
| 10:53:06 | PMunch | But I'm guessing they might've changed some names and/or types in the conversion |
| 10:53:22 | PMunch | Which 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:42 | PMunch | Welp, turns out it was fairly trivial :P |
| 12:26:35 | * | PMunch quit (Quit: Leaving) |
| 12:30:14 | FromDiscord | <pmunch> Version 0.12.4 now bootstraps itself (kinda) |
| 12:34:12 | FromDiscord | <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:04 | arkanoid | what is the differece from "init(_: typedesc[Foo]: Foo" and "init(T: type Foo): T" ? |
| 13:12:53 | FromDiscord | <odexine> Nothing, except to note that using “type” in that context is IIRC outdated |
| 13:13:21 | arkanoid | thanks! |
| 13:15:27 | arkanoid | the result of typedesc is always a concrete type, or it might well be a typeclass/concept? |
| 13:49:24 | NimEventer | New 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:37 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#pasty=ewxoMVnkOYkN |
| 14:29:42 | FromDiscord | <albassort> what are the chances this is my fault |
| 14:30:13 | FromDiscord | <albassort> idr wanna step through it atm, is this known? |
| 14:38:13 | * | systemds1cks is now known as systemdsucks |
| 15:25:43 | FromDiscord | <myxi> you're probably just reading from nil like it hints |
| 15:25:51 | FromDiscord | <myxi> it happened to me two days ago |
| 15:26:14 | FromDiscord | <myxi> and indeed, it turned out that I was reading from nil |
| 15:26:50 | * | derpydoo joined #nim |
| 15:27:03 | FromDiscord | <myxi> you don't have to step through everything, just use `echo fmt"{identifier=}"` to see each an identifier's value |
| 15:27:11 | FromDiscord | <myxi> that's what I did back then |
| 15:32:02 | FromDiscord | <albassort> This program has been working for like a year |
| 15:32:06 | FromDiscord | <albassort> so it would be wird |
| 15:32:11 | FromDiscord | <albassort> (edit) "wird" => "weird" |
| 15:32:16 | FromDiscord | <albassort> i will investigate |
| 15:32:33 | FromDiscord | <myxi> you're running it in a newer version than before? |
| 15:32:39 | FromDiscord | <myxi> (edit) "you're running it in a newer version ... than" added "of nim" |
| 15:32:50 | FromDiscord | <albassort> no i had it precompilled on my system |
| 15:33:07 | FromDiscord | <albassort> is there any symbolic link to re that could cause it? |
| 15:36:04 | FromDiscord | <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:23 | FromDiscord | <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:35 | FromDiscord | <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:50 | FromDiscord | <myxi> found an article on it as well: https://internet-of-tomohiro.netlify.app/nim/gdb.en.html |
| 15:37:23 | advesperacit | perhaps you are trying to access a capture group that has not been matched? |
| 15:38:41 | advesperacit | iirc that would be either segfault or some index exception depending on compile options |
| 15:40:01 | FromDiscord | <albassort> hm ok, likely my fault |
| 15:40:03 | FromDiscord | <albassort> i'll work on it |
| 16:05:00 | * | ntat quit (Remote host closed the connection) |
| 16:06:09 | * | ntat joined #nim |
| 16:22:56 | FromDiscord | <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:16 | FromDiscord | <ambient3332> by convert i mean cast |
| 16:23:20 | FromDiscord | <ambient3332> (no memory copy) |
| 16:24:26 | FromDiscord | <saint.___.> In reply to @myxi "IDK much about Nim": Where's your pfp from? Just wondering! |
| 16:25:31 | FromDiscord | <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:32 | FromDiscord | <griffith1deadly> In reply to @ambient3332 "(no memory copy)": https://nim-lang.org/docs/system.html#toOpenArray%2Carray%5BI%2CT%5D%2CI%2CI |
| 16:25:45 | FromDiscord | <myxi> (edit) "it" => "I" |
| 16:25:59 | FromDiscord | <myxi> (edit) "found" => "find" | "findthat ... as" added "out" |
| 16:29:02 | FromDiscord | <saint.___.> In reply to @myxi "I honestly have no": Ooh gotcha! |
| 16:37:35 | FromDiscord | <ambient3332> sent a code paste, see https://play.nim-lang.org/#pasty=mXinugOIyOIs |
| 16:43:17 | FromDiscord | <griffith1deadly> sent a code paste, see https://play.nim-lang.org/#pasty=GvKePwoMXDAT |
| 16:43:20 | advesperacit | openarray is only a type for use in parameter https://nim-lang.github.io/Nim/manual.html#types-open-arrays |
| 16:43:55 | FromDiscord | <ambient3332> So I can't feed an array[ObjectType] into function that takes openArray[ObjectType]? |
| 16:44:45 | advesperacit | "Any array with a compatible base type can be passed to an open array parameter" |
| 16:44:48 | FromDiscord | <griffith1deadly> In reply to @ambient3332 "So I can't feed": you can, but without storing it into variable |
| 16:45:10 | FromDiscord | <ambient3332> Yeah but the function modifies the array |
| 16:48:29 | FromDiscord | <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:56 | FromDiscord | <myxi> (edit) "to" => "tobe" |
| 16:48:59 | FromDiscord | <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:05 | FromDiscord | <myxi> (edit) "tobe" => "to be" |
| 16:49:58 | advesperacit | @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:03 | FromDiscord | <myxi> Thank you. I guess I have to give up on my no external dependencies mission lol |
| 16:51:35 | advesperacit | I started using nim with that mindset as well, but its turned out to be a mistake |
| 16:53:47 | advesperacit | If 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:57 | advesperacit | I've done that and it works alright for the most part, but I'll use puppy in future stuff |
| 16:55:04 | FromDiscord | <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:12 | FromDiscord | <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:26 | FromDiscord | <myxi> (edit) "folder," => "folder." |
| 16:56:03 | FromDiscord | <sirolaf> sent a code paste, see https://play.nim-lang.org/#pasty=WKvYxfTRNclU |
| 17:00:55 | FromDiscord | <kiloneie> Is there a way to get the name of a variable at runtime ? |
| 17:02:34 | FromDiscord | <ambient3332> sent a code paste, see https://play.nim-lang.org/#pasty=yUBnlGollYse |
| 17:11:33 | arkanoid | "import foo {.all.} except bar, baz" seems to import bar, baz |
| 17:22:06 | FromDiscord | <Elegantbeef> All probably does not care about `except` |
| 17:22:12 | FromDiscord | <Elegantbeef> So... either issue or stop using all 😄 |
| 17:32:14 | FromDiscord | <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:46 | FromDiscord | <Elegantbeef> Tcc is not supposed to be supported but you can just do `--threads::off` |
| 17:44:43 | FromDiscord | <ambient3332> sent a code paste, see https://play.nim-lang.org/#pasty=UaDjOnTEnSYl |
| 17:45:05 | FromDiscord | <ambient3332> (it makes a copy and runs render on that, not the original) |
| 18:35:22 | FromDiscord | <Robyn [She/Her]> In reply to @kiloneie "Is there a way": Why would you need a variable name at runtime? |
| 18:42:28 | FromDiscord | <kiloneie> In reply to @chronos.vitaqua "Why would you need": Just seeing if it's possible |
| 18:49:00 | FromDiscord | <odexine> In reply to @chronos.vitaqua "Why would you need": it has a use |
| 18:49:03 | FromDiscord | <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:22 | FromDiscord | <Robyn [She/Her]> In reply to @odexine "it has a use": I'm just curious about the use honestly |
| 19:29:02 | Amun-Ra | it's possible, use std/tables |
| 19:29:58 | FromDiscord | <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:59 | Amun-Ra | ;) |
| 19:32:06 | Amun-Ra | I don't think asttostr would be of much help |
| 19:33:14 | FromDiscord | <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:38 | FromDiscord | <kiloneie> im sure it has other uses too |
| 19:35:29 | Amun-Ra | I'm courious about the runtime usage of asttostr |
| 19:40:06 | FromDiscord | <Elegantbeef> It turns into a static string |
| 19:40:14 | FromDiscord | <Elegantbeef> So there is not much benefit to runtime usage |
| 19:40:25 | Amun-Ra | es |
| 19:40:27 | Amun-Ra | yes* |
| 19:46:37 | * | ntat quit (Quit: Leaving) |
| 19:47:29 | FromDiscord | <Elegantbeef> there is also `locals` one can use |
| 19:47:33 | FromDiscord | <Elegantbeef> so you can do `echo locals()` |
| 19:48:06 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=DhlSRpveFqcX |
| 20:11:02 | NimEventer | New 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:26 | FromDiscord | <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:49 | FromDiscord | <morgan> idk why futhark had been working and now isnt |
| 21:19:00 | FromDiscord | <morgan> i didn't change the c im wrapping |
| 21:19:11 | FromDiscord | <morgan> i did define new types |
| 21:20:16 | FromDiscord | <morgan> oh now the error is in the generated code from futhark |
| 21:20:54 | FromDiscord | <morgan> oh maybe its my converters |
| 21:21:00 | FromDiscord | <morgan> i think that might be a name collision |
| 21:22:03 | FromDiscord | <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 |