4 ms·
This is awesome! The direction of using a subset of python, while leveraging the user base and static typing to accomplish some other everyday task in a differe
by adsharma 5y ago
This is awesome! The direction of using a subset of python, while leveraging the user base and static typing to accomplish some other everyday task in a different language is very legit IMO.
I took a cursory look at:
https://github.com/zanellia/prometeo/blob/master/prometeo/cgen/code_gen.py https://github.com/zanellia/prometeo/blob/master/prometeo/cg...
It seems quite similar in spirit to
https://github.com/adsharma/py2many/blob/main/pyrs/transpiler.py https://github.com/adsharma/py2many/blob/main/pyrs/transpile...
I'm not spending much time on py2many last few months (started a new job). Let me know if any of it sounds useful - especially the ability to transpile to 7-8 languages including Julia, C++ and Rust.
- zanellia 5y agoPretty cool! How do you manage multiple target languages with a single AST parser? Do you use an intermediate AST?
- pure_simplicity 5y agoThat's a good question to put in the discussion tab on their GitHub repo, that way others that are interested can find it too :)
- adsharma 5y agoNo intermediate AST. To understand the various stages of transpilation and separation of language specific and independent rewriters, this file is a good starting point: https://github.com/adsharma/py2many/blob/main/py2many/cli.py#L162 https://github.com/adsharma/py2many/blob/main/py2many/cli.py...