Wednesday, 8 April 2009

Lennart Augustsson releases his embedded BASIC

Lennart Augustsson, author of the world's first Haskell compiler, has released the much-anticipated source code to his BASIC DSL written in Haskell that uses LLVM for JIT compilation.

Lennart has been teasing us with a series of fascinating articles describing the elegant DSL capabilities offered by his latest work and it is great to finally have something to play with!

This project demonstrates how the Haskell programming language combined with FFI bindings to LLVM's C API can be used to construct new language implementations quickly and easily.

Functional languages excel at metaprogramming and there are several similar compilers written in functional languages that are buildinng upon LLVM including our own HLVM project that is written in OCaml and provides a complete high-performance garbage collected virtual machine in under 1,000 lines of OCaml code.

No comments: