News for hackers. Stuff that matters.
Re:Try Clojure by d4mi3n on Wednesday May 22, 2024 @02:55PM (#40444736)
In my experience, the subsets of the community around clojure were one of the biggest problem with it. It's gotten better over the years, but circa 2016 - 2018 it had a spike in popularity despite being very hostile to newcomers.

There was an almost apologist attitude towards rough edges or failure modes folks new to the community would fall into. I managed to work with it for a time despite that, but it left me with a bad taste in my mouth. It's really important to make your ecosystem and communities welcome to new users or they're destined to fade.

Re:Try Clojure by crispyambulance on Wednesday May 22, 2024 @03:10PM (#40444914)

  > ...had a spike in popularity despite being very hostile to newcomers.
To be fair the community itself, as humans, was very welcoming to newcomers. Really super nice and helpful folks.

If anything was "hostile" it was the dominance of emacs and very limited options for other tooling. That, and the horrifically unhelpful leaky abstractions in the stack trace when something went wrong. It's a big step, if you don't already know emacs to learn emacs (at a fairly advanced level) AND a new very different programming language.

I see now there's a vscode option with Calva. I haven't tried it. Might do that someday. Really wanted to like this language!

Re:Try Clojure by gleenn on Wednesday May 22, 2024 @03:26PM (#40445167)
Cursive plugin for IntelliJ is a fantastic option, it's not free but it is excellent.
Re:Try Clojure by aeonik on Wednesday May 22, 2024 @04:47PM (#40446317)
it's nice, but I used to write Java, and even getting IntelliJ setup on my laptop took a lot of fiddling with JVM versions and getting it to recognize my Clojure install.

To this day, I will still have weird issues where Cursive won't run a project, and Emacs will.

All that being said, I do really like Cursive.

Re:Try Clojure by cess11 on Thursday May 23, 2024 @01:27AM (#40450783)
I use https://sdkman.io/ to manage JVM versions, have you tried that? I haven't used Cursive, maybe it does something weird, but in general IntelliJ seems to accept it just fine in my everyday work.
Re:Try Clojure by yungporko on Wednesday May 22, 2024 @04:24PM (#40445977)
the tooling is the reason i gave up when i was interested in learning clojure. everywhere pretty much said that emacs was the "correct" editor to use for clojure, i tried it out for a bit but ultimately learning a new language and a new editor at the same time was just too big of an ask.

i tried calva with vscode afterwards but it was basically the same thing, calva has paredit which overrides the keyboard navigation and there was no way to disable it. somebody had asked for the option to disable it on the github but the creator said something along the lines of calva without paredit wasn't the way he wanted it to be used, so i just picked another language to learn.

Re:Try Clojure by cospaia on Friday May 24, 2024 @08:59AM (#40465765)
Wow. I'm the creator of Calva and I can tell you that I do not have an opinion on how to use it. I would never say something like that, and now I wonder what I could have said that was interpreted this way...

By default Calva Paredit overrides three or so keyboard shortcuts. This is to help the users to not accidentally delete brackets, which in turn keeps the support questions down about broken Clojure code. I have tried to make it super easy to disable these overrides. There's a command for it. There's a button in the toolbar for it, and there's a setting for it.

There's also a setting for removing all Paredit bindings, even those that are not overriding any default ones. (This setting is for people who use Paredit, but want to provide their own shortcuts entirely.)

Re:Try Clojure by yungporko on Sunday May 26, 2024 @10:41AM (#40482530)
i'm pretty sure this is the thread i saw, but at the time it hadn't been closed yet: https://github.com/BetterThanTomorrow/calva-paredit/issues/1...

if there's now a way to disable paredit entirely then i might check it out again some time in the bear future

Re:Try Clojure by ARandomerDude on Wednesday May 22, 2024 @03:40PM (#40445365)
clojure-lsp and clj-kondo work with any editor and are both excellent.

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

https://github.com/clj-kondo/clj-kondo

I've always used (Neo)Vim with Clojure.

Re:Try Clojure by neilyio on Wednesday May 22, 2024 @05:01PM (#40446498)
I'll second that the popular tooling, while powerful and reliable, its just not user friendly.

The official Clojure CLI, for example, is just plain confusing, and that's most people's first impression to the entire ecosystem. The config files, while they use the wonderful `.edn` format, are also not intuitive. Newcomers are the most likely people to encounter the most amount of error messages... which are famously difficult to read.

And that's before you even get into REPL configuration, which involves coordination with your editor process, a client process, and a server process. Even if you have a tool like Calva or CIDER managing it for you, you'll still get confused when something goes wrong unless you grok all the moving parts.

Even if you figure that all out, you still don't have Parinfer or equivalents setup yet in your editor. Also, clojure-lsp tends to require some configuration to get working the way you want. And that's before you get started with ClojureScript, which brings the complexity to another level entirely.

Despite all this, I love Clojure. It's an expert's language, even though it shouldn't have to be. Once you learn this stuff, you respect why much of this complexity exists. It's inherent to the amount of power the language gives you.

But doesn't mean we can't make it easier to use and get started with.

Re:Try Clojure by roenxi on Wednesday May 22, 2024 @08:16PM (#40448706)
> The official Clojure CLI, for example, is just plain confusing, and that's most people's first impression to the entire ecosystem. The config files, while they use the wonderful `.edn` format, are also not intuitive.

I completely agree; it is unfortunate they don't spend more time officially recommending leiningen.org. A beginner attempting to use the built-in CLI is going to lead to a poor first 3 months.

Re:Try Clojure by astrashe2 on Wednesday May 22, 2024 @05:04PM (#40446530)
This matches my experience as an amateur programmer. The initial hill was steep, but I don't think it was because people weren't friendly.

There is one cultural thing that might be confused with unfriendliness. Sometimes people react badly if someone posts incorrect information. But I think that's good. When you search for information about Python or PHP you have to wade through quite a bit of junk. Ironically, it's sometimes easier to find correct answers for Clojure.

Clojure itself is very clean and consistent, it's got a lot of polish to it, which makes it comparatively easy to learn. And there isn't that much of it. But for a long time the tooling was hard.

That's far less of a problem than it used to be. deps.edn and shadow-cljs both made things easier, as has Cursive. People say nice things about Calva, but I don't know it.

I'm a big fan. Babashka alone is enough to make learning Clojure worthwhile. Also, for someone like me, it's kind of nice that it feels almost finished. Once you learn it, you know it, and now that the tooling has settled down a bit you don't have to keep running to keep up.

Re:Try Clojure by hluska on Wednesday May 22, 2024 @10:26PM (#40449723)
People posting the wrong information is a great opportunity for a community to explain why it’s wrong. We lost that take on community and it’s a major loss for our entire industry. It’s remarkably hard for people to figure out why they’re wrong when they’re wrong.

I don’t think the solution is the Usenet-esque “you are wrong and your breeding is suspect” way. But there’s a very good place in the middle and I’d really like to find that place.

Business wise, I think we’re using the wrong paradigm in some major places. Maybe we can beat that while I’m still alive and that would be a net win for our whole craft.

Re:Try Clojure by bunderbunder on Wednesday May 22, 2024 @03:05PM (#40444863)
A somewhat similar thing I ran into is that existing Clojure code can be incredibly difficult to grok if you don't already know the language very well.

Some of this comes from lisp's minimalist syntax, which makes it hard to even know what kind of thing you're looking at when you're encountering a new thing for the first time. But the problem is also compounded by some of Clojure's more distinctive (and powerful) features such as ad-hoc polymorphism and using maps to pass function arguments.

The closest analogy from imperative languages that I can think of is another language that's famous for being incredibly productive in the hands of a skilled user, but whose code tends to feel kind of write-only: Perl.

Re:Try Clojure by kazinator on Wednesday May 22, 2024 @03:27PM (#40445187)
In Perl you have the dynamism, and the syntax.

Evidently, 93% paint splatters, when OCRed, are valid Perl programs:

https://www.mcmillen.dev/sigbovik/2019.pdf

I doubt that a similar thing is true for Clojure.

Here, the only problem is that you don't know what the symbols and some of the notations mean. You can look at the unfamiliar syntax and know what is a child of what. Most operators are words you can search for.

Re:Try Clojure by slifin on Wednesday May 22, 2024 @05:45PM (#40447034)
If I can get clojure storm running in my project then I find a lot of code incredibly straightforward

Because there's a preference for just passing immutable data around the time travel debugger really helps me understand complex interactions

Re:Try Clojure by kimi on Wednesday May 22, 2024 @03:06PM (#40444869)
YMMV. I always found it very welcoming and full of interesting people.
Re:Try Clojure by bunderbunder on Wednesday May 22, 2024 @03:39PM (#40445354)
I may be wrong, but I think the parent poster was talking more about the language and ecosystem than the community. I, too, have found the community to be amazing. But the language itself used to be quite frustrating to learn. It's better now, but I think that by the time it got fixed many companies and teams had already been burned.

Clojure is particularly vulnerable to that because it really is an enterprise applications language. That makes it more vulnerable to learning curve problems than a language like Rust whose most direct competitors are other languages with comparably steep learning curves.

Re:Try Clojure by kimi on Thursday May 23, 2024 @02:20AM (#40451122)
Yes, I agree with you, learning is complicated, because it's mostly un-learning habits you had for 20+ years. Stack traces suck, but after a while you grok them. The clojure/core is full of niceties, but it's so big you need a map just to know what's in there. And still...
Re:Try Clojure by wredue on Wednesday May 22, 2024 @05:14PM (#40446635)
That is basically every functional programming language in existence.