Hacker News new | past | comments | ask | show | jobs | submit login

Very cool to see such a robust community.

As far as self-compilation, I haven't seen anything on how to compile a ClojureScript project without Java, is there an article somewhere on how to do so?




One of the reasons that ClojureScript is so fast and efficient is that it leans heavily on the Google Closure optimizing compiler. This compiler goes beyond normal "minimzation" and goes into dead code removal, function inlining and a ton of other stuff. That compiler is written in Java. So it's highly unlikely that JVM is removed as a dev-time requirement anytime in the near future.

On the other hand, I have never really seen a need to remove it. Once the CLJS compiler is up and running, incremental compilations on huge codebases (~300 files) takes a fraction of a second. So in the end...I'd rather have the JVM as a requirement if it allows that fast of a dev cycle.


Another reason is that is doesn't do all the things that standard Clojure does, which are the actual cause for slowness, it is not the JVM.

http://blog.ndk.io/2014/02/11/jvm-slow-startup.html



I don't quite follow, this creates a cljs.core "analysis cache". I don't know what an analysis cache, but I guess it is something that's needed to compile ClojureScript code?

Has no one distributed such a cache in a way that it's easier to do a compile without Java installed? Is there not anything as simple as (where cljs-compile is a Node script):

  cljs-compile file.cljs > out.js
yet?


If memory serves, it is certainly possible to get up-and-running with CLJS without needing Java, but I cannot remember how. There is this tool, which might also be helpful: https://github.com/oakmac/cuttle




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: