News for hackers. Stuff that matters.
Re:Direct Clojure to C Compiler - Based on ClojureScript by pjmlp on Monday July 09, 2012 @10:23AM (#4218303)
There are JVMs with native code generation like you would expect from a normal C compiler, they are just a bit too expensive.

Here is one example, http://www.atego.com/products/aonix-perc/

Re:Direct Clojure to C Compiler - Based on ClojureScript by exDM69 on Monday July 09, 2012 @10:40AM (#4218395)
Yes. Java is getting closer and closer to native code performance. In some rare cases it can even beat C. But this is after billions of dollars have been thrown at trying to make Java fast.

If you intend to distribute your software (as opposed to running on your own servers), it would require all the customers to have a fancy JVM. Or buying an expensive license to be able to distribute the runtime with your software.

Re:Direct Clojure to C Compiler - Based on ClojureScript by markokocic on Monday July 09, 2012 @10:52AM (#4218440)
> Yes. Java is getting closer and closer to native code performance. In some rare cases it can even beat C. But this is after billions of dollars have been thrown at trying to make Java fast.

Why is it a bad thing that someone was willing to pay money to make Java fast. Do you want to say that there haven't been billions of dollars in both money and man-hours thrown at trying to make C/C++ fast? There's no free performance.

Re:Direct Clojure to C Compiler - Based on ClojureScript by exDM69 on Monday July 09, 2012 @11:09AM (#4218518)
> Why is it a bad thing that someone was willing to pay money to make Java fast.

I guess there's someone who wants to pay for that.

But I don't think it's money well spent. The Java bytecode is not designed for or suited to fast execution and it's a bad intermediate representation for computer programs to be compiled into native code. The Java byte code was designed to be easy to interpret and was designed at a time when a memory access was faster to execute than an ALU instruction (on cheap h/w where Java was originally intended to be run on). Those days have passed and we should move on to better intermediate representations for computer programs. Like LLVM IR.

Re:Direct Clojure to C Compiler - Based on ClojureScript by pjmlp on Monday July 09, 2012 @11:29AM (#4218626)
You mean VM Kit then, with AOT compilation for Java, just like Clang but for Java.

http://vmkit.llvm.org/

Re:Direct Clojure to C Compiler - Based on ClojureScript by exDM69 on Monday July 09, 2012 @12:38PM (#4218973)
Except that I don't want the Java part of it. I'd much rather just use Clang and C.

VMkit is a nice effort, though. I hope it will some day power fancy new languages that have dynamic features which are not well suited for AOT compilation.

Re:Direct Clojure to C Compiler - Based on ClojureScript by pjmlp on Monday July 09, 2012 @11:26AM (#4218611)
What part did you not understand from my post?

These are native code compilers without any need of extra runtime exactly like C.

Just because most people only know Oracle(Sun)'s JVM, it does not mean it is the only way to execute Java code.