Re:I built a hardware processor that runs Python
by larusso on Monday April 28, 2025 @12:53PM
(#43823486)
This sounds like your ‚arch‘ (sorry don‘t 100% know the correct term here) could potentially also run ruby/js if the toolchain can interpret it into your assembly language?
[ Parent
| on HN ]
Re:I built a hardware processor that runs Python
by hwpythonner on Monday April 28, 2025 @02:09PM
(#43824268)
Good question — I’m not 100% sure.
I'm not an expert on Ruby or JS internals, and I haven’t studied their execution models deeply.
But in theory, if the language is stack-based (or can be mapped cleanly onto a stack machine), and if the ISA is broad enough to cover their needs, it could be possible.
Right now, PyXL’s ISA is tuned around Python’s patterns — but generalizing it for other languages would definitely be an interesting challenge.
Re:I built a hardware processor that runs Python
by larusso on Monday April 28, 2025 @02:44PM
(#43824597)
I assume Lua would fit the bill then definitely.
Edit: Just want to mention that this sounds like a super interesting project. I have to admit that I struggled to see where python was run on the hardware when mentioning custom toolchains and a compilation step. But the important aspect is that your hardware runs this similar to how a vm would run it with all dynamic aspects of the language included. I wonder similar to a parent comment if something similar for wasm would be worth having.