[gambit-list] Clojure to Gambit Scheme compiler

Nathan Sorenson takeoutweight at hotmail.com
Mon Mar 19 21:29:25 EDT 2012


Hi, I'm Nathan Sorenson (@takeoutweight), the person behind the Clojure->Gambit compiler. It's really recent, and I was planning on posting an announcement to this list before too long but I was beat to the punch :)

I started the project knowing next-to-nothing of Gambit and I'm actually surprised I was able to get so much working without much hand-holding.


>I wonder whether (and how) they pretend to implement STM and multicore
>support...

I'm currently inheriting ClojureScript's strategy of defensive copy-on-write when manipulating persistent data structures. Also, ClojureScript doesn't provide the synchronized concurrency primitives (e.g. Ref) so there isn't much in the way of STM.

I'd be interested in learning more what the threading story is for Gambit, and if there's any prospect for multicore in the future. My personal interest in Gambit is for iOS development, so I'm curious if there is any way to cooperate with the Grand Central Dispatch mechanism.

The biggest piece of the puzzle was definitely Meroon, which is doing all the polymorphic dispatch duty. 

At the end of the day, I was a very happy camper when I saw how fast Gambit could launch! Beating the reference implementation (even if only on a microbenchmark) is always a good feeling. Of course clojure-scheme is only a few days old and there is certainly much work to be done. 


> On Tue, Mar 13, 2012 at 5:07 PM, Marc Feeley <feeley at iro.umontreal.ca> wrote:
> Gasp!  After a bit of research it appears that someone has forked the ClojureScript compiler to build a compiler from Clojure to Gambit Scheme:
>
> https://github.com/takeoutweight/clojure-scheme
>
> Apparently the resulting executable programs runs significantly faster than when using the JVM.  One of the performance problems with Clojure (on JVM) is the program startup time (typically above 1 second).  This is eliminated when using Gambit which takes a few milliseconds to startup.  On Mac OS X:
>
> % time gsi -e "(exit)"
>
> real    0m0.012s
> user    0m0.006s
> sys     0m0.005s
>
> Marc
> 		 	   		  


More information about the Gambit-list mailing list