News for hackers. Stuff that matters.
Re:State of Clojure 2020 by d_t_w on Friday February 21, 2020 @03:58AM (#22381819)
I studied Java at University and then worked with it for 15 years through various companies, finance mostly. I like the language but the opportunities and my use of it felt very stale in the end.

I switched to Clojure a decade ago, around the time I started working with distributed systems. The best move I have ever made. I love working with Clojure and I find a large benefit in my understanding of the JVM.

Recently I've built a front end (Clojurescript) and some lambda services (Clojurescript on Node) to complement my startup (Clojure, https://operatr.io - its a tool for Kafka). There's an advantage to using a single language/mindset through your entire stack.

I spoke at the last Conj (https://www.youtube.com/watch?v=MnvtPzEH-d8) about my experience, broadly speaking my top reason for loving Clojure is that I am much more effective in delivery today than I was a decade ago. I simply don't believe I could have built Operatr in Java/Javascript, YMMV.

In technical terms Clojure's data-orientation coupled with host-interop is much more important to me than it being a functional language or emacs/vim etc. Turns out I still use Intellij (with the Cursive plugin) and my work setup has changed very little.

It's a great tool, if you haven't tried it you should have a play - particularly if you work with Java.

Re:State of Clojure 2020 by arc-in-space on Friday February 21, 2020 @04:42AM (#22382005)
>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.

Re:State of Clojure 2020 by thom on Friday February 21, 2020 @08:35AM (#22382937)
For 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.
Re:State of Clojure 2020 by dgb23 on Friday February 21, 2020 @05:43AM (#22382223)
I 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.)
Re:State of Clojure 2020 by slifin on Friday February 21, 2020 @07:13AM (#22382543)
There 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

Re:State of Clojure 2020 by armitron on Friday February 21, 2020 @07:21AM (#22382563)
GraalVM does not solve the reliance on the underlying host (JVM, Java) problem.
Re:State of Clojure 2020 by slifin on Friday February 21, 2020 @07:56AM (#22382727)
Well 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

Re:State of Clojure 2020 by vips7L on Friday February 21, 2020 @08:56AM (#22383075)
You 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.
Re:State of Clojure 2020 by mark_l_watson on Friday February 21, 2020 @07:31PM (#22388467)
I wonder if native apps built with Graal or jpackage could be accepted at the Apple macOS and Windows app stores?
Re:State of Clojure 2020 by vips7L on Saturday February 22, 2020 @09:25AM (#22391171)
Graal probably. Apple seems to not like JITs so shipping the JVM might be out of the question.
Re:State of Clojure 2020 by zenlot on Friday February 21, 2020 @02:20PM (#22385903)
And the 'problem' is not a problem at all.
Re:State of Clojure 2020 by predators372 on Friday February 21, 2020 @08:22AM (#22382855)
Are 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.

Re:State of Clojure 2020 by mark_l_watson on Friday February 21, 2020 @07:23PM (#22388418)
Another 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 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 looks very interesting for those of us who like Lisp and need access to deep learning tools.
Re:State of Clojure 2020 by d_t_w on Friday February 21, 2020 @06:01AM (#22382298)
I 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.

Re:State of Clojure 2020 by slifin on Friday February 21, 2020 @07:18AM (#22382558)
Yeah 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

Re:State of Clojure 2020 by kimi on Friday February 21, 2020 @05:24AM (#22382169)
The 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.
Re:State of Clojure 2020 by mr_overalls on Friday February 21, 2020 @11:05AM (#22384124)
If you're more at home in the .NET world, there's ClojureCLR:

https://github.com/clojure/clojure-clr

Re:State of Clojure 2020 by gdsdfe on Friday February 21, 2020 @09:15AM (#22383206)
I'm curious to know, why Clojurescript on Node vs clojure on the JVM for this project?
Re:State of Clojure 2020 by escherize on Friday February 21, 2020 @12:28PM (#22384883)
Using the JVM on aws lambda isn't such a good fit due to startup time.
Re:State of Clojure 2020 by Scarbutt on Friday February 21, 2020 @11:24AM (#22384300)
Every Java developer ever: "after >=10 years of java, I switched to ruby|python|js and I'm so much productive now!"

Also, surely your 25 years of experience have nothing to do with you being more productive now than 25 years ago.

Re:State of Clojure 2020 by iLemming on Friday February 21, 2020 @03:21PM (#22386340)
People switch to Clojure from other languages, not just Java. I've seen plenty of former Java, Ruby, Python, C#, JS/TS, C++ and even Haskell devs who switched to Clojure and say - Clojure does feel more productive.
Re:State of Clojure 2020 by WillPostForFood on Friday February 21, 2020 @05:02PM (#22387343)
More productive than the day before they switched, not 25 years ago.
Re:State of Clojure 2020 by d_t_w on Friday February 21, 2020 @08:17PM (#22388723)
This is the point. I still work in Java occasionally but I'm much more effective delivering in Clojure today - with 10 years experience, than I am in Java which I used my entire career.

Same host environment, many of the same libraries, same developer. Different language, different mindset.