News for hackers. Stuff that matters.
Re:Direct Clojure to C Compiler - Based on ClojureScript by goggles99 on Monday July 09, 2012 @03:13PM (#4219858)
Why do this? compile to native code directly if anything. Would you transform it to C first so you could edit the C? Then what if you want to make a big update using the Closure source? it will overwrite your changes.

This approach is not practical, perhaps I am failing to understand any logic as to why you would go with this approach. Portability (between processor architectures) is all I can think of but you will never achieve high performance if this is the case.

C coders write their code differently against different processors because all machines have different capabilities and resources (strength and weaknesses).

Re:Direct Clojure to C Compiler - Based on ClojureScript by spacemanaki on Monday July 09, 2012 @03:17PM (#4219881)
Compiling to C is not at all an uncommon strategy, there's at least one pretty serious Scheme implementation [1] that does this. Portability between architectures is a pretty big advantage, but in this case another one is leveraging the Boehm GC, rather than rolling your own. Could you use the Boehm GC if you emitted assembly? I would guess maybe it's possible, but you'd have to emit assembly that followed C calling conventions, I would imagine. Emitting C might be easier. Lisp in Small Pieces has a pretty big chapter that goes into detail how to compile Lisp to C.

[1] http://dynamo.iro.umontreal.ca/~gambit/wiki/index.php/Main_P...

see also:

http://www.iro.umontreal.ca/~boucherd/mslug/meetings/2004102...

http://www.iro.umontreal.ca/~boucherd/mslug/meetings/2004102...

Re:Direct Clojure to C Compiler - Based on ClojureScript by takeoutweight on Monday July 09, 2012 @06:49PM (#4221016)
in clojure-scheme I actually compile Clojure to Gambit to make use of Gambit's awesome runtime. It's a very good match for Clojure.

https://github.com/takeoutweight/clojure-scheme

Re:Direct Clojure to C Compiler - Based on ClojureScript by dons on Monday July 09, 2012 @04:02PM (#4220104)
C has been widely used as a "portable" target language. LLVM is increasingly used as a more semantically-sane alternative.