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
Afficher les réponses par date
Hallo,
On Tue, Mar 20, 2012 at 2:29 AM, Nathan Sorenson takeoutweight@hotmail.com wrote:
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.
Honest question: Why not Gambit directly?
Honest question: Why not Gambit directly?
That question to me amounts to "How is Clojure better than X," which is a pretty big discussion. I'd say the primary reason is social. I've done much of my personal programming in Clojure due to various contingent factors (working with Java constraint solving libraries, various SVG rendering libs etc...) so I'm comfortable with the language and know the community. I see ClojureScript picking up steam and I see native mobile as a natural piece of the server+browser ecosystem starting to form around Clojure+ClojureScript. I hope clojure-scheme fits that hole.
I definitely wouldn't try to make the claim that Clojure is fundamentally "better" on a technical or aesthetic level as a language.
Hallo,
On Tue, Mar 20, 2012 at 9:45 PM, Nathan Sorenson nathan.d.sorenson@gmail.com wrote:
I definitely wouldn't try to make the claim that Clojure is fundamentally "better" on a technical or aesthetic level as a language.
As I said, it was an honest question. Thanks :)