Hacker News new | ask | show | jobs
by crispyalmond 1829 days ago
Something like this? https://github.com/yglukhov/nimpy
1 comments

From the Readme, Nimpy is a language integration tool that lets you call Python from Nim. It also links to Nimporter which allows you to import Nim code as a Python package.

What I'm describing would be the inverse of Nimporter, allowing you to import Python code as a Nim library (without making Python calls). That way, you get the performance of Nim but the years of Python package development. "Transpiler" might be a better word?

I've never worked on anything so difficult so I'm really just spitballing. But... wouldn't it be cool? :)

Ah yes, I misread your intent. That would be very nice to have. There is this breakdown of features[0] present in Nim compared to Python which might be helpful when doing this.

[0] https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programm...