by scythe · 17y ago · 0 comments
[1] see http://lua-users.org/lists/lua-l/2009-06/msg00071.html and http://lua-users.org/lists/lua-l/2009-06/msg00069.html
I believe the difference is that unladen-swallow generates python code (JIT) using LLVM, but PyPy generated the interpreter that way.
The JIT approach taken by PyPy is quite different than that taken by unladen-swallow or other projects. Once completed, it can supposedly "turn the interpreter of an arbitrary dynamic language into a just-in-time compiler for the same language". However, as far as I can tell, the only working "backend" for the JIT is x86. Why they don't leverage LLVM, I'm not sure, but it's likely that they have good reasons.
PyPy is a very cool idea in that it provides RPython (a non-dynamic subset of Python) as a DSL for creating dynamic languages. In theory, one could write clean, beautiful, intention-revealing code that specifies a language, while the JIT generator handles all the hard parts of making it fast. Unladen swallow has the much narrower goal of leveraging LLVM to make Python bytecode run faster.
Whether PyPy is too ambitious is hard to tell, but it's certainly way behind schedule from what they had hoped when the project began. It's certainly a really cool project that's worth keeping an eye on.
A fantastic explanation by sigfpe: http://blog.sigfpe.com/2009/05/three-projections-of-doctor-f...
More generally: http://en.wikipedia.org/wiki/Partial_evaluation
It's not a theory. Squeak Smalltalk has been doing exactly that for years. (Not the JIT, but specifying the interpreter in a subset language.)