tags:

views:

1144

answers:

5

There is Gambit scheme, MIT scheme, PLT scheme, chicken scheme, bigloo, larceny, ...; then there are all the lisps.

Yet, there's not (to my knowledge) a single popular scheme/lisp on LLVM, even though LLVM provides lots of nice things like:

  • easier to generate code than x85
  • easy to make C ffi calls ...

So why is it that there isn't a good scheme/lisp on LLVM?

+6  A: 

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.

Pascal Cuoq
"more than experimental" :-)
Jon Harrop
+2  A: 

One thing to keep in mind is that many of these implementations have C FFIs and native-code compilers that significantly predate LLVM.

Pillsy
+1  A: 

GHC is experimenting with a scheme backend and getting really exciting preliminary results over their native code compiler. Granted, that's haskell. But they've recently pushed new changes into LLVM making tail calls easier IIRC. This could be good for some scheme implementation.

Golias
I think you mean the LLVM backend rather than a Scheme one.
Chuck
+5  A: 

There's no LLVM-targeted Lisp or Scheme because you haven't written one yet.

Yes.

You.

The person reading this answer.

It's your fault.

JUST MY correct OPINION
+2  A: 

there's not (to my knowledge) a single popular scheme/lisp on LLVM

Currently, llvm-gcc is the nearest thing to a popular implementation of any language on LLVM. In particular, there are no mature LLVM-based language implementations with garbage collection yet. I am sure LLVM will be used as the foundation for lots of exciting next-generation language implementations but that will take a lot of time and effort and it is early days for LLVM in this context.

My own HLVM project is one of the only LLVM-based implementations with garbage collection and its GC is multicore-capable but loosely bound: I used a shadow stack for an "uncooperative environment" rather than hacking the C++ code in LLVM to integrate real stack walking.

Jon Harrop