6 ms·
>I love working with Clojure and I find a large benefit in my understanding of the JVM. Reliance on the Java ecosystem has been the biggest issue for me in try
by arc-in-space 7y ago
>I love working with Clojure and I find a large benefit in my understanding of the JVM.
Reliance on the Java ecosystem has been the biggest issue for me in trying to use Clojure. I love many things about the language, but I have zero experience with Java or the JVM. A number of my attempts at using Clojure for a project have been hindered by my lack of understanding of the underlying runtime and the tools. In a way, it almost feels like Clojure simply isn't for me.
On the other hand, I've had much more luck with ClojureScript, which I'll happily use over JS any day, though the build system still occasionally mystifies me.
- kimi 7y agoThe only reliance you have is on libraries that are often battle tested, well engineered, and cover any project space. Quite different from some other ecosystems I won't mention.... of course YMMV.
- dgb23 7y agoI agree with this, Clojure being hosted means you have to understand the host decently enough. This is a downside and an upside since Java and JS are large, popular ecosystems. But in some cases I wish there was the option to just compile a binary. As for now, I can’t recommend the language to people who don’t already now Java and/or JS. (Maybe WASM/WASI will open this door at some point.)
- slifin 7y agoThere is now an option to compile a binary, it uses GraalVM native-image technology We're growing a scripting ecosystem in Clojure now thanks to this, it's still relatively new As a newcomer, I've made several native binaries for different operation systems
- armitron 7y agoGraalVM does not solve the reliance on the underlying host (JVM, Java) problem.
- slifin 7y agoWell that depends what you define the host problem to be End users can certainly run Clojure programs natively without having the JVM installed on their machine
- vips7L 7y agoYou can do that without Graal using jpackage. The only boon of Graal is native binaries and interop. But if you want to ship the JVM the user doesn't need it installed.
- mark_l_watson 7y agoI wonder if native apps built with Graal or jpackage could be accepted at the Apple macOS and Windows app stores?
- vips7L 7y agoGraal probably. Apple seems to not like JITs so shipping the JVM might be out of the question.
- zenlot 7y agoAnd the 'problem' is not a problem at all.
- predators372 7y agoAre you watching projects like Janet language? For me, JVM is a nonstarter in any capacity, but I welcome that PLT circles are learning from Clojure's design choices and that other lisps are increasingly feasible. It's not clojure, but it's clojure-ish enough that it can be pleasantly productive for little scripting tasks and smaller problems.
- mark_l_watson 7y agoAnother language with a syntax similar to Clojure is the Hy language built on Python (I just released a book on Hy https://leanpub.com/hy-lisp-python https://leanpub.com/hy-lisp-python so I admit positive bias for the language). I used to use Clojure a lot for two consulting customers and I need to try it again. I think the project libpython-clj https://github.com/clj-python/libpython-clj https://github.com/clj-python/libpython-clj looks very interesting for those of us who like Lisp and need access to deep learning tools.
- d_t_w 7y agoI can imagine to a degree, I have zero experience with Javascript and I found the practice of getting a Clojurescript REPL very complicated. Once I was set up I quickly became effective, though I do tend to stay within the bounds of Cljs and avoid the host where I can.
- slifin 7y agoYeah CLJS REPLs are a pain point currently (if you use Cursive specifically) Emacs and Atom and some others are much easier, that said a lot of people start with the hot code reloading since that experience is really nice and works out the box for Shadow-cljs or Figwheel Then eventually set up their REPLs, I know Cursive is working on this though and the nice thing there is you always have access to the "standard library" provided by the Google Closure compiler all of JS and then all of CLJS and all of npm and all of CLJS's libraries
- thom 7y agoFor me, the browser has way more baggage as a runtime than Java ever could. I've only ever found working on top of the JVM a massive boon, and I don't feel at any point I've had to have a deep understanding of different garbage collectors etc. The most complicated thing I've ever needed to do is increase the maximum heap size. In exchange for that I get access to an enormous ecosystem of industrial strength code for free.
- mr_overalls 7y agoIf you're more at home in the .NET world, there's ClojureCLR: https://github.com/clojure/clojure-clr https://github.com/clojure/clojure-clr