2008-11-15
Pachuco Background
I've been interested in the implementation of programming languages for many years. I've often indulged this interest by browsing the published literature on the subject, which is extensive. But you don't really understand something in computing until you've worked in that area yourself.
One of source of my fascination is the fact that something as expressive as a good programming language can be mapped onto a dumb machine. Interpreters, and compilers that target a virtual machine, may be an important and pragmatic design point, but they are not as exciting as true compilers that target the bare metal.
Unfortunately, implementations of production compilers tend to be large codebases with unnecessary complexity due to historical baggage, just like most mature software projects (I'm basing this on my explorations of open-source compilers, but I'm sure that proprietary compilers are no better). So they don't make attractive environments for explorations of language implementation techniques. Another issue with many production compilers is that they are implemented in C and C++. These languages still have their place in the world, but they are no longer a good answer to the challenges encountered when writing a compiler.
So for a number of years I had an urge to tinker with a compiler, but couldn't find a compiler worth tinkering with. Influenced by texts such as Structure and Interpretation of Computer Programs, I came to the conclusion that writing a compiler for a Lisp/Scheme-like language in that language is not such a big deal. The effort involved is significant, but not infeasible, and it's a stimulating way to spend your free time.
So last year, when I had a block of time that I could commit to getting the project off the ground, I started working on Pachuco. It also helped that I had just got my first x86-64 machine, and a wish to learn about x86-64 machine code.