00:00:16 | FromDiscord | <auxym> probably way easier to link that in via relative paths, compared to trying to figure the nimble package dir |
00:00:48 | nrds | <Prestige99> but link how, is the question |
00:01:39 | FromDiscord | <auxym> passL? |
00:02:03 | FromDiscord | <auxym> I used in .compile. in a project to compile-in a C file based on a compile-time define |
00:02:29 | FromDiscord | <huantian> In reply to @salt "yeah, the error doesn't": hm actually that's weird, why is ord not a procvar |
00:02:44 | nrds | <Prestige99> You're saying like in a pragma? I haven't done that before |
00:03:38 | FromDiscord | <auxym> yeah. for compile I had to use a macro to generate a pragma but you might not have to. |
00:03:40 | FromDiscord | <auxym> https://github.com/auxym/nim-on-samd21/blob/master/src/startup.nim |
00:04:35 | FromDiscord | <huantian> In reply to @huantian "hm actually that's weird,": I think it is that ord is a magic builtin that can't be passed around like that, and the error message is outdated |
00:04:38 | FromDiscord | <auxym> the startup.c file path it's passing in is relative to the project build dir, too. |
00:06:15 | FromDiscord | <auxym> try adding {.passL: "-L./relative/path/to/your/so".} at the top of the file that needs those |
00:08:02 | nrds | <Prestige99> in the library, or in the project using the library? |
00:08:13 | FromDiscord | <exelotl> sent a long message, see http://ix.io/3TKe |
00:09:32 | LuxuryMode | Is `os.commandLineParams` the best way to fetch command line params or is there some other preferred proc or approach for this? |
00:10:12 | FromDiscord | <spoon> now how do i make a macro to make the xor keyword real 😢 |
00:10:32 | nrds | <Prestige99> LuxuryMode I use https://nim-lang.org/docs/parseopt.html |
00:10:39 | FromDiscord | <auxym> In reply to @nrds "<Prestige> in the library,": Prestige: since linking is a single call (I think?), I think anywhere you put it would result in nim adding it to its linker call |
00:10:46 | FromDiscord | <exelotl> In reply to @spoon "now how do i": I'm pretty sure the language has an xor keyword 😅 |
00:11:06 | FromDiscord | <auxym> you can compile with `-v` to see nim's gcc command lines |
00:11:08 | LuxuryMode | nrds: ah beautiful, was looking for something like this. Thank you! |
00:11:21 | nrds | <Prestige99> Hm I'll try it in the "main" module of the libary then |
00:11:22 | FromDiscord | <spoon> i meant nxor |
00:11:36 | FromDiscord | <spoon> :) |
00:11:38 | FromDiscord | <auxym> LuxuryMode: I think the cligen library is also pretty popular |
00:12:12 | FromDiscord | <exelotl> ah |
00:12:15 | FromDiscord | <huantian> it might just be easier to bitwise not then xor lol |
00:12:49 | LuxuryMode | thanks auxym |
00:12:51 | FromDiscord | <spoon> lol, just being able to define things that take arguments on either side have been on my wishlist for some reason |
00:12:52 | FromDiscord | <auxym> In reply to @spoon "i meant nxor": `template nxor(a, b: untyped): untyped = not (a xor b)`? |
00:13:24 | FromDiscord | <spoon> hm |
00:13:34 | FromDiscord | <huantian> you could just deal with having to type an extra period |
00:13:52 | FromDiscord | <auxym> In reply to @spoon "hm": nim actually implements a lot of its own stuff that way: https://github.com/nim-lang/Nim/blob/version-1-6/lib/system/comparisons.nim#L128 |
00:14:11 | FromDiscord | <spoon> ye, i've seen the magic pragma before |
00:14:19 | FromDiscord | <spoon> havent read for a while though |
00:14:42 | FromDiscord | <auxym> no magic there, it's just a template |
00:14:51 | FromDiscord | <huantian> sent a code paste, see https://paste.rs/Ftn |
00:15:24 | * | crem quit (Ping timeout: 240 seconds) |
00:16:29 | FromDiscord | <spoon> In reply to @auxym "no magic there, it's": yea, nim has a special set of characters that work that way though |
00:16:29 | FromDiscord | <auxym> oh yeah you're right about that |
00:17:15 | * | crem joined #nim |
00:17:34 | * | nrds quit (Remote host closed the connection) |
00:21:00 | FromDiscord | <huantian> Who needs bitwise xnor when you can just use a loop and != |
00:21:11 | * | nrds joined #nim |
00:21:38 | * | 077AAIBZ5 joined #nim |
00:21:38 | * | 077AAIBZ5 quit (Remote host closed the connection) |
00:22:05 | FromDiscord | <auxym> haha |
00:22:23 | FromDiscord | <auxym> would gcc optimize that to an xnor? 😄 |
00:23:31 | FromDiscord | <demotomohiro> x86_64 or arm have xnor instruction? |
00:24:00 | FromDiscord | <demotomohiro> As far as I know, they have and, or, xor |
00:27:04 | LuxuryMode | Is there a unit type in Nim, e.g. `proc doSomething(): Unit = echo "whatever"` or is this https://nim-lang.org/docs/manual.html#types-procedural-type basically what I'm dealing with? |
00:28:11 | FromDiscord | <huantian> I think you just do `proc()` yeah |
00:28:35 | LuxuryMode | thanks |
00:28:41 | LuxuryMode | Also, is there a REPL for Nim? |
00:33:41 | FromDiscord | <auxym> inim works OK |
00:34:36 | FromDiscord | <auxym> not sure why they don't merge this so it compiles on 1.6 though 😦 https://github.com/inim-repl/INim/pull/131 |
00:35:53 | FromDiscord | <auxym> meanwhile you can `nimble install https://github.com/auxym/INim@#update-cligen` |
00:40:34 | LuxuryMode | thanks auxym |
00:42:33 | LuxuryMode | hmm, where exactly does nimble install that? Seems I need to add some dir to my path |
00:43:36 | FromDiscord | <auxym> on linux it's `~/.nimble/bin` |
00:44:32 | FromDiscord | <huantian> I think you can also do `nim secret` |
00:49:57 | LuxuryMode | thanks |
00:50:03 | LuxuryMode | How do I get out of nim secret? :P |
00:50:31 | LuxuryMode | ah `quit()` |
00:55:10 | FromDiscord | <exelotl> `nim secret` uses Nimscript (the subset of Nim that works at compile time), so it'll probably fall over as soon as you import something that wasn't made with Nimscript in mind |
00:55:41 | FromDiscord | <exelotl> That's why it's secret |
01:00:08 | FromDiscord | <auxym> ah, yeah. inim compiles everything on the fly with tcc |
01:21:30 | * | neurocyte1 joined #nim |
01:23:07 | * | noeontheend joined #nim |
01:23:50 | * | neurocyte quit (Ping timeout: 252 seconds) |
01:23:50 | * | neurocyte1 is now known as neurocyte |
01:29:16 | FromDiscord | <Elegantbeef> So debian sid is fun 😛 |
01:29:42 | FromDiscord | <Elegantbeef> Let's just say gnome isnt very compatible with it due to python being shit |
01:34:08 | FromDiscord | <Girvo> In reply to @Elegantbeef "<@823468778704076810>\: still debugging macro?": Yeah. I can't seem to get my head around how to make a macro pragma replace itself with the codegenDecl pragma in a variable definition |
01:34:24 | FromDiscord | <Elegantbeef> What do you have presently? |
01:34:39 | FromDiscord | <Girvo> sent a code paste, see https://play.nim-lang.org/#ix=3TKl |
01:34:44 | FromDiscord | <Elegantbeef> `[4]` is wrong |
01:35:05 | FromDiscord | <Girvo> Yeah I thought so. I think it needs to be `[2]` or `[1]` based on the dumptree I got? |
01:35:18 | FromDiscord | <Elegantbeef> Not only that but in 1.6 and below variable macros are written `macro rtcNoInit(lh, rh, ex: untyped)` |
01:36:21 | FromDiscord | <Girvo> Ahhhhh |
01:36:22 | FromDiscord | <Girvo> Sweet |
01:36:32 | FromDiscord | <Girvo> Alright I'll start again I think |
01:36:47 | FromDiscord | <Elegantbeef> Also i did make your macro in micros for fun 😛 |
01:36:59 | FromDiscord | <Girvo> Hah how does it look in micros? |
01:37:14 | FromDiscord | <Elegantbeef> https://github.com/beef331/micros/blob/master/tests/test2.nim#L5-L14 |
01:37:16 | FromDiscord | <Girvo> Once I get it working in straight std/macros, it'll be fun to compare |
01:37:36 | FromDiscord | <Girvo> ugh thats so much cleaner to understand haha |
01:37:49 | FromDiscord | <Elegantbeef> That's the point |
01:38:04 | FromDiscord | <Elegantbeef> Oh god trying to use a floating window manager after using i3wm for so long is interesting |
01:38:39 | FromDiscord | <Girvo> sent a code paste, see https://play.nim-lang.org/#ix=3TKm |
01:38:51 | FromDiscord | <Elegantbeef> Yea you can |
01:38:53 | FromDiscord | <Girvo> Haha man I force my floating WM to act like a tiling one. I refuse to give it up |
01:39:00 | FromDiscord | <Elegantbeef> you can make it so `ex` has to be `nnkNilLit` |
01:39:06 | FromDiscord | <Girvo> Ah neat |
01:39:19 | FromDiscord | <Elegantbeef> Eh i'm just trying debian sid a try cause i was pissed off with some ubuntu packages |
01:39:46 | FromDiscord | <Girvo> Because RTC_NOINIT_ATTR's whole deal is that you don't initialise it, it "carries over" memory from its previous execution/boot |
01:39:51 | FromDiscord | <Elegantbeef> Easier to use a normal DE than i3wm for testing |
01:39:59 | FromDiscord | <Girvo> (Well, you don't initialise it always, I guess) |
01:40:07 | FromDiscord | <Girvo> And yeah thats fair enough |
01:40:55 | FromDiscord | <Elegantbeef> if you want to enforce no intializing just do `if ex.kind != nnkNilLit: error("You should know better no intializing RTC vars", ex)` |
01:42:56 | FromDiscord | <Girvo> Haha thats basically exactly what I just wrote |
01:50:14 | FromDiscord | <Girvo> sent a code paste, see https://play.nim-lang.org/#ix=3TKs |
01:50:30 | FromDiscord | <Elegantbeef> In the above yes |
01:50:41 | FromDiscord | <Elegantbeef> `rh` can be any valid type so `nnkBracket` is allowed |
01:50:45 | FromDiscord | <Elegantbeef> Even `nnkCall` |
01:52:34 | FromDiscord | <Girvo> Alright. I need to go read some macro docs/examples I think. Been far too long since I tackled them |
01:52:54 | FromDiscord | <Elegantbeef> shamelessly links my writeup again |
01:53:10 | FromDiscord | <Girvo> Haha thats what I'm going through 😉 |
01:53:19 | FromDiscord | <Girvo> (That and dom's book) |
02:01:56 | * | ltriant_ quit (Ping timeout: 272 seconds) |
02:02:57 | FromDiscord | <Girvo> sent a code paste, see https://play.nim-lang.org/#ix=3TKv |
02:03:29 | FromDiscord | <Elegantbeef> Well i'd suggest using `genasts` instead of quote now but the above should work |
02:03:30 | FromDiscord | <Girvo> Only if I remove the `ex.kind != nnkNilLit` though, as if I don't remove it, it picks up the _next_ statement if I don't have `= nil` |
02:03:54 | FromDiscord | <Girvo> Oh for sure, this is just a first pass to make sure I understand what it's doing |
02:04:08 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/5X5 |
02:04:35 | FromDiscord | <Girvo> Oh nice |
02:04:45 | FromDiscord | <Elegantbeef> `import std/genasts` for that |
02:04:49 | FromDiscord | <Elegantbeef> anyway what's the issue? |
02:05:25 | FromDiscord | <Girvo> sent a code paste, see https://play.nim-lang.org/#ix=3TKw |
02:05:30 | FromDiscord | <Girvo> https://media.discordapp.net/attachments/371759389889003532/958185100758102036/unknown.png |
02:05:40 | FromDiscord | <Girvo> https://media.discordapp.net/attachments/371759389889003532/958185143565176923/unknown.png |
02:06:48 | FromDiscord | <Girvo> And lastly |
02:06:49 | FromDiscord | <Elegantbeef> Full code? |
02:06:49 | FromDiscord | <Girvo> https://media.discordapp.net/attachments/371759389889003532/958185430744985640/unknown.png |
02:07:25 | FromDiscord | <Girvo> https://pastebin.com/hn4gvsUn |
02:07:32 | FromDiscord | <Girvo> ^ full code for that module |
02:08:05 | FromDiscord | <Elegantbeef> `nnkEmpty` is the kind |
02:08:09 | FromDiscord | <Girvo> Ah! |
02:08:16 | FromDiscord | <Girvo> Man I'm a moron sometimes |
02:08:26 | FromDiscord | <Elegantbeef> Hey i lied to you |
02:08:41 | FromDiscord | <Girvo> yeah but I should've picked up on it |
02:08:46 | FromDiscord | <Girvo> I have the dumptree in front of me lol |
02:08:57 | FromDiscord | <Girvo> _telling_ me it needs to be Empty not Nil lol |
02:09:36 | FromDiscord | <Girvo> Now the only interesting thing is that `Error Type` business. It seems the `int` type itself is "lost" somewhere through this macro? At least for autocomplete anyway. Maybe it doesn't matter much |
02:10:01 | FromDiscord | <Elegantbeef> It's an untyped macro |
02:10:01 | FromDiscord | <Girvo> If I try to assign a string to it, Nim of course complains correctly |
02:10:29 | * | Zectbumo quit (Read error: Connection reset by peer) |
02:10:40 | FromDiscord | <Girvo> Right so there is not much that can be done there |
02:11:16 | FromDiscord | <Girvo> Well, good enough for a first pass anyway. The C output is correct, and actual usage of the variable is correct and type checked 🙂 |
02:11:42 | * | Zectbumo joined #nim |
02:12:40 | FromDiscord | <Girvo> I can't remember ever writing a full typed macro myself lol |
02:12:57 | FromDiscord | <Elegantbeef> You use them alot for introspective heavy code |
02:13:57 | FromDiscord | <Girvo> Yeah, would be super handy for certain DSLs I could imagine |
02:14:53 | FromDiscord | <Elegantbeef> I use them for the nimscripter bridge, cant beat that introspection 😛 |
02:18:06 | FromDiscord | <huantian> Too bad I can’t make a typed macro for myself |
02:18:15 | FromDiscord | <Elegantbeef> Lol |
02:18:19 | FromDiscord | <Girvo> Whats the impact of this on my variable pragma macro? https://github.com/nim-lang/Nim/commit/2bd1aa186e09565b2103394bd281478fa1b10ef1 |
02:18:42 | FromDiscord | <Girvo> Is it supposed to use the unary node rather than triplet now? |
02:19:00 | FromDiscord | <Girvo> (I was reading through this: https://github.com/nim-lang/RFCs/issues/220) |
02:19:24 | FromDiscord | <Elegantbeef> you later wrap it with a when block and support both |
02:20:37 | FromDiscord | <Elegantbeef> Atleast you ideally want to support stable and open yourself up to devel imo |
02:21:33 | FromDiscord | <Girvo> > Given how simple these changes are I'm worried if I'm missing something.↵Haha, I feel that, Araq. All the damned time. |
02:21:47 | FromDiscord | <Girvo> Ahhhh right, I'm with you |
02:22:29 | FromDiscord | <Girvo> Yeah once I can wrap up a lot of what I've added and bring it into an updated Nesper, I will need to. Though some of Nesper needs to be brought up to date with devel as well I believe |
02:23:21 | FromDiscord | <Girvo> Is that change not in 1.6.2 yet? |
02:23:34 | nrds | <Prestige99> Setting LD_LIBRARY_PATH to my path with .so files works, but using --passL"-L{thePath}" does not. Am I missing something here? |
02:23:43 | FromDiscord | <Girvo> (edit) "1.6.2" => "1.6.4" |
02:23:48 | FromDiscord | <Elegantbeef> Nope it's devel will be a change in next version afaik |
02:23:53 | FromDiscord | <Girvo> Ahhhh cool |
02:23:56 | FromDiscord | <Elegantbeef> so `1.8` or `2.0` whatever comes first |
02:24:18 | FromDiscord | <Elegantbeef> also stable is at 1.6.4 |
02:24:18 | FromDiscord | <Girvo> I'm tempted to switch to devel and see what works/breaks. I'll put it on my todo list and take a crack at some point |
02:24:33 | FromDiscord | <Girvo> Yeah I edited my comment haha, I misremembed the sub version |
02:24:34 | FromDiscord | <Elegantbeef> A majority of stuff will wrok |
02:24:38 | FromDiscord | <Elegantbeef> work perhaps |
02:25:04 | FromDiscord | <Girvo> Yeah I expect it will. I'm curious about Nesper, it was written against v1.4 originally |
02:25:25 | FromDiscord | <Elegantbeef> Mostly going to just get warnings, less so errors |
02:30:17 | FromDiscord | <Patitotective> @ElegantBeef while you were calling my design wacky, i was working on it https://github.com/Patitotective/ImTemplate https://media.discordapp.net/attachments/371759389889003532/958191335641346108/prefsmodal1.png https://media.discordapp.net/attachments/371759389889003532/958191335825879121/main.png https://media.discordapp.net/attachments/371759389889003532/958191336043970570/aboutmodal.png |
02:30:41 | FromDiscord | <Patitotective> (edit) "@ElegantBeef while you were calling my design wacky, i was working on it ... https://github.com/Patitotective/ImTemplate" added "lmao" |
02:30:55 | nrds | <Prestige99> Does --passL not work with 1.6.4 or something? |
02:31:04 | FromDiscord | <Elegantbeef> It does |
02:32:09 | FromDiscord | <Elegantbeef> Patito you dont use the wacky design though do you? |
02:32:32 | FromDiscord | <Patitotective> In reply to @Elegantbeef "Patito you dont use": not the callback stuff |
02:32:53 | FromDiscord | <Elegantbeef> You use the proper return value and a buffer |
02:32:55 | FromDiscord | <Elegantbeef> Good |
02:33:51 | FromDiscord | <Alexis> sent a code paste, see https://play.nim-lang.org/#ix=3TKz |
02:33:57 | FromDiscord | <Elegantbeef> That's the way to do it |
02:34:14 | nrds | <Prestige99> Elegantbeef: okay help me understand this then - I'm building with `--passL="-L.usr/lib/"` where `libSDL2_gpu.so` lives at`.usr/lib/libSDL2_gpu.so`, but when at runtime I get `libSDL2_gpu.so: cannot open shared object file: No such file or directory` |
02:34:42 | nrds | <Prestige99> I've tried absolute paths, no trailing `/` etc |
02:34:48 | FromDiscord | <Elegantbeef> that's for compile linking |
02:35:18 | FromDiscord | <Patitotective> In reply to @Elegantbeef "That's the way to": 🙃 still im not convinced about how im managing the "cache", im almost i can make it work without it but huh |
02:35:25 | FromDiscord | <Elegantbeef> add the file to your `LD_LIBRARY_PATH=".usr/lib" myBinaryName` |
02:35:26 | FromDiscord | <Patitotective> (edit) "almost" => "sure" |
02:35:55 | nrds | <Prestige99> ah that's what I had originally but I can't make my library enforce that for the users of said library.. back to square one |
02:35:55 | * | noeontheend quit (Ping timeout: 246 seconds) |
02:36:14 | FromDiscord | <Elegantbeef> What do you mean? |
02:36:36 | nrds | <Prestige99> If someone uses my library they will need that env variable set to use it |
02:36:55 | nrds | <Prestige99> or maybe there's another way but I haven't found one, yet |
02:37:37 | FromDiscord | <Elegantbeef> I dont follow the issue |
02:38:09 | nrds | <Prestige99> If someone uses my library they won't be able to run/compile their program if the LD_LIBRARY_PATH isn't set |
02:38:26 | nrds | <Prestige99> trying to solve this on my library's end instead of telling everyone to set up this path |
02:41:02 | FromDiscord | <Elegantbeef> I mean you're dynamic linking you either have the library in the system path or in a path provided with ldlibpath |
02:41:19 | FromDiscord | <Elegantbeef> So either the library is beside the binary, in `lib` or in the libpath |
02:41:49 | FromDiscord | <Elegantbeef> You can always make a shell script or use a nimble task to get it in there |
02:41:54 | FromDiscord | <Elegantbeef> Or make your own build tool |
02:42:15 | nrds | <Prestige99> was hoping there was a way to do this with nimble but haven't seen a way yet |
02:42:40 | FromDiscord | <Elegantbeef> Follow the impbox way and make your own build tool |
02:42:47 | nrds | <Prestige99> hm perhaps |
02:43:02 | nrds | <Prestige99> Was hoping nimble could link more than just the binary |
02:43:32 | FromDiscord | <Elegantbeef> I dont know what you mean by that |
02:44:22 | nrds | <Prestige99> Like it links a binary, but if I could have it also add the .so files to the path that would solve my issue |
02:44:57 | nrds | <Prestige99> hmm might have found an option |
02:56:21 | nrds | <Prestige99> nvm idk what this nimble documentation means |
03:00:33 | * | ltriant joined #nim |
03:03:01 | FromDiscord | <Girvo> Could you not use `putEnv` to adjust the env var, if thats what you mean by PATH? |
03:03:48 | FromDiscord | <Girvo> Though finding shared libraries is an OS packaging problem more so than anything else |
03:06:53 | nrds | <Prestige99> The libs are shipped with the library, I'm just having a hard time setting them up for some reason |
03:07:02 | FromDiscord | <Girvo> If it's dynamically linked and you want to make sure its there (and you redistribute the library), you solve that by packaging the library in a known place, and baking that relative path into your compile. Or, on macOS, you just put it in the right spot in the application bundle haha 🙂 |
03:07:38 | nrds | <Prestige99> I just need LD_LIBRARY_PATH which I can configure in config.nims for the library's development, but when something else uses that library, the path doesn't get set |
03:09:14 | FromDiscord | <Girvo> Tbh I wouldn't want a library messing with my LD_LIBRARY_PATH automatically anyway myself haha. It'll break some of my C projects if it's not careful 😉 But thats my and my weird use-cases, I get what you are after. I swear theres a better way than LD_LIBRARY_PATH though, I looked into a lot of this when I was doing macOS application dev in Nim, but I can't find the project sadly |
03:10:46 | FromDiscord | <Girvo> `-Wl,-rpath,'$ORIGIN/../lib'` is the better way of doing it if this was C. @ElegantBeef theres a way to do those exact linker options in Nim no? I remember there was |
03:11:10 | FromDiscord | <Elegantbeef> `passL` pragma |
03:12:33 | FromDiscord | <Girvo> sent a code paste, see https://play.nim-lang.org/#ix=3TKE |
03:13:44 | FromDiscord | <Girvo> This should let users still override which library its linked against via LD_LIBRARY_PATH or LD_PRELOAD as well, but have it work in the default case as long as you package the `.so` files next to the binary |
03:13:54 | FromDiscord | <Girvo> Unless I'm misunderstanding what you're trying to achieve! |
03:15:55 | nrds | <Prestige99> It would only be the LD_LIBRARY_PATH for the running program so it should be fine eh |
03:16:04 | FromDiscord | <Girvo> Actually you might not even need `-Wl` I think that you just do `-rpath,'$ORIGIN/../path/to/wherever;` |
03:16:17 | FromDiscord | <Girvo> (edit) "`-rpath,'$ORIGIN/../path/to/wherever;`" => "`-rpath,'$ORIGIN/../path/to/wherever'`" |
03:17:11 | FromDiscord | <Girvo> Like, yeah, I guess haha. But `rpath` is the "proper" way to do it |
03:17:45 | nrds | <Prestige99> hm will have to look up what that is |
03:18:37 | FromDiscord | <Girvo> rpath tells the linker where it should be looking for your shared libraries 🙂 It's basically LD_LIBRARY_PATH but baked into the binary, rather than messing with env vars |
03:20:05 | FromDiscord | <demotomohiro> You can ask Nim to pass that linker option to gcc with `--passL`. |
03:20:23 | FromDiscord | <Elegantbeef> demo is a few messages behind |
03:20:27 | FromDiscord | <Elegantbeef> They'll catch up eventually |
03:20:46 | FromDiscord | <Girvo> hah. `--passL` doesn't need `-Wl` right, thats implied? |
03:21:02 | FromDiscord | <Elegantbeef> no clue i dont play with the C compiler |
03:21:05 | FromDiscord | <Girvo> As passL _is_ linker options |
03:21:14 | FromDiscord | <Girvo> And `-Wl` is telling GCC "here are the linker options" lol |
03:22:07 | FromDiscord | <demotomohiro> Nim uses gcc as linker so you still need to pass `-wl` to `--passL`. |
03:22:16 | FromDiscord | <Girvo> Okay good to know! |
03:22:40 | FromDiscord | <Girvo> @nrds what relative path are your shared libraries being placed in? |
03:22:53 | FromDiscord | <Girvo> Asked a better way: what are you trying to set LD_LIBRARY_PATH to right now? |
03:23:06 | FromDiscord | <Elegantbeef> No his name is prestige |
03:23:10 | FromDiscord | <Elegantbeef> Nrds is the bridge |
03:23:15 | FromDiscord | <Elegantbeef> Cmon girvo i believe in you |
03:23:17 | FromDiscord | <Girvo> lol |
03:23:32 | FromDiscord | <Girvo> I need another coffee |
03:23:41 | FromDiscord | <Elegantbeef> But it's 2133 |
03:23:58 | FromDiscord | <Girvo> 1333 for me 😉 |
03:24:16 | FromDiscord | <Elegantbeef> Sucks to suck |
03:25:20 | FromDiscord | <Girvo> hahaha. Anyway @prestige -- whats the path you're setting LD_LIBRARY_PATH to? I can give you the `--passL` you're after, and you can either do it as a nim.cfg build arg, nimble build arg, or do it as a pragma in your library code 🙂 |
03:26:32 | nrds | <Prestige99> So --passL works for the build step but not when I'm using the library in another project, apparently |
03:26:43 | nrds | <Prestige99> relative to the project it's `.usr/lib` |
03:26:44 | FromDiscord | <Girvo> I found my old project! And yep, `rpath` as a passL linker option is exactly how I did it lol |
03:27:37 | nrds | <Prestige99> well i was just using -L |
03:27:54 | FromDiscord | <Girvo> @Prestige okay cool, where is the binary going to be output to? the top level? `./binary`, then `./.usr/lib/`? |
03:28:12 | nrds | <Prestige99> wherever nimble puts it I suppose |
03:29:01 | FromDiscord | <Girvo> -L is still needed, thats what tells it what SO it should be looking for. -rpath is what tells it _where_ it should be looking for that SO |
03:30:53 | FromDiscord | <Girvo> What I've done in these situations, is basically make my nimble build task have an `before` block that copies the files needed to wherever nimble is going to put the binary |
03:31:54 | * | arkurious quit (Quit: Leaving) |
03:32:28 | FromDiscord | <Girvo> An example, is that I need `nimbase.h` in a particular place for my current project to be able to build. So I literally copy it from Nim before building |
03:32:38 | FromDiscord | <Girvo> sent a code paste, see https://paste.rs/9AW |
03:33:53 | FromDiscord | <Girvo> `binDir` being where the binary is going to go, IIRC. You can check for the existence of your `binDir / ".usr" / "lib"` directory, create it if it doesn't exist, and copy your SO files all in that `before build` block |
03:34:55 | NimEventer | New thread by Mardiyah: How to do runtime constant in forward ?, see https://forum.nim-lang.org/t/9057 |
03:38:53 | FromDiscord | <Girvo> Will nimble bring down some binary files if its a dependency of another project when `nimble install`-ed? And if so, where should they be put? |
03:39:18 | nrds | <Prestige99> Yeah I was hoping it could, but the nimble docs aren't super clear to me |
03:39:36 | nrds | <Prestige99> so maybe I should just write a custom solution like Elegantbeef was saying |
03:40:54 | FromDiscord | <Elegantbeef> It's what impbox did for nico and i did for the rpi pico stdlivb |
03:40:54 | FromDiscord | <Girvo> That's basically what I'd recommend 🙂 Even if it's as simple as a `Makefile` with some variables at the top, in a "template" project you ask your users to clone down. That will include the `.so` files in a known-good place, and allow you to ensure it's packaged correctly (with `rpath` set to where you now _know_ it will be) |
03:41:12 | FromDiscord | <Girvo> Its what I did for my SDL-on-macOS projects too back in the day |
03:41:29 | FromDiscord | <Elegantbeef> Actually girvo i could probably steal some help from you on the picostdlib 😛 |
03:41:45 | nrds | <Prestige99> any docs on rpath? |
03:41:46 | FromDiscord | <Girvo> Hah I'd be glad to help 🙂 |
03:42:15 | FromDiscord | <Girvo> Yep, one tick! |
03:42:20 | FromDiscord | <Girvo> https://en.wikipedia.org/wiki/Rpath |
03:42:46 | FromDiscord | <Girvo> https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html -- search for `-rpath dir` |
03:43:20 | FromDiscord | <Elegantbeef> The big thing I need to do is make is so no one has to manually add the libraries they're using to cmake, so I parse the C files then emit a list of the libraries that they're using, mostly just need to know the best way handling it @auxym and I have had a back and forth about it for a bit |
03:43:29 | FromDiscord | <Girvo> ^ that's not quite the current version, but rpath simply hasn't really changed in decades lol |
03:43:59 | FromDiscord | <demotomohiro> Latest binutils doc: https://sourceware.org/binutils/docs-2.38/ld/Options.html#Options |
03:44:09 | FromDiscord | <Girvo> Ah perfect! Read that one ^^^ |
03:44:12 | FromDiscord | <demotomohiro> then grep `-rpath` |
03:44:54 | FromDiscord | <Girvo> @ElegantBeef Ooooh yeah thats an interesting problem! I have a couple of solutions to it. But a question for you: how cross platform does this need to be haha |
03:45:27 | FromDiscord | <Elegantbeef> I mean it needs to work for all OS that someone wants to develop for the rpi pico on |
03:45:36 | FromDiscord | <Girvo> Yeah fair enough 🙂 |
03:45:55 | * | vicfred quit (Quit: Leaving) |
03:46:06 | FromDiscord | <Girvo> There are Linux-specific solutions, but they fall apart when cross-compiling from Windows (and macOS to a lesser extent) |
03:46:27 | FromDiscord | <Elegantbeef> I mean we have a build tool to do all the generating |
03:46:41 | FromDiscord | <Elegantbeef> I just havent really got to the best way of using the list i generate into cmake |
03:47:19 | FromDiscord | <Girvo> Is it up on github somewhere? I can take a look. You're basically trying to build the list to pass to `find_library` I assume? |
03:47:47 | FromDiscord | <Elegantbeef> Of course it is |
03:48:18 | FromDiscord | <Elegantbeef> https://github.com/beef331/picostdlib/blob/master/src/template/csource/CMakeLists.txt#L27 |
03:48:32 | FromDiscord | <Elegantbeef> `pico_stdlib hardware_adc` are what the issue is presently |
03:48:47 | FromDiscord | <Elegantbeef> Right now you have to manually add the libraries you're using there |
03:48:59 | FromDiscord | <Girvo> Yeah, we have to do the same in ESP32 land |
03:49:15 | FromDiscord | <Elegantbeef> I have this PR right now which generates a list of the librariies https://github.com/beef331/picostdlib/blob/master/src/template/csource/CMakeLists.txt#L27 |
03:49:18 | FromDiscord | <Girvo> sent a code paste, see https://play.nim-lang.org/#ix=3TKO |
03:49:49 | FromDiscord | <Girvo> Zephyr, I'm certain, has a nice solution for this. I'll have a look today and get back to you |
03:50:08 | FromDiscord | <demotomohiro> This document explains how linux search shared libraries at runtime: https://www.man7.org/linux/man-pages/man8/ld.so.8.html |
03:51:06 | LuxuryMode | If I declare a variable of type `OptParser` using `let` and then try iterating over it, I get a strange error. Is this because the iterating requires mutating the `OptParser` itself or..? https://play.nim-lang.org/#ix=3TKP |
03:51:40 | FromDiscord | <Elegantbeef> `getOpt` takes a `var OptParser` |
03:51:51 | FromDiscord | <Girvo> His back-and-forward is right: if its autogenerating, instead of modifying the developers CMakeLists.txt, you create your own picostdlib-libraries.txt file that gets included into it... oh ignore me, you guys already went through all that lol |
03:52:44 | FromDiscord | <Elegantbeef> Just wanted to get your insight here, as you seemingly have more knowledge here |
03:52:55 | LuxuryMode | Oh I see `iterator getopt(p: var OptParser): tuple[kind: CmdLineKind, key, val: string] {...}` I did not know a param could specify the type of binding required (not sure that's the right way to say that) |
03:52:57 | FromDiscord | <Girvo> Yeah I'm going through the PR 🙂 |
03:53:10 | LuxuryMode | Where can I find this explained in the docs? |
03:53:14 | FromDiscord | <Elegantbeef> My CMake knowledge is uhhh i walk past someone writting `cmake build` |
03:53:21 | FromDiscord | <Girvo> Hahaha |
03:53:29 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/manual.html#procedures-var-parameters |
03:53:37 | LuxuryMode | Thanks very much |
03:54:13 | FromDiscord | <Elegantbeef> No problem |
03:54:26 | FromDiscord | <Girvo> HIs point about having piconim run `cmake ..` is the way to go IMO, if you've got a build tool wrapping/calling CMake anyway, it should run it. Now to check if there is a nicer way of handling this library list generation, one tick |
03:54:41 | LuxuryMode | In Python, one can make a list from an iterator with `list(my_iterator)` Is there a way to accomplish the same thing in Nim? |
03:54:55 | LuxuryMode | Or just check if `item in iterator` kind of thing... |
03:55:08 | FromDiscord | <Elegantbeef> `import std/sequtils; let mtColl = toSSeq(myIter)` |
03:55:14 | FromDiscord | <Elegantbeef> `toSeq` even |
03:55:19 | FromDiscord | <Elegantbeef> My keyboard likes multi pressing |
03:55:24 | LuxuryMode | ah very nice. Thank you! |
03:55:45 | FromDiscord | <Elegantbeef> Since you're doing parseopt i'm going to say you dont want that |
03:56:31 | LuxuryMode | You mean I really just want to be iterating? |
03:56:46 | FromDiscord | <Elegantbeef> I'm assuming you're checking for specific flags? |
03:57:08 | LuxuryMode | right |
03:57:26 | LuxuryMode | My goal is to be able to ignore all other flags if `--help` is supplied |
03:57:27 | FromDiscord | <Elegantbeef> Iterating over and using case statements is a much nicer idea imo |
03:57:32 | LuxuryMode | and in that case print the usage |
03:57:59 | LuxuryMode | or perhaps I want to just fail if any other flags are supplied together with `--help`. Not sure what the right approach is |
03:59:59 | LuxuryMode | That makes sense. `case key of "help", "h": writeHelp()` |
04:00:25 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=3TKQ |
04:00:43 | FromDiscord | <Elegantbeef> You could even abuse the exception handler if you wanted, but that's odd |
04:01:01 | LuxuryMode | Thanks, that's helpful |
04:02:23 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=3TKS for that try except method |
04:02:29 | FromDiscord | <Girvo> sent a long message, see http://ix.io/3TKT |
04:02:56 | FromDiscord | <Elegantbeef> I went through something similar to that girvo |
04:03:08 | FromDiscord | <Girvo> Yeah fair enough 🙂 I figured you must've haha |
04:03:25 | FromDiscord | <Elegantbeef> Actually i didnt use system vars |
04:03:38 | FromDiscord | <Elegantbeef> I manually wrote to a file using a ugly work around |
04:03:53 | FromDiscord | <Girvo> Ah I just though an env var isn't a bad fit, coz you can just use `ENV` in CMake then |
04:04:24 | FromDiscord | <Elegantbeef> The annoying part is that it means you have to manually annotate modules and forgetting is a silent issue since we have -10 test suites |
04:04:30 | FromDiscord | <Elegantbeef> Doesnt even know how you begin to test this API |
04:04:51 | FromDiscord | <Girvo> Hah, yeah testing in this space is... well, look, theres a reason most of this stuff in other languages also doesn't have tests 😉 |
04:05:56 | FromDiscord | <Girvo> Anyway, I'll have a think and do some experimentation. Is there a particular CMake version you can require? Later versions have added a lot more stuff to help with this sort of thing |
04:06:23 | FromDiscord | <Elegantbeef> I'm using whatever the pico-sdk uses |
04:06:56 | FromDiscord | <Elegantbeef> Afterall my code is just wrapping their sdk dumbly and slowly, especially since I have practically nothing to toy with the pico with |
04:07:32 | FromDiscord | <Girvo> I have a pico around here somewhere. I can have a play with it, see what things are like |
04:08:02 | FromDiscord | <Girvo> But the long and the short is, most embedded cmake stuff requires you to add the libraries you want to your CMakeLists.txt somewhere lol |
04:08:19 | FromDiscord | <Elegantbeef> Yea but doing it manually sucks |
04:09:11 | FromDiscord | <Girvo> I don't disagree. Welcome to embedded 😄 |
04:09:13 | FromDiscord | <Elegantbeef> The checking includes is imo the best solution given that it makes it so i can abstract the C code anyway i want |
04:09:32 | FromDiscord | <Girvo> Oh yeah, it's not a bad solution IMO, and if it works right now that's better than most. |
04:09:53 | FromDiscord | <Girvo> I'm looking at how Zephyr does it, and they do sort of the same thing, just in CMake scripting instead, from what I can see |
04:09:55 | FromDiscord | <Elegantbeef> Well it doesnt work presently since no one piped it together yet, i was waiting for casey's PR |
04:09:58 | FromDiscord | <Girvo> https://github.com/zephyrproject-rtos/zephyr/blob/main/cmake/linker/ld/target.cmake |
04:10:35 | FromDiscord | <Girvo> `LIBRARIES_PRE_SCRIPT` and `POST_SCRIPT` as well as `zephyr_link_libraries` |
04:10:56 | FromDiscord | <Girvo> sent a code paste, see https://play.nim-lang.org/#ix=3TKW |
04:11:28 | FromDiscord | <Elegantbeef> Mines more readable 😛 |
04:11:48 | FromDiscord | <Girvo> CMake scripting is a god-damned dark art lol |
04:12:10 | FromDiscord | <Girvo> I feel like I'm summoning cthulu every time I do it |
04:12:31 | FromDiscord | <Elegantbeef> Yea i want to avoid it since it's just unmaintainable imo |
04:13:07 | FromDiscord | <Girvo> https://github.com/zephyrproject-rtos/zephyr/blob/main/cmake/linker/ld/ld_script.cmake |
04:13:26 | FromDiscord | <Elegantbeef> Did i stutter? |
04:13:31 | FromDiscord | <Girvo> This is basically the script they use to map symbol names to strings, then eventually to the target_link_library |
04:13:38 | FromDiscord | <Girvo> Haha nah I'm just curious how they do it 😉 |
04:14:40 | FromDiscord | <Girvo> They're quite literally using regexes. Its near identical in terms of approach, though the way they do it is they compile it _without_ the libraries linked, search the binary for unlinked/not found symbols, then map them to the libraries they _do_ need to link |
04:15:08 | FromDiscord | <Elegantbeef> Ah ok so i'll be happy with mine |
04:15:10 | FromDiscord | <Girvo> So, yeah, stick with parsing `#include` 🙂 |
04:17:11 | FromDiscord | <Girvo> I wonder if one could just link all the libraries, and then strip the unused symbols out lol |
04:18:02 | FromDiscord | <Girvo> Haha yeah, `-dead-strip` would technically do it |
04:19:08 | FromDiscord | <Girvo> Or `-fdata-sections -ffunction-sections` and link with `-Wl,--gc-sections` all in one command, with `-Os`. but that feels nearly as rube-goldberg machine like as your current solution 😂 |
04:20:21 | FromDiscord | <Girvo> `-flto` also, though thats Clang, iirc. |
04:20:26 | FromDiscord | <Elegantbeef> How dare you say it's rube goldbergy |
04:20:48 | FromDiscord | <Girvo> Man any time I'm parsing C code, I want to curl up in a ball and cry 😉 |
04:21:00 | * | Zectbumo quit (Quit: Zectbumo) |
04:21:03 | FromDiscord | <Elegantbeef> Hey scanf is easy |
04:23:58 | * | rockcavera quit (Remote host closed the connection) |
04:25:24 | * | Zectbumo joined #nim |
04:26:42 | LuxuryMode | Anything else I should have .gitignore aside from these? https://github.com/github/gitignore/blob/main/Nim.gitignore |
04:35:05 | FromDiscord | <Elegantbeef> binaries is another thing |
04:36:52 | LuxuryMode | *.out? |
04:37:06 | FromDiscord | <Elegantbeef> default on linux is no extension |
04:37:20 | LuxuryMode | ah I see a .out after running nimble build on my Mac |
04:37:33 | FromDiscord | <congusbongus> I just add to the .gitignore as I go because I can't predict ahead of time what crazy files various IDEs/tools add↵also I check what I'm committing which is a concept that seems to escape a lot of my juniors /rant |
04:37:41 | LuxuryMode | nim build doesn't do that though |
04:37:50 | LuxuryMode | sorry, `nim c` |
04:38:28 | FromDiscord | <Elegantbeef> How dare you insult me congus, i often assume my ignore covers me and notice always 1 second too late so have to do a rebase to fix my fuckup! |
04:38:40 | LuxuryMode | lel |
04:39:17 | FromDiscord | <congusbongus> I bet your commit messages are like "fixed thing" |
04:39:30 | FromDiscord | <Elegantbeef> Depends on what i'm working on |
04:39:35 | LuxuryMode | git commit -m "another commit" |
04:39:38 | FromDiscord | <Elegantbeef> If i'm working on a toy project yea |
04:43:30 | FromDiscord | <Girvo> Pfft. `git commit --amend` 😉 |
04:43:37 | FromDiscord | <Girvo> Just do it all as one commit! mwahahaha |
04:43:51 | FromDiscord | <Elegantbeef> When you accidently already pushed |
04:44:18 | FromDiscord | <Girvo> Easy! `git push --force` |
04:44:23 | FromDiscord | <Girvo> Problem "solved" 😄 |
04:44:42 | * | jmdaemon quit (Ping timeout: 272 seconds) |
04:46:36 | * | jmdaemon joined #nim |
04:56:18 | * | jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in) |
04:56:36 | * | jmdaemon joined #nim |
05:12:23 | FromDiscord | <huantian> It’s fine if nobody else is looking to |
05:22:10 | * | slowButPresent quit (Quit: leaving) |
06:14:49 | FromDiscord | <Phil> In reply to @congusbongus "I just add to": Imagine having colleagues that make small commits of a small group of 3-4 with changes that relate to one another, instead of one massive commit of 30 files saying "added thing" |
06:15:07 | FromDiscord | <Phil> (edit) "In reply to @congusbongus "I just add to": Imagine having colleagues that make small commits of a small group of 3-4 ... with" added "files at most" |
06:37:42 | FromDiscord | <congusbongus> did you mean to reply to a different message? |
06:59:31 | * | ltriant quit (Ping timeout: 260 seconds) |
07:25:00 | * | ltriant joined #nim |
07:32:07 | * | neurocyte8 joined #nim |
07:34:03 | * | neurocyte quit (Ping timeout: 260 seconds) |
07:34:04 | * | neurocyte8 is now known as neurocyte |
07:44:03 | * | jmdaemon quit (Ping timeout: 260 seconds) |
08:10:15 | * | xet7 quit (Remote host closed the connection) |
08:14:37 | * | xet7 joined #nim |
08:25:42 | * | PMunch joined #nim |
08:29:51 | * | yoyojambo joined #nim |
08:39:09 | * | Zectbumo quit (Remote host closed the connection) |
08:48:04 | * | yiggityswaps joined #nim |
08:49:53 | * | yoyojambo quit (Ping timeout: 252 seconds) |
09:09:45 | * | yiggityswaps quit (Quit: Leaving) |
09:10:00 | * | yiggityswaps joined #nim |
09:16:26 | PMunch | I love how this simple topic just turned into a list of good ways to learn programming: https://forum.nim-lang.org/t/9053 |
09:36:47 | FromDiscord | <tandy> sent a code paste, see https://play.nim-lang.org/#ix=3TLP |
09:36:56 | FromDiscord | <tandy> sent a code paste, see https://play.nim-lang.org/#ix=3TLQ |
09:36:56 | FromDiscord | <tandy> this is the code it generates |
09:37:23 | FromDiscord | <tandy> sent a code paste, see https://paste.rs/18i |
09:37:32 | * | yiggityswaps quit (Read error: Connection reset by peer) |
09:37:48 | FromDiscord | <tandy> sent a code paste, see https://play.nim-lang.org/#ix=3TLR |
09:40:07 | * | xet7 quit (Quit: Leaving) |
09:40:46 | * | gsalazar_ joined #nim |
09:41:37 | FromDiscord | <tandy> sent a code paste, see https://play.nim-lang.org/#ix=3TLU |
09:43:16 | * | gsalazar quit (Ping timeout: 246 seconds) |
09:47:27 | FromDiscord | <untoreh> can you make a generic accessor over an object variant? |
09:49:36 | * | gsalazar_ quit (Quit: Leaving) |
09:49:45 | * | gsalazar joined #nim |
09:50:14 | FromDiscord | <untoreh> sent a code paste, see https://play.nim-lang.org/#ix=3TLW |
09:54:54 | FromDiscord | <Solitude> no, you cant |
09:58:56 | FromDiscord | <TryAngle> In reply to @Girvo "I feel like I'm": I've no clue tbh. but I've heard Zig toolchain can replace all that stuff 🤔 ↵is that true? |
10:36:57 | FromDiscord | <Rika> In reply to @untoreh "something like this doesnt": Generics have to resolve to one type at compile time. An accessor like this is dependent on run time values to determine the return type |
11:10:16 | FromDiscord | <Phil> In reply to @congusbongus "did you mean to": No, it was just early in the morning before proper waking time and I fucked up sentence structure in english.↵Was more meaning to say that while you struggle with folks unable to use gitignore, I struggle with folks unable to make small commits which makes understanding their code based on the steps they took a massive pain in my butt. |
11:13:41 | FromDiscord | <Zoom> This is what forums are. The recurring plot is\: 5 posts to understand what the issue is, 10 posts to ask "Why do you need to solve this? Solve this instead!", 5 posts with solutions, mostly wrong, 50 posts discussing how the working solution was wrong, 5000 posts discussing how we all live in a simulation↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>) |
11:15:57 | PMunch | Haha :P |
11:16:10 | PMunch | Sounds about right |
11:17:06 | FromDiscord | <Zoom> Anyone packaged Nim stuff for Debian? I'm looking at their [guide](https://www.debian.org/doc/manuals/debmake-doc/index.en.html)'s ToC and my head starts spinning |
11:17:50 | * | ehmry quit (Ping timeout: 252 seconds) |
11:18:59 | PMunch | @Zoom, once you've mastered all these packaging guidelines it would be extremely helpful if you could write a small guide on how to package Nim applications for Linux :) |
11:19:49 | FromDiscord | <fbpyr> [Zoom](https://matrix.to/#/@Zoom:matrix.org)\: on my debian machines I just pulled the pre-built linux binaries\: https://nim-lang.org/install_unix.html |
11:19:53 | PMunch | Just had a look at that guide, 8 chapters :S |
11:20:04 | FromDiscord | <Zoom> Please, God, no \:O↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>) |
11:20:18 | PMunch | Where the basics chapter is split into 27 subchapters |
11:22:57 | * | ehmry joined #nim |
11:42:42 | * | jjido joined #nim |
11:44:38 | FromDiscord | <auxym> In reply to @Elegantbeef "Hey scanf is easy": Been reading you and @Girvo's conversation (I was asleep, you guys must be on the west coast). interesting stuff. Another random idea, sorta similar to parsing `#include`s: maybe we could `exportc` a special, dummy token from each picostdlib library? like a dummy proc PICOSTDLIB_INCLUDE_TIME or whatever and then scan for that in the generated C? if it's a a no-op proc then impact on code size |
11:48:19 | PMunch | Hmm, I wonder if Futhark would handle Pico headers |
12:07:37 | * | slowButPresent joined #nim |
12:20:23 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
12:54:05 | FromDiscord | <hmmm> friendsies, what is the best way to make a field object to store some flags and objects? I'm currently using a seq and reading if the flag is there but sounds dumb. I think I've seen people using bitfiddling bitmasks bitvoodoo and wondering if it makes sense for me 🤔 |
12:54:27 | FromDiscord | <Rika> Flags are usually represented as sets in Nim |
12:54:36 | FromDiscord | <hmmm> really? |
12:54:40 | FromDiscord | <hmmm> had no idea |
12:54:53 | FromDiscord | <Rika> Yes because most people don’t use it and do it the C way |
12:55:00 | FromDiscord | <hmmm> do you have some examples of people using them for flags in the wild? |
12:55:06 | FromDiscord | <Rika> Uh |
12:55:15 | FromDiscord | <Rika> Nothing really comes to mind |
12:56:22 | FromDiscord | <hmmm> hmm I'll just fiddle a bit with sets and see if they make sense for my case, thanks rika 💯 |
12:59:54 | FromDiscord | <auxym> In reply to @PMunch "Hmm, I wonder if": if you want a challenge try tinyusb 🙂 |
13:00:25 | FromDiscord | <auxym> our issue with pico atm isn't so much the headers as wrapping / automating the pico sdk's cmake based build |
13:05:26 | FromDiscord | <auxym> @hmmm https://nim-lang.org/docs/manual.html#set-type-bit-fields |
13:06:00 | FromDiscord | <auxym> we use them a lot in picostdlib, I can point you to some examples if you want |
13:06:22 | PMunch | @auxym, the problem with these libraries is (at least the AVR stuff) that they require a special compiler |
13:06:30 | PMunch | So the clang-based parsing doesn't work |
13:06:44 | PMunch | As long as you can build them with a "normal" compiler then it should work just fine |
13:06:47 | FromDiscord | <auxym> you mean tinyusb? or cmake? |
13:07:56 | FromDiscord | <auxym> the challenge with tinyusb is macros. for example, the generation of usb descriptors is implemented 100% through a whole lot of macros |
13:09:06 | FromDiscord | <Rika> Hand conversion time |
13:14:45 | FromDiscord | <auxym> beef and I gave up, haha. someday maybe. Right now I'm just calling them from a C file that I also include in the build. |
13:20:02 | * | Gustavo6046 quit (Ping timeout: 260 seconds) |
13:21:21 | * | rockcavera joined #nim |
13:21:21 | * | rockcavera quit (Changing host) |
13:21:21 | * | rockcavera joined #nim |
13:24:30 | FromDiscord | <hmmm> In reply to @auxym "<@!887269570765791243> https://nim-lang.org/docs/m": thanks auxy, I wanted an example just to make sure I was reading them correctly even if I guess there is not much science to it lol |
13:25:02 | FromDiscord | <hmmm> also why do you use bitfields instead of sets? |
13:25:30 | FromDiscord | <hmmm> oh they ARE sets lol |
13:25:36 | FromDiscord | <Rika> was gonna say |
13:25:56 | FromDiscord | <Rika> a (non-hash) set is a bitfield (only in implementation, though its doubtful it will change) |
13:28:13 | * | Gustavo6046 joined #nim |
13:28:54 | FromDiscord | <auxym> In reply to @hmmm "thanks auxy, I wanted": here's an example, there are others in the same file. it's fully compatible with the c struct that is imported, too. https://github.com/beef331/picostdlib/blob/master/src/picostdlib/tusb.nim#L317 |
13:29:45 | * | Gustavo6046 quit (Max SendQ exceeded) |
13:30:24 | * | Gustavo6046 joined #nim |
13:36:42 | * | yoyojambo joined #nim |
13:44:42 | * | yoyojambo quit (Read error: Connection reset by peer) |
13:44:58 | PMunch | Ah C macros are a PITA |
13:50:04 | FromDiscord | <Phil> Under which circumstances does -d:Danger actually become a bad choice to use?↵Or other way around if it's easier, under which circumstances does it become a good choice to use (assuming it breaks something must of the time unless specific circumstances X)?↵Mostly asking because I have no idea of the implications that come with "turn off runtime checks and turn on optimizer" |
13:51:36 | FromDiscord | <auxym> IMO: only use Danger for high-performance numerical code, or maybe embedded. Otherwise the cost of runtime checks is pretty cheap compared to the advantages of not having silent overflow bugs |
13:52:34 | FromDiscord | <auxym> -d:release does optimization and keeps the runtime checks, fyi |
13:53:57 | FromDiscord | <auxym> there's more info on runtime checks here: https://nim-lang.org/docs/manual.html#pragmas-compilation-option-pragmas danger turns all of that off |
13:59:02 | FromDiscord | <Solitude> In reply to @Isofruit "Under which circumstances does": always -d:danger, fuck it. if you need checks, you deserve to crash. |
14:01:21 | * | arkurious joined #nim |
14:03:21 | FromDiscord | <auxym> well, the whole point of checks is causing crashes instead of silently doing bad stuff (integer overflow, accessing memory outside an array...) |
14:04:27 | FromDiscord | <Solitude> yeah, whatever, also put --panics:on in your global nim.cfg |
14:07:12 | FromDiscord | <tandy> when you want good jsgen \:)↵(@Phil) |
14:07:27 | FromDiscord | <tandy> \dont |
14:08:33 | * | lumo_e joined #nim |
14:20:14 | FromDiscord | <Phil> ... Looking through the compiler docs, I don't know why nim supports Nintendo switch cross complain, but I am amused that it does |
14:20:32 | FromDiscord | <Phil> (edit) "complain," => "compilation," |
14:21:51 | FromDiscord | <ajusa> what's the correct alternative for using a Table[string, string] on the JS backend? |
14:22:39 | FromDiscord | <ajusa> In reply to @Isofruit "... Looking through the": I've gotten it working on the 3DS as well, and exelotl runs Nim on the GBA |
14:34:14 | * | lumo_e quit (Remote host closed the connection) |
14:41:56 | FromDiscord | <ajusa> In reply to @ajusa "what's the correct alternative": JsAssoc appears to be the correct thing to use |
14:48:02 | * | lumo_e joined #nim |
14:48:54 | FromDiscord | <demotomohiro> In reply to @Isofruit "... Looking through the": It seems this is first PR adds Nintendo switch support to Nim: https://github.com/nim-lang/Nim/pull/8069 |
14:52:14 | * | anddam left #nim (WeeChat 3.4.1) |
14:53:55 | * | Gustavo6046 quit (Quit: I'm a quit message virus. Please replace your old line with this line and help me take over the world. <screw you aloo_shu my old line was better and more creative!>) |
15:16:24 | * | perro joined #nim |
15:28:20 | FromDiscord | <leorize> federico3 is our resident Debian maintainer |
15:29:35 | * | Gustavo6046 joined #nim |
15:30:46 | * | Gustavo6046 quit (Remote host closed the connection) |
15:31:06 | * | Gustavo6046 joined #nim |
15:45:42 | * | LuxuryMode quit (Quit: Connection closed for inactivity) |
15:59:52 | * | Gustavo6046 quit (Ping timeout: 260 seconds) |
16:26:22 | * | jmdaemon joined #nim |
16:29:10 | * | vicecea quit (Remote host closed the connection) |
16:29:38 | * | vicecea joined #nim |
16:32:44 | FromDiscord | <kevin> Is there a way to convert/parse a byte string into a nim array? |
16:32:56 | FromDiscord | <kevin> `let key: array[32, byte] = "FFFFFFFF00000000FFFFFFFF00000000".parseHexStr()` |
16:33:05 | FromDiscord | <kevin> (edit) "key:" => "test:" |
16:33:13 | FromDiscord | <kevin> something like this? |
16:34:32 | FromDiscord | <kevin> `got 'string' for 'parseHexStr but expected array[0..31 byte]` |
16:35:07 | FromDiscord | <kevin> Is this kind of conversion even possible? I know arrays have some runtime limitations |
16:37:56 | FromDiscord | <qb> Is cross compiling with clang doable? |
16:40:14 | * | Lord_Nightmare quit (Quit: ZNC - http://znc.in) |
16:42:03 | * | Lord_Nightmare joined #nim |
16:42:24 | FromDiscord | <Generic> theoretically yes |
16:42:30 | FromDiscord | <Generic> though I personally never got it working |
16:43:13 | FromDiscord | <Generic> a single clang build can target multiple systems |
16:44:22 | FromDiscord | <Generic> but that's already where it can get hard, because lots of distributions of clang are only compiled with support for compiling whatever is native |
16:45:26 | FromDiscord | <Generic> if you get over this hurdle, you need to figure out how to get the standard library into this mix |
16:46:15 | FromDiscord | <qb> Okay so I better boot up the windows vm and compile with clang directly ;D |
16:46:34 | FromDiscord | <Generic> ah you're not talking about embedded |
16:47:37 | FromDiscord | <Generic> idk about that, I've heard that cross compiling for windows with gcc and mingw works relatively well |
16:48:25 | FromDiscord | <Generic> but I never tried it myself |
17:00:39 | rockcavera | kevin, yes, it's possible |
17:02:38 | FromDiscord | <kevin> sent a code paste, see https://play.nim-lang.org/#ix=3TNw |
17:02:47 | FromDiscord | <kevin> so close lol but I'm missing something |
17:06:21 | FromDiscord | <kevin> maybe I don't actually need an `array[32, byte]` ? Maybe just use the openarray where functions require a `array[32, byte]`? |
17:07:05 | Amun-Ra | kevin: does it have to be an array? |
17:07:32 | FromDiscord | <kevin> My functions all take parameters of `array[32, byte]` |
17:07:35 | FromDiscord | <huantian> I think you might want a cast? Or just uh manually convert the string into chars and bytes? |
17:07:52 | FromDiscord | <huantian> I don’t know if you can just cast a string to a byte array |
17:12:19 | Amun-Ra | kevin: https://play.nim-lang.org/#ix=3TNy |
17:13:37 | FromDiscord | <kevin> actual magic |
17:13:47 | FromDiscord | <kevin> thanks! ❤️ |
17:22:47 | * | vicfred joined #nim |
17:47:29 | * | LuxuryMode joined #nim |
18:02:37 | * | Zectbumo joined #nim |
18:15:35 | FromDiscord | <Phil> sent a long message, see http://ix.io/3TNT |
18:17:50 | FromDiscord | <Solitude> In reply to @Isofruit "Reading through it, though": ~~if you can write manual parser in under 5 minutes for that regex - you are misusing regex.~~ fuck regex |
18:17:53 | PMunch | @Phil well you could go through the string character by character manually |
18:18:33 | FromDiscord | <Phil> ... that sounds so painful I'd rather deal with regexes |
18:19:00 | PMunch | And if you haven't programmed a lot then the complexity of Regex on top of the complexity of learning to program could be tricky |
18:20:10 | FromDiscord | <Phil> I mean, maybe I'm predisposed since in Bioinformatics 50% what you write is regexes since the vast majority of time you're looking for patterns of amino-acid/nucleotide-chains (which programmatically speaking are just a single string a chain), so I'm very used to them, but man |
18:20:20 | FromDiscord | <Phil> In reply to @PMunch "And if you haven't": Okay, fair, mixes with Araqs language in a language thing |
18:20:49 | FromDiscord | <Phil> (edit) "a" => "per" |
18:20:51 | PMunch | Exactly |
18:21:18 | PMunch | I mean if you're learning Nim coming from a different language and already know Regexes then use them as you would elsewhere (which should already be sparingly) |
18:23:23 | FromDiscord | <auxym> I think araq was trying to make the point: don't use strings to store data (in-memory) that could be stored in a properly typed object/struct |
18:23:45 | FromDiscord | <auxym> via an adhoc serialization protocol using regexes... |
18:25:06 | FromDiscord | <auxym> I'm not sure that a college-level Algorithms textbook is exactly the right place to start for someone who's never, ever programmed, but heh, everyone learns differently I guess. |
18:26:28 | FromDiscord | <Phil> Hmmm I might actually want to play around with that distinct string thing |
18:27:02 | FromDiscord | <Phil> I do have stuff like "campaignName", "articleName" which could be used as distinct strings I guess |
18:27:15 | FromDiscord | <Phil> So far I only went around eliminating strings through enums when possible |
18:45:49 | * | tiorock joined #nim |
18:45:50 | * | tiorock quit (Changing host) |
18:45:50 | * | tiorock joined #nim |
18:45:50 | * | rockcavera is now known as Guest4465 |
18:45:50 | * | Guest4465 quit (Killed (calcium.libera.chat (Nickname regained by services))) |
18:45:50 | * | tiorock is now known as rockcavera |
18:46:55 | * | tiorock joined #nim |
18:46:56 | * | tiorock quit (Changing host) |
18:46:56 | * | tiorock joined #nim |
18:46:56 | * | rockcavera is now known as Guest1762 |
18:46:56 | * | tiorock is now known as rockcavera |
18:50:43 | * | Guest1762 quit (Ping timeout: 260 seconds) |
18:52:57 | * | tiorock joined #nim |
18:52:57 | * | tiorock quit (Changing host) |
18:52:57 | * | tiorock joined #nim |
18:52:58 | * | rockcavera quit (Killed (copper.libera.chat (Nickname regained by services))) |
18:52:58 | * | tiorock is now known as rockcavera |
19:03:18 | FromDiscord | <hmmm> broskis are emojis universal like ascii in the sense that I can count on them to be displayed regardless of whatever contraption the user is bogged with? |
19:11:36 | FromDiscord | <hmmm> oh they are unicode |
19:12:04 | FromDiscord | <hmmm> but a common kind of unicode right? 🤔 |
19:16:30 | PMunch | Certainly more common than hieroglyphs or cuneiform |
19:16:44 | PMunch | But certainly not as ubiquitous as ASCII |
19:17:05 | FromDiscord | <hmmm> hmm that's what I thought, but I guess good enough is good enough |
19:17:10 | PMunch | And of course with the normal caveat that glyphs can we drawn differently between platforms |
19:17:15 | FromDiscord | <hmmm> they get displayed like garbage on ascii only systems? |
19:17:17 | PMunch | What are you doing with them? |
19:17:24 | PMunch | Pretty much |
19:17:44 | PMunch | Ever seen those Ãẗ things in the middle of a word? |
19:17:59 | FromDiscord | <hmmm> I need to make some elements in my app visible and don't want to make them with something like () lol |
19:18:00 | PMunch | Those are probably characters that don't render properly because of encoding issues |
19:18:12 | PMunch | Terminal app? |
19:18:19 | FromDiscord | <hmmm> yea I've seen them |
19:18:21 | FromDiscord | <hmmm> no gui app |
19:18:39 | * | Gustavo6046 joined #nim |
19:18:44 | PMunch | Ah, then it's probably just up to the renderer |
19:19:23 | FromDiscord | <hmmm> pmunchie since you are here listen to this other question, today we looked into sets and bitfield, but |
19:19:45 | * | jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in) |
19:19:47 | FromDiscord | <hmmm> what happens if I define an enum for my field with ABC and then I want to add function D? |
19:19:51 | * | Gustavo6046 quit (Remote host closed the connection) |
19:20:11 | FromDiscord | <hmmm> aren't strings more flexible for people that don't know how much more functionality they want to add? |
19:20:14 | * | Gustavo6046 joined #nim |
19:20:34 | FromDiscord | <auxym> emojis are utf8, which is slowling becoming the standard, but they're a bit special and not even all systems that support utf8 support emojis |
19:20:43 | PMunch | @hmmm, then you need to add another field to your enum |
19:20:49 | PMunch | I'm not sure what the question is |
19:21:12 | FromDiscord | <hmmm> hmm the things are getting committed to disk I don't know if I can change the enum on the fly |
19:21:55 | PMunch | Uhm, not quite sure what you're doing here |
19:21:56 | FromDiscord | <hmmm> the context is using sets / enum for flags lol I didn't tell |
19:22:04 | * | jmdaemon joined #nim |
19:22:19 | FromDiscord | <hmmm> hmm I'll thing about it some more |
19:22:30 | FromDiscord | <auxym> yeah but what's the story about dynamically changing your enum defs, that sounds a bit weird |
19:23:02 | PMunch | When serialising an enum to a file it will just get turned into an int |
19:23:05 | PMunch | Same for bit sets |
19:23:50 | PMunch | So if you extend the enum (as long as it doesn't require more bytes than the previous definition, this can be controlled in Nim) a new reader will be able to read an older file just fine |
19:23:57 | FromDiscord | <hmmm> no wait what I really want to say is that if I have an enum that is north south east ovest I can't add up later right? |
19:24:02 | PMunch | As long as you keep all the enum values the same of course |
19:24:16 | PMunch | @hmmm, sure you can |
19:24:21 | FromDiscord | <hmmm> oh rly? |
19:24:27 | FromDiscord | <hmmm> I'm totally amazed lol |
19:24:30 | FromDiscord | <Solitude> whos gonna stop you |
19:24:41 | PMunch | I mean you can't do it dynamically while your program is running |
19:24:55 | FromDiscord | <auxym> add what? a new enum entry, or a new flag in the set? And when? At run time or in a subsequent build or something? |
19:24:56 | PMunch | But if you recompile your program you can do whatever you want :P |
19:25:55 | FromDiscord | <hmmm> hmm excuse me I'll go dabbling some tests on enums I was half convinced you couln't change them lol |
19:28:12 | * | neurocyte8 joined #nim |
19:28:59 | * | neurocyte quit (Ping timeout: 260 seconds) |
19:33:54 | FromDiscord | <auxym> I think we may be misunderstanding your question. It's a program. A text file. You can wipe it all out, rewrite it and recompile any time you want. |
19:36:49 | FromDiscord | <hmmm> hmm ok you can't change them dynamically |
19:36:54 | FromDiscord | <hmmm> unless I'm missing something lol |
19:37:15 | FromDiscord | <Rika> No you can’t but you can change it before compilation |
19:37:27 | FromDiscord | <hmmm> ye that was apparent to me even before lol |
19:37:36 | FromDiscord | <Rika> I don’t understand what you’re asking |
19:37:39 | FromDiscord | <Rika> Most of us don’t |
19:38:29 | FromDiscord | <hmmm> so if I choose an enum scheme I can add new enums but can't remove them without breaking the app for existing users |
19:38:54 | FromDiscord | <hmmm> hmm that's fine |
19:38:55 | FromDiscord | <Rika> Well yeah just like removing field |
19:39:18 | FromDiscord | <Rika> The way to remove fields or enums is to mark them deprecated |
19:39:38 | FromDiscord | <Rika> Or |
19:39:56 | FromDiscord | <Rika> When deserialising an old object, map it to the new object |
19:40:02 | FromDiscord | <Rika> And save only new objects |
19:40:15 | FromDiscord | <hmmm> that's kinda genius tbh |
19:42:40 | FromDiscord | <Rika> So your project still has the old objects named “ObjectV1” v2 etc and the new one is just called “Object” |
19:43:08 | FromDiscord | <Rika> OR |
19:43:12 | FromDiscord | <Rika> Your object has a version field |
19:43:32 | FromDiscord | <auxym> In reply to @hmmm "hmm ok you can't": you can't change the enum typedef dynamically, but you can add / remove entries (flags) from your set any time |
19:43:44 | FromDiscord | <Rika> So you just need to load that field and check what it is, then your proc can use whatever logic (chosen by case statement) to load into the new object |
19:43:54 | FromDiscord | <hmmm> actually I'm having this problem right now since I'm adding options and will break all my pre existing data but I think I don't want to write stuff just map it back, I guess I will do it the caveman way lol |
19:44:36 | FromDiscord | <Rika> In reply to @Rika "So you just need": This is kinda a database design thing by the way, migration based versioning |
19:45:16 | FromDiscord | <hmmm> yea it's for things that matter I guess 😛 |
19:45:27 | FromDiscord | <auxym> deech has some cool ideas about using macros to upgrade between different generations of your types in this talk: https://thestrangeloop.com/2021/nim-nuggets-systems-programming-and-metaprogramming-magic.html |
20:08:14 | FromDiscord | <Elegantbeef> It's a cool idea but i dislike that we have types with versioned names |
20:10:40 | FromDiscord | <Bubblie> So for a linux executeable, how do I make on in nim? I know regular linux executeables have .elf, but Iirc it can be any format and linux can execute it. |
20:10:54 | FromDiscord | <Bubblie> (edit) "on in" => "one from" |
20:10:57 | FromDiscord | <Rika> ? Just compile? |
20:11:17 | FromDiscord | <Elegantbeef> Linux doesnt have an executable extension |
20:11:32 | FromDiscord | <Rika> Linux doesn’t use extensions technically |
20:11:39 | FromDiscord | <Elegantbeef> Linux doesnt use file extension for dispatch it uses it only as a hint for programs |
20:11:56 | FromDiscord | <Rika> If it’s marked executable, Linux will try to execute it |
20:12:08 | FromDiscord | <Bubblie> Since im on windows it makes an exe, so is there something I can do to make a executeable for linux from windows? |
20:12:22 | FromDiscord | <Rika> There are many Python or other script languages marked as executable and are because of shebang comments or whatever they’re called |
20:12:31 | FromDiscord | <Rika> In reply to @Bubblie "Since im on windows": Okay so cross compile? |
20:12:56 | FromDiscord | <Bubblie> Is there any docs on cross compilation? |
20:13:15 | FromDiscord | <Bubblie> For nim |
20:13:31 | FromDiscord | <Elegantbeef> No we thought you wanted rust cross compilation docs 😜 |
20:13:36 | FromDiscord | <Bubblie> LMAO |
20:13:37 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/nimc.html#crossminuscompilation |
20:13:43 | FromDiscord | <Bubblie> Thanks beef |
20:26:21 | NimEventer | New thread by Markus_gritsch: Automatic dereferencing for procs, see https://forum.nim-lang.org/t/9058 |
20:46:40 | FromDiscord | <Zoom> Wait, we have no ability to kill threads in stdlib? How else can I stop a thread hung up on a blocking IO? |
20:47:48 | FromDiscord | <Rika> Not cross platform probably |
20:48:01 | FromDiscord | <Rika> Otherwise you might be able to use kill in p thread |
20:49:00 | FromDiscord | <tandy> how does one wrap an async js function ? |
20:49:47 | FromDiscord | <Zoom> That sucks, because I relied on OS to clean up threads after quit(0) but Bash, of all places, gets unresponsive due to one of the threads having blocking `getch()` |
20:50:14 | FromDiscord | <Zoom> I don't really get why the terminal is affected after the program quits |
20:51:46 | FromDiscord | <Zoom> I'm trying to fix this whole mess of threads and not require the user to hit "any key" to release the thread |
20:53:01 | FromDiscord | <Elegantbeef> Seems like the best thing would be to have a custom exit hook which wraps the windows/unix thread close APIs |
20:53:13 | FromDiscord | <Elegantbeef> Or a PR to add that functionality to threads, it's odd it doesnt have it |
20:53:14 | FromDiscord | <Zoom> We have `destroyThread` in std/threads... under `when false:` 😠 |
21:04:44 | FromDiscord | <Zoom> Anyone has any idea why terminal with bash gets borked in my case? Again, currently I'm not joinning threads, not calling sync or anything, just `quit(0)`. On of the threads is caught blocked waiting for user input. Everything works fine for me with Fish, but with Bash the terminal gets unresponsive, even though the program finishes fine, no zombie threads in sight. |
21:07:06 | FromDiscord | <Elegantbeef> This is related to your not tetris eh? |
21:07:06 | FromDiscord | <Zoom> Yep |
21:07:33 | FromDiscord | <Elegantbeef> No clue how helpful i'll be but after i'm done documenting micros procedures i'll take a look |
21:09:02 | FromDiscord | <Zoom> Someone reported a bug and I think this is the cause, I'm not really knowledgeable enough in all things terminal so this is a bit baffling. |
21:14:14 | FromDiscord | <auxym> doesn't look like nim has daemon threads like in java/python either. in those langs daemon threads always get killed when their parent (ie your main thread) exits |
21:18:45 | PMunch | That honestly sounds like a bash bug tbh |
21:18:51 | PMunch | If there are no zombie processes left |
21:19:13 | PMunch | But oh well, I'm off to bed |
21:19:14 | * | PMunch quit (Quit: leaving) |
21:19:26 | FromDiscord | <Elegantbeef> Buh bye |
21:21:14 | FromDiscord | <Zoom> Yeah, [Elegantbeef](https://matrix.to/#/@elegantbeef:matrix.org) you don't need to torture yourselve and read my code, I've condensed the source of the bug |
21:25:40 | FromDiscord | <Zoom> https://play.nim-lang.org/#ix=3TOu |
21:42:55 | * | wyrd quit (Ping timeout: 240 seconds) |
21:46:50 | FromDiscord | <Elegantbeef> It seems like it's an issue with the program closing without resetting the stdout attributes |
21:50:07 | * | wyrd joined #nim |
21:52:08 | FromDiscord | <Elegantbeef> [Zoom](https://matrix.to/#/@Zoom:matrix.org)\: it's not ideal but https://play.nim-lang.org/#ix=3TOA |
21:53:01 | FromDiscord | <Elegantbeef> https://github.com/nim-lang/Nim/blob/version-1-6/lib/pure/terminal.nim#L805-L806 we finish what the system couldnt 😛 |
21:55:04 | * | Jjp137 quit (Quit: Leaving) |
22:03:35 | * | mn3m0n1c joined #nim |
22:22:43 | * | vicfred quit (Quit: Leaving) |
22:27:16 | * | LuxuryMode quit (Quit: Connection closed for inactivity) |
22:37:54 | FromDiscord | <Zoom> [Elegantbeef](https://matrix.to/#/@elegantbeef:matrix.org)\: thanks a lot. That's some ugly boilerplate code though, gotta hide it \:) |
22:38:12 | FromDiscord | <Zoom> Interesting, that the issue isn't present on Fish |
22:38:54 | FromDiscord | <Elegantbeef> Might be that fish resets the stdout after the program closes, whereas bash doesnt. I dont know |
22:40:04 | FromDiscord | <Elegantbeef> Even piping with bash causes the issue, so clearly it's a permanent change to the file |
23:08:39 | * | Zectbumo quit (Remote host closed the connection) |
23:11:46 | * | yoyojambo joined #nim |