Hacker News new | ask | show | jobs
by adsharma 1409 days ago
> It's not "useful" in the sense of being something that you'd actually run.

What if we could actually run it (stay with me for a second) with a well known interpreter such as python3 or v8?

That is the direction py2many has taken. Trying to define a small subset of python + missing rust features (pattern matching as an expression), interfacing with formal verification methods such as z3 and then finally building a transpiler to transpile this language to rust.

2 comments

My goal is that we can actually run it, but that would still only be useful for the following things:

- Testing the spec itself - Ensuring that a more production-grade interpreter like Miri has the same semantics as the spec it claims to implement

It's not intended that unsafe Rust authors would ever run the MiniRust interpreter; if they want something like that, they should run Miri instead. They might still read the MiniRust interpreter sources to figure out what the heck Miri is doing.

NQP is also a similar project from the Perl world, a subset of the language that's simpler to implement and has clearer edge-cases.