notes
notes copied to clipboard
RARVM: High level AST interpreter
In the last few days, I have started to extend the http://norvig.com/lispy.html interpreter with the four properties I'm most interested in:
- external resource access control (filesystem, network etc.)
- internal resource usage control (#instructions/time, memory)
- recursive application of the above (processes sandboxing processes sandboxing ... etc.)
- process suspension, serialization and resumption
I want to see if these are possible to sensibly implement on an AST based machine. My first proof of concept was on a custom, obscure stack based machine in RPython/Rust, with a custom assembler and language on top: https://www.youtube.com/watch?v=MBymOp6bTII
Since no one will use that, I started to extend the https://github.com/xtuc/webassemblyjs/ interpreter, until I found out it does not even know how to branch yet. So I'm waiting for its maintainer to catch up.
So now I want to see if this can work on a high level. Due to the combination of these properties, it's not easy, but still very much fun.