Hacker News new | ask | show | jobs
by gw 2138 days ago
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.
1 comments

There is really no way to trap it? Maybe fork the NimScript stuff to give the option to try to hang around?
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.