Start with Parrot VM?

Sorry for not advancing on this project during the past two months, but I unexpectedly got involved into an entire recruitment process for a job at Google, so that is what I have been spending thoughts and time on recently.

Anyway, since I can now invest time & thoughts into this project again, I am currently thinking about targeting Parrot VM instead of LLVM in the first iteration. That would provide some benefits regarding the-work-to-be-done-before-the-first-release (but also architectural benefits):

  • I would save a lot of work on implementing a type system that translates the dynamically typed nature of Lisp into the statically typed nature of LLVM IR, since Parrot VM is already working with dynamic types.
  • It would also help thinking about a clear interface & hierarchy inside the project that distinguishes a “high level” layer from a “low level” layer. The high level layer will be doing the parsing, interpreting the Lisp source etc. while the low level layer implements a “generator” that targets either Parrot VM or LLVM.
    However, the interface between these two layers is intended to be simple & minimal. That should be relatively easy to achieve; luckily I am using a language that supports first-class functions and other nice features 😉 .

So this should remove (or rather “shift”, in a temporal sense) some complexity. It would allow me to focus on the high level layer and have the low level layer be much less complex initially.

However, the overall goal will remain targetting LLVM of course, in order to be able to make use of all the backends/targets that LLVM already supports. So once this first iteration is done, I can then focus on writing that type system that has to deal with converting dynamic types to static types and vice versa.

Does that make sense? Any thoughts and/or opinions out there?