I'm not sure if the transposition was intended, but your comment shows another reason why using a calculated value here is good.
Have you played around with Nimborg? That allows embedding Python in Nim fairly easily. https://github.com/micklat/NimBorg I've been able to call into the Nim side from Python by treating the Nim code as C functions to…
I saw the original link on my phone yesterday. The screenshots in the post were unreadable since pinch and zoom was disabled, so I didn't fully understand until pulling up HN on a larger screen today. I have no idea how…
NimBorg is what you're looking for, https://github.com/micklat/NimBorg
I haven't looked closely at the Vala stuff that you mentioned, but it is very straightforward to generate shared libraries in Nim with exported functions that you can access via ctypes. That's not quite the same as…
You'll get an IndexError exception on that if there are any blank lines in the file. Changing that to line.lstrip().startswith('#') would be an alternate approach.
I'm not sure if the transposition was intended, but your comment shows another reason why using a calculated value here is good.
Have you played around with Nimborg? That allows embedding Python in Nim fairly easily. https://github.com/micklat/NimBorg I've been able to call into the Nim side from Python by treating the Nim code as C functions to…
I saw the original link on my phone yesterday. The screenshots in the post were unreadable since pinch and zoom was disabled, so I didn't fully understand until pulling up HN on a larger screen today. I have no idea how…
NimBorg is what you're looking for, https://github.com/micklat/NimBorg
I haven't looked closely at the Vala stuff that you mentioned, but it is very straightforward to generate shared libraries in Nim with exported functions that you can access via ctypes. That's not quite the same as…
You'll get an IndexError exception on that if there are any blank lines in the file. Changing that to line.lstrip().startswith('#') would be an alternate approach.