00:28:16 | * | lucasta joined #nim |
00:58:42 | FromDiscord | <.bobbbob> how do I make nim c output the binary to a specific directory/name? |
00:59:58 | FromDiscord | <.bobbbob> nvmd found it, -o |
01:00:22 | FromDiscord | <griffith1deadly> as i recall you cannot set outdir and binary name at same time |
01:01:33 | FromDiscord | <.bobbbob> yeah looks like you need --output and -o |
01:09:36 | FromDiscord | <christofur> has anyone been able to compile x86_64 win binaries on a mac system with m2? |
01:11:38 | FromDiscord | <Elegantbeef> What compiler are you using? |
01:11:52 | FromDiscord | <Elegantbeef> For the easiest path you probably want to use zigcc |
01:44:14 | FromDiscord | <christofur> clang, but ill try that |
01:44:20 | FromDiscord | <christofur> clang: error: linker command failed with exit code 1 (use -v to see invocation)↵Error: execution of an external program failed: 'clang |
01:44:28 | FromDiscord | <christofur> i guess i gotta specify it explicitly when i instal |
01:44:35 | FromDiscord | <christofur> (edit) removed "when i instal" |
01:46:46 | FromDiscord | <Elegantbeef> Eh cross compilation is always fun |
01:46:59 | FromDiscord | <christofur> nim.cfg(197, 3) Error: unknown C compiler: 'zig'. Available options are: gcc, switch_gcc, llvm_gcc, clang, bcc, vcc, tcc, env, icl, icc, clang_cl |
01:47:01 | FromDiscord | <christofur> dont think i can use it |
01:47:02 | FromDiscord | <Elegantbeef> Zig's compilation work on top of clang/llvm is very nice |
01:47:05 | FromDiscord | <christofur> do i have to alias this or |
01:47:11 | FromDiscord | <Elegantbeef> https://github.com/enthus1ast/zigcc |
01:47:15 | FromDiscord | <Elegantbeef> You do technically need to alias it |
01:48:02 | FromDiscord | <Elegantbeef> It's not officially supported but it's a good CC path |
01:53:39 | FromDiscord | <christofur> `/bin/sh: zigcc: command not found` hmm |
01:53:41 | FromDiscord | <christofur> i aliased it |
01:53:45 | FromDiscord | <christofur> in .bashrc, even though i use zsh |
01:56:12 | FromDiscord | <christofur> sent a code paste, see https://paste.rs/ChQMo |
01:59:47 | FromDiscord | <Elegantbeef> Well it's going to `sh` so your alias must work for that shell |
02:03:17 | * | krux02 quit (Remote host closed the connection) |
02:32:41 | FromDiscord | <nasuray> The aforementioned zigcc nimble package is creating a shim around zig. So if you install that there is no aliasing... Is the compiler zig on your path? |
02:42:35 | * | lucasta quit (Quit: Leaving) |
02:45:05 | FromDiscord | <christofur> In reply to @Elegantbeef "Well it's going to": i did.. |
02:45:13 | FromDiscord | <christofur> @nasuray yes. |
02:45:21 | FromDiscord | <christofur> can i just make it use zsh instead of sh |
02:46:44 | FromDiscord | <nasuray> Why does the shell matter at all? |
02:47:08 | FromDiscord | <christofur> i dont know.. considering i can run zigcc just fine in terminal |
02:47:16 | FromDiscord | <christofur> https://media.discordapp.net/attachments/371759389889003532/1186499964218646619/image.png?ex=65937933&is=65810433&hm=cddcfd479f053e2d34f5be5261732bc9c75395c77a6de47fbee709745ca1137c& |
02:47:34 | FromDiscord | <christofur> i dont really know whats going on here |
02:48:20 | FromDiscord | <christofur> like i said i aliased in bashrc.. so |
02:48:29 | FromDiscord | <christofur> and zshrc |
02:48:35 | FromDiscord | <nasuray> Aliased what exactly? |
02:48:54 | FromDiscord | <christofur> https://media.discordapp.net/attachments/371759389889003532/1186500377902841927/image.png?ex=65937996&is=65810496&hm=31286dbe36a2aff28bdb7945f79501104b38457e40e8bdcd3559f1400790a3fa& |
02:48:57 | FromDiscord | <christofur> i did this, not sure what else its expecting. |
02:50:15 | FromDiscord | <nasuray> Two other options then create an exe on your path for zigcc or just use the above nimble package |
02:50:29 | FromDiscord | <nasuray> https://github.com/enthus1ast/zigcc |
02:50:42 | FromDiscord | <christofur> i installed that package |
02:50:47 | FromDiscord | <christofur> https://stackoverflow.com/questions/73345643/how-to-use-the-zig-compiler-in-order-to-compile-nim-code |
02:50:49 | FromDiscord | <christofur> they link to this |
02:50:57 | FromDiscord | <christofur> i dont really see the difference between this and aliasing but ill try |
02:51:23 | FromDiscord | <nasuray> The subprocess needs to have sourced the right rc files |
02:51:42 | FromDiscord | <nasuray> Assuming /bin/sh is even bash or zsh to begin with |
02:53:27 | FromDiscord | <Elegantbeef> no `sh` should be `sh` |
02:54:27 | FromDiscord | <christofur> ya im googling to find out what i edit for that |
02:55:23 | FromDiscord | <nasuray> @Phil didn't use an alias for that stackoverflow answer either |
02:55:57 | FromDiscord | <christofur> yes im seeing that |
02:56:30 | FromDiscord | <nasuray> I do the same thing as `zigcc` for my `zig` wrapper https://github.com/daylinmorgan/forge |
03:00:10 | FromDiscord | <christofur> eh, ill just stick to windows i guess |
03:00:17 | FromDiscord | <christofur> really would rather develop on my air but this is too much |
03:00:36 | FromDiscord | <Elegantbeef> I mean you're using `.bashrc` to register aliases |
03:00:50 | FromDiscord | <Elegantbeef> That's explicitly for `bash` and only used by a few other shells |
03:00:58 | FromDiscord | <Elegantbeef> I think `.profile` is loaded first |
03:01:01 | FromDiscord | <Elegantbeef> I do not recall though |
03:01:09 | FromDiscord | <christofur> MachO Flush... error(link): unsupported cpu architecture 0x0↵error: UnsupportedCpuArchitecture↵Error: execution of an external program failed: 'zigcc -o |
03:01:14 | FromDiscord | <christofur> oh im passed that now |
03:01:24 | FromDiscord | <Elegantbeef> `--cpu:amd64`? |
03:01:42 | FromDiscord | <Elegantbeef> Or does zig no support amd64 from arm |
03:01:44 | FromDiscord | <Elegantbeef> ..... hmmmm |
03:02:10 | FromDiscord | <christofur> tried to prefix it with arch -x86_64 |
03:02:12 | FromDiscord | <christofur> which should run rosetta |
03:02:48 | FromDiscord | <christofur> In reply to @Elegantbeef "`--cpu:amd64`?": tried with that, same message |
03:03:43 | FromDiscord | <Elegantbeef> Zig might not do arm -\> amd64... I assume it does but idk |
03:05:18 | FromDiscord | <nasuray> https://ziglang.org/download/0.11.0/release-notes.html#Support-Table |
03:07:27 | FromDiscord | <nasuray> I can't recall if `zig targets` just includes everything LLVM supports or if it filters based on the running compiler |
03:09:45 | FromDiscord | <nasuray> with `forge` I do my best to match the triples to the appropriate `cpu` and `os` on `nim`. But there are plenty of things that don't cross-compile easily because of missing shared libraries |
03:17:26 | * | edr quit (Quit: Leaving) |
03:58:42 | * | derpydoo quit (Ping timeout: 252 seconds) |
04:03:43 | * | dtomato quit (Ping timeout: 246 seconds) |
04:16:23 | * | dtomato joined #nim |
04:51:46 | FromDiscord | <.bobbbob> sent a code paste, see https://paste.rs/oElrQ |
05:05:51 | ormiret | things after a ? aren't part of the path, they're "query parameters" Can grab them from Context: https://planety.github.io/prologue/context/#getqueryparamsoption |
05:09:48 | FromDiscord | <albassort> i've returned i suppose |
05:09:59 | FromDiscord | <albassort> hey guys whats the best flow path control mechanisms |
05:10:04 | FromDiscord | <albassort> (edit) "hey guys whats the best flow path control mechanisms ... " added "in your opinions" |
05:10:14 | FromDiscord | <albassort> im rewriting old shitty cold, its one giant uncomprehensible loop |
05:10:42 | FromDiscord | <albassort> https://gitlab.com/CAlbassort/universalime/-/blob/main/src/libs/nim/keyboardWriter.nim?ref_type=heads |
05:10:48 | FromDiscord | <albassort> im thinking about putting it into blocks |
05:11:18 | FromDiscord | <albassort> a nim goto statement would be helpful here too |
05:14:21 | NimEventer | New thread by khaledh-nim: Ref types and the align pragma, see https://forum.nim-lang.org/t/10783 |
05:18:55 | FromDiscord | <albassort> https://github.com/sls1005/nim-goto |
05:19:02 | FromDiscord | <albassort> is this a good idea? |
05:19:03 | FromDiscord | <albassort> maybe not |
05:23:18 | FromDiscord | <m4ul3r> I've used it before, but it's not really the best way to handle it.↵It works as a goto |
05:23:25 | FromDiscord | <albassort> i trust Araq over myself and am goign to just structure it |
05:23:35 | FromDiscord | <albassort> (edit) "goign" => "going" |
05:23:52 | FromDiscord | <albassort> In reply to @m4ul3r "I've used it before,": yeah but read the code i posted, it is basically the only situation where a goto make sense |
05:24:01 | FromDiscord | <albassort> many paths that lead to other paths that accsess the same memory |
05:28:56 | FromDiscord | <Elegantbeef> Nim actually has goto built in |
05:29:16 | FromDiscord | <Elegantbeef> https://forum.nim-lang.org/t/8963#58594 |
05:29:28 | FromDiscord | <albassort> I've heard rumblings of goto in nim but its not fresh in my memory |
05:30:59 | FromDiscord | <albassort> In reply to @Elegantbeef "Nim actually has goto": that seeems a little jank of syntax and maybe should have its own keyword but yeah that seems good |
05:31:18 | FromDiscord | <Elegantbeef> Good thing goto is jank |
05:31:41 | FromDiscord | <albassort> you think if you could be like ↵goto state:↵ of a ...↵it would be over used |
05:31:49 | FromDiscord | <albassort> (edit) "over used" => "overused" |
05:31:52 | FromDiscord | <albassort> its obscurity is a power |
05:31:57 | FromDiscord | <Elegantbeef> I mean you can make a macro over it |
05:32:05 | FromDiscord | <albassort> yeah but you know what i mean |
05:32:11 | FromDiscord | <Elegantbeef> No I do not |
05:32:19 | FromDiscord | <albassort> i mean, less jank in the stdlib |
05:32:23 | FromDiscord | <albassort> you can make a macro for anything |
05:32:34 | FromDiscord | <Elegantbeef> I mean who really needs goto |
05:32:36 | FromDiscord | <Elegantbeef> 2 people and a dog |
05:32:54 | FromDiscord | <albassort> beef, i would like your experienced as a slightyly older but more experienced and smarter person |
05:33:02 | FromDiscord | <odexine> In reply to @Elegantbeef "2 people and a": Beef since when did you need go to |
05:33:03 | FromDiscord | <albassort> In reply to @albassort "https://gitlab.com/CAlbassort/universalime/-/blob/m": would this benefit from goto |
05:33:27 | FromDiscord | <albassort> though the code may be too incomprhenensible for you to make a judgement |
05:33:31 | FromDiscord | <Elegantbeef> Are you micro optimising call overheads |
05:33:39 | FromDiscord | <albassort> no |
05:33:48 | FromDiscord | <albassort> well |
05:33:49 | FromDiscord | <albassort> i want to |
05:34:00 | FromDiscord | <albassort> i want to make the control flow easier to visualize |
05:34:02 | FromDiscord | <odexine> In reply to @albassort "would this benefit from": Where do you think it needs go to? |
05:34:15 | FromDiscord | <Elegantbeef> https://gitlab.com/CAlbassort/universalime/-/blob/main/src/libs/nim/keyboardWriter.nim?ref_type=heads#L89-110 goto is the least of your concerns |
05:34:29 | FromDiscord | <Elegantbeef> This procedure has 20 local variables |
05:34:35 | FromDiscord | <albassort> this is messed up |
05:34:50 | FromDiscord | <odexine> I cannot read that on mobile lol |
05:35:14 | FromDiscord | <albassort> In reply to @Elegantbeef "This procedure has 20": how else do you import user configurable settings |
05:35:15 | FromDiscord | <Elegantbeef> If you used procedures instead of nested logic you would not think goto is a good idea |
05:35:34 | FromDiscord | <Elegantbeef> Using procs and passing the state along |
05:35:45 | FromDiscord | <albassort> that was the other option |
05:35:52 | FromDiscord | <albassort> make a state then parse the state on yield |
05:35:59 | FromDiscord | <Elegantbeef> your biggest problem here is you're doing 3000 things in a single proc |
05:36:17 | FromDiscord | <Elegantbeef> Separate your logic out into procedures, and suddenly you will live a better life |
05:36:29 | FromDiscord | <albassort> i think i was burnt out when i wrote this |
05:36:37 | FromDiscord | <albassort> sent a code paste, see https://paste.rs/5VDsL |
05:37:23 | FromDiscord | <albassort> https://gitlab.com/CAlbassort/universalime/-/blob/main/src/libs/nim/ime.nim?ref_type=heads |
05:37:29 | FromDiscord | <albassort> look at the implementation of this |
05:38:19 | FromDiscord | <albassort> i have to rewrite that entire thing because idk what the fuck i was thiniing |
05:38:21 | FromDiscord | <albassort> (edit) "thiniing" => "thiniking" |
05:38:25 | FromDiscord | <albassort> (edit) "thiniking" => "thinkinf" |
05:38:29 | FromDiscord | <Elegantbeef> Yea rewrite it then comeback |
05:38:29 | FromDiscord | <albassort> (edit) "thinkinf" => "thinking" |
05:38:53 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/jdgGB |
05:38:57 | FromDiscord | <albassort> i wrote it as a closure itertor with manual memory managment |
05:39:01 | FromDiscord | <albassort> for... some reason |
05:39:27 | FromDiscord | <albassort> beef this is why im secrative about my code |
05:39:35 | FromDiscord | <albassort> (edit) "beef this is why im secrative about my code ... " added "when im writing it" |
05:39:42 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/om8QN |
05:40:02 | FromDiscord | <Elegantbeef> Cause people give helpful insight 😄 |
05:43:14 | FromDiscord | <Elegantbeef> https://gitlab.com/CAlbassort/universalime/-/blob/main/src/libs/nim/ime.nim?ref_type=heads#L41-49 I do have to say this is interesting, a generic iterator that only works on `seq[string]` |
05:44:21 | FromDiscord | <albassort> i dont remember being on drugs |
05:44:25 | FromDiscord | <albassort> (edit) "i dont remember being on drugs ... " added "while i wrote this" |
05:44:31 | FromDiscord | <albassort> maybe i was stressed |
05:44:58 | FromDiscord | <albassort> from all of the x11 learning |
05:45:35 | FromDiscord | <Elegantbeef> Learning X11 has killed people I'm sure of it |
05:45:46 | FromDiscord | <Elegantbeef> At least it broke me writing a window manager |
05:46:20 | FromDiscord | <albassort> its well documented but it doesn't help |
05:46:26 | FromDiscord | <albassort> (edit) removed "" |
05:46:43 | FromDiscord | <albassort> mostly because its documentation is split in 3 different places |
05:46:43 | FromDiscord | <Elegantbeef> You obviously have not tried to write a window manager |
05:47:03 | FromDiscord | <albassort> well, the functions are there beef |
05:47:12 | FromDiscord | <Elegantbeef> They are there |
05:47:17 | FromDiscord | <albassort> in the docs |
05:47:27 | FromDiscord | <albassort> the struts have no explanation and are named randomly |
05:47:28 | FromDiscord | <Elegantbeef> But the correct way of doing things and making things work is certainly not |
05:47:32 | FromDiscord | <albassort> and are sometimes the same as other struts |
05:47:48 | FromDiscord | <albassort> and the order is just "fuck it figure it out" |
05:48:04 | FromDiscord | <albassort> and every time you fuck it up your computer breaks and you gotta kill the process |
05:48:24 | FromDiscord | <Elegantbeef> Nah I used Xephyr to test with |
05:48:28 | FromDiscord | <Elegantbeef> So it did not require a restart |
05:51:32 | FromDiscord | <albassort> i have no interest in interacting with X11 again |
05:51:42 | FromDiscord | <albassort> i imagine wayland is somehow worse |
05:51:55 | FromDiscord | <Elegantbeef> Wayland can be nicer but yea it's also a whole thing |
05:52:05 | FromDiscord | <Elegantbeef> I do wonder if futhark can wrap wayland/wlroots now |
05:52:20 | FromDiscord | <albassort> futhark the language or futhark the nim thing |
05:52:39 | FromDiscord | <albassort> or the other nim thing |
05:53:50 | FromDiscord | <albassort> i think combining goto and state management would make the most sense |
05:54:18 | FromDiscord | <albassort> because then it isn't relooping and then checking the state, you can clearly see the branch it is now going down |
05:54:30 | FromDiscord | <albassort> (edit) "down" => "down, and it can loop through paths freely" |
05:54:40 | FromDiscord | <Elegantbeef> The Nim C wrapper |
05:55:00 | FromDiscord | <Elegantbeef> Meh the goto isnot that important |
05:55:37 | FromDiscord | <Elegantbeef> No point writing with a goto and making the code impossible to follow if the performance is not benefited significantly |
05:57:04 | FromDiscord | <albassort> in which situations is goto faster than thigns |
05:57:07 | FromDiscord | <albassort> (edit) "thigns" => "things" |
05:57:20 | FromDiscord | <Elegantbeef> When you're aimlessly micro optimising |
05:57:43 | FromDiscord | <ichigo> `goto ohgodhowdidwegethere` |
05:58:08 | FromDiscord | <albassort> some dude said "yo what if i plant these hard things in the ground then come back next year" |
05:58:17 | FromDiscord | <albassort> (edit) "plant" => "put" |
05:58:44 | FromDiscord | <ichigo> chocolate coins unfortunately do not sprout into chocolate bushes |
06:02:02 | FromDiscord | <Elegantbeef> I think that's a myth |
06:14:47 | FromDiscord | <ichigo> reject `goto`, use `comefrom` |
06:24:04 | FromDiscord | <JJ> oh god that reminds me i should fix my wayland wrappers |
06:24:07 | FromDiscord | <JJ> or formally abandon them |
06:24:59 | FromDiscord | <JJ> they're long outdated with the advent of futhark... |
06:25:19 | FromDiscord | <Elegantbeef> Well futhark had issues with wlroots/wayland iirc |
06:32:26 | FromDiscord | <JJ> really, interesting |
06:32:37 | FromDiscord | <JJ> hm. anything specific? or was it a style insensitivity issue |
06:32:54 | FromDiscord | <Elegantbeef> It was nested anonymous unions iirc |
06:33:20 | FromDiscord | <JJ> blugh |
06:34:17 | FromDiscord | <Elegantbeef> It might be fixed by now, I do not recall if I made an issue |
06:34:26 | FromDiscord | <Elegantbeef> I should've but I'm also a dweeb sometimes |
06:36:33 | FromDiscord | <ca_lobo_14153> In reply to @rakgew "<@1164001202451775498> you could get": That is probably the better way of doing things... thanks for pointing it out. |
06:59:42 | * | Qaziquza joined #nim |
07:01:58 | * | Qaziquza quit (Client Quit) |
07:04:57 | FromDiscord | <albassort> Did futhark git gud with 2.0 integration or something |
07:05:18 | FromDiscord | <albassort> I cint and uncheckedarray old fashioned |
07:05:24 | FromDiscord | <albassort> (edit) "I" => "Are" |
07:05:25 | FromDiscord | <Elegantbeef> Nope |
07:05:37 | FromDiscord | <albassort> (edit) "uncheckedarray" => "uncheckedarray[ptr int]" |
07:05:57 | FromDiscord | <albassort> Then why are we abandoning hand written bindings? |
07:06:09 | FromDiscord | <Elegantbeef> Cause large libraries are a pain to wrap? |
07:06:21 | FromDiscord | <albassort> (edit) "int]" => "cint]" |
07:06:33 | FromDiscord | <albassort> Can you just import things with futhark now? |
07:06:44 | FromDiscord | <Elegantbeef> You always could |
07:06:53 | FromDiscord | <albassort> I mean and have type checking and the like |
07:07:03 | FromDiscord | <Elegantbeef> You always did |
07:07:17 | FromDiscord | <albassort> There's something it was missing that I didn't like |
07:07:24 | FromDiscord | <albassort> I forget what |
07:07:33 | FromDiscord | <Elegantbeef> That it used `ptr T` instead of `ptr Unchecked[T]`? |
07:07:45 | FromDiscord | <Elegantbeef> That it generated an unreadable file? |
07:07:56 | FromDiscord | <albassort> Probably the latter |
07:16:13 | * | advesperacit joined #nim |
07:21:23 | * | jmdaemon joined #nim |
07:24:16 | FromDiscord | <sOkam! 🫐> Add the "wrapping big libraries" that was already mentioned to the mix, and you probably get the picture |
07:25:30 | FromDiscord | <sOkam! 🫐> sent a long message, see https://paste.rs/jLEyB |
07:31:55 | FromDiscord | <sOkam! 🫐> sent a long message, see https://paste.rs/eEbiX |
07:38:50 | FromDiscord | <Phil> In reply to @christofur "": Afaik aliases just get substituted, so in the end what your CLI command for the compiler gets is 2 words, zig and cc. ↵That is not what you want. What you want is a single command for the compiler to execute. That's why you need either a bash script or enthus1ast's package |
07:39:42 | FromDiscord | <Phil> (edit) "single" => "single-word" |
07:45:37 | * | PMunch joined #nim |
07:47:39 | FromDiscord | <Phil> In reply to @albassort "Probably the latter": Btw. nice to see you again! |
07:52:21 | FromDiscord | <pmunch> In reply to @albassort "Probably the latter": It has some switches now that can make the output more readable, with the drawbacks that motivated that design decision in the first place |
07:53:31 | FromDiscord | <pmunch> I'm also working on a "project mode" which tries to wrap an entire project into separate files and such. But it's giving me a bit of a hard time.. C imports and declarations are just a bit too foreign for Nim |
07:56:19 | FromDiscord | <pmunch> In reply to @heysokam "There is always the": Well I was fed up with the existing tools that didn't work, and which tried to work this way. So when I designed Futhark I tried to do things better. Not quite sure what that script would do, but with a combination of `-d:nodeclguards` and `outputPath` I think you get pretty readable and Git friendly output. |
07:57:28 | FromDiscord | <Elegantbeef> Do you carry comments over to the bindings? |
07:57:40 | FromDiscord | <pmunch> My main goal was to have something which actually worked without manually having to edit the code after wrapping. Putting things in a file to be checked into a repository promotes editing the code post-wrap. |
07:57:59 | FromDiscord | <pmunch> Unfortunately not, I'm not sure libclang exposes comments |
07:58:17 | FromDiscord | <Elegantbeef> Though it also promotes distributing Nim libraries that do not require libclang/futhark 😄 |
07:58:50 | FromDiscord | <Elegantbeef> Ideally you can pin a package to a library version and not have to depend on futhark/libclang |
07:59:04 | FromDiscord | <Elegantbeef> Those of course can be a bit of a pain to get working due to distros being silly |
08:00:33 | FromDiscord | <pmunch> Sure, which is why I ended up adding the outputPath flag to Futhark and the section on how to create a hybrid of Futhark and non-Futharked wrappers |
08:02:44 | FromDiscord | <pmunch> My MAPM bindings for example, they ship the Futharked file and to use Futhark you have to throw a switch |
08:03:03 | FromDiscord | <pmunch> I see now though that it does depend on Futhark, guess I should remove that. |
08:09:45 | FromDiscord | <Elegantbeef> Oh hey it seems futhark does indeed work on wlroots now |
08:10:49 | FromDiscord | <pmunch> Nice |
08:10:57 | FromDiscord | <pmunch> It seems to work on most things by now |
08:11:18 | FromDiscord | <Elegantbeef> Let me bring back wasmer 😛 |
08:11:34 | PMunch | Just not embedded stuff, but that's mainly Nim's poor handling of target and host OS.. |
08:11:47 | PMunch | Wasmer doesn't work? |
08:12:43 | FromDiscord | <Elegantbeef> Remember it has that `#define own` that is used for annotations that libclang just eats |
08:12:53 | FromDiscord | <Elegantbeef> So it defines the procedures incorrectly as `varargs` |
08:13:04 | PMunch | Oh right, I think I fixed that |
08:13:29 | PMunch | Isn't that this thing? https://github.com/PMunch/futhark#pre-ansi-c-function-declarations |
08:14:11 | FromDiscord | <Elegantbeef> No it was just a define that marked when a procedure owned resources |
08:14:27 | PMunch | There is no issue in the issue tracker for this, so I have no minimal code repro to test on :( |
08:14:32 | FromDiscord | <Elegantbeef> so it was like `own int name()` |
08:14:35 | FromDiscord | <Elegantbeef> There was one |
08:14:53 | PMunch | Hmm, I tried to search for wasmer but it found nothing |
08:14:56 | FromDiscord | <Elegantbeef> https://github.com/PMunch/futhark/issues/44 |
08:15:06 | FromDiscord | <Elegantbeef> You fixed it |
08:16:01 | PMunch | Ah right, yes it's the same thing as what I linked |
08:16:05 | PMunch | Or same root cause |
08:17:50 | PMunch | If it errors out on anything else now just let me know :) |
08:21:37 | FromDiscord | <requiresupport> have a widestring created with `newWideCString` would like to compare the chars with another string also created with `newWideCString` but getting error that there is no proc in std that can compare `Utf16Char` with another `Utf16Char`. Help please |
08:22:28 | FromDiscord | <Elegantbeef> There are no `[]` or `==` procs |
08:23:28 | FromDiscord | <Elegantbeef> You need to define your own `==` for `WideCstring` that compares pointers then walks the string to see if they're the same |
08:24:12 | PMunch | Odd thing to leave out if we have newWideCString.. |
08:24:37 | FromDiscord | <Elegantbeef> They're just glorified windows Cstrings 😄 |
08:25:09 | FromDiscord | <requiresupport> i hate working with windows 😞 |
08:51:17 | PMunch | Hmm, I need to pass argc/argv on to a C library |
08:51:56 | PMunch | Is there a way to get these in Nim or do I have to re-create them manually from the command line options? |
08:52:14 | PMunch | I guess I could set up my own main and call NimMain from there.. |
08:55:44 | FromDiscord | <Elegantbeef> https://github.com/nim-lang/Nim/blob/version-2-0/lib/std/cmdline.nim#L263C1-L265C49 might help |
08:56:02 | FromDiscord | <Elegantbeef> Sadly there is no way of getting the raw values that I know of |
08:56:29 | PMunch | Hmm, that's a shame.. |
08:56:42 | FromDiscord | <Elegantbeef> Well you can use those for linux atleast 😄 |
08:57:47 | PMunch | Which is all that really matters :) |
08:59:57 | PMunch | Hmm, we don't have strdup anywhere do we? |
09:02:37 | FromDiscord | <Elegantbeef> Depends on whether you need to pass it across to C or Nim |
09:03:00 | FromDiscord | <Elegantbeef> `$` works as a str dup but is managed by Nim so sharing it is unwise |
09:04:01 | PMunch | Yeah I need it for interop |
09:04:50 | FromDiscord | <Elegantbeef> The only reference to `strdup` in the Nim git repo is inside of linenoise.c 😄 |
09:05:22 | FromDiscord | <Elegantbeef> so `proc copy(_: cstring): cstring {.importc:"strdup", cdecl.}` your welcome |
09:05:58 | PMunch | I just did `proc strdup(x: cstring): cstring {.importc.}` |
09:06:13 | FromDiscord | <Elegantbeef> Lame |
09:06:50 | PMunch | Gah, for some reason Microsoft Tasks just randomly opens up a blank new browser window from time to time when I have it open in the background of my browser |
09:06:58 | FromDiscord | <Elegantbeef> I've heavily embraced using `_` myself for when parameter names do not matter |
09:07:14 | PMunch | Yeah I think I'll nick that idea |
09:07:17 | FromDiscord | <Elegantbeef> Such a lovely way of doing it `type X = proc(_: int, _: string): float` is pretty good |
09:10:57 | PMunch | Well this is a bit annoying, Nim doesn't auto-convert a `ptr array[N, X]` to `ptr UncheckedArray[X]` |
09:11:45 | FromDiscord | <Elegantbeef> Of course not that's loss of information! |
09:20:58 | PMunch | Neat! I managed to port the hello_world of FUSE to Nim :) |
09:21:14 | PMunch | So now I have a Nim program which can control a filesystem |
09:22:21 | FromDiscord | <ichigo> .. . . . . . .Use a macro to represent the AST of your program as an actual directory tree you can browse and edit while nim is compiling. |
09:22:49 | FromDiscord | <Phil> The placement of the dots in that sentence is disturbing the force |
09:23:08 | FromDiscord | <ichigo> (edit) ".Use" => "Use" |
09:23:13 | FromDiscord | <ichigo> there; fixed |
09:24:22 | PMunch | Haha, my idea is actually to map the MQTT devices in my smart-home to a filesystem. So that to turn off the lights I can simply do `echo off > house/living-room/lights` |
09:24:45 | FromDiscord | <ichigo> In ~~UNIX~~House, everything is a file. |
09:24:46 | PMunch | That write operation would then get turned into a MQTT message to turn of the lights |
09:25:38 | PMunch | Turn off even |
09:27:09 | PMunch | But am considering to write an article on this, in which case I was thinking of creating a JSON "editor" by mounting a JSON object to a path, then allowing edits, and when unmounted it would write out the result |
09:33:05 | FromDiscord | <Chronos [She/Her]> In reply to @PMunch "Haha, my idea is": Huh, that sounds fun actually |
09:34:26 | FromDiscord | <sOkam! 🫐> In reply to @pmunch "Well I was fed": I didn't know about `outputPath`. That might be what I was searching for but couldn't find 👌 |
09:39:20 | PMunch | If anyone else wants to play around with this: https://github.com/PMunch/libfuse-nim |
09:41:17 | FromDiscord | <Phil> Actually PMunch, how much multithreading have you done?↵Ever tried running some code in a separate thread that eventually finishes and when it does so sends back a message via Channel, without forcing you to call joinThread? |
09:41:38 | PMunch | I've done a fair bit |
09:41:52 | PMunch | That should work fine |
09:42:03 | FromDiscord | <Phil> Never got it to work myself, always blew up |
09:42:10 | PMunch | Then just wait for a message in the channel instead of using joinThread |
09:42:10 | FromDiscord | <Phil> No jointhread meant segfaults for me |
09:42:24 | PMunch | Hmm, that doesn't sound right |
09:42:34 | FromDiscord | <Phil> I explained badly:↵I was in an eventloop and the joinThread was outside of it |
09:42:48 | FromDiscord | <Phil> My mainthread was guaranteed to outlive that shorter task-thread |
09:43:03 | FromDiscord | <Phil> And in the loop regularly checking for new messages |
09:46:58 | PMunch | Something like this right? https://paste.rs/2OntL.txt |
09:47:04 | PMunch | Seems to work fine for me |
09:49:13 | FromDiscord | <Phil> Hmmm that gives me a baseline to work off of |
09:49:19 | FromDiscord | <Phil> That didn't quite work for me when I tried |
09:49:28 | FromDiscord | <Phil> But I also was creating the thread from a proc and so on |
09:53:35 | FromDiscord | <Phil> In reply to @PMunch "Something like this right?": Yep, me creating the thread in a proc was the mistake |
09:55:48 | FromDiscord | <Phil> Thanks! |
09:56:42 | FromDiscord | <Phil> sent a code paste, see https://paste.rs/Smecd |
10:07:52 | PMunch | Yeah that's just illegal creation of threads |
10:10:33 | FromDiscord | <Phil> Can't be illegal, the compiler never stopped me! |
10:10:40 | FromDiscord | <Phil> 😄 |
10:12:15 | PMunch | Haha, usually the Nim compiler is good about this sort of thing |
10:13:05 | PMunch | Chronos_[She/Her], did a simple test with the JSON thing now, just does a single level of the object, and only shows the string contents of each key as a separate file, but it already works great :) |
10:13:49 | FromDiscord | <Elegantbeef> Eh `Thread[T]` does not seem to make any sense |
10:14:21 | PMunch | WDYM? |
10:14:34 | FromDiscord | <Elegantbeef> https://forum.nim-lang.org/t/10772#71871 |
10:15:01 | PMunch | Huh? |
10:15:27 | FromDiscord | <Phil> Maybe referring to me using generic procs to instantiate threads via createThread? |
10:15:38 | FromDiscord | <Phil> (edit) "createThread?" => "createThread and result?" |
10:20:36 | FromDiscord | <Elegantbeef> You would imagine you could use `Thread[T]` as a local variable, but seemingly that is 'wrong' |
10:21:59 | FromDiscord | <Elegantbeef> Unless I misunderstand araq's message they seem weird |
10:22:36 | PMunch | Yeah you apparently can't use them as local variables |
10:23:25 | FromDiscord | <Clonkk> If I understood the implementation correctly, it's just that Thread[T] should not be treated as a "value". Under the hood, it's a pthread pointer |
10:24:19 | FromDiscord | <Elegantbeef> Well `=copy` is disabled so I do not know what implications what you're saying has |
10:27:35 | FromDiscord | <Elegantbeef> Like in Phil's example that segfaults there is no obvious reason to me for it to segfault |
10:28:55 | FromDiscord | <Phil> I mean, I'll just eat it and refactor my code to not instantiate threads from procs and require the user pass me in a thread-variable |
10:29:22 | FromDiscord | <Elegantbeef> Sure you have to do that, but I'm saying there is no sensible reason that I can see for needing to do that |
10:29:24 | FromDiscord | <Phil> It appears to be intended design based on Araqs statements so I assume that's a feature not a bug to kick you towards his intended design for using threads |
10:30:03 | FromDiscord | <Phil> That or it's in the nature of the beast somehow. I dunno, I'm already writing code at lower levels than I ever have before |
10:30:44 | FromDiscord | <Clonkk> I think it just means thread object should live on heap, no ? |
10:31:07 | FromDiscord | <Elegantbeef> He says "global" |
10:31:22 | FromDiscord | <Elegantbeef> Global to me means static memory accessible by all |
10:31:41 | FromDiscord | <pmunch> Bit weird that they can't be local if they're just a pthread pointer |
10:32:02 | FromDiscord | <Elegantbeef> Yea, but I need to sleep instead of worry about this wacky world 😄 |
10:32:08 | FromDiscord | <pmunch> What are they on windows? |
11:20:09 | FromDiscord | <Chronos [She/Her]> @odexine reminds me of when someone suggested allowing for passing the allocator explicitly as an argument for stdlib functions lol |
11:20:23 | FromDiscord | <odexine> that's what zig does, yes |
11:25:26 | FromDiscord | <Chronos [She/Her]> Yeah, thought it was a coincidence that you mentioned this |
11:27:09 | FromDiscord | <odexine> i replied to a message, did you read what i replied to? |
11:29:40 | FromDiscord | <Chronos [She/Her]> Yeah I did |
11:30:02 | FromDiscord | <Chronos [She/Her]> Just funny that it was mentioned |
11:30:24 | FromDiscord | <Chronos [She/Her]> Though, ig considering it was about allocators in general, I'm just being a bit silly |
12:05:04 | * | ehmry quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
12:06:05 | FromDiscord | <requiresupport> is there a nim version of https://en.cppreference.com/w/c/string/wide/wcslen ? any pros can give me a quick implementation in nim? |
12:07:30 | PMunch | I mean you could just do `proc wcslen(_: cstring): csizet {.importc, header: "wchar.h".}` |
12:08:08 | FromDiscord | <requiresupport> that's what I have right now.. but im OCD and i've been trying to implement in nim and failed multiple times :/ |
12:12:03 | PMunch | Why would you want to implement it in Nim when you have a perfectly good version in C available for use? |
12:13:18 | FromDiscord | <requiresupport> just curious how to do, no real reason why |
12:13:24 | FromDiscord | <requiresupport> (edit) "do," => "do it," |
12:13:35 | PMunch | Ah, well wide strings are just UTF-16 I believe |
12:13:44 | PMunch | So you'd need to implement that |
12:14:00 | PMunch | Not terribly hard, just tedious |
12:14:09 | FromDiscord | <requiresupport> I see |
12:15:09 | PMunch | Basically `var x = 0; while x < data.len: x += data[x].byteLen` |
12:15:36 | PMunch | Where `byteLen` is a procedure that checks how many UTF bytes this character uses |
12:17:36 | FromDiscord | <requiresupport> Thanks ill give it another try |
13:28:12 | PMunch | Haha, got the JSON as file-system thing working |
13:28:39 | PMunch | Actually pretty neat, instead of using jq you can now use find/grep/etc. to navigate JSON |
13:28:54 | PMunch | Currently only read-only though |
13:29:01 | PMunch | Making it RW would be really cool |
13:30:04 | FromDiscord | <nnsee> that _does_ sound pretty neat, actually |
13:30:14 | FromDiscord | <nnsee> but how do you handle types? |
13:30:38 | FromDiscord | <nnsee> say I do `echo 1000 > randomKey`, is that saved as a string or an int |
13:30:41 | PMunch | Well, at the moment since it's read-only I just turn everything into strings |
13:30:59 | PMunch | Objects are turned into directories with each key being a file or directory |
13:31:22 | PMunch | Arrays also turns into directories with files/subdirectiories just named 0,1,2,etc. |
13:31:58 | PMunch | And everything which is not an object or an array just gets turned into a file with the contents as a string |
13:32:07 | FromDiscord | <nnsee> so in that case how would i create a new, say, array? `mkdir` is ambiguous since it can mean either an empty object or an empty array |
13:32:17 | FromDiscord | <nnsee> I know you haven't gotten around to implementing that lol, just wondering the hypotheticals |
13:32:27 | PMunch | My idea was to basically treat write operations with a large tryParse thing |
13:32:33 | PMunch | Falling back to just a string |
13:32:37 | * | ehmry joined #nim |
13:33:06 | PMunch | Well mkdir by itself would probably create a key with a `null` value |
13:33:44 | PMunch | And then if a folder only contains a contiguous list of numbered files starting at 0 it would become an array, otherwise it would become an object |
13:35:06 | PMunch | Of course handling the case of doing `echo "hello" > something/hello` where the `something` folder is currently a contiguous list of numbered files would either have to convert to an object, or simply throw an error |
13:36:10 | FromDiscord | <nnsee> In reply to @PMunch "My idea was to": what about if I want to write a string `"0"`? |
13:36:40 | PMunch | Then you're shit out of luck :P |
13:37:02 | PMunch | I guess strings could require `""` around them |
13:37:21 | PMunch | And then just throw an error if you try to write something which isn't a valid thing into a file |
13:37:46 | PMunch | That would probably be the "better" way of doing it |
13:37:57 | FromDiscord | <nnsee> so the flow would turn into `echo '"my string"' > key` |
13:38:08 | FromDiscord | <nnsee> which is... manageable, but not ideal |
13:38:12 | PMunch | Yeah if you want to write a string |
13:38:43 | PMunch | Of course it could just be required on things which could otherwise be parsed as something else |
13:39:03 | FromDiscord | <nnsee> and writing vars would be `echo "\"$myvar\"" > key`, oof |
13:39:22 | PMunch | Hmm, yeah |
13:40:05 | PMunch | I guess the "otherwise be parsed as something else" rule would be better |
13:40:15 | FromDiscord | <nnsee> yeah, sounds good to me |
13:40:45 | PMunch | So `echo "hello world" > key` would work fine, but you would need `echo '"0"' > key` to write a string with the content 0 to a key |
13:41:11 | PMunch | Would of course mean that for variables you would want to add those escapes anyways, to be safe |
13:41:17 | FromDiscord | <nnsee> also that `echo '"hello world"' > key` would still write just `hello world` |
13:41:18 | FromDiscord | <nnsee> yearp |
13:41:45 | PMunch | This was really just meant to be a silly experiment though :P |
13:51:59 | * | derpydoo joined #nim |
14:18:30 | * | edr joined #nim |
14:20:48 | FromDiscord | <nnsee> bouncycastle |
14:20:53 | FromDiscord | <nnsee> bouncycastle |
14:21:04 | PMunch | nnsee, you okay there? |
14:21:06 | FromDiscord | <nnsee> whoops, i was wondering why search wasn't working |
14:21:16 | PMunch | Haha :P |
14:27:48 | FromDiscord | <jviega> @pmunch you can get the true argv and argc |
14:28:11 | FromDiscord | <jviega> Just add a constructor, it gets passed them by the system |
14:30:02 | FromDiscord | <jviega> `{.pragma: constructor, codegenDecl: "attribute((constructor)) $# $#$#", exportc.}` then your prototype can get argc, argv and envp |
14:30:35 | PMunch | Isn't that the same as just overriding main and calling NimMain from there? |
14:30:40 | FromDiscord | <jviega> No |
14:30:48 | PMunch | Or can C programs have more than one constructor? |
14:30:52 | FromDiscord | <jviega> It gets called in addition to NimMain but before your program's entry point |
14:30:54 | FromDiscord | <jviega> Yes |
14:31:12 | FromDiscord | <jviega> You can in fact set explicit priorities for ordering, etc. |
14:31:33 | PMunch | Huh, didn't know that was possible |
14:32:11 | FromDiscord | <jviega> Yup, lots of dark corners in C-land 🙂 |
14:34:36 | PMunch | Indeed |
14:36:39 | PMunch | Hmm, this is annoying.. JsonNodes are ref objects, so I can get one, change its value, and that changes the node in the object I got it from. But I can't change the type of a node, because that would change the variant object. And just assigning a new object doesn't work, because that breaks the reference.. |
14:38:18 | PMunch | Aha, but I can assign to `node[]` |
14:38:19 | FromDiscord | <Clonkk> Isn't std/json generally speaking badly build if you want advanced json handling ? |
14:38:55 | FromDiscord | <jviega> "Advanced json handling"? |
14:39:51 | FromDiscord | <jviega> It's fine. I think my biggest issues got fixed in 2.0 |
14:39:52 | FromDiscord | <Clonkk> Well if you need finer control over your Json tree in your program↵(@jviega) |
14:40:50 | FromDiscord | <Clonkk> I tend to avoid json but I remember somwhere in the roadmap a goal to rework std/json |
14:42:05 | FromDiscord | <Clonkk> Unless that's been done already |
14:42:14 | FromDiscord | <jviega> It's all structured as a tree? You can certainly manipulate it just fine. If you wanted to add another layer of indirection, it would make some replacements a little easier, but whether it's better is heavily dependent on you. Tends to be more error prone and a little slower to do that, but a bit easier to do big replacements. |
14:42:22 | PMunch | Eh, it's fine for most things |
14:42:29 | FromDiscord | <jviega> Like I said, it's fine. It's not amazing, but it's fine. |
14:42:59 | PMunch | @nnsee, now I can write to files! |
14:43:17 | PMunch | Only existing files though |
14:44:24 | FromDiscord | <nnsee> neat |
14:46:12 | PMunch | I apparently don't get unmount events though, so it's a bit useless at the moment :P |
14:46:35 | PMunch | Like it updates, and the state is kept internally as a JSON object, but it is never written out as one |
14:51:28 | PMunch | Nice, now it writes out the JSON object on unmount |
14:56:42 | PMunch | If you want to try it out you can find it here: https://github.com/PMunch/libfuse-nim/blob/master/jsonfile.nim |
14:56:58 | PMunch | It's <200 LOC so should be pretty easy to grasp what is going on |
14:58:48 | * | jmdaemon quit (Ping timeout: 256 seconds) |
14:59:08 | PMunch | I believe adding mkdir and create to the hello_oper definition is all that would be needed to be able to create new keys and objects |
14:59:23 | PMunch | But that has to deal with the logic of doing so |
14:59:44 | PMunch | I must say, libfuse is surprisingly easy to work with |
15:00:04 | PMunch | Should definitely be possible to do what I had originally planned with it |
15:13:05 | FromDiscord | <demotomohiro> In reply to @jviega "<@392962235737047041> you can get": I searched about that feature and this answer says it is platform-dependent.↵https://stackoverflow.com/questions/58999228/picking-up-value-of-attribute-constructor-function-in-main |
15:13:56 | FromDiscord | <jviega> Meaning it might not work on Windows. It should work in anything even remotely unixy it’s been around forever |
15:14:31 | PMunch | I mean I'm writing a FUSE thing, so Windows is already out of the question |
15:16:31 | FromDiscord | <jviega> I’m sure it even works w wsl2 |
15:17:18 | PMunch | FUSE or constructor? |
15:22:42 | FromDiscord | <jviega> Constructor, tho I suspect FUSE would too |
15:22:44 | FromDiscord | <bostonboston> The constructor attribute works on windows, I use it in my libs so I don't have to call nimMain |
15:23:44 | FromDiscord | <jviega> Yeah I thought it did. It's fairly universal |
15:26:53 | * | PMunch quit (Quit: Leaving) |
15:39:52 | FromDiscord | <Phil> I think I might not be able to get around the macro bits |
15:41:34 | FromDiscord | <Phil> sent a code paste, see https://paste.rs/4GVgn |
16:29:39 | FromDiscord | <Phil> Oh hey, you can use a macro in a template here |
16:46:25 | FromDiscord | <albassort> I found a 10 year old pmuch insult last night |
16:48:21 | * | krux02 joined #nim |
17:46:11 | * | antranigv quit (Ping timeout: 264 seconds) |
17:59:09 | FromDiscord | <Phil> Wait... crap, if spawning a thread isn't in there, I can either write my own threadpool solution which I'd like to avoid or look if any other solution allows spawning threads without ever awaiting them and instead waiting for them to send channel messages |
17:59:36 | FromDiscord | <Phil> (edit) "spawning" => "spawning/creating" | "spawning/creatinga thread ... isn'tpossible" added "from a proc" | "in there," => "possible (because it all requires global variables)," |
18:00:11 | FromDiscord | <Phil> I guess Malebolgia is out as it definitely doesn't support unstructured concurrency which I believe this falls under.↵Leaves Weave and taskpool |
18:37:28 | FromDiscord | <albassort> In reply to @isofruit "Wait... crap, if spawning/creating": can you pass pointers to channels into there? |
18:38:19 | FromDiscord | <albassort> macro into the template and extend it somehow? |
18:38:37 | FromDiscord | <Phil> The problem with malebolgia isn't that I can't get a channel in there, it's that I can't spawn a thread without awaiting it |
18:38:57 | FromDiscord | <Phil> Which I don't wish to do at all cost. The entire idea is to not give a damn when it returns. It just pings back a channel message when its ready and dies |
18:39:00 | FromDiscord | <Phil> That's the idea anyhow |
19:14:38 | NimEventer | New thread by miran: Nim 2.0.2 and 1.6.18 released, see https://forum.nim-lang.org/t/10785 |
19:19:57 | * | antranigv joined #nim |
19:20:07 | FromDiscord | <9ih> does std/streams care about the endianness of the host cpu? |
19:21:28 | * | pbsds quit (Quit: Ping timeout (120 seconds)) |
19:21:57 | * | pbsds joined #nim |
19:22:05 | * | casaca quit (Read error: Connection reset by peer) |
19:22:30 | * | madprops quit (Remote host closed the connection) |
19:22:31 | * | khazakar quit (Read error: Connection reset by peer) |
19:22:46 | * | khazakar joined #nim |
19:22:46 | * | madprops joined #nim |
19:22:46 | * | madprops quit (Changing host) |
19:22:46 | * | madprops joined #nim |
19:22:53 | * | GreaseMonkey quit (Remote host closed the connection) |
19:23:59 | * | greaser|q joined #nim |
19:26:42 | FromDiscord | <nasuray> In reply to @isofruit "The problem with malebolgia": I forced it to do this in probably a super unsafe way by having an await that passes around the addr of bool from other threads to stop a while loop another another spawned thread |
19:27:17 | FromDiscord | <Phil> That sounds like working around intended limitations and the intended scope of a package |
19:27:30 | FromDiscord | <Phil> Which means unsupported territory and "You're on your own if future code changes break your workaround" |
19:27:49 | FromDiscord | <Phil> I'd like something a bit more stable, so I opened an issue with weaver in the hopes that what I'm asking for isn't dumb ^^' |
19:28:23 | FromDiscord | <Phil> and that I can get an answer from mratsim as the examples there aren't really informing me of how to achieve what I want |
19:28:45 | FromDiscord | <nasuray> Ya I basically just wanted to have two separate threads make network calls where one is showing a progress bar and the other is doing work in the background. |
19:29:02 | FromDiscord | <Phil> Honestly I just saw ↵> Only support "structured" concurrency.↵And bailed |
19:29:13 | FromDiscord | <Phil> In reply to @nasuray "Ya I basically just": So basically 2 long running threads that ping pong messages |
19:29:26 | FromDiscord | <Phil> Like a Threadserver↵... may I introduce you to ThreadButler ? 😄 |
19:31:19 | FromDiscord | <Phil> I mostly just want to have a way to split out tasks from the background thread into "task"-threads that ping messages back and die.↵Otherwise the idea is every long-running thread gets a channel that you can send messages to.↵All channels are united in the hub, if you have the hub you can send messages to any long-running thread out there.↵All of that is type-safe since the channels pass object variants around that I generate for you. |
19:32:34 | FromDiscord | <Phil> And threads have associated handlers to deal with their individual messages, one handler per message type (basically requires heavy usage of `distinct` if you need the same kind of data in multiple ways) |
19:32:41 | FromDiscord | <nasuray> In reply to @isofruit "Honestly I just saw": My eyes glazed over since I don't really know what I'm doing vis a vis multi threading and did whatever I wanted lol |
19:34:04 | FromDiscord | <Phil> Fair.↵I basically see all of these concurrency libs and see scientific notations.↵none of the docs are accessible to me.↵If you don't already have a solid standing in concurrency, you're not going to understand what the heck they want from you when you just want a "webdev-like" setup with a GUI thread and a backend thread |
19:34:53 | FromDiscord | <Phil> I have about 50 examples for concurrently working through data in a seq and about none for a thread wanting to split out tasks and never block its own while loop |
19:35:08 | FromDiscord | <Phil> (edit) "I have about 50 examples for concurrently working through data in a seq and about none for a thread wanting to split out tasks ... and" added "into short-lived threads" |
19:36:43 | FromDiscord | <Phil> (edit) "I have about 50 examples for concurrently working through data in a seq ... and" added "or doing recursive tasks in parallel" |
19:49:36 | FromDiscord | <pmunch> In reply to @albassort "I found a 10": Do you keep them in a box? |
19:58:43 | * | xet7 quit (Remote host closed the connection) |
20:01:31 | FromDiscord | <Zoom> How is that different from a basic threadpool pattern?↵(@Phil) |
20:01:49 | FromDiscord | <Zoom> I mean, the long-running part. |
20:02:12 | FromDiscord | <Phil> In reply to @Zoom "How is that different": Not all my tasks are uniform and I'm centering everything around the GUI thread (mentally) |
20:03:39 | FromDiscord | <Phil> Maybe I want the backend thread to have a connection pool to a database, or whatever.↵The biggest part about multithreading in this place is about syntax though. I can express in words what I want, but I fail to express it in syntax, the examples I see don't go in the direction that I want and I fail to "transform" them into what I want or change my vision so that it fits with the examples |
20:05:25 | FromDiscord | <michaelb.eth> @Phil I will get to the review of the thread butler docs, just been a bit busy with holidays fast approach |
20:05:31 | FromDiscord | <michaelb.eth> (edit) "approach" => "approaching" |
20:05:33 | FromDiscord | <Zoom> I suppose the set of the task kinds is known and bounded, you can dedicate specific threads or even threadpools to them.↵(@Phil) |
20:07:37 | FromDiscord | <Phil> sent a long message, see <!doctype html> |
20:07:44 | FromDiscord | <pmunch> In reply to @albassort "I found a 10": Wait, did I insult someone, or did someone insult me? |
20:09:06 | FromDiscord | <michaelb.eth> I also wanted to note that, I'm starting to think again about `AsyncChannel`. I starting to feel strongly again it's the "right way" to set a foundation for the kind of stuff you're aiming for.↵↵I can't make any guarantees, but I think if we can nail down a solid implementation of `AsyncChannel` then it should be straightforward to build task abstractions on top of it, similar to that earlier work I did on a task runner. |
20:09:10 | FromDiscord | <Phil> Which brings me to right now and not knowing what the heck to do.↵I mean, fundamentally I could just generate 50 global thread variables that I use as my own threadpool but that seems predestined to make me run into issues |
20:10:00 | FromDiscord | <Phil> In reply to @michaelb.eth "I also wanted to": I mean, I'm happy to implement support for it when it stands, but the difference is kinda beyond me I'll admit.↵I use tryRecv and trySend everywhere anyway, so none of my reads/writes should be blocking, thus what AsyncChannel achieves I'm not entirely sure of |
20:10:16 | FromDiscord | <Phil> well, blocking beyond getting the lock |
20:11:49 | FromDiscord | <Phil> So currently I just opened an issue with weave so maybe mratsim can tell me if I'm being an idiot or not trying to build what I described with weave as apparently there's nothing (that isn't deprecated) in the std lib to do so |
20:12:18 | FromDiscord | <Phil> Well, unless I entirely roll my own on the basis of a set of generated global thread variables that I randomly use |
20:12:28 | FromDiscord | <Phil> (edit) "Well, unless I entirely roll my own on the basis of a set of generated global thread variables that I randomly use ... " added "and let die" |
20:14:25 | FromDiscord | <nasuray> sent a code paste, see https://play.nim-lang.org/#ix=html> |
20:14:40 | * | greaser|q quit (Changing host) |
20:14:40 | * | greaser|q joined #nim |
20:14:45 | * | greaser|q is now known as GreaseMonkey |
20:15:28 | FromDiscord | <Phil> Note, you could use an atomic bool there xP |
20:15:42 | FromDiscord | <Phil> At least I think you could, should be possible |
20:15:55 | FromDiscord | <Elegantbeef> Phil is a person |
20:16:32 | FromDiscord | <Phil> The apple in my Pfp claims otherwise |
20:16:49 | FromDiscord | <Elegantbeef> They own glasses though |
20:17:00 | FromDiscord | <Phil> Just makes it a smart fruit |
20:18:09 | FromDiscord | <JJ> why is it that only case statements are special-cased to be overloadable as a macro? |
20:18:27 | FromDiscord | <Elegantbeef> Cause pattern matching |
20:18:45 | FromDiscord | <Phil> In reply to @nasuray "This is the salient": I am not entirely sure where one thread talks to the other I'll admit |
20:18:46 | FromDiscord | <Elegantbeef> I think the talk was to use `case` instead of `match` |
20:19:08 | FromDiscord | <Elegantbeef> Also for loops are overloadable |
20:19:13 | FromDiscord | <JJ> yeah but like... i would really like to be able to overload if statements as well 🙁 |
20:19:17 | FromDiscord | <JJ> oh interesting |
20:19:19 | FromDiscord | <Elegantbeef> but it's done `for ... in macro args:...` |
20:19:31 | FromDiscord | <Elegantbeef> You do not need to overload them though |
20:20:15 | * | val_ joined #nim |
20:20:15 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html> |
20:20:57 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html> |
20:21:06 | * | val_ quit (Client Quit) |
20:21:08 | FromDiscord | <Phil> In reply to @Elegantbeef "Phil is a person": Though for the purposes of clear communication, what did you want to express? |
20:21:45 | FromDiscord | <Elegantbeef> I found it funny that you suggested the atomic like ostensibly 3 days after first learning of them 😄 |
20:22:07 | FromDiscord | <Phil> That's a good quality! Immediately apply what improves your code! |
20:22:25 | FromDiscord | <nasuray> In reply to @isofruit "I am not entirely": They both get the pointer `finished` and `showProgress` starts up with `while not finished[]`. That's the extent of their "communication". |
20:22:28 | FromDiscord | <Elegantbeef> When all you have is a hammer every problem looks like a nail |
20:22:55 | FromDiscord | <Phil> I got a toolbox, that one may be missing screwdrivers though so I make do with the hammer and nail |
20:23:23 | FromDiscord | <Elegantbeef> At this point I doubt you even have a hammer and just set nails using your toolbox |
20:24:30 | FromDiscord | <Phil> The toolbox contains a fair bit, just not low level stuff like memory allocation and a decent grasp on multithreading related things/concurrency lingo xP |
20:24:57 | FromDiscord | <Phil> Which is what I'm working on so I demand some slack xP |
20:26:03 | FromDiscord | <Phil (he/him)> Man, imagine the bridge just being dead again |
20:26:22 | FromDiscord | <Elegantbeef> Imagine |
20:26:23 | FromDiscord | <Phil (he/him)> Or dropping messages apparently.↵↵This was dropped\:↵> Which is what I'm working on so I demand some slack xP |
20:26:56 | FromDiscord | <Elegantbeef> Nah this is matrix and discord |
20:44:07 | * | xet7 joined #nim |
21:06:31 | * | khazakar quit (Quit: Connection closed for inactivity) |
21:16:51 | FromDiscord | <summarity> How do I define the target (e.g. "js") in a nim.cfg |
21:17:59 | FromDiscord | <intellij_gamer> sent a code paste, see https://play.nim-lang.org/#ix=html> |
21:20:29 | FromDiscord | <nnsee> In reply to @isofruit "The apple in my": apple a re people too |
21:38:23 | FromDiscord | <goldenlion5648> sent a code paste, see https://play.nim-lang.org/#ix=html> |
21:46:17 | FromDiscord | <9ih> are there any neato tools for using with nimble for like monorepo structures? like yarn workspace where I don't need to explicitly increment versions for each package |
21:46:41 | FromDiscord | <9ih> (edit) "are there any neato tools for using with nimble for like monorepo structures? like yarn workspace where I don't need to explicitly increment versions for each package ... " added "for use in other packages" |
21:48:03 | FromDiscord | <nnsee> In reply to @9ih "are there any neato": atlas might be able to do this, from the sounds of it |
21:49:47 | FromDiscord | <graveflo> In reply to @goldenlion5648 "hey I'm relatively new": I don't think so. You can assign a default value and in future versions of nim you can enforce "not nil" types, but I don't know of any way to do that with the default constructor. It is common practice to make a `proc` to construct objects though |
21:50:16 | FromDiscord | <graveflo> I like the default constructor a lot though and I wish there were more ways to play with it |
21:50:25 | FromDiscord | <goldenlion5648> In reply to @graveflo "I don't think so.": thanks |
21:50:34 | FromDiscord | <Phil> In reply to @goldenlion5648 "hey I'm relatively new": The best I can recommend is adopting a pattern of not instantiating types directly but through constructors (like initAnimal), these will force you to set values |
21:50:42 | FromDiscord | <Phil> since they're just procs that you pass parameters |
21:51:25 | FromDiscord | <goldenlion5648> not really related, but is there a way to create new operators? like say I wanted to make `^&^` an operator (or some other symbol combination) |
21:51:37 | FromDiscord | <9ih> In reply to @nnsee "atlas might be able": oki thanks |
21:51:50 | FromDiscord | <Phil> In reply to @goldenlion5648 "not really related, but": I mean sure, operators are just procs |
21:52:05 | FromDiscord | <Phil> Are you aware to use backticks in those scenarios? |
21:53:31 | FromDiscord | <bostonboston> You can make your own operators but I don't think you can give them funny semantics like ``[]`` |
21:53:31 | FromDiscord | <goldenlion5648> In reply to @isofruit "Are you aware to": I learned about them 5 minutes ago, so not a good grasp yet, but I was kind of trying that, was wondering why this was invalid https://media.discordapp.net/attachments/371759389889003532/1186788429636304926/image.png?ex=659485db&is=658210db&hm=10ad16b5384a1d10f301ea7cdce700e9e5c54d9681601662adb950e0716756d0& |
21:54:30 | FromDiscord | <Phil> I will admit that one I never tried. I assume that maybe operators require you to use special characters?↵But I never even had the idea to use a normal word for that since... that's not a valid usecase for it really |
21:55:36 | FromDiscord | <goldenlion5648> In reply to @isofruit "I will admit that": oh you were right, thanks this worked https://media.discordapp.net/attachments/371759389889003532/1186788951701336145/image.png?ex=65948657&is=65821157&hm=371b9cfc40ea837c9dbd981c6b644ae4214429e45b6d701ea2166bb8dbbeb265& |
21:57:31 | FromDiscord | <nasuray> In reply to @goldenlion5648 "hey I'm relatively new": https://nim-lang.org/docs/manual.html#requiresinit_1 you might want the `requiresInit` pragma |
21:58:07 | FromDiscord | <graveflo> I believe only a small symbol set can be used when defining infix operators |
21:58:30 | FromDiscord | <graveflo> In reply to @goldenlion5648 "I learned about them": https://nim-lang.org/docs/manual.html#lexical-analysis-operators |
21:58:59 | FromDiscord | <goldenlion5648> In reply to @nasuray "https://nim-lang.org/docs/manual.html#requiresinit_": thanks looks like you were correct |
22:07:28 | * | advesperacit quit () |
22:08:41 | FromDiscord | <goldenlion5648> I'm trying to make an interpretter in nim, and to take some shortcuts, is there an equivalent to python's eval? |
22:08:44 | FromDiscord | <Phil> In reply to @michaelb.eth "<@180601887916163073> I will get": All good, take your time btw.↵I've been trying to figure out how to do add in tasks anyway in a manner that doesn't end up with me creating my own threadpool since std/threadpool is deprecated |
22:09:00 | FromDiscord | <Phil> In reply to @goldenlion5648 "I'm trying to make": What does python's eval do? |
22:09:16 | FromDiscord | <goldenlion5648> In reply to @isofruit "What does python's eval": run a string as code |
22:09:40 | FromDiscord | <Phil> In reply to @goldenlion5648 "run a string as": You can do that, but at compiletime, not at runtime |
22:10:00 | FromDiscord | <Phil> So first things first, are you aware of the difference between the two? |
22:10:15 | FromDiscord | <goldenlion5648> thanks, all good. I guess eval is pretty unsafe haha |
22:10:25 | FromDiscord | <goldenlion5648> In reply to @isofruit "So first things first,": yeah I am |
22:10:36 | FromDiscord | <Phil> Check.↵Basically what you'd be doing is macros |
22:11:13 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=html> |
22:11:30 | FromDiscord | <Phil> Everything with backticks is a variable whose "string" gets inserted there |
22:12:05 | FromDiscord | <Phil> So it's very much a "kinda" at compiletime, but even there only "kinda" |
22:12:51 | FromDiscord | <goldenlion5648> In reply to @isofruit "So it's very much": how would that macro be invoked? like what would the arguments be? |
22:13:15 | FromDiscord | <Phil> Ah, that was only an excerpt of a proc that is called as part of a macro |
22:13:21 | FromDiscord | <Phil> Give me a minute to whip up an example |
22:13:55 | FromDiscord | <Elegantbeef> What phil is saying will not help |
22:14:00 | FromDiscord | <Elegantbeef> You'd need to use Nim's VM to cheat that way |
22:14:23 | FromDiscord | <Elegantbeef> Macros are evaluated at compile time so you cannot provide runtime strings to evaluate code |
22:14:38 | FromDiscord | <Phil> Did I miss something? We were talking about compiletime |
22:14:52 | FromDiscord | <Phil> Wait, did I not make it clear that this generates actual code and thus goes away after compilation is done? |
22:15:00 | FromDiscord | <Elegantbeef> > I'm trying to make an interpretter in nim, and to take some shortcuts, |
22:15:16 | FromDiscord | <Elegantbeef> I assume this means they want to just evaluate expressions instead of doing a proper VM to cheat |
22:15:33 | FromDiscord | <albassort> In reply to @pmunch "Wait, did I insult": you called someone stupid for something stupid |
22:15:36 | FromDiscord | <Phil> Ahh, fair |
22:15:50 | FromDiscord | <goldenlion5648> no worries, I'm clear that my original idea wont work |
22:16:04 | FromDiscord | <albassort> In reply to @pmunch "Do you keep them": no i keep them on the nim fourms with the rest of the things i dont own |
22:16:48 | FromDiscord | <pmunch> Huh, hopefully it was deserved |
22:17:03 | FromDiscord | <Elegantbeef> If it was aimed at me, probably |
22:21:58 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=html> |
22:23:14 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=html> |
22:23:41 | FromDiscord | <Elegantbeef> It most likely will not help you at all |
22:24:06 | FromDiscord | <Phil> I think at this point they just got curious |
22:24:16 | FromDiscord | <goldenlion5648> sent a code paste, see https://play.nim-lang.org/#ix=html> |
22:24:40 | FromDiscord | <goldenlion5648> In reply to @isofruit "I think at this": yeah I just got curious |
22:24:42 | FromDiscord | <Elegantbeef> Phil is silly and did not use `static string` |
22:24:43 | FromDiscord | <Phil> In reply to @goldenlion5648 "what is the point": Yes, the issue here is that macros implicitly convert everything they accept into NimNodes |
22:25:15 | FromDiscord | <Phil> In this case the nimnode is a "string literal" which you can turn back into a string via `$` |
22:25:18 | FromDiscord | <Elegantbeef> `string` means it accepts any ast that is of type `string` `static string` means it accepts a constant value and it's accessible as a normal string inside the macro |
22:25:47 | FromDiscord | <Phil> Could've used static string but I do not yet have built that habit, instead I just unpack the string value |
22:27:12 | FromDiscord | <Elegantbeef> Ah you do not like functioning macros |
22:27:12 | FromDiscord | <Elegantbeef> 😛 |
22:27:14 | FromDiscord | <Elegantbeef> If you're unpacking values you've completely removed any compile time evaluation and constants |
22:28:57 | FromDiscord | <Phil> I have in fact not!↵Because I implemented a proc that checks if its a symnode and extracts the value from the impl if so... yes I likely should've used static string |
22:29:29 | FromDiscord | <Elegantbeef> What about `"hello" & "world"`? |
22:29:43 | FromDiscord | <Phil> I will admit I haven't tried |
22:29:58 | FromDiscord | <Elegantbeef> That gives you a `nnkInfix` |
22:30:05 | FromDiscord | <Elegantbeef> Shit that's wrong |
22:30:29 | FromDiscord | <graveflo> don't rustle beef about macros. He's obsessed with them |
22:30:30 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html> |
22:30:31 | FromDiscord | <Elegantbeef> There we go |
22:30:49 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html> |
22:30:53 | FromDiscord | <Elegantbeef> Lol grave |
22:30:57 | FromDiscord | <Elegantbeef> Macros are lovely |
22:31:00 | FromDiscord | <Elegantbeef> I just like reusable code |
22:31:10 | FromDiscord | <Elegantbeef> Manually unpacking nodes is masochistic behaviour |
22:31:32 | FromDiscord | <Phil> Huh, yeah my proc worked for the & operator |
22:31:40 | FromDiscord | <Elegantbeef> Yea cause of constant folding |
22:31:48 | FromDiscord | <Elegantbeef> `"hello" & "world"` is constant folded |
22:32:15 | FromDiscord | <Phil> Okay at this point you're really constructing scenarios.↵Like, I'll fold that static string is better, but the examples are starting to reach |
22:32:24 | FromDiscord | <Elegantbeef> throwing in `bleh()` means the code can be evaluated at runtime and is not constant folded at the call site |
22:32:49 | FromDiscord | <Phil> Doesn't the macro using string implicitly force the string to be compiletime? |
22:32:55 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html> |
22:32:57 | FromDiscord | <Phil> Because macros don't exist at runtime |
22:32:57 | FromDiscord | <Elegantbeef> No it does not |
22:33:06 | FromDiscord | <Elegantbeef> You can have a macro that operates on a `let` value |
22:33:18 | FromDiscord | <Elegantbeef> The ast has to be known at CT not the data it contains |
22:33:36 | FromDiscord | <Phil> You can have a macro operating on the AST that will in the future hold a let value but not the let value itself |
22:33:49 | FromDiscord | <Elegantbeef> `s: string` states "This AST must be typed to string" it has no indication of what the data actually is |
22:34:08 | FromDiscord | <Phil> I am happy to be proven wrong but I'm having trouble envisioning a compiletime construct acting on data that does not exist by the time it disappears |
22:34:13 | FromDiscord | <Elegantbeef> Let's consider `strscans` |
22:34:24 | FromDiscord | <Elegantbeef> `line.scanf("$i", myInt)` |
22:34:31 | FromDiscord | <Elegantbeef> This scans a unknown string parsing an int |
22:34:40 | FromDiscord | <Elegantbeef> Most macros do not know their inputs statically |
22:35:12 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html> |
22:35:59 | FromDiscord | <Elegantbeef> Ok most is nor accurate, but there are many places where macros do not operate on CT values |
22:36:02 | FromDiscord | <Elegantbeef> not\ |
22:36:16 | FromDiscord | <Phil> I would assuming that whatever represents the exact macro here (I'm not sure what is triggering this) simply reshapes the code that is written there into "normal" code intead of acting on the data inside |
22:36:38 | FromDiscord | <Elegantbeef> Right, they're user defined compiler passes that convert one syntax to another |
22:37:02 | FromDiscord | <Elegantbeef> But the point is that there are many macros that do not need to know what the data is cause they're just transformers |
22:37:20 | FromDiscord | <Phil> I mean, any macro is just a syntax transformer |
22:37:28 | FromDiscord | <Phil> As you stated basically |
22:37:32 | FromDiscord | <Elegantbeef> That's not true |
22:37:35 | FromDiscord | <Elegantbeef> Macros do not have to emit AST |
22:37:46 | FromDiscord | <Elegantbeef> You can use macros to just statically call code |
22:38:17 | FromDiscord | <Elegantbeef> I'm not a bit confused where the disconnect is 😄 |
22:38:19 | FromDiscord | <Elegantbeef> now a bit\ |
22:38:40 | FromDiscord | <Phil> While true, ultimately I've always ultimately used them to generate code.↵There were macros that didn't generate code themselves but were part of a larger mechanism that ultimately spit out code |
22:39:47 | FromDiscord | <Phil> In reply to @Elegantbeef "I'm not a bit": Regarding the data stuff?↵Likely because the statement "operates on a let value" indicated to me that somehow the macro code acted on/with the runtime value.↵Which I don't think it can.↵It can just reshape the instructions that will run over that value, like the pipe it'll run through, but it doesn't act on the water later that flows through afterwards because its gone by then. |
22:40:43 | FromDiscord | <Elegantbeef> By `let` value I meant a sym that pointed to `let` |
22:40:57 | FromDiscord | <Elegantbeef> Not the value held inside a let cause that's only possible if the macro is evaluated at runtime which is not possible |
22:41:01 | FromDiscord | <Phil> Ah check, then just a misunderstanding |
22:50:10 | * | xet7 quit (Remote host closed the connection) |
22:53:44 | NimEventer | New question by Nino van Hooff: How to call iterator for Chipmunk 7 bindings (Nim), see https://stackoverflow.com/questions/77688407/how-to-call-iterator-for-chipmunk-7-bindings-nim |
23:01:37 | FromDiscord | <albassort> One day I'll contribute to nim. |
23:02:27 | FromDiscord | <Phil> You can contribute docs anytime 😉 |
23:10:10 | FromDiscord | <albassort> I can document the hidden go-to |
23:10:27 | FromDiscord | <albassort> (edit) "go-to" => "goto statement" |
23:19:07 | FromDiscord | <summarity> sent a code paste, see https://play.nim-lang.org/#ix=html> |
23:22:54 | FromDiscord | <guttural666> how do initialize a distinct string like Path? |
23:23:10 | FromDiscord | <Elegantbeef> `Path"someString"` |
23:25:57 | FromDiscord | <guttural666> confused, shouldn't thi work? |
23:26:00 | FromDiscord | <guttural666> https://media.discordapp.net/attachments/371759389889003532/1186811698737328229/image.png?ex=65949b86&is=65822686&hm=706ec2a66545ac4c2fc7c186205743d28c011a6ece66dfe3eea1b77ab47b1165& |
23:26:01 | NimEventer | New thread by inv2004: Ccal: Calendar with local holidays via ip location, see https://forum.nim-lang.org/t/10786 |
23:26:05 | FromDiscord | <guttural666> (edit) "thi" => "this" |
23:26:14 | FromDiscord | <Elegantbeef> It will |
23:26:24 | FromDiscord | <Elegantbeef> `path.splitFile(path)`...? |
23:26:32 | FromDiscord | <guttural666> https://media.discordapp.net/attachments/371759389889003532/1186811833605161010/image.png?ex=65949ba7&is=658226a7&hm=d8007c23c9dc2b7c58ea258c02d5590b70b92862d62b5f536c81326c92ad3040& |
23:26:40 | FromDiscord | <guttural666> fuck |
23:27:37 | FromDiscord | <guttural666> UFC is error prone and wrong 😄 and I'm stupid |
23:46:31 | FromDiscord | <summarity> How can I force Nim to not mangle object property names in JS? Here's a minimal example: https://gist.github.com/turbo/627e1fb4762dcf96c78a261df882f74f |
23:50:57 | FromDiscord | <Elegantbeef> `{.exportc.}` |
23:53:48 | FromDiscord | <summarity> Ah, on the prop itself. Yes, `{.exportc: "['$1']".}` worked |