r/Clojure • • Jun 02 '22

State of Clojure 2022 Results

https://clojure.org/news/2022/06/02/state-of-clojure-2022
108 Upvotes

13 comments sorted by

12

u/MattDarling Jun 02 '22

Congrats to the shadow-cljs folks, sitting at a reported ~75% usage. That's a pretty dominant position over figwheel-main.

I've heard people being happy with their choice either way, I just thought it'd be more of a 50/50 thing.

21

u/rpd9803 Jun 03 '22

Shadow CLJS is awesome and the fact that the author hangs out in the slack channel and answers my lowly noob questions is amazing.

13

u/wildnux Jun 03 '22

@thheller is amazing and so is shadow-cljs :)

8

u/Linerre Jun 03 '22

Agreed! I also noticed the author being active in the slack answering questions in what I see as tireless way. His blogs are also a great source for help. For example, this one on the paths of a clojure project: https://code.thheller.com/blog/shadow-cljs/2021/05/13/paths-paths-paths.html

5

u/NoahTheDuke Jun 03 '22

Figwheel was very good, but in my limited experience, Figwheel Main (the successor) didn’t go far enough to be something better while also breaking compatibility with original Figwheel. So when provided the opportunity to upgrade last year, I tried shadow-cljs because of the chatter, and I’ve been more than pleased. The interoperability with npm is remarkable and seamless.

2

u/oakes Jun 03 '22

I like figwheel main because it's just a clojure library. Shadow is nice but i never want/need to use npm libraries, and i'd rather not even install npm on my machine. Then again, js people would probably say the same thing about java ;)

9

u/thheller Jun 04 '22

This is a common misconception. I made the mistake of calling the shadow-cljs npm package and the thheller/shadow-cljs Clojure Library the same thing.

If you don't need npm packages at all then you don't need npm or even node at all. I alluded to this in a rather old blog post, but should maybe write a deps.edn guide for purists that want to avoid npm.

As soon as you want npm packages however you need npm, yarn or anything that can create the proper node_modules folder. CLJSJS is not supported (and also partially deprecated anyways, see my blog for reasons why I dropped support) but cljs.main/figwheel.main using npm packages via :target :bundle are in the same boat at that point.

6

u/theconstultingdev Jun 03 '22 edited Jun 03 '22

but how do you make ClojureScript web apps without needing npm?

1

u/joinr Jun 06 '22

I have been able to get by without left-pad for a couple of years now; namely because I don't access to npm on certain environments due to internal policy. It is possible to dev cljs apps with cljsjs or just script tags and interop. OTOH, a lot of libs out there just assume everyone is using npm. It's probably not a poor assumption, but certainly far from universal.

1

u/SimonGray Jun 04 '22

Are you being facetious? It is completely possible to not use any NPM packages. I have never needed one until I recently wanted to visualise a network graph.

2

u/nzlemming Jun 08 '22

Agreed, Thomas deserves massive props for making CLJS more accessible, both through shadow itself and the frankly amazing support he gives on slack and elsewhere.

5

u/mac Jun 03 '22

I am curious to hear if the people hanging out here would agree that "error messages" is still the area of improvement that should have the highest priority?

2

u/kinleyd Jun 04 '22

Thanks - the survey gives a clear picture of trends over the past 5 years.