00:00:47 | * | Jesin joined #nim |
00:05:38 | FromDiscord | <バロザード> so would i be able to just import a c library and use it? |
00:15:02 | * | leorize[m] quit (Ping timeout: 265 seconds) |
00:15:22 | * | leorize[m] joined #nim |
00:15:34 | * | stisa quit (Ping timeout: 246 seconds) |
00:15:34 | * | Avatarfighter[m] quit (Ping timeout: 246 seconds) |
00:15:54 | * | retroedgetech[m] quit (Ping timeout: 246 seconds) |
00:15:54 | * | nxnl[m] quit (Ping timeout: 246 seconds) |
00:15:54 | * | gollark[m]1 quit (Ping timeout: 246 seconds) |
00:15:54 | * | vindaar[m] quit (Ping timeout: 246 seconds) |
00:15:54 | * | lnxw37d4 quit (Ping timeout: 246 seconds) |
00:16:18 | * | sagax quit (Ping timeout: 245 seconds) |
00:16:35 | * | stefantalpalaru quit (Ping timeout: 240 seconds) |
00:17:12 | FromDiscord | <dom96> of course, as long as you wrap its functions |
00:19:00 | * | stisa joined #nim |
00:19:13 | * | Avatarfighter[m] joined #nim |
00:19:22 | FromDiscord | <ElegantBeef> My favourite example is https://github.com/ftsf/nico/blob/master/nico/stb_vorbis.nim |
00:19:56 | * | retroedgetech[m] joined #nim |
00:19:58 | * | nxnl[m] joined #nim |
00:24:57 | * | lnxw37d4 joined #nim |
00:25:39 | * | gollark[m]1 joined #nim |
00:25:44 | * | vindaar[m] joined #nim |
00:34:47 | * | stefantalpalaru joined #nim |
00:41:15 | * | D_ quit (Ping timeout: 240 seconds) |
00:45:50 | * | stefantalpalaru quit (Changing host) |
00:45:50 | * | stefantalpalaru joined #nim |
00:46:51 | * | D_ joined #nim |
00:47:04 | FromDiscord | <ElegantBeef> It just hit me that this is valid Nim code and now i hate myself https://play.nim-lang.org/#ix=2RIX |
00:49:29 | FromDiscord | <Yardanico> this is totally ok |
00:49:48 | FromDiscord | <Yardanico> have you seen https://github.com/nim-lang/Nim/wiki/Lesser-known-Nim-features#abusing-statement-list-expressions-to-allow-using-parenthesis-like-braces-in-nim ? |
00:49:53 | FromDiscord | <Yardanico> or this (from the same wiki page) https://media.discordapp.net/attachments/371759389889003532/817197185669529650/unknown.png |
00:50:27 | FromDiscord | <ElegantBeef> Yea i have |
00:51:07 | FromDiscord | <ElegantBeef> Someone said stacked ternary instead of nested and it hit me that was possible and i cried a little 😄 |
01:00:01 | * | njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
01:00:42 | FromDiscord | <exelotl> that's not so bad beef... xD |
01:02:26 | * | theelous3 quit (Read error: Connection reset by peer) |
01:02:44 | FromDiscord | <exelotl> sent a code paste, see https://play.nim-lang.org/#ix=2RJ4 |
01:03:05 | FromDiscord | <ElegantBeef> I know what it's like |
01:05:18 | FromDiscord | <exelotl> sent a code paste, see https://play.nim-lang.org/#ix=2RJ5 |
01:09:24 | * | krux02 quit (Remote host closed the connection) |
01:11:47 | FromGitter | <deech> Had no idea Status was using Rust as well. NIce! https://status.im/our_team/open_positions.html?gh_jid=2386730 |
01:17:34 | FromGitter | <redblack3_gitlab> > *<FromDiscord>* <バロザード> so would i be able to just import a c library and use it? ⏎ ⏎ It's possible to make a DSL with macros and `dotOperators` to easily "just use" arbitrary C/C++ libraries |
01:20:13 | FromGitter | <redblack3_gitlab> I have a shabby implementation of such a DSL, might release it when the implementation is less embarrassing. but it beats every other language I know in terms of C++ interop |
01:33:10 | * | sagax joined #nim |
01:38:53 | * | quantimnot quit (Quit: Connection closed) |
01:44:33 | * | FromDiscord quit (Remote host closed the connection) |
01:44:47 | * | FromDiscord joined #nim |
01:45:05 | * | liblq-dev quit (Ping timeout: 240 seconds) |
01:45:25 | * | Avatarfighter[m] quit (Ping timeout: 265 seconds) |
01:45:25 | * | Zoom[m] quit (Ping timeout: 265 seconds) |
01:45:45 | * | Northstrider[m] quit (Ping timeout: 240 seconds) |
01:45:54 | * | i_use_arch_btw[4 quit (Ping timeout: 265 seconds) |
01:45:54 | * | antholop[m] quit (Ping timeout: 265 seconds) |
01:46:23 | * | retroedgetech[m] quit (Ping timeout: 265 seconds) |
01:46:27 | * | FlammableDuck[m] quit (Ping timeout: 240 seconds) |
01:46:29 | * | Benjamin[m]2 quit (Ping timeout: 240 seconds) |
01:46:44 | * | vycb[m] quit (Ping timeout: 240 seconds) |
01:46:54 | * | mahlon quit (Ping timeout: 246 seconds) |
01:48:15 | * | alex[m]28 quit (Ping timeout: 240 seconds) |
01:48:18 | * | stisa quit (Ping timeout: 244 seconds) |
01:48:19 | * | sekao[m] quit (Ping timeout: 244 seconds) |
01:48:26 | * | ee7[m] quit (Ping timeout: 240 seconds) |
01:48:26 | * | BitPuffin quit (Ping timeout: 240 seconds) |
01:48:26 | * | reversem3 quit (Ping timeout: 240 seconds) |
01:48:26 | * | vegai1 quit (Ping timeout: 240 seconds) |
01:48:27 | * | zazi[m] quit (Ping timeout: 240 seconds) |
01:48:27 | * | Yardanico[m] quit (Ping timeout: 240 seconds) |
01:48:36 | * | unclechu quit (Ping timeout: 258 seconds) |
01:49:16 | * | Northstrider[m] joined #nim |
01:49:20 | * | nxnl[m] quit (Ping timeout: 244 seconds) |
01:49:26 | * | Clonkk[m] quit (Ping timeout: 240 seconds) |
01:50:31 | * | D_ quit (Remote host closed the connection) |
01:51:21 | * | D_ joined #nim |
01:51:30 | * | mahlon joined #nim |
01:51:53 | * | Avatarfighter[m] joined #nim |
02:03:24 | * | FlammableDuck[m] joined #nim |
02:03:43 | * | Benjamin[m]2 joined #nim |
02:03:48 | * | asdflkj quit (Ping timeout: 245 seconds) |
02:05:04 | * | retroedgetech[m] joined #nim |
02:05:26 | * | Jjp137 quit (Ping timeout: 240 seconds) |
02:05:43 | * | Jjp137 joined #nim |
02:06:20 | * | vycb[m] joined #nim |
02:07:19 | * | Zoom[m] joined #nim |
02:07:45 | FromDiscord | <Yardanico> btw checking why nim-markdown is so slow - the main reason seems that it uses a lot of regexps and calls `re` each time (doesn't precompile expressions) |
02:08:58 | FromDiscord | <Yardanico> like 75% of total runtime is spent in pcre_study |
02:09:07 | FromDiscord | <Yardanico> for a simple md document |
02:13:56 | * | i_use_arch_btw[4 joined #nim |
02:13:59 | * | antholop[m] joined #nim |
02:19:08 | * | alex[m]28 joined #nim |
02:21:16 | * | liblq-dev joined #nim |
02:22:47 | * | unclechu joined #nim |
02:24:50 | * | lritter quit (Ping timeout: 265 seconds) |
02:25:12 | * | lritter joined #nim |
02:27:27 | * | Yardanico[m] joined #nim |
02:27:32 | * | ee7[m] joined #nim |
02:28:56 | FromDiscord | <Yardanico> HAHAHAH |
02:29:15 | * | nxnl[m] joined #nim |
02:29:24 | FromDiscord | <Yardanico> i made it ~6x faster by stupidly simple table caching at runtime with two templates |
02:29:38 | FromDiscord | <Yardanico> ~28ms vs ~4.6ms to parse a simple markdown doc |
02:30:57 | * | Clonkk[m] joined #nim |
02:36:02 | * | stisa joined #nim |
02:38:39 | * | sekao[m] joined #nim |
02:41:58 | * | zazi[m] joined #nim |
02:42:16 | * | vegai1 joined #nim |
02:42:24 | FromDiscord | <treeform> nice I love making code faster |
02:42:45 | FromDiscord | <Yardanico> https://github.com/soasme/nim-markdown/pull/50 |
02:43:13 | FromDiscord | <Yardanico> nim-markdown also uses singly-linked lists which might hurt performance more |
02:43:21 | FromDiscord | <Yardanico> sorry, doubly-linked lists |
02:43:26 | * | njoseph joined #nim |
02:44:35 | * | reversem3 joined #nim |
02:44:58 | * | BitPuffin joined #nim |
02:50:04 | FromDiscord | <gogolxdong> @Yardanico https://media.discordapp.net/attachments/371759389889003532/817227429970051072/unknown.png |
02:50:10 | FromDiscord | <Yardanico> yes? |
02:51:34 | FromDiscord | <gogolxdong> In file included from /root/.cache/nim/dbx_r/@m..@sUsers@[email protected]@[email protected]@[email protected]:10:↵/mnt/c/Users/asus/.nimble/pkgs/nimdbx-0.4.1/libmdbx-dist/mdbx.h:189:10: fatal error: pthread.h: No such file or directory↵ #include <pthread.h> / for pthread_t / |
02:51:41 | FromDiscord | <Yardanico> see the readme |
02:51:48 | FromDiscord | <Yardanico> add pthread.h to the `stubs` directory if you get include errors |
02:52:06 | FromDiscord | <Yardanico> I haven't tried threads myself though |
02:52:13 | FromDiscord | <Yardanico> and cosmopolitan still lacks quite a lot of stuff |
02:53:00 | FromDiscord | <Yardanico> yeah https://media.discordapp.net/attachments/371759389889003532/817228169924968499/unknown.png |
02:53:04 | FromDiscord | <gogolxdong> and some definitions conflict cosmopolitan/cosmopolitan.h:6412:23: error: conflicting types for ‘uint64_t’↵ #define cpu_set_t uint64_t |
02:53:35 | FromDiscord | <Yardanico> huh, that's definitely weird |
02:53:42 | FromDiscord | <Yardanico> it shouldn't conflict at all unless you define those yourself somehow |
02:53:51 | FromDiscord | <gogolxdong> when specify some system include path in passC option |
02:54:32 | FromDiscord | <Yardanico> oh that definitely won't work |
02:54:42 | FromDiscord | <gogolxdong> sent a code paste, see https://play.nim-lang.org/#ix=2RJj |
02:54:42 | * | D_ quit (Ping timeout: 260 seconds) |
02:54:43 | FromDiscord | <Yardanico> yeah |
02:54:51 | FromDiscord | <Yardanico> you'll need to modify libdbx as well then |
02:54:57 | FromDiscord | <Yardanico> so it doesn't include standard libc headers |
02:55:02 | FromDiscord | <gogolxdong> (edit) |
02:56:19 | * | D_ joined #nim |
02:57:08 | FromDiscord | <gogolxdong> Is it possible than I compile wNim on windows and run on Linux and MacOS |
02:57:13 | FromDiscord | <Yardanico> no |
02:57:15 | FromDiscord | <gogolxdong> (edit) "than" => "that" |
02:57:38 | FromDiscord | <Yardanico> cosmopolitan has limited GUI support _only_ for windows (because win32 api is a system API and doesn't require shared libs like on Linux) |
02:57:56 | FromDiscord | <Yardanico> so that you can a gui app that will run on windows but on macos/linux it'll be terminal or some other solution |
02:58:04 | FromDiscord | <Yardanico> And really, cosmopolitan right now is still very rough :) |
02:58:27 | FromDiscord | <gogolxdong> Is it because of involving platform specific API? |
02:59:40 | FromDiscord | <Yardanico> Maybe you're mistaking what Cosmopolitan is - it maps (polyfills) some POSIX (Linux to be specifically) APIs to an OS's native API or reimplements it. And then there's the portable executable part which allows to build a single binary that can run in multiple OSes |
02:59:48 | FromDiscord | <Yardanico> Cosmopolitan positions itself as an alternative libc |
03:00:16 | FromDiscord | <Yardanico> It doesn't allow you to use win32 apis on any platform, it allows you to use a lot of POSIX APIs on any platform it supports |
03:00:25 | FromDiscord | <Yardanico> the only toolchain it supports is x86_64-linux for example |
03:01:41 | FromDiscord | <gogolxdong> Do you think it's going to change cross platform development, such as programming language and application? |
03:04:11 | FromDiscord | <Yardanico> Not really, when you're target one single platform you get access to all of it's APIs and it's all already been tested before you (with rare exceptions). Cosmopolitan is still a rather PoC project, but I think it's quite cool. Some people have been overestimating it's worthiness towards cross-platform programming though. |
03:05:31 | * | rockcavera quit (Remote host closed the connection) |
03:11:32 | FromDiscord | <gogolxdong> What's the application scenarios except hello world? |
03:12:18 | FromDiscord | <Yardanico> Cosmopolitan is generally suited at TUI applications, or some terminal webapps (so you can start the binary and open a page in the browser to get a GUI) |
03:13:57 | FromDiscord | <gogolxdong> Does TUI mean terminal UI? |
03:14:57 | FromDiscord | <Yardanico> yes |
03:18:33 | FromDiscord | <gogolxdong> TUI is suitable for programmers, most people get used to GUI. |
03:22:14 | FromDiscord | <gogolxdong> Application based on distributed storage requires the ability to operate on file and memory. |
03:24:57 | * | valorzard joined #nim |
03:44:11 | * | njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
03:44:31 | * | njoseph joined #nim |
03:46:19 | * | valorzard quit (Quit: Connection closed) |
03:49:48 | FromDiscord | <ShadowElf37> sent a code paste, see https://play.nim-lang.org/#ix=2RJt |
03:51:49 | FromDiscord | <Yardanico> lemme check |
03:56:52 | FromDiscord | <Yardanico> well you're right that the AST is the same, it might error for different reasons though, I'll try to find out why |
03:57:49 | FromDiscord | <ShadowElf37> thx ❤️ |
03:59:40 | FromGitter | <zajrik> Anyone able to help me with making an https request? When I try making the request I get `SSL support is not available. Cannot connect over SSL. Compile with -d:ssl to enable`. When I compile with `--d:ssl` I get `Error: unhandled exception: No SSL/TLS CA certificates found. [IOError]`. I'm struggling to find any documentation that fully explains this and am at a complete loss |
04:01:33 | FromDiscord | <zajrik> Okay I'm here now instead of on gitter lol. But yeah, this is driving me insane |
04:01:52 | FromDiscord | <flywind> https://forum.nim-lang.org/t/7551#47922 |
04:02:00 | FromDiscord | <flywind> see this post for ssl issues. |
04:02:23 | FromDiscord | <Yardanico> yeah, refer to https://forum.nim-lang.org/t/7551#47896 |
04:03:32 | FromDiscord | <zajrik> Yessss, that did the trick, thank you! |
04:04:24 | FromDiscord | <zajrik> So this was not always necessary, correct? If so, I'm hoping it's resolved soon. Having to provide a file alongside the program I'm writing isn't the end of the world but certainly not ideal |
04:05:21 | FromDiscord | <Yardanico> you'll have to provide openssl dlls with your program anyway :) |
04:05:27 | FromDiscord | <flywind> you may be interested in https://forum.nim-lang.org/t/7581 |
04:05:35 | FromDiscord | <flywind> > Show Nim: Puppy - Easy HTTP(S) requests without DLLs, --d:ssl or cacerts.pem. |
04:06:02 | FromDiscord | <zajrik> Oh :Thonk: |
04:06:09 | FromDiscord | <zajrik> I hadn't considered that |
04:06:52 | FromDiscord | <treeform> that's why I made puppy, I was frustrated with ca certs as well. |
04:07:00 | FromDiscord | <zajrik> Bah. This project has become more complicated just by nature of needing to make https requests lol |
04:07:11 | FromDiscord | <zajrik> I'll look into Puppy |
04:08:04 | FromDiscord | <zajrik> Oh dang. Just from the readme it already looks significantly more ergonomic than HttpClient |
04:09:23 | FromDiscord | <zajrik> Ohhhh I get the name. Was confused for a hot minute there but I get it. Dogs fetch. |
04:09:31 | FromDiscord | <zajrik> :bloblul: |
04:09:57 | FromDiscord | <zajrik> That's cute |
04:10:45 | FromDiscord | <Yardanico> @ShadowElf37 I think the issue is that your code assumes that it's being run at global level, but it's being run under the `type` (You get a TypeDef, not a TypeSection), see https://github.com/nim-lang/Nim/issues/13830 |
04:11:39 | FromDiscord | <ShadowElf37> iiiinteresting |
04:11:44 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=2RJB |
04:12:00 | FromDiscord | <Yardanico> or actually just |
04:16:54 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=2RJD |
04:16:58 | FromDiscord | <Yardanico> and then you have access to the whole type section inside of createType |
04:17:54 | FromDiscord | <ShadowElf37> ok interesting |
04:18:01 | FromDiscord | <ShadowElf37> thank you for figuring that out |
04:18:06 | FromDiscord | <Yardanico> also you should return `untyped` not `NimNode` |
04:18:23 | FromDiscord | <ShadowElf37> okie |
04:20:13 | FromDiscord | <Yardanico> @ShadowElf37 also, you know that `new array` makes a heap-allocated array instead of a stack-allocated one, right? |
04:20:40 | FromDiscord | <ShadowElf37> yeah ik im trying to implement something like this https://ryanfleury.net/blog_entity_memory_contiguity |
04:20:59 | FromDiscord | <ElegantBeef> Have you looked at polymorph? |
04:21:10 | FromDiscord | <ShadowElf37> idea is to allocate memory for a big chunk of entities at once so malloc doesnt affect performance all the time |
04:21:43 | FromDiscord | <Yardanico> so with my approach your previous macro can be replicated as |
04:21:59 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=2RJE |
04:22:20 | FromDiscord | <ShadowElf37> lol the indices |
04:22:25 | FromDiscord | <ShadowElf37> very neat thank you for that |
04:22:28 | FromDiscord | <Yardanico> you might also want to use https://github.com/PMunch/macroutils to simplify some of the access |
04:22:38 | FromDiscord | <Yardanico> using names instead of indices |
04:22:44 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/817250753948155944/unknown.png |
04:23:03 | * | spiderstew_ joined #nim |
04:23:19 | FromDiscord | <Yardanico> and also you should try using `treeRepr node`, it shows a tree-like representation of the AST |
04:23:31 | FromDiscord | <Yardanico> really useful for understanding how to do indexing/etc |
04:24:02 | FromDiscord | <ShadowElf37> ok cool i'll take a look at all that |
04:24:06 | FromDiscord | <ShadowElf37> thanks for the help i appreciate it |
04:24:33 | * | spiderstew quit (Ping timeout: 264 seconds) |
05:10:10 | * | Avatarfighter[m] quit (Quit: authenticating) |
05:10:18 | * | Avatarfighter[m] joined #nim |
05:42:54 | FromDiscord | <zajrik> @treeform Any idea why I'm getting `convert from VT_EMPTY to COMBinary` on a simple get request with an authorization header with puppy? I'm stumped. Not having any problem fetching my access token but attempting to make a request with it and it's erroring |
05:43:42 | FromDiscord | <zajrik> I don't think I'm doing anything wrong with the request |
05:44:01 | FromDiscord | <zajrik> sent a code paste, see https://paste.rs/PfT |
05:45:20 | FromDiscord | <treeform> do you have a stack trace where that is happening? |
05:45:25 | FromDiscord | <zajrik> yeah one sec |
05:45:37 | FromDiscord | <treeform> never seen this error and my request looks nearly like yours. |
05:45:48 | FromDiscord | <treeform> I also set `Authorization` header and fetch some https |
05:46:33 | FromDiscord | <zajrik> https://media.discordapp.net/attachments/371759389889003532/817271848072642580/message.txt |
05:47:34 | FromDiscord | <treeform> could I have the stack trace where in puppy |
05:47:40 | FromDiscord | <treeform> I think I just need to check for null and return error |
05:47:55 | FromDiscord | <zajrik> That file is the only stack it's giving me |
05:57:32 | FromDiscord | <treeform> if you remove the try:/except |
05:57:40 | FromDiscord | <treeform> what stack trace do you get? |
05:59:00 | FromDiscord | <zajrik> I get an uncaught exception dialog window with the same afaik. I'll have to get back to you on that though. Steeped away to watch stuff with my wife |
05:59:17 | FromDiscord | <treeform> ok |
05:59:38 | FromDiscord | <zajrik> I'll ping ya tomorrow 👍 |
05:59:43 | FromDiscord | <treeform> sure |
06:00:04 | FromDiscord | <zajrik> Thanks for your help |
06:08:38 | * | vicfred quit (Quit: Leaving) |
06:21:54 | * | narimiran joined #nim |
06:24:59 | * | Gustavo6046 quit (Ping timeout: 258 seconds) |
06:32:52 | FromDiscord | <treeform> I put a little patch that just would return an error in your case. |
06:35:37 | FromDiscord | <zajrik> Oh cool. Ill install tomorrow and check it out. The real problem is that I don't know WHY it's erroring lol |
06:37:52 | * | wasted_youth2 quit (Quit: Leaving) |
06:41:19 | * | jess quit (Quit: K-Lined) |
07:00:22 | FromDiscord | <Araq> @treeform we also have tools/urldownloader |
07:00:45 | FromDiscord | <Araq> that uses the Windows API too, it would be interesting to compare to Puppy |
07:05:37 | * | maier joined #nim |
07:05:59 | * | maier quit (Client Quit) |
07:06:39 | * | maier joined #nim |
07:10:35 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
07:31:49 | FromDiscord | <treeform> I did not know that. It would be interesting. We also do the gzip thing, which nim usually doesn't. |
07:56:20 | * | jess joined #nim |
07:58:01 | * | JustASlacker joined #nim |
08:00:21 | * | letto quit (Quit: Konversation terminated!) |
08:02:18 | * | letto joined #nim |
08:23:51 | * | ^Q-Master^ joined #nim |
08:24:02 | * | Q-Master quit (Read error: Connection reset by peer) |
08:33:07 | * | m4r35n357 quit (Quit: Ex-Chat) |
08:41:50 | * | m4r35n357 joined #nim |
08:42:21 | * | m4r35n357_ joined #nim |
08:45:17 | * | lritter quit (Ping timeout: 260 seconds) |
08:46:48 | * | krux02 joined #nim |
08:51:48 | * | Vladar joined #nim |
08:58:38 | narimiran | anybody up for some proof-reading? https://github.com/nim-lang/website/blob/c7897daec40376aad933b7c6724443635e11ef62/jekyll/_posts/2021-03-05-fusion-and-pattern-matching.md |
08:59:09 | narimiran | you can submit your fixes via "insert a suggestion": https://github.com/nim-lang/website/pull/271/files |
09:00:08 | * | wiltzutm[m] quit (Quit: Idle for 30+ days) |
09:00:10 | * | FlammableDuck[m] quit (Quit: Idle for 30+ days) |
09:00:40 | FromDiscord | <Araq> this article should be split into two, one showing off pattern matching and outlining further improvements |
09:01:03 | FromDiscord | <Araq> the other explaining how it works under the covers (and maybe how Nim's macros work) |
09:05:05 | * | PMunch joined #nim |
09:18:13 | * | superbia joined #nim |
09:26:34 | * | m4r35n357_ quit (Quit: Ex-Chat) |
09:26:34 | * | m4r35n357 quit (Quit: Ex-Chat) |
09:26:54 | * | m4r35n357 joined #nim |
09:38:51 | * | drbixx[m] joined #nim |
10:34:10 | FromDiscord | <acek7> how is everyone |
10:35:23 | FromDiscord | <Unaimend> fine, and you? |
10:41:52 | PMunch | Pretty good |
10:45:30 | FromDiscord | <acek7> trying to learn C#, its stressful |
10:51:56 | FromDiscord | <Unaimend> In reply to @acek7 "trying to learn C#,": why do try to learn c# if I may ask? |
10:52:36 | FromDiscord | <DARTHVADER NAXXX> Does nim have something like `linear_interpolate`? |
10:53:18 | m4r35n357 | My first nim program (feature complete) ;) https://pastebin.com/0YKM4n8y - the only other language to get so much done in so little code is Python (hardly surprising!), but Python is dog slow |
10:54:14 | m4r35n357 | Central force problem solved using Hamiltonian mechanics, with symplectic integrators and automatic differentiation, in ~150 LOC |
10:56:57 | * | JustASlacker quit (Ping timeout: 264 seconds) |
11:07:13 | * | JustASlacker joined #nim |
11:08:38 | liblq-dev | @DARTHVADER it doesn't have a lerp built in, but it can be implemented very easily https://en.wikipedia.org/wiki/Linear_interpolation#Programming_language_support |
11:08:55 | liblq-dev | you can literally just copy-paste the version you like, but use Nim syntax for the proc declaration |
11:12:40 | FromDiscord | <DARTHVADER NAXXX> Thanks |
11:16:11 | FromDiscord | <Unaimend> sent a code paste, see https://play.nim-lang.org/#ix=2RKZ |
11:16:38 | FromDiscord | <Unaimend> (edit) "https://play.nim-lang.org/#ix=2RKZ" => "https://play.nim-lang.org/#ix=2RL0" |
11:16:51 | m4r35n357 | is anyone still working on a REPL for nim, or is it not feasible? |
11:17:10 | FromDiscord | <Unaimend> (edit) "https://play.nim-lang.org/#ix=2RL0" => "https://paste.rs/mA7" |
11:19:10 | PMunch | @m4r35n357, congrats! |
11:19:27 | PMunch | And yeah, the stuff done per line is pretty high in Nim :) |
11:19:44 | PMunch | m4r35n357, and for the REPL, try `nim secret` |
11:20:57 | PMunch | Hmm, is there something wrong with calling async event handlers from an async callback? |
11:21:58 | PMunch | I have created a small add-on for my home-assistant setup which dims up the lights in my bedroom before my alarm rings. Then as it rings it turns on all the lights in the house and starts playing the radio. |
11:22:47 | FromDiscord | <mratsim> In reply to @m4r35n357 "is anyone still working": `nimble install inim` |
11:23:16 | PMunch | I wrapped the HomeAssistant WebSocket API into something a bit more purpose built, amongst other things an `onEvent` where you can register event handlers for various things. |
11:24:11 | PMunch | It appears to run fine for the first day, everything turns on as it should. But then it's stuck at 25% CPU utilisation and doesn't do anything for the next morning |
11:25:04 | FromDiscord | <Vindaar> @DARTHVADER NAXXX also check out: https://github.com/HugoGranstrom/numericalnim/ |
11:29:30 | FromDiscord | <Vindaar> @Unaimend For these changes better make another commit (`commit 0`), then an interactive rebase, reorder such that `commit 2, commit 0, commit 1`, then squash `commit 0` onto `commit 2`. That's what I'd do anyway |
11:29:45 | FromDiscord | <Unaimend> In reply to @Vindaar "<@!287576619718279178> For these changes": ok, thx |
11:30:10 | FromDiscord | <Vindaar> sorry, just realized I messed up the order, haha |
11:30:16 | FromDiscord | <Unaimend> In reply to @Vindaar "sorry, just realized I": yes |
11:30:18 | FromDiscord | <Vindaar> you get the idea I suppose |
11:30:28 | FromDiscord | <Unaimend> But I think ill figure it out 🙂 |
11:30:34 | m4r35n357 | PMunch, cheers ;) |
11:30:52 | FromDiscord | <Vindaar> (hint hint, but `magit` in emacs makes these things trivial 🙈 ) |
11:31:15 | FromDiscord | <Unaimend> In reply to @Vindaar "(hint hint, but `magit`": yeah, atm I am using nvim, because spacemacs just doesnt want to work with nimlsp |
11:31:18 | m4r35n357 | PMunch, I saw about nim secret, but on github it looked abandoned, will try anyway as I only use standard libraries in my stuff |
11:31:55 | PMunch | It's a bit janky, inim is for sure the better alternative. But it works in a pinch just to test some simple stuff |
11:32:07 | m4r35n357 | mratsim, I saw that too but it didn't seem active - is it? |
11:32:20 | FromDiscord | <mratsim> Sometimes projects just work |
11:32:58 | m4r35n357 | mratsim, if that was aimed at me, I agree ;) noted. |
11:32:59 | PMunch | Can't google it right now as I rebooted my HomeAssistant :P |
11:33:05 | FromDiscord | <Unaimend> do we have bitwise operators in nim? because or just defaults to (a,b : bool) for me |
11:33:08 | PMunch | It runs my DNS adblocker.. |
11:33:27 | FromDiscord | <Unaimend> (edit) "or" => "`or`" |
11:33:35 | PMunch | @Unaimed, or is also bitwise or |
11:33:37 | FromDiscord | <mratsim> In reply to @Unaimend "do we have bitwise": and or not shifts are bitwise on integers |
11:33:57 | PMunch | !eval echo 0b1010 and 0b0111 |
11:34:00 | NimBot | 2 |
11:34:10 | FromDiscord | <mratsim> otherwise `import bitops` for more operators and also overloaded bitor, bitand, bitxor |
11:35:12 | FromDiscord | <Unaimend> sent a code paste, see https://play.nim-lang.org/#ix=2RLa |
11:35:20 | FromDiscord | <Unaimend> (edit) "https://paste.rs/fJP" => "https://play.nim-lang.org/#ix=2RLa" |
11:35:37 | * | xet7 quit (Quit: Leaving) |
11:35:40 | FromDiscord | <Unaimend> (edit) "https://play.nim-lang.org/#ix=2RLa" => "https://play.nim-lang.org/#ix=2RLc" |
11:35:58 | FromDiscord | <mratsim> the first one yes, the second overload I'm not sure, but yeah it should `or` |
11:36:28 | FromDiscord | <Unaimend> hmm, then there must be some mistake in my code 💩 |
11:36:43 | FromDiscord | <mratsim> fyi, here is my technique to overload all bit operators for distinct types: https://github.com/mratsim/constantine/blob/master/constantine/primitives/constant_time.nim#L81-L100 |
11:37:03 | FromDiscord | <mratsim> with Ct being: https://github.com/mratsim/constantine/blob/master/constantine/primitives/constant_time_types.nim#L12 |
11:38:02 | FromDiscord | <Unaimend> In reply to @mratsim "fyi, here is my": Man your code is always fucking beautiful |
11:39:47 | FromDiscord | <Unaimend> Wait `==` has a higher precedence then `or`? |
11:44:17 | FromDiscord | <mratsim> `if i == 0 or i == 1:` what do you expect? |
11:45:32 | FromDiscord | <Unaimend> In reply to @mratsim "`if i == 0": if (i == 0) or (i == 1): which totally makes sense |
11:45:35 | FromDiscord | <Unaimend> 😂 |
11:45:46 | FromDiscord | <Unaimend> (edit) "if" => "`if" | "1):" => "1):`" |
11:47:54 | * | narimiran quit (Quit: leaving) |
11:54:59 | liblq-dev | me, an intellectual: `if i in [0, 1]` |
11:55:26 | m4r35n357 | mratsim how do I run inim? https://pastebin.com/cjQcCQip |
11:56:00 | FromDiscord | <Clyybber> In reply to @liblq-dev "me, an intellectual: `if": pfft: if i in 0..1 |
11:56:23 | liblq-dev | heckin' |
11:56:38 | liblq-dev | that doesn't even do the same thing smh |
11:56:43 | * | PMunch quit (Ping timeout: 245 seconds) |
11:57:03 | liblq-dev | `if i in 0..1` is `if i >= 0 and i <= 1` so it's incorrect 😎 |
11:57:05 | FromDiscord | <Clyybber> floats dont exist |
11:57:39 | liblq-dev | yaml is a programming language |
12:04:46 | * | haxscramper joined #nim |
12:05:30 | * | Vladar quit (Remote host closed the connection) |
12:05:31 | m4r35n357 | mratsim OK found executable ;) |
12:09:07 | * | PMunch joined #nim |
12:16:17 | ForumUpdaterBot | New thread by Clavismax: Nimble refresh: Could not download: No SSL/TLS CA certificates found., see https://forum.nim-lang.org/t/7582 |
12:20:36 | FromDiscord | <mratsim> `if i in {0, 1}` |
12:34:30 | * | asdflkj joined #nim |
12:53:39 | * | rockcavera joined #nim |
13:07:30 | federico3 | https://nitter.unixfox.eu/hvcco/status/1364104368228859906 |
13:10:45 | * | junland quit (Quit: %ZNC Disconnected%) |
13:11:35 | * | junland joined #nim |
13:23:18 | asdflkj | lol |
13:23:46 | asdflkj | +1 for nitter not twitter |
13:38:51 | FromDiscord | <hamidb80> does nimScript have REPL? |
13:40:15 | FromDiscord | <Recruit_main707> `nim secret` |
13:42:30 | FromDiscord | <hamidb80> why `secret?`😅 |
13:43:14 | idf | they dont want us to know |
13:52:53 | FromDiscord | <mratsim> because it's unsupported |
13:53:08 | FromDiscord | <mratsim> the fact that it works is a coincidence |
14:11:18 | * | JustASlacker quit (Ping timeout: 245 seconds) |
14:12:14 | FromDiscord | <Clyybber> @flywind why do you need unsafeIsolate? |
14:12:52 | FromDiscord | <flywind> > we also need func unsafeIsolate[T](value: sink T): Isolated[T] = Isolated(value: value)↵> because the compiler's checking can be annoying and the first thing people do is to put closures into tasks |
14:12:58 | FromDiscord | <flywind> from araq |
14:14:14 | FromDiscord | <Clyybber> We should then check the refcount at runtime |
14:14:48 | FromDiscord | <Clyybber> @Araq |
14:14:56 | FromDiscord | <mratsim> you can't check refcount unless it's atomic |
14:15:06 | FromDiscord | <mratsim> you will have data races no? |
14:15:08 | FromDiscord | <Clyybber> We check it before isolating it |
14:15:12 | FromDiscord | <mratsim> ah Isee |
14:15:28 | m4r35n357 | For the record, nim secret failed for me on ARM64, but inim works |
14:15:34 | FromDiscord | <Clyybber> isolating should be a no-op if it's determinable at compile time, otherwise it should be a runtime check |
14:15:35 | FromDiscord | <mratsim> need to read the issue then |
14:15:54 | FromDiscord | <flywind> here https://github.com/nim-lang/Nim/pull/17263 |
14:16:02 | FromDiscord | <Araq> @Clyybber the check is expensive |
14:16:17 | FromDiscord | <Araq> and requires ORC, not ARC |
14:16:19 | FromDiscord | <haxscramper> m4r35n357: nim secret runs nimscript basically, `inim` recompiles your code for each statement and runs 'real' nim |
14:16:26 | FromDiscord | <Araq> but it is a good idea, agreed |
14:17:02 | FromDiscord | <Clyybber> We can make it possible to disable the check like we do with overflow checks etc |
14:17:23 | FromDiscord | <Araq> it would be an assertion |
14:17:27 | FromDiscord | <Clyybber> Yeah |
14:17:30 | FromDiscord | <Araq> not yet another switch. |
14:17:35 | FromDiscord | <Clyybber> ok |
14:17:47 | m4r35n357 | haxscramper, thx for the info |
14:17:50 | FromDiscord | <Araq> however, other checks that we do don't affect the "big O" semantics |
14:18:36 | FromDiscord | <Araq> and also, please be aware that just because something is shared between "isolated" graphs doesn't mean that you actually access it at runtime |
14:18:36 | FromDiscord | <Clyybber> hmm, for acyclic structures it should be a cheap refcount check at least |
14:19:00 | FromDiscord | <Araq> so you need the purely unchecked variant regardless |
14:19:21 | FromDiscord | <Clyybber> Can we have Isolated fields I wonder? |
14:19:57 | FromDiscord | <Clyybber> The borrow checker should be fine with it right? |
14:21:22 | FromDiscord | <Araq> what is an isolated field? one which has the type `owned` ? |
14:21:51 | FromDiscord | <Clyybber> Yeah |
14:23:16 | FromDiscord | <Clyybber> But this leads to flow typing essentially |
14:23:36 | FromDiscord | <Clyybber> Because then one should be able to do `isolate(someObj.field)` |
14:23:50 | FromDiscord | <Araq> I think isolation.nim should simply offer a `isDeeplyIsolated` proc and then people can write their own asserts before calling `unsafeIsolate` |
14:24:36 | FromDiscord | <Clyybber> Hmm, maybe. I think we should document isolation.nim as experimental, so that we reserve rights to change stuff |
14:24:51 | * | JustASlacker joined #nim |
14:25:02 | FromDiscord | <Araq> not too late for that, previously it was unusable |
14:25:10 | * | tane joined #nim |
14:25:40 | FromDiscord | <mratsim> I am `veryDeeplyIsolated` |
14:25:43 | FromDiscord | <Clyybber> cool, if you want @flywind do it in your PR |
14:26:26 | FromDiscord | <Araq> and only ORC can offer `isDeeplyIsolated`. we need to watch out... I think our cursor optimization might break deep isolation checking (?) |
14:26:37 | FromDiscord | <Clyybber> Hmm, good point |
14:26:38 | FromDiscord | <flywind> @Clyybber sure |
14:27:10 | FromDiscord | <flywind> will make a separate PR tomorrow |
14:27:14 | FromDiscord | <Clyybber> ok |
14:34:54 | FromDiscord | <ajusa> Might not be explicitly Nim related, but if I want to say scrape 10,000 webpages, is it better to create a thread for each one and do them synchronously within each thread, or launch 10,000 async tasks and wait for them all to finish at the end? Might have gotten my terminology a bit wrong there. |
14:36:56 | Prestige | probably going to be better to have multiple threads, each having multiple async tasks |
14:37:00 | FromDiscord | <mratsim> I have exactly what you need |
14:37:27 | FromDiscord | <mratsim> https://ep2019.europython.eu/media/conference/slides/KNhQYeQ-downloading-a-billion-files-in-python.pdf |
14:39:59 | FromDiscord | <dom96> When you’re io bound you’re pretty much always better off with async |
14:40:52 | FromDiscord | <ajusa> Even for thousands and thousands of tasks though? Also thank you mratsim, that was pretty interesting. Looks like multiprocessing + async was the fastest |
14:41:10 | FromDiscord | <mratsim> it's Prestige solution, multithreading + async |
14:43:07 | FromDiscord | <mratsim> in Python due to the global interpreter lock, there is absolutely no use-case for multithreading |
14:44:13 | FromDiscord | <ajusa> Hm, I might implement it in a few ways and try benchmarking on a smaller set of data (something I should do either way tbh). This is specifically being used similarly to nmap, finding open ports and ip addresses within a subnet. There are 60,000 ports to check per IP address, so you can see why I might be debating which one to use. I'll probably spawn one thread per IP address and do async within the thread to check each port. |
14:45:06 | FromDiscord | <dom96> If you're going to spawn one thread per IP address then you might as well not use async |
14:45:23 | FromDiscord | <mratsim> note that firewalls will likely rate-limit you if they detect you are scanning in short succession |
14:46:10 | FromDiscord | <hamidb80> In reply to @mratsim "in Python due to": Are parralism and multithreading in nim diffrent? In python yes but in nim i doubt |
14:46:22 | FromDiscord | <mratsim> there are techniques to do mass nmap spread over a month with seemingly random patterns to trip iptables. |
14:46:43 | FromDiscord | <mratsim> In reply to @hamidb80 "Are parralism and multithreading": Multithreading is a way to achieve parallelism |
14:46:53 | FromDiscord | <mratsim> but there are many kinds of parallelism |
14:47:03 | FromDiscord | <konsumlamm> but multithreading is not necessarily parallel |
14:47:11 | FromDiscord | <mratsim> even on a single core, SIMD is executing things in parallel |
14:47:21 | FromDiscord | <hamidb80> In reply to @konsumlamm "but multithreading is not": What 🤨 |
14:47:39 | FromDiscord | <mratsim> and a superscalar processor can execute multiple instructions in a cycle. |
14:49:07 | FromDiscord | <konsumlamm> In reply to @hamidb80 "What 🤨": concurrency does not imply parallelism |
14:50:05 | FromDiscord | <ajusa> A single CPU can have multiple threads, but it can't run them in parallel. It just switches between threads a lot. |
14:50:29 | * | JustASlacker quit (Ping timeout: 260 seconds) |
14:50:48 | FromDiscord | <hamidb80> In reply to @konsumlamm "concurrency does not imply": Multithreading is not concurrency |
14:51:47 | FromDiscord | <konsumlamm> i mean, there are different kinds of multithreading |
14:52:15 | FromDiscord | <konsumlamm> hardware multithreading, OS threads, user-level threads |
14:53:09 | FromDiscord | <konsumlamm> in many languages, user-level threads can run in parallel, but not in all (for example python) |
14:54:10 | FromDiscord | <konsumlamm> and parallelism is not the only purpose of threading, though the other purposes get kinda superseded by async |
14:54:58 | FromDiscord | <konsumlamm> speaking generally |
14:55:23 | FromDiscord | <konsumlamm> in Nim, threads map to OS threads (afaik) |
14:55:52 | FromGitter | <HJarausch_gitlab> How to debug a *Weave* application? ⏎ ⏎ Here is an excerpt of a programme using *Weave* ⏎ ⏎ ```code paste, see link``` ... [https://gitter.im/nim-lang/Nim?at=60424678823b6654d286295a] |
15:00:03 | FromDiscord | <mratsim> I'm missing N_Gaeste, Kap_T, N_Tische and Matrix at the very least to reproduce your issue |
15:00:55 | * | abm joined #nim |
15:01:35 | FromDiscord | <mratsim> one thing though. Avoid ref and multithreading, the multiple threads can easily mess up the refcount. If you still want to try, maybe gc:arc will work. But updating ref variables in parallel without locking or atomic refcount from multiple threads is a very very bad idea. |
15:05:32 | * | JustASlacker joined #nim |
15:20:38 | FromGitter | <HJarausch_gitlab> Thanks Mamy. I have put the complete code |
15:21:46 | FromGitter | <HJarausch_gitlab> Thanks Mamy. I have put the complete code in ⏎ https://play.nim-lang.org/#ix=2RME ⏎ ⏎ Note, I do need *ref* since several objects should access the same data. ⏎ Thanks for you help ... [https://gitter.im/nim-lang/Nim?at=60424c8ab5131f4f28f45de1] |
15:22:54 | * | JustASlacker quit (Ping timeout: 246 seconds) |
15:23:29 | * | maier quit (Ping timeout: 265 seconds) |
15:24:16 | FromDiscord | <mratsim> do you also get ResourceExhaustedError? |
15:24:47 | * | dgb quit (Quit: WeeChat 2.7.1) |
15:24:48 | FromDiscord | <mratsim> sent a code paste, see https://play.nim-lang.org/#ix=2RMF |
15:24:53 | FromDiscord | <mratsim> (edit) "https://play.nim-lang.org/#ix=2RMF" => "https://paste.rs/2Ac" |
15:27:37 | * | dgb joined #nim |
15:33:41 | FromGitter | <HJarausch_gitlab> Yes, that's exactly that code internal check which should not trigger. When you set ⏎ ⏎ ``const UseWeave = false`` ⏎ you can see that this check is not triggered. ⏎ ... [https://gitter.im/nim-lang/Nim?at=60424f54d1aee44e2dc77edc] |
15:35:24 | FromDiscord | <mratsim> okay |
15:35:26 | FromDiscord | <Araq> don't share `ref`, use shared pointer instead |
15:37:20 | * | sz0 quit (Quit: Connection closed for inactivity) |
15:44:14 | * | Gustavo6046 joined #nim |
16:00:21 | FromDiscord | <CAA> If nim doesn't require you to use pointers, how does it handle pointers when converted to C? |
16:00:34 | FromDiscord | <mratsim> it uses pointers |
16:00:39 | FromDiscord | <CAA> I meant the nim code |
16:00:46 | FromDiscord | <CAA> The nim code doesn't force you to think with pointers |
16:00:53 | FromDiscord | <CAA> but how does it make the pointers? |
16:00:56 | FromDiscord | <CAA> when converted to C |
16:01:02 | FromDiscord | <mratsim> C doesn't force you to think in assembly either |
16:01:25 | FromDiscord | <mratsim> Nim is a compiler, it can transform/lower the intent of your Nim code to C base primitives |
16:01:42 | FromDiscord | <CAA> Lets say I turned garbage collection off, would pointers still be used? |
16:01:46 | FromDiscord | <mratsim> (edit) "is" => "has" |
16:01:50 | FromDiscord | <mratsim> yes |
16:02:12 | FromDiscord | <mratsim> unless you have types that are never mutated, and that are small |
16:02:21 | Clonkk[m] | Everything is pointer, some language are just better at hiding it |
16:02:41 | FromDiscord | <mratsim> everything is a continuation 😉 |
16:03:08 | FromDiscord | <CAA> Like python |
16:03:09 | FromDiscord | <CAA> or java |
16:10:41 | nisstyre | a continuation is just the rest of a computation |
16:10:55 | nisstyre | so yeah everything uses them |
16:11:05 | nisstyre | unless you reify them like scheme |
16:20:12 | * | gpanders quit (Quit: ZNC - https://znc.in) |
16:21:27 | * | fosred joined #nim |
16:22:48 | * | fosred quit (Client Quit) |
16:26:43 | FromDiscord | <zajrik> @treeform Pasted in your fix (since you didn't version bump and release :drakeLUL: ) And I have a better idea of the problem now because I can actually check the response code. Getting a 401. Not sure why. Authorization looks correct to me. I'll have to dig on the API docs and see if I'm doing something wrong. Thanks again for your hard work 👍 |
16:26:52 | leorize[m] | @mratsim are you gonna give cps the push anytime soon? :P |
16:27:37 | * | gpanders joined #nim |
16:27:59 | FromDiscord | <mratsim> soon, yes, but I said that earlier this week, i don't understand the CPS transform, so I wouldn't be able to debug it, only monkey patch it. So my first task would be to understand what's going on |
16:28:24 | FromDiscord | <mratsim> So this is my browser tabs https://media.discordapp.net/attachments/371759389889003532/817433372519170078/unknown.png |
16:28:43 | FromDiscord | <mratsim> (I've closed many already, and I haveplenty of papers on CPS transforms sitting on my phones) |
16:29:11 | FromDiscord | <CAA> sent a code paste, see https://play.nim-lang.org/#ix=2RN9 |
16:29:12 | * | gpanders quit (Client Quit) |
16:30:16 | leorize[m] | @mratsim if you're on IRC, you can ask disruptek and/or Zevv for some pointers |
16:30:39 | * | clyybber joined #nim |
16:31:26 | FromDiscord | <mratsim> well I understand what the CPS transform does, but most of the time the implementations are on weird languages like Scheme, Clojure or what not that have no for or while loop ... |
16:31:37 | FromDiscord | <Clyybber> hehe |
16:31:40 | FromDiscord | <Clyybber> ignore for loop for now |
16:31:46 | FromDiscord | <mratsim> anyway it's more like, I have to implement my own to understand the transformation. |
16:31:50 | FromDiscord | <Clyybber> because cps can't handle that currently |
16:31:58 | FromDiscord | <mratsim> why not? |
16:32:12 | FromDiscord | <Clyybber> because there is no nice way to transform a for loop into a while loop |
16:32:13 | leorize[m] | because the compiler sucks :P |
16:32:35 | FromDiscord | <Clyybber> leorize: No, getTransformedAst or how it's called is fine |
16:32:53 | FromDiscord | <Clyybber> leorize: It's just that a "transformForLoop" is unimplemented |
16:33:06 | FromDiscord | <Clyybber> or unexposed rather |
16:33:58 | leorize[m] | to the macro implementer it translates to: the compiler sucks :P |
16:34:16 | * | gpanders joined #nim |
16:34:21 | FromDiscord | <Clyybber> I guess, but it's not bugs here that make this impossible |
16:34:23 | FromDiscord | <mratsim> I'm sure I can use `items` with a while inside as a workaround 😉 |
16:34:44 | FromDiscord | <Clyybber> @mratsim how? |
16:35:02 | FromDiscord | <mratsim> I don't know yet |
16:35:45 | FromDiscord | <mratsim> anyway I didn't plan to start implementing it in the compiler but stay as a library. |
16:36:05 | FromDiscord | <mratsim> dealing with the compiler transforms seems too daunting tbh |
16:36:09 | FromDiscord | <Clyybber> :D I would say don't worry about it for now |
16:36:10 | FromDiscord | <Clyybber> if we have while loops working |
16:36:12 | FromDiscord | <Clyybber> for some reason my messages aren't arriving |
16:36:38 | FromDiscord | <Clyybber> I mean, we don't have to handle for loops for now IMO |
16:36:46 | FromDiscord | <Clyybber> and once cps is ready otherwise |
16:36:59 | FromDiscord | <Clyybber> we can make the compiler supply a "transformForLoop" |
16:37:33 | leorize[m] | according to this: https://github.com/disruptek/cps/issues/48, looks like for loops are expanded but is invalid ast? |
16:38:12 | FromDiscord | <Clyybber> leorize: It's because getTransformedImpl does not return AST that's intended for sem consumption |
16:39:52 | leorize[m] | to the macro implementer it translates to: the compiler sucks |
16:40:17 | leorize[m] | jokes aside, typed ast not being spec-ed is quite an issue for cps |
16:40:45 | FromDiscord | <Clyybber> sure, this doesn't return typed ast though if you mean that |
16:41:05 | FromDiscord | <Araq> I would implement CPS in the compiler |
16:41:34 | FromDiscord | <Araq> the transformations are hardly any different and you get out of the VM's restrictions |
16:42:00 | FromDiscord | <Clyybber> but doing it outside of the compiler is "cooler" :p |
16:42:12 | FromDiscord | <Araq> as long as it remains opt-in, it's a bit academic to implement everything as a macro |
16:42:29 | leorize[m] | also you get out-of-bound updates |
16:43:43 | FromDiscord | <Araq> the typed AST is still a minefield, do we want nkHiddenAddr, nkHiddenConv nodes? how to access `skResult`? |
16:44:30 | FromDiscord | <Araq> today's compiler actually has an answer for these questions but they don't look like stable answers |
16:44:38 | leorize[m] | I don't think the mostly undocumented compiler internals would help much... |
16:46:39 | FromDiscord | <Araq> that's mostly an excuse as far as I'm concerned, you can easily use `debug(n)`, there is docs about Nim's internals and when you submit a PR, it will get reviewed and corner cases pointed out |
16:48:18 | FromDiscord | <treeform> In reply to @zajrik "<@!107140179025735680> Pasted in your": I think there is just not body with a 401, so I was failing to read it. |
16:48:38 | FromDiscord | <zajrik> I figured that was the case after I was able to check the error code |
16:49:20 | FromDiscord | <zajrik> I've got everything working now that I don't have my access token wrapped in quotes so problem solved |
16:49:24 | FromDiscord | <zajrik> 👍 |
16:50:13 | FromDiscord | <hamidb80> what is the Possibilities if data race happens? is it possible to app be crashed? |
16:50:43 | FromDiscord | <Clyybber> @Araq How far do you think we should go with the statementizing? We could possibly generate all the temporaries the C backend usually inserts in injectdestructors |
16:53:20 | FromDiscord | <Araq> yeah, ideally the backend doesn't introduce temps |
16:53:25 | FromDiscord | <mratsim> In reply to @Araq "I would implement CPS": I think it should be in the compiler as well. But let me learn one thing at a time. |
16:53:45 | FromDiscord | <Clyybber> I think that statementizing stuff like `g(Object()` doesn't seem like a good idea |
16:53:48 | FromDiscord | <mratsim> I tried learning Nim static at the same time as data science/numpy and Arraymancer |
16:54:07 | FromDiscord | <Clyybber> Since then we end up with `var tmp = Object(); g(tmp)` |
16:55:40 | FromDiscord | <Clyybber> actually nevermind, I think it's fine |
16:55:57 | FromDiscord | <Araq> yeah, well, don't split up constructors |
16:56:30 | FromDiscord | <Araq> however, constructors suck a bit, `a = [a[0]]` needs a temp, `a = [b]` doesn't |
16:56:47 | FromDiscord | <Clyybber> yeah |
16:56:48 | FromDiscord | <mratsim> btw I've added a couple links from Rust internals that I found interesting there: https://github.com/weavers-guild/weave-io/commit/1a682482f295e8eec74bbc1616bdcf0732c2b52d#diff-66f62d1807d3821a3865f2573b69c74be033f1341240ac861fefc6d430bff5e0, and also this discussion on adding CPS to Rust: https://internals.rust-lang.org/t/pre-rfc-cps-transform-for-generators/7120 |
16:57:26 | FromDiscord | <mratsim> For that there are something call "reductions" and "redexes" that seem to be used on OCaml to remove the temporaries |
16:58:12 | FromDiscord | <mratsim> didn't understand half the talk but: https://www.youtube.com/watch?v=v8HQ459NsKs |
16:58:32 | FromDiscord | <Araq> @mratsim: maybe buy the CPS book. I did. |
16:58:51 | FromDiscord | <mratsim> https://media.discordapp.net/attachments/371759389889003532/817441033989914664/unknown.png |
16:59:00 | FromDiscord | <Araq> Andrew W. Appel, "Compiling with Continutations" |
16:59:09 | * | xet7 joined #nim |
16:59:15 | FromDiscord | <mratsim> I'm waiting for this book: https://www.plai.org/ |
17:00:14 | FromDiscord | <mratsim> http://cs.brown.edu/courses/cs173/2012/book/Control_Operations.html#%28part._.Continuation-.Passing_.Style%29 |
17:04:51 | FromDiscord | <mratsim> Found these as well:↵- https://www.microsoft.com/en-us/research/publication/compiling-with-continuations-continued/↵- http://matt.might.net/articles/cps-conversion/↵- https://jtobin.io/transforming-to-cps |
17:05:51 | FromDiscord | <mratsim> For me the main benefit of implementing these in the compiler is avoiding getType and friends. |
17:08:57 | FromDiscord | <treeform> @Araq, tools/urldownloader uses a completely different API. It looks very complex. I just use the COM api from winim its pretty simple. Like 10 lines vs 400... |
17:09:23 | FromDiscord | <Clyybber> misping? |
17:09:49 | FromDiscord | <treeform> he asked me... |
17:10:34 | FromDiscord | <treeform> he wanted to know how similar tools/urldownloader and puppy here, and its not at all similar. |
17:10:40 | FromDiscord | <Clyybber> oh, nevermind :P |
17:11:08 | FromDiscord | <treeform> tools/urldownloader also support FTP which might add to extra complexity |
17:11:53 | FromDiscord | <treeform> tools/urldownloader also has to implement the win32 api, I don't I just use winim's com interface. |
17:12:09 | FromDiscord | <Araq> well but it takes a callback so it can show % of completion |
17:12:15 | FromDiscord | <treeform> yeah that too |
17:12:25 | FromDiscord | <Araq> tools/urldownloader is simply superior 😛 |
17:13:18 | FromDiscord | <treeform> I don't see anything about gzipping stuff. |
17:13:34 | FromDiscord | <Araq> there isn't any support for that iirc |
17:14:16 | FromDiscord | <treeform> if you use this to download zip archives its not needed. |
17:18:24 | FromDiscord | <Clyybber> @Araq I was about to say "I figured it out, we only need to statementize expressions containing control flow", but in↵`g(a(), b(), try: c())` we would have to transform it to `aTmp = a(); bTmp = b(); try: cTmp = c(); g(aTmp, bTmp, cTmp)` because otherwise we break the left to right evaluation |
17:18:45 | FromDiscord | <Clyybber> even though a() and b() don't contain control-flow |
17:19:05 | FromDiscord | <Clyybber> (edit) "even though a() and b() don't contain ... control-flow" added "exposed" |
17:23:05 | FromDiscord | <Araq> @Clyybber stop statementization efforts immediately |
17:23:30 | FromDiscord | <Araq> they will create tons of new problems for C++ codegen where you cannot generate temporaries of types that have a forbidden = operator |
17:24:03 | FromDiscord | <Araq> instead we should pass up/down the "wants to own / does own this value" information |
17:24:11 | FromDiscord | <Araq> in order to fix the .cursor bug |
17:51:52 | FromGitter | <essess> hello - trying out nim for the first time and I'm compiling on my beaglebone black. I eventually get a failure about linenoise: https://pastebin.com/zjyN0rEz ⏎ I grabbed the 1.4.4 .zip tag and kicked it off with ./build_all.sh ⏎ any hints? |
17:52:29 | * | waleee-cl joined #nim |
17:54:30 | leorize[m] | what distro are you on? |
17:55:40 | leorize[m] | looks like debian, then you should be able to find nim in the official repository |
17:55:47 | FromGitter | <essess> it's the default debian IoT image |
17:55:49 | leorize[m] | you should enable backports to get the latest nim |
17:56:18 | FromGitter | <essess> ok - I'll look into that right now |
17:57:30 | * | qwertfisch quit (Quit: ZNC - http://znc.in) |
17:58:41 | leorize[m] | it is kinda weird that gcc doesn't spit out any error messages though |
18:07:31 | FromGitter | <essess> I tried the snap, works fine. Looked into cross-compiling and that was above where I'm comfortable at (for now) .. so decided to just build it locally and was pleasantly surprised watching it chug away for the last couple of hours until it stopped. |
18:09:20 | ForumUpdaterBot | New thread by Alexeypetrushin: Channel / Actors based parallelism? Are there such Web Servers?, see https://forum.nim-lang.org/t/7583 |
18:09:38 | FromGitter | <essess> it looks like nim is not part of buster-backports for armhf. |
18:09:43 | leorize[m] | while we don't officially release arm binaries, they are built daily by nightlies so we do know that it should build |
18:10:04 | leorize[m] | ping federico3 |
18:11:01 | leorize[m] | you can grab the armv7l build from here in the meantime then: https://github.com/nim-lang/nightlies/releases/tag/latest-version-1-4 |
18:11:32 | federico3 | err "default IoT image"? |
18:13:02 | federico3 | anyhow I can upload the backport of 1.4.2 shortly |
18:14:54 | FromGitter | <essess> default IoT image (https://elinux.org/Beagleboard:BeagleBoneBlack_Debian#Debian_Buster_IOT_Snapshot) |
18:16:09 | FromGitter | <essess> armv7 will work for armhf targets? |
18:16:24 | federico3 | a weekly snapshot of Buster is something pretty odd to do |
18:17:30 | leorize[m] | @essess yes it should |
18:18:18 | federico3 | ARMv7 is armhf |
18:18:54 | federico3 | (out of curiosity, why are you running the compiler on a beagle?) |
18:20:16 | FromGitter | <essess> understood. this is my first embedded linux prj ever. I usually stick to 'deeper' stuff --- didn't want to fuss w/C and thought I'd try something more comfortable like nim. ⏎ thanks for the help guys, I didn't know armv7 === armhf --- I'll go off and figure this out |
18:20:49 | FromGitter | <essess> I'm running the compiler there because I saw that there wasn't a armhf cross-compile target --- but now I know better |
18:21:20 | FromDiscord | <queersorceress> sent a long message, see http://ix.io/2RNL |
18:21:22 | leorize[m] | for nim armv7 covers both hard float and soft float |
18:21:49 | leorize[m] | since such details are delegated to the c compiler :p |
18:22:00 | FromDiscord | <treeform> In reply to @queersorceress "so i'm using the": Yeah its annoying, but we have learned to live with it... |
18:22:05 | FromDiscord | <mratsim> the hell is a soft float and a hard float? |
18:22:17 | FromGitter | <essess> I understand now --- I'll go get smarter and come back w/any more questions |
18:22:18 | FromDiscord | <queersorceress> In reply to @treeform "Yeah its annoying, but": i dun wanna |
18:22:28 | federico3 | essess: you might want to consider using Unstable instead |
18:22:43 | federico3 | or testing. Anyhow I'm going to update Backports |
18:22:44 | FromDiscord | <treeform> In reply to @mratsim "the hell is a": software emulated soft vs in hardware? |
18:22:47 | FromDiscord | <mratsim> In reply to @queersorceress "so i'm using the": nim.cfg or config.nims with --outdir:binDir |
18:23:06 | FromDiscord | <mratsim> and within tests --outdir:../binDir |
18:23:20 | federico3 | @mratsim hard float is in hardware, soft is emulated |
18:25:47 | FromDiscord | <queersorceress> In reply to @mratsim "nim.cfg or config.nims with": you know, for some reason i thought that wouldn't work as it would move the test executables out from under nimble, but it does in fact, all work as before! |
18:30:07 | FromDiscord | <queersorceress> i feel like that should probably be part of the default `config.nims` that gets generated, but that might be too opinionated as `binDir` isn't a required field |
18:30:24 | FromDiscord | <mratsim> I use `build` as a name usually |
18:30:42 | FromDiscord | <mratsim> and `bin` for prod stuff |
18:31:03 | FromDiscord | <mratsim> I even have `build/test` for tests because i tend to write too many tests |
18:31:27 | * | JustASlacker joined #nim |
18:32:04 | FromDiscord | <queersorceress> heh |
18:33:44 | FromDiscord | <mratsim> proof: https://github.com/mratsim/constantine/tree/master/tests |
18:36:54 | * | PMunch quit (Quit: leaving) |
18:38:56 | FromDiscord | <queersorceress> if only that was considered a normal amount of tests |
18:39:15 | * | JustASlacker quit (Ping timeout: 246 seconds) |
18:39:34 | FromDiscord | <mratsim> those tests are also randomized and differing one are running for each CI. |
18:39:37 | FromDiscord | <dom96> In reply to @queersorceress "i dun wanna": I recall seeing a PR for this, hmm |
18:40:23 | FromDiscord | <dom96> https://github.com/nim-lang/nimble/pull/850 |
18:40:57 | FromDiscord | <queersorceress> has there ever been consideration for a default "clean" task for nimble? |
18:41:07 | FromDiscord | <dom96> Ugh, Nimble CI got broken and wasn't fixed. |
18:41:34 | FromDiscord | <mratsim> would be cleaner if everything was put in a build folder |
18:41:45 | FromDiscord | <dom96> yeah |
18:50:26 | FromDiscord | <queersorceress> that small change of test executable placement makes this so much better too. https://media.discordapp.net/attachments/371759389889003532/817469113798361148/nimble-clean-diff.png |
18:52:16 | * | JustASlacker joined #nim |
19:13:33 | * | JustASlacker quit (Ping timeout: 265 seconds) |
19:29:01 | FromDiscord | <queersorceress> am i missing something or is there not a way to output a valid RFC822 date representation in the `times` module? the time zone modifier is making this complicated, i need the offset to be in the format of 4 digits, but the minute option adds a colon to it :\ |
19:32:15 | FromDiscord | <zidsal> I've written my first macro which generates a bunch of type definitions, whats the best way to test this? is there a way I can get the repr of the returned nim node in the test? |
19:32:31 | FromDiscord | <Yardanico> the best way to test is to compare ASTs of course |
19:32:36 | * | maier joined #nim |
19:33:06 | FromDiscord | <queersorceress> there should be some methods in the macros module that allows you to dump the ast tree |
19:34:58 | FromDiscord | <haxscramper> In reply to @zidsal "I've written my first": sent a code paste, see https://play.nim-lang.org/#ix=2ROc |
19:35:13 | FromDiscord | <haxscramper> Comparing ASTs is a torture for macro functionality testing |
19:35:46 | FromGitter | <essess> leorize[m] // federico3 --- thanks for the nighlies tip. Dropped it onto the bbb and it works. No need to build locally. I'll probably end up cross-compiling from here on out anyways knowing that the arm target is going to work for armhf. |
19:36:34 | FromDiscord | <haxscramper> For larger macros it might make sense to split definition into multiple implementation parts then test all of this separately, but for simple macros just using generated results should suffice |
19:36:56 | FromDiscord | <zidsal> ok thanks guys |
19:40:24 | * | theelous3 joined #nim |
19:48:38 | FromDiscord | <queersorceress> oh, i see, this is an open issue 😐 https://github.com/nim-lang/Nim/issues/4347 |
19:52:54 | FromDiscord | <CAA> sent a code paste, see https://paste.rs/jkj |
19:53:25 | FromDiscord | <Yardanico> Depends on what you actually mean |
19:53:33 | FromDiscord | <Yardanico> What's your end goal? |
19:53:35 | FromDiscord | <CAA> I just want to use main() as an entry point in nim. |
19:53:52 | FromDiscord | <Yardanico> But for what? That's why I'm asking |
19:53:55 | FromDiscord | <mratsim> proc main() = |
19:53:59 | FromDiscord | <Yardanico> you can use `quit` if you want a different exit code |
19:54:57 | FromDiscord | <queersorceress> sent a code paste, see https://play.nim-lang.org/#ix=2ROh |
19:55:26 | FromDiscord | <Yardanico> yes, but unlike C this will be a normal procedure without any "magic", that's why I was confused about @CAA 's question |
19:55:41 | FromDiscord | <Yardanico> maybe he wanted some C-like logic regarding exit codes or something else |
19:55:57 | FromDiscord | <CAA> Is there a language that's similar to nim but more C like? |
19:56:07 | FromDiscord | <Yardanico> not sure, we talk about Nim here :) |
19:56:09 | FromDiscord | <queersorceress> you can call it whatever you want, by default nim just runs the code from the top to bottom of the file, the `main` as the entry point is an implementation detail of how C works as a language. |
19:56:29 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=2ROj |
19:57:53 | FromDiscord | <queersorceress> In reply to @Yardanico "if you want exit": i'd disagree with that statement, but that's language semantics. i think it would be better to use the `when isMainModule:` to shortcut that. |
19:58:41 | FromDiscord | <queersorceress> you are completely correct, it just seems silly is all |
19:58:55 | FromDiscord | <mratsim> In reply to @CAA "Is there a language": Maybe D |
19:59:05 | FromDiscord | <mratsim> depends on the color of your glasses |
19:59:20 | FromDiscord | <mratsim> or Zig. |
19:59:22 | FromDiscord | <Yardanico> In reply to @queersorceress "you are completely correct,": that's why I was really confused with the initial question |
20:00:39 | FromDiscord | <mratsim> but my advice is write at least a weekend project, say AOC / advent of code, before evaluating the syntax:ergonomics. All have their quirks and often there is a good reason and it forms a coherent whole. |
20:00:49 | FromDiscord | <mratsim> (edit) "syntax:ergonomics." => "syntax/ergonomics." |
20:01:07 | FromDiscord | <queersorceress> haha, yeah. i mean, i'm sure there are reasons to care about the source code representations of executable code entry points for use with linkers in this day and age, i just don't know why you would really want to care about that now 🙂 |
20:02:09 | FromDiscord | <Yardanico> I mean if you really wanted to you can use `--noMain` and define your own `int main` for the C backend in your code |
20:02:25 | * | maier quit (Ping timeout: 276 seconds) |
20:06:13 | FromDiscord | <queersorceress> @CAA what specific functionality or behaviors from C do you want that don't seem readily apparent to you in nim? |
20:06:52 | FromDiscord | <CAA> I'm just more comfortable with C like langs than python like. I'll just have to get used to nim. |
20:08:30 | FromDiscord | <queersorceress> syntactically it does look a lot more like python than C, but i'm sure you will find it behaves closer to C than python. |
20:10:08 | * | theelous3 quit (Read error: Connection reset by peer) |
20:10:35 | * | theelous3 joined #nim |
20:11:47 | FromDiscord | <queersorceress> there are a few non-obvious things at first - like the entry point function name - which i got hung up on at first too but the language interop between nim and C is top notch, better than any other language i've seen, which kept me around long enough to adapt and move away from developing code in C anymore. |
20:15:24 | * | asdflkj quit (Ping timeout: 260 seconds) |
20:17:11 | * | asdflkj joined #nim |
20:20:57 | FromDiscord | <Yardanico> well, the result was obvious - keep |
20:21:01 | FromDiscord | <Yardanico> https://en.wikipedia.org/wiki/Wikipedia:Articles_for_deletion/Nim_(programming_language)_(5th_nomination) |
20:22:09 | FromDiscord | <queersorceress> sounds like we need some more non-official channel publications |
20:22:24 | * | Vladar joined #nim |
20:23:03 | FromDiscord | <Yardanico> no, I just feel like the person who nominated the article for deletion didn't do enough research |
20:23:26 | FromDiscord | <Yardanico> like "15 page views in the last 30 days (including mine)." that was edit count, not view count |
20:23:39 | FromDiscord | <Yardanico> by view count Nim will overtake D in a year-two (although that's not a really good metric) |
20:25:14 | FromDiscord | <queersorceress> not that i think the page should get deleted, i'm not sure what the purpose of that metric is, like it lacks any context at all |
20:25:51 | FromDiscord | <Yardanico> well that person also said "Yet another open source computer language that never quite achieved notability despite the developer's attempts to promote it." and "Bottom line: it looked promising when it was shiny and new but never quite took off and became notable." |
20:25:59 | FromDiscord | <queersorceress> why would i go to wikipedia for background info on the language vs the language's homepage -- unless i'm totally outside of programming as a field. |
20:28:10 | leorize[m] | The administrator said that the article just need updates with references from more recent 3rd-party sources, and that view counts doesn't matter per Wikipedia policy |
20:30:33 | FromDiscord | <queersorceress> hence my comment about more non-official channel discussion about it. i think the vast majority of us that use nim regularly are comfortable enough with it that we don't encounter any major usage problems that aren't bugs/feature requests. thus there isn't very much third party material about the language or using it. that contributes heavily to popularity and uptake of use. |
20:31:22 | FromDiscord | <queersorceress> since we already use it, we are going to keep using it, but for those that don't know about it that are connected to us, they have no reason to explore it's use since we aren't talking about it. |
20:32:17 | leorize[m] | we do have a share of developers blog on dev.to, but yea, it's no where enough |
20:33:40 | FromDiscord | <Yardanico> even if we do blog, isn't it not notability-worthy per wikipedia guidelines? |
20:33:44 | FromDiscord | <Yardanico> unless a person is an "expert in the field" |
20:35:06 | leorize[m] | well a major project like nimbus (one of the first few Etherium 2 clients) should fit the guidelines I think? |
20:35:35 | FromDiscord | <dom96> Just some person that seems to enjoy deleting articles from WP |
20:36:54 | FromDiscord | <queersorceress> oh yeah, there are some super zealous WP editors, which is why i try to stay as far away from it as possible but having random blog posts would probably increase overall usage which would cause more significant usage examples. |
20:37:21 | FromDiscord | <dom96> of course, blog posts are one of the best ways to promote Nim |
20:37:38 | FromDiscord | <dom96> which can make it more likely that bigger outlets pick up news on Nim |
20:40:55 | FromDiscord | <queersorceress> speaking of ways to increase language popularity, making sure we were able to output dates that conform to RFC822 would probably be a good place to start 🙂 |
20:41:51 | * | rockcavera quit (Remote host closed the connection) |
20:42:37 | FromDiscord | <dom96> Some may find this interesting, February search performance for forum.nim-lang.org https://media.discordapp.net/attachments/371759389889003532/817497349097390131/unknown.png |
20:43:11 | FromDiscord | <dom96> seems many are interested in comparing Nim to Rust these days 🙂 |
20:45:00 | FromDiscord | <queersorceress> lots of people i know are using rust, but most of them came from not writing C-language code into using rust, vs i chose nim over rust specifically because of the interop. i also find rust's syntax really hard to visually parse, it looks ugly, but not as bad as swift is. |
20:45:47 | FromDiscord | <Unaimend> In reply to @Yardanico "https://en.wikipedia.org/wiki/Wikipedia:Articles_fo": dafuq, why are people doing this? |
20:47:14 | FromDiscord | <Solitude> In reply to @Unaimend "dafuq, why are people": rust inside job |
20:53:23 | * | haxscramper quit (Remote host closed the connection) |
20:59:40 | FromDiscord | <Unaimend> So, is is ok to have like 100 tags in the package.json for a single package? |
20:59:40 | FromDiscord | <Hi02Hi> rust claims to be okay on embedded devices, but when i compile a hello world prog, its >2MB. When I go to their book on embedded rust, it says to get rid of the std. Is that normal for embedded devices? b/c nim can be with the std, and even the gc on embedded. |
20:59:54 | FromDiscord | <Unaimend> (edit) "is" => "it" |
21:01:26 | FromDiscord | <Yardanico> @Unaimend I think generally you wouldn't want more than 10 |
21:01:27 | FromDiscord | <Yardanico> why 100? |
21:02:25 | FromDiscord | <Unaimend> If I improve my bionim package, I would like it if people would find it if they search for included algorithms or file formats, this would results in many tags |
21:02:32 | FromDiscord | <Unaimend> In reply to @Yardanico "why 100?": just a random number |
21:02:46 | FromDiscord | <Yardanico> You don't need that many tags for people to find it |
21:02:50 | FromDiscord | <Yardanico> there are much better ways to do that |
21:02:59 | FromDiscord | <queersorceress> @Hi02Hi because nim compiles down to C, you can take advantage of dead code stripping, i assume rust should be able to do that as well if it is statically typed and doesn't use dynamic dispatch. |
21:03:01 | FromDiscord | <Yardanico> you can add those file extensions to the readme for example |
21:03:08 | FromDiscord | <Solitude> In reply to @Unaimend "If I improve my": tag your repo |
21:03:11 | FromDiscord | <Unaimend> Yeah thats why I asked, because that seemed stupid 🙂 |
21:03:17 | FromDiscord | <Yardanico> @queersorceress nim has it's own dead code elimination (which is always enabled) as well |
21:03:24 | FromDiscord | <Unaimend> In reply to @Solitude "tag your repo": what do you mean? |
21:03:51 | FromDiscord | <Unaimend> In reply to @Yardanico "you can add those": What do you mean exactly? |
21:04:01 | FromDiscord | <Yardanico> In reply to @Unaimend "What do you mean": just add them as a list to readme of your repo |
21:04:14 | FromDiscord | <Yardanico> no need to add tons of tags for the nimble package in packages.json |
21:04:17 | FromDiscord | <Solitude> In reply to @Unaimend "what do you mean?": github tags |
21:04:32 | FromDiscord | <Unaimend> In reply to @Yardanico "just add them as": Thanks for the tip, seems much more reasonable |
21:04:39 | FromDiscord | <Hi02Hi> In reply to @queersorceress "<@!787421416227995699> because nim compiles": it's a hello world program, what dead code is there to eliminate? |
21:04:47 | FromDiscord | <Unaimend> In reply to @Solitude "github tags": why would i use tags for this case? |
21:07:16 | FromDiscord | <Unaimend> Since as far as I know, tags should follow the SemVer proposal |
21:07:57 | FromDiscord | <Yardanico> In reply to @Unaimend "why would i use": nonono, he's not talking about that |
21:08:09 | FromDiscord | <Unaimend> ahhh omg |
21:08:10 | FromDiscord | <Yardanico> he's talking about these https://media.discordapp.net/attachments/371759389889003532/817503773885726721/unknown.png |
21:08:16 | FromDiscord | <queersorceress> In reply to @Hi02Hi "it's a hello world": sent a long message, see http://ix.io/2ROI |
21:08:28 | FromDiscord | <Unaimend> In reply to @Yardanico "he's talking about these": Sry, wine is getting to my head |
21:08:38 | FromDiscord | <Yardanico> In reply to @Unaimend "Sry, wine is getting": it's okay, github generally calls those "topics" |
21:09:12 | FromDiscord | <queersorceress> so for nim, you need the garbage collection implementation, plus the stdlib code, plus your code |
21:09:59 | FromDiscord | <Yardanico> with -d:useMalloc --gc:arc it's generally really nice because you don't need to ship nim's own allocator and arc injects all needed destructor/etc calls |
21:10:05 | FromDiscord | <Unaimend> In reply to @Yardanico "it's okay, github generally": Do you know of articles which highlight Nim features in comparision to other languages, I would like to write a post for the bioinformatics subreddit, to make nim a little bit more popular in this scene and I could use some inspiration |
21:10:35 | FromDiscord | <queersorceress> depending on how the language is implemented, there is a lot that goes on between the human version of the source code to the implementation of making that work, the symbol lookup tables, type checking, the threading model, etc. |
21:11:08 | FromDiscord | <Unaimend> In reply to @Yardanico "it's okay, github generally": Well I searched for git tags a few days ago but you can imagine my search results had nothing to do with those |
21:12:23 | FromDiscord | <queersorceress> there are a lot of factors that can influence this, some languages use dynamic dispatch, which means instead of code getting generated where you can trace which functions call what other functions being determined at compile-time, it gets resolved at run-time. this means you cannot strip out a lot "unused/dead" code because you cannot statically prove that it gets used or not, as the symbol lookup and resolution is done at run-time |
21:14:06 | FromDiscord | <queersorceress> so you have to ship all your methods in your binary, regardless of if they get used or not, because they might be. thus your binary will go up in size. some languages use strings heavily for lookup, rather than a hard-coded address. this can increase binary size too. |
21:14:22 | * | NimBot joined #nim |
21:16:36 | leorize[m] | usually it's because rust bundles their own I/O implementation |
21:16:43 | leorize[m] | nim reuse the libc ones |
21:16:46 | FromDiscord | <queersorceress> i know nothing about the implementation details of rust, so i cannot give you a specific reason, but everything i mentioned is the why of it. this is why Go binaries are always huge, because they have to bundle everything they are going to use ever into the one binary. |
21:17:42 | * | lritter joined #nim |
21:18:08 | FromDiscord | <queersorceress> ah, yeah, that will definitely do it. being able to rely on the platform's C stdlib at the very least is really convenient, but can get really complicated in terms of supporting a product as there is a lot of ambiguity and subtle differences in implementations out there. |
21:18:30 | FromDiscord | <Yardanico> well, that's why nim stdlib exists :) |
21:18:38 | FromDiscord | <Yardanico> it tries to mitigate differences between implementations |
21:18:54 | leorize[m] | our i/o abstraction is horrendous though :P |
21:19:25 | FromDiscord | <Yardanico> part of formatBiggestFloat for example https://media.discordapp.net/attachments/371759389889003532/817506606350598174/unknown.png |
21:19:30 | FromDiscord | <Hi02Hi> does rust have the equivalent of a system module or does it package the entire std into the binary? |
21:19:53 | leorize[m] | rust do have dead code elimination iirc |
21:20:27 | leorize[m] | @Yardanico I don't think we should be proud of that hack :P |
21:20:55 | FromDiscord | <Yardanico> i didn't say "proud", I just meant that it tries to make a somewhat consistent interface for different OSes/compilers |
21:21:27 | leorize[m] | clyybber said he was working on better float-to-string impl sometime ago but I guess it's stalled for now |
21:25:13 | FromDiscord | <queersorceress> sent a long message, see https://paste.rs/hZO |
21:26:25 | FromDiscord | <CAA> Can I use curly brackets in nim? |
21:26:33 | FromDiscord | <Yardanico> no |
21:26:40 | FromDiscord | <dk> to create tables, sure :) |
21:26:50 | FromDiscord | <Yardanico> as a replacement for indentation - no :) |
21:27:23 | FromDiscord | <queersorceress> @CAA nim denotes encapsulation with indentation, like python. |
21:27:55 | FromDiscord | <Yardanico> nim had curly braces syntax skin a long time ago, but it was removed because no one used it and it was more work to maintain |
21:28:11 | * | superbia quit (Quit: WeeChat 3.0) |
21:28:39 | leorize[m] | and why bother about curly braces when you are still gonna indent anyway... |
21:28:45 | FromDiscord | <Yardanico> exactly |
21:29:05 | FromDiscord | <dk> sent a code paste, see https://play.nim-lang.org/#ix=2ROP |
21:29:24 | FromDiscord | <Yardanico> shh |
21:29:27 | FromDiscord | <queersorceress> that's something different than scope encapsulation |
21:29:39 | FromDiscord | <Yardanico> @dk https://github.com/nim-lang/Nim/wiki/Lesser-known-Nim-features#abusing-statement-list-expressions-to-allow-using-parenthesis-like-braces-in-nim |
21:30:18 | FromDiscord | <queersorceress> that is a bad (confusing) example |
21:30:26 | FromDiscord | <queersorceress> (edit) |
21:32:45 | FromDiscord | <dom96> In reply to @Yardanico "<@!324175372117606401> https://github.com/nim-lang/": ooh, that's a cool wiki article |
21:33:16 | FromDiscord | <Yardanico> @dom96 it was initially made as a half-serious one for features you wouldn't want to use, but it became a bit more serious over time :) |
21:35:05 | FromDiscord | <ElegantBeef> Also this reminds me almost no one outside of Nim know's what an enum indexed array is, they always think it's a hashmap 😄 |
21:35:12 | FromDiscord | <Yardanico> xd |
21:35:41 | FromDiscord | <ElegantBeef> I used it in my sand sim and multiple people were like "They the fuck is that table in array construction brackets" |
21:35:41 | FromDiscord | <queersorceress> the harder i try, the more i am starting to hate the `times` module and lack of necessary functionally it has D:< |
21:35:48 | FromDiscord | <Yardanico> for example? |
21:35:51 | FromDiscord | <Yardanico> except the rfc822 thing |
21:35:54 | FromDiscord | <queersorceress> @ElegantBeef isn't that a C thing? |
21:36:13 | FromDiscord | <ElegantBeef> I dont know |
21:36:17 | * | vicfred joined #nim |
21:36:33 | FromDiscord | <ElegantBeef> It's not a common thing to be able to use enums for indexing arrays but it really should be |
21:37:00 | FromDiscord | <ElegantBeef> Enum associations without the overhead of a hash |
21:37:02 | FromDiscord | <ElegantBeef> Just lovely! |
21:37:02 | leorize[m] | the times module is kinda a mess with Interval vs Duration |
21:37:17 | FromDiscord | <queersorceress> i mean, you shouldn't do it, but i've seen it a lot in C since your default enum gets mapped to an int, and there are no hashmaps in plain C. |
21:37:49 | FromDiscord | <queersorceress> In reply to @leorize "the times module is": yeah, exactly, and trying to parse and convert between the types is awful. |
21:38:11 | leorize[m] | I believe Duration was added after 1.0, which is why we couldn't get rid of Interval... |
21:39:24 | leorize[m] | and even worse, Duration is recommended but Interval got the nicer API |
21:39:26 | FromDiscord | <queersorceress> trying to work around the rfc822 thing by pulling the utcOffset, converting it up to the right number from seconds, but if i'm not working with a whole date then this module is just useless. this isn't a huge problem as i've written my fair share of date-time code from scratch but what i'm doing isn't an edge-case or that irregular. |
21:40:03 | leorize[m] | you need to write your own rfc822 serializer/parser (and I believe there's a nimble module for that already) |
21:40:39 | FromDiscord | <queersorceress> can you link me, i didn't see it when i searched. |
21:40:49 | FromDiscord | <queersorceress> there was a parser, but not a serializer |
21:41:26 | FromDiscord | <Yardanico> can't you just remove the colon after formatting to get a rfc822-compatible date? |
21:41:39 | leorize[m] | I guess you have to write your own then |
21:42:10 | leorize[m] | at one point we should make a new time module outside of the stdlib :p |
21:42:31 | FromDiscord | <Solitude> doesnt treeform have one? |
21:42:32 | FromDiscord | <queersorceress> so, all the unit-based methods convert ints to `timeinterval`s, but the things that convert back to ints of different units are written for `duration` instead 🙄 |
21:43:00 | FromDiscord | <queersorceress> (edit) "ints" => "`int`s" | "ints" => "`int`s" |
21:50:36 | FromDiscord | <queersorceress> this is pretty useless, lol https://play.nim-lang.org/#ix=2RP0 |
21:51:40 | FromDiscord | <バロザード> https://twitter.com/SpaceGoatVii/status/1367911478808875008?s=20 |
21:54:44 | FromDiscord | <treeform> Is there a way in to store a function pointer and pointer to its arguments... then call it? Kind of like a closure? |
21:55:53 | FromDiscord | <queersorceress> what do you mean by "pointer to arguments"? |
21:56:41 | leorize[m] | cps got a transform for making closures |
21:56:46 | FromDiscord | <treeform> some sort of structure that has the arguments |
21:57:09 | FromDiscord | <dom96> Well, you can use closure for that |
21:57:14 | FromDiscord | <queersorceress> lmao, so you are asking for an assembly trampoline? |
21:57:23 | FromDiscord | <dom96> you can grab its function pointer and "data" |
21:57:26 | FromDiscord | <treeform> so like `foo a(1,2,3)` a want to separate `a` and `(1,2,3)` and call them at a later time. |
21:57:51 | FromDiscord | <ElegantBeef> Sounds oddly related to the lack of closures on the js backend and my proposed solution in #gamedev 😄 |
21:58:17 | FromDiscord | <queersorceress> i believe you can save the arguments as a varargs array, and pass that to your function pointer. |
21:58:37 | FromDiscord | <ElegantBeef> Yea a macro could grab the call and the idents and transform it into a specific object type |
21:58:41 | FromDiscord | <queersorceress> i'm trying to figure out how best to explain this if you have no idea what an ABI is |
21:59:14 | FromDiscord | <treeform> I know what ABI is |
22:00:53 | FromDiscord | <treeform> What I am trying to write a `spawn` macro that just does `spawn a(i)` then when it starts the thread it grabs the `i` from some place. Current thread API requires static arguments. I want to figure out how to work around that. |
22:01:30 | leorize[m] | use cps |
22:02:08 | * | Gustavo6046 quit (Ping timeout: 260 seconds) |
22:02:24 | FromDiscord | <queersorceress> so to call a function, you have to have the address to it in memory, then load up your cpu registers correctly to supply arguments in the right order and such. it sounds like you want a trampoline to just drop the two bits of data into it and it will do the right thing for you, which you cannot identify at the time you are compiling or writing the code. |
22:03:13 | * | Gustavo6046 joined #nim |
22:03:53 | FromDiscord | <treeform> I think I can determine during compile, the macro just can't create a global variable |
22:04:02 | FromDiscord | <treeform> so I am trying a dynamic approach |
22:04:27 | leorize[m] | please just use cps, it can chop a function down into closures |
22:05:08 | FromDiscord | <queersorceress> i'm not recognizing this abreviation, "cps" |
22:05:15 | leorize[m] | and since it functions on typed ast you can fed it an implementation and it will spit out a continuation |
22:05:36 | FromDiscord | <ElegantBeef> continuation passing style iirc 😄 |
22:06:09 | leorize[m] | @queersorceress https://github.com/disruptek/cps |
22:06:41 | FromDiscord | <queersorceress> oh well that is nifty! |
22:07:49 | * | FromDiscord quit (Remote host closed the connection) |
22:08:03 | * | FromDiscord joined #nim |
22:10:58 | * | qwertfisch joined #nim |
22:11:55 | * | defection joined #nim |
22:20:46 | * | k0mpjut0r joined #nim |
22:20:46 | k0mpjut0r | Hello all, I'm working with some c2nim translated code (nim-ffmpeg) and one of the fields `AVStream **streams;` ended up as `streams*: ptr ptr AVStream`. How can I make Nim interpret this as an array in a way that would be compatible with the original C structure? |
22:21:27 | FromDiscord | <Yardanico> so it's an array of pointers to AVStream? |
22:22:34 | leorize[m] | well c2nim translated code usually need some modification |
22:25:56 | * | clyybber quit (Quit: WeeChat 3.0.1) |
22:26:39 | FromDiscord | <queersorceress> you should be able to abstract a layer of pointer abstraction by making `Ref` types too. |
22:26:51 | FromDiscord | <queersorceress> (edit) "pointer abstraction" => "pointers" |
22:29:36 | FromDiscord | <Clyybber> In reply to @Araq "instead we should pass": k |
22:30:56 | defection | Don't mean to butt in, but how do I get `nimble build` to respect my damn config.nims switches? If I run `nim c` manually, everything works as expected. Not super important I guess, but mildly annoying. |
22:31:18 | defection | Don't mean to butt in, but how do I get `nimble build` to respect my damn config.nims switches? If I run `nim c` manually, everything works as expected. Not super important I guess, but mildly annoying. |
22:31:31 | * | defection quit (Remote host closed the connection) |
22:31:59 | FromDiscord | <ElegantBeef> you can add switches inside nimble which you probably should do |
22:32:19 | FromDiscord | <Yardanico> he left lol |
22:32:26 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/817524980190937088/unknown.png |
22:34:10 | FromDiscord | <queersorceress> rip |
22:35:45 | * | defection joined #nim |
22:36:59 | FromDiscord | <dk> he defected |
22:37:47 | * | defection quit (Client Quit) |
22:39:27 | FromDiscord | <Yardanico> maybe something wrong with his IRC client https://media.discordapp.net/attachments/371759389889003532/817526753073168395/unknown.png |
22:43:11 | FromDiscord | <zajrik> Anyone know why `fmt"{foo}\n{bar}"` returns the literal `foo\nbar` (with the text backslash-n, not an actual newline) while `fmt("{foo}\n{bar}")` outputs an actual newline? |
22:43:30 | FromDiscord | <zajrik> I just had a fun time figuring out why my newlines suddenly broke |
22:44:20 | FromDiscord | <ElegantBeef> https://nim-lang.org/docs/strformat.html#fmt-vsdot-amp |
22:44:32 | FromDiscord | <zajrik> oho |
22:44:34 | FromDiscord | <zajrik> Thank you |
22:44:47 | FromDiscord | <zajrik> don't know how I didn't manage to find that while googling |
22:44:58 | FromDiscord | <ElegantBeef> Dont google Nim isnt a overly large language |
22:45:10 | FromDiscord | <ElegantBeef> Look at the module documentation, forum or ask here |
22:45:21 | FromDiscord | <zajrik> Yeah, I've noticed that in the past when I first started Nim |
22:45:24 | FromDiscord | <ElegantBeef> Or subreddit i guess |
22:45:27 | FromDiscord | <zajrik> I'm now coming back to it for a small work project |
22:45:44 | FromDiscord | <zajrik> And quickly become reacquainted with that fact lol |
22:45:50 | leorize[m] | funny enough, documentation of Nim 0.x.y shows up more often in search engines than the latest ones |
22:46:07 | FromDiscord | <Yardanico> shouldn't it be possible to blacklist it from google search? |
22:46:10 | FromDiscord | <Yardanico> @dom96 do you know? |
22:46:22 | FromDiscord | <Yardanico> e.g. via google search console |
22:46:26 | FromDiscord | <ElegantBeef> https://nim-lang.org/docs/theindex.html also this exists and is pretty good aswell |
22:46:36 | leorize[m] | we can do it with robots.txt I think |
22:46:40 | FromDiscord | <dom96> guess that's what robots.txt is for |
22:46:50 | FromDiscord | <Tristan> In reply to @Yardanico "maybe something wrong with": Yeah... That was me. kirc was giving me some garbage about not being able to send to the channel, but apparently it did... twice. |
22:46:56 | FromDiscord | <zajrik> ohhhh I should use & instead if I wanna cut out the parens |
22:47:25 | * | xet7 quit (Remote host closed the connection) |
22:48:23 | FromDiscord | <dk> In reply to @zajrik "ohhhh I should use": what parens |
22:48:41 | FromDiscord | <ElegantBeef> Ah here's the difference https://media.discordapp.net/attachments/371759389889003532/817529072459972608/unknown.png |
22:49:02 | FromDiscord | <zajrik> In reply to @dk "what parens": > Anyone know why fmt"{foo}\n{bar}" returns the literal foo\nbar (with the text backslash-n, not an actual newline) while fmt("{foo}\n{bar}") outputs an actual newline? |
22:49:17 | FromDiscord | <ElegantBeef> the latter is with parens which is why it's a strlit |
22:49:34 | FromDiscord | <zajrik> Makes sense. String vs Raw string |
22:49:45 | leorize[m] | `<identifier>"string"` is a form of raw string |
22:49:52 | FromDiscord | <ElegantBeef> Yep i was just going to say that |
22:50:56 | FromDiscord | <zajrik> Lesson learned :blobcheer1: |
22:51:15 | FromDiscord | <Tristan> In reply to @ElegantBeef "you can add switches": Hmm, switches still don't appear to be working unless I make a task manually. Life goes on 🤷♂️ |
22:51:32 | FromDiscord | <ElegantBeef> You can also use a `filename.nim.cfg` |
22:51:59 | leorize[m] | where is your `config.nims` relative to the source? |
22:53:51 | FromDiscord | <Tristan> Right next to the `.nimble` file. I've also tried `nim.cfg` in the project root and `modulename.nim.cfg` under `src` |
22:54:07 | leorize[m] | place the config in the src folder and it should work |
22:54:20 | * | tane quit (Quit: Leaving) |
22:54:32 | FromDiscord | <queersorceress> doesn't the nim compiler have a built-in repl? |
22:55:04 | leorize[m] | yes, though it doesn't work most of the time |
22:55:05 | FromDiscord | <ElegantBeef> Well `nim secret` is nimscript based and we do have `nim eval` |
22:55:13 | FromDiscord | <ElegantBeef> `inim` is pretty fricken good |
22:55:49 | FromDiscord | <Tristan> No go on that one either... maybe it's just the switch I'm using... `switch("define", "mingw")` |
22:56:53 | leorize[m] | ah yea, that switch has to be passed from the command line |
22:56:58 | * | FromDiscord quit (Remote host closed the connection) |
22:57:12 | * | FromDiscord joined #nim |
22:57:31 | leorize[m] | btw the discord bridge seems to be crashing a lot Yardanico |
22:57:35 | FromDiscord | <Tristan> Ah... good to know. Appreciate it! |
22:57:43 | FromDiscord | <Yardanico> @leorize very weird |
22:59:04 | leorize[m] | out of memory or smt? |
23:01:10 | FromDiscord | <Yardanico> nah, seems related to edits |
23:02:57 | FromDiscord | <Yardanico> yeah |
23:02:58 | FromDiscord | <Yardanico> " for slice in slices[start .. i - 1]:" |
23:03:06 | FromDiscord | <Yardanico> index out of bounds |
23:03:48 | leorize[m] | lol |
23:03:54 | leorize[m] | and why are you using a copying slice? |
23:04:31 | FromDiscord | <Yardanico> most code to handle edits is quote old, I need to refactor it ideally |
23:04:33 | FromDiscord | <queersorceress> hmmm, i assume that when serializing xml (via `xmltree` module), i cannot guarantee the ordering of the attributes of a node, can i? the fact that they change due to the internal ordering of the `StringTableRef` type that stores them is mildly annoying. |
23:04:57 | FromDiscord | <Yardanico> @leorize I'm using https://github.com/mark-summerfield/diff for diffing edits |
23:05:04 | leorize[m] | why do you need the attributes to be ordered? |
23:05:36 | FromDiscord | <queersorceress> it would make the unit tests easier |
23:07:04 | FromDiscord | <queersorceress> i'm generating an RSS feed, so testing the generated contents against a premade file would be really convenient. |
23:08:05 | FromDiscord | <queersorceress> it's not like the attributes get randomly ordered each time, so it's probably fine, i'm just curious because it seems like a case that isn't covered by the code. |
23:09:00 | FromDiscord | <queersorceress> but we do have ordered tables, so i thought there might be a simple fix to this. |
23:09:43 | leorize[m] | I guess we need OrderedStringTable? :P |
23:12:45 | FromDiscord | <zajrik> Hmm. Are proc forward declarations supposed to cancel out the documentation for that proc or am I doing it wrong? |
23:13:14 | leorize[m] | they're that broken, yes |
23:13:21 | FromDiscord | <zajrik> oof |
23:14:03 | FromDiscord | <zajrik> oh well |
23:14:22 | leorize[m] | https://github.com/nim-lang/RFCs/issues/309 <- here's the discussion around those |
23:15:16 | FromDiscord | <Yardanico> with IC we're supposed to not need forward decls and code reodrdering anymore |
23:15:24 | FromDiscord | <Yardanico> also it should (iirc) allow for circular imports |
23:15:27 | FromDiscord | <zajrik> IC? |
23:15:31 | FromDiscord | <Yardanico> incremental compilation |
23:15:34 | FromDiscord | <Yardanico> (edit) "reodrdering" => "reordering" |
23:15:37 | FromDiscord | <zajrik> Ahh okay |
23:16:02 | FromDiscord | <Anuke> what's the current status on incremental compilation? |
23:16:08 | FromDiscord | <zajrik> Well I can't wait for that, then. Forward declaration necessity is probably my only real gripe with the language |
23:16:09 | FromDiscord | <Yardanico> you can follow araq's PRs |
23:16:29 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/817536069334990869/unknown.png |
23:16:32 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/817536084094615572/unknown.png |
23:17:02 | leorize[m] | IC progress currently is: doesn't work |
23:17:23 | FromDiscord | <zajrik> lol |
23:17:28 | FromDiscord | <Anuke> I saw his PRs, but the titles weren't very descriptive and I'm not familiar with the Nim compiler codebase, so it's hard/impossible to tell what's currently working and what needs to be done |
23:17:38 | FromDiscord | <Yardanico> short answer: right now it's not usable |
23:17:51 | leorize[m] | the only way to know what's the progress is to ask @Araq |
23:18:03 | FromDiscord | <Anuke> noted |
23:18:14 | leorize[m] | until he figured out a good way to communicate to everyone else, that is |
23:19:17 | FromDiscord | <zajrik> Y'know what |
23:19:23 | FromDiscord | <zajrik> I was looking at the wrong proc :drakeLUL: |
23:20:36 | FromDiscord | <zajrik> my opinion of forward declarations still stands |
23:22:05 | FromDiscord | <Yardanico> no one is saying that forward decls are good :) |
23:43:33 | Prestige | Is there a way to have a handler triggered when a program is being terminated? |
23:44:21 | Prestige | I was thinking the signal proc in posix. Curious if there's a better way |
23:44:21 | leorize[m] | addExitProc? |
23:45:09 | FromDiscord | <Yardanico> @Prestige https://nim-lang.org/docs/exitprocs.html |
23:45:12 | FromDiscord | <Yardanico> as leorize said :P |
23:45:20 | Prestige | Nice, thanks |
23:59:59 | * | Vladar quit (Quit: Leaving) |