3 ms·
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
by Touche 11y ago
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?
- cp9 11y agohttps://github.com/clojure/clojurescript/wiki/Optional-Self-hosting https://github.com/clojure/clojurescript/wiki/Optional-Self-... here's how to bootstrap cljs.
- Touche 11y agoI 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?
- spiralganglion 11y agoIf 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 https://github.com/oakmac/cuttle
- deleted 11y ago[deleted]
- _halgari 11y agoOne 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.
- pjmlp 11y agoAnother 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 http://blog.ndk.io/2014/02/11/jvm-slow-startup.html