6 ms·
Thankfully Rich Hickey & co wrote Clojure so we can program on a modern Lisp in the Java Virtual Machine and in the browser! (ClojureScript) (even the .NET CLR
by JBiserkov 10y ago
Thankfully Rich Hickey & co wrote Clojure so we can program on a modern Lisp in the Java Virtual Machine and in the browser! (ClojureScript) (even the .NET CLR is supported)
[1] http://clojure.org http://clojure.org
[2] http://clojurescript.org http://clojurescript.org
- qwertyuiop924 10y agoNot a super fan of Clojure, but it's a good language. Shame it's still stuck in the Java ecosystem, though.
- smnplk 10y agoI believe the whole point was to target the JVM, because of reuse and maturity. And actually it's not stuck just in java ecosystem, clojure got wings years ago. Yoy can find it inside a browser today too :)
- metaobject 10y agoI wonder if there ever has been talk of a native Clojure? I guess it may not be very usable without the JVM ecosystem, though. Frankly, I find calling JVM library calls from Clojure to be quite ugly and really stand out in the code (mostly because of the mix of the lower-case-dash-delimited variable and fn nameing convention of Clojure and the mixed-case/camelCase naming style of Java.
- pjmlp 10y agoYes, there are a few aborted attempts. The problem with all languages that decide to implement their own runtime, instead of building it on top of JVM or .NET eco-systems is that their native code generation and GC implementation are always going to be worse. Also there is the issue of having to implement the whole set of third party libraries from scratch, just like PyPy and JRuby have issues using libraries that rely on CPython or Ruby FFI. So unless you get a set of developers really committed to go through the efforts of making it succeed, everyone will ignore it.
- JBiserkov 10y agoThe closest thing to a native Clojure is Pixie[1]. As the authors note, it's a "Clojure inspired lisp", not a "Clojure Dialect". >Pixie implements its own virtual machine. It does not run on the JVM, CLR or Python VM. It implements its own bytecode, has its own GC and JIT. And it's small. Currently the interpreter, JIT, GC, and stdlib clock in at about 10.3MB once compiled down to an executable. [1] https://github.com/pixie-lang/pixie https://github.com/pixie-lang/pixie
- deleted 10y ago[deleted]
- pjmlp 10y agoYeah, but for many of us the Java ecosystem is a feature. You only get tooling comparable to Visual VM or Mission Control in commercial Common Lisps. Also I think many that bash Java don't realise it is the only language ecosystem that matches C and C++ in availability across OSes, including many embedded ones.
- qwertyuiop924 10y agoI realize, I just can't stand the ecosystem. Everything is super verbose, frustratingly overcomplicated, and full of XML. Yuck.
- pjmlp 10y agoIt is a consequence of being an enterprise language. I imagine you never had the pleasure of doing enterprise distributed computing projects via CORBA, DCOM, SUN-RPC, DCE in C, C++, Visual Basic and Smalltalk. Guess where those enterprise architects moved on. EDIT: Should have mentioned Delphi and Objective-C as well.
- qwertyuiop924 10y agoI didn't, it sounds unpleasant, I can guess, and I don't like it, which is why I'm not a fan of Java.
- shakna 10y agoThough it kind of sucks that Tail Call Elimination is such a difficult task on the JVM. Scheme kind of gets you thinking in a way that works iteratively, but gets expressed recursively. Its easy to read, and can make for some great optimisation without being premature. The JVM does not really support this style of programming - despite LISP's syntax leading towards it.
- qwertyuiop924 10y agoYeah, it's super nice.
- smnplk 10y agorecur in clojure is also easy to read in my opinion.
- shakna 10y agoTrue. However, a named let in Scheme is not a loop. Its still a lambda. Which means you can have nested lets with TCE, and you can construct them on the fly, depending on what your needs are, usung patterns like currying. That flexibility just doesn't work on the JVM. You can force it, but it'll be slow and horrible compared to another pattern - and I don't think a LISP should tell me how to do something. That's Python's ideology.
- ScottBurson 10y agoIronically, the Lisp Machines didn't have TCO either.
- pjmlp 10y agoEven though I prefer static typing to dynamic typing, Clojure is a pleasure to do some coding for fun while traveling. It would be nicer if the performance was better though, many that only know Java via Clojure don't realize the performance impact of Clojure. At least 1.8 did had some improvements in that direction.