46 minutes ago · 10 min read2084 words · Tech · hide

I get restless now and then and I want to implement a programming language. Then after mustering the resolve, I stew, for there is no good implementation language.1 What am I to do, build my own programming language so that I can then use it to implement the first language? So I go back to modifying an existing implementation instead. There do exist established general-purpose tools for building fast programming language implementations: RPython, which has PyPy (Python) as its primary success story but also can claim Topaz (Ruby) and a couple of other smaller ones Truffle, which is the foundation of TruffleRuby, GraalPython, GraalJS, and even Sulong (LLVM) And more nascent ones such as Deegen, which was used to reimplement Lua. They each take different approaches: Deegen requires you to write your bytecode interpreter and type system in a C++ DSL. From this it generates an interpreter, a baseline JIT compiler, and, hopefully eventually, an optimizing JIT compiler. Truffle requires you…

Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town