News for hackers. Stuff that matters.
Re:Nim – Python-like statically-typed compiled language by pbsds on Sunday August 16, 2020 @12:30PM (#24179094)
Worth mentioning is NimScript, a subset of nim which can be interpreted, and embedded like lua: https://nim-lang.org/docs/nims.html

If for some reason the nim compiler starts becoming slow, then this could also drastically speed up development

Re:Nim – Python-like statically-typed compiled language by gw on Sunday August 16, 2020 @01:14PM (#24179412)
Yeah it really is a hidden gem. You can use it as a bash replacement, and with the new compiler API you can embed the entire interpreter in your program. My only complaint is that the interpreter aborts the process when the nimscript code has an error, so you can't really use it for hot code reloading right now. I hope they fix that eventually.
Re:Nim – Python-like statically-typed compiled language by ilaksh on Sunday August 16, 2020 @08:45PM (#24182686)
There is really no way to trap it? Maybe fork the NimScript stuff to give the option to try to hang around?
Re:Nim – Python-like statically-typed compiled language by gw on Monday August 17, 2020 @08:20AM (#24186489)
I did manage to fork it and prevent it from aborting, but i don't want to maintain it forever. I tracked it down to this function:

https://github.com/nim-lang/Nim/blob/cd28fe2ef7a204721efa720...

It's calling `quit` which cannot be caught in a try statement.