by llimllib · 13y ago · 0 comments
Although the most well-known language implemented in the pypy "vm" is python, the toolchain is completely language agnostic.
So, this is more akin to Apple writing a C interpreter on top of llvm than it is to building a ruby interpreter on top of python.
* RPython comes with a good garbage collector
* the language where you specify what's going on is RPython in which you write an interpreter. Then you get a JIT using a few hints. This is difference than "interpreter in C + compiler to LLVM" scenario by quite a bit.
* RPython comes with a set of data structures that are higher level (lists, dicts, etc.) and is a GCed language. JIT is also well aware of those.
In much the same way, comparing "Apple writing a C interpreter on top of llvm" to "Alex Gaynor writing a Ruby interpreter on top of RPython" makes a very good analogy, even though Apple is not much like Alex Gaynor, Ruby is not much like C, and PyPy is not much like LLVM.
You're right that the analogy doesn't quite capture everything here. On the other hand the analogy gets across most of the point.
I would have said "That's mostly right, but the interesting thing about sharing code on a VM is access to VM features and code shared on the platform, not just that it's possible to decouple a front end from a VM."
or something to that effect.
"C'mon dude, don't let flaming beget flaming."