5 ms·
Can this be used for node.js development? If so, any example projects out there?
by SeanDav 13y ago
Can this be used for node.js development? If so, any example projects out there?
- swannodette 13y agoThat's the plan - as you can see here https://github.com/clojure/core.async/blob/master/src/main/clojure/cljs/core/async/impl/dispatch.cljs https://github.com/clojure/core.async/blob/master/src/main/c... we pick the fastest mechanism available for scheduling tasks depending on the environment. So that's MessageChannel for modern browsers, setImmediate for Node & IE 10, and setTimeout for everyone else.
- pjmlp 13y agoIn regards to Clojure, why bother with node.js when one has the full power of the JVM and CLR at disposal?!
- emidln 13y agoBecause you want to use a library that was written for Node and not speed time finding (or writing) something similar for the JVM? If you know Node better than the JVM, Clojurescript on Node is very likely more valuable to you when starting out than Clojure on the JVM.
- leishulang 13y agonot to mention that node-webkit will enable clojurescript to be a major player in large desktop production tools (light-table).
- pjmlp 13y agoJavaFX, Swing, AWT, SWT, Windows Forms, WPF, XAML,.... Webkit, blah.
- leishulang 13y agowebkit might be so so. with node in the formula, and all those npm goodness, I don't think the ones you mention are as nice and as open.
- pjmlp 13y agoGiven JVM and CLR's age, I doubt there is any library for node that doesn't already exist in a similar way for the other platforms.
- emidln 13y agoJust because a library exists for the JVM or CLR doesn't mean a person familiar with Node knows that it exists or the advantages/disadvantages of the 15 libraries that will show up for any given thing they are trying to do. The libraries, profiling tools, performance tuning details. These are the things that make up a platform. Knowing the syntax of Clojure and nothing about the JVM ecosystem isn't going to help you ship any faster. Should a developer in this situation bite the bullet and learn a better supported platform? Maybe. Does everyone have time to do so? Probably not.
- pjmlp 13y agoSince Clojure was born in the JVM, I doubt anyone learning Clojure will be more at home in node.
- MatthewPhillips 13y agoA Clojure programs takes 3-4 seconds to load, making it untenable for command-line programs.
- pjmlp 13y agoJust compile it to native code with a native Java compiler, or NGEN/Mono AOT on the CLR side.
- lucian1900 13y agoAt least in the past that has been very problematic. Perhaps it will change, but I would very much like to see Clojure become a new ClojureScript target.
- frou_dh 13y agoI recognise your username as the one obsessed with bringing up the existence of native Java/.NET compilers! It seems a losing battle.
- pjmlp 13y agoBecause they do exist, and I think it is important to make people aware Language != Implementation, as young developers seem not to know anything about compiler implementation nowadays. Maybe my country of origin makes me have a bit of D. Quixote, who knows.
- MatthewPhillips 13y agoSpecifically which one, and how? I've investigated this a lot, and can't find too many people doing this.