Why isn't there a good scheme/lisp on llvm?

LLVM provides a lot, but it's still only a small part of the runtime a functional language needs. And C FFI calls are uncomplicated because LLVM leaves memory management to be handled by someone else. Interacting the Garbage Collector is what makes FFI calls difficult in languages such as Scheme.

You might be interested in HLVM, but it's still more than experimental at this point.


For CL: Clasp is a Common Lisp implementation on LLVM, and mocl implements a subset of Common Lisp on LLVM.

For Scheme: there's a self-hosting Scheme->LLVM demo and a prototype LLVM backend for Bigloo Scheme.

For Clojure: there's Rhine, which is a Clojure-inspired lisp.


There's a very small and apparently unoptimised Scheme compiler here:

http://www.ida.liu.se/~tobnu/scheme2llvm/

Taking your question literally,

  • Writing compilers is hard.
  • A poor implementation like the one linked above can block new implementations. People going to the LLVM page see that there's a Scheme already, and don't bother writing one.
  • There's a limited number of people who write and use Scheme (I'm one, not a hater, btw).
  • There are lots of existing Scheme intepreters and compilers and there's not a screaming need to have a new one.
  • There's not an immediate, clear benefit to writing a new interpreter using LLVM. Would it be faster, easier, more flexible, better in some way than the other dozens of Scheme implementations?
  • The LLVM project went with another language (C) to demo their technology, and haven't seen a need to implement a lot of others.

I think that it could be a lot of fun for someone to build an LLVM-based Scheme compiler. The Scheme compilers in SICP and PAIP are both good examples.

Tags:

Lisp

Scheme

Llvm