Live data from Hacker News

Why Clojure?

gaiwan.co

211–220 of 302 posts

Re: Why Clojure?

#211
I recall when I used to work for Pupper Labs - then PuppetDB jumping to Clojure in 2012 was a gutsy call that totally paid off and put the language on the map. Puppet was a Ruby shop, but as data piled up, they needed something really cool and risky—enter Clojure, which we though was a slick Lisp running on the JVM. It turned PuppetDB into a beast for storing catalogs and reports, leaving Ruby’s old setup in the dust with crazy speed boosts, like 130 times faster for some tasks, thanks to its async magic and functional vibe. We could’ve gone Java or JRuby, but Clojure’s concise code and JVM power hit the sweet spot, making PuppetDB a lean, scalable backbone for thousands of nodes. It wasn’t just a tech switch—it showed Clojure could hang with the big dogs, influencing Puppet’s later projects and proving a niche language could rock real-world infrastructure. It was the best move and kept thing really interesting - in a good way of course.

Re: Why Clojure?

#212

Learning clojure has improved all of my programming in every language. I’m in love with the simplicity and smallness of it. Rich said one of the reasons he built it was he was programming like this already (pure functions acting on data) but the languages he was using didn’t support it well. There is a lot to be learned and applied even if you can’t use clojure at work every day.

>Rich said one of the reasons he built it was he was programming like this already (pure functions acting on data) but the languages he was using didn’t support it well. But he could have been using F#, OCaml, Haskell. So it might not be just about pure functions and immutable data.

For being an Haskell and Clojure dev. Data manipulation in Clojure requires a mind shift coming from Haskell. But it feels a lot more straightforward in Clojure. Even if `lens` is incredible. This is like Haskell lenses was were included in the core language if you want. Of course, not type-safe. This is just that, solving problems in Haskell or in Clojure does not really require the same approach. But both ways are delightful. And personally, Clojure has always felt more natural, even though, I also love the Haskell approach.

Re: Why Clojure?

#213

I love writing Clojure. Whenever I say that publicly, there are inevitably some voices challenging my stance with skepticism, criticism, and attempts to discredit whatever I say provides practical value for me. Then I have to explain to them, "no, it's not the only language I know," "yes, I've used dozens of other languages before," "yes, including languages with robust static type systems as well." And you know what…

I've never seen anything but praise for clojure.

After writing Clojure/CLJS for a decade professionally I think it's a toy language that is completely inappropriate for industrial use. But, at this point it's not worth my time to talk about it past that

Re: Why Clojure?

#214

Earlier quoted context omitted.

If you like the language, don't let that stop you. Install leiningen and run: `lein new app my-stuff`. Then type `lein repl` and you should have a repl running. Alternatively, open the project in IntelliJ with Cursive installed or VSCode with Clava or other supported editors and start evaluating code at the repl. Go through a few tutorials, then go through one of the free books available online. Don't give up when yo…

Well, also, sadly, the first thing I would want to be right now happens to be... a GUI, which seems to be the archnmesis of Java in general, and clojure in particular ;)

Ain't nothing wrong with Swing or JavaFX :).

Re: Why Clojure?

#215
post #61
post #54

Who are these articles for? I feel like Clojure’s value proposition is pretty well understood, and every last Clojure pitch can be relied upon to make the same exact points.

These articles are necessary to counteract armchair critics who are afraid of unfamiliar things and feel insecure. This crowd is loud: you can hear the choir of "but no one is using it, I tried it once and there were parentheses, I tried it and it was too hard, I hate the JVM" — there needs to be a voice that says it works (and works well!) for some people. FWIW, it works for me — I would not have been able to build…

The only counter argument that matters to me is there are hardly any jobs.

Re: Why Clojure?

#217
post #190
post #185

Earlier quoted context omitted.

You can keep a JVM running in the background with your project loaded and send stuff there from your IDE/editor. I don't think this is possible with JavaScript.

You can eval strings in Javascript, so pretty sure that's possible.

[deleted]

Re: Why Clojure?

#218
post #185

Earlier quoted context omitted.

Maybe I miss what REPL really is, but... If REPL is the main value proposition, how is it better from average JavaScript development? Dev tools allow you to basically interactively work with your code.

You can keep a JVM running in the background with your project loaded and send stuff there from your IDE/editor. I don't think this is possible with JavaScript.

So they try to make the least-worst JVM environment which is great if you're dead-set on using the JVM, which has a lot of pros.

For most people Python/Javascript also does the job and you don't need to learn another paradigm — a Lisp — to code for it, which also makes sense.

However, learning a Lisp also makes you a better coder because of immutability and less side-effects. Hence why Clojure is still around.

Re: Why Clojure?

#219
post #192

Earlier quoted context omitted.

The parent comment illustrates the problem with one clear example. In real-world code functions pass around amorphous maps, they add, subtract and transform fields. There is no way to know what's being passed around without reading the source of the whole chain. Statically typed languages reduce the need to know how the data is structured or manipulated. The market has clearly chosen this benefit over what Clojure ca…

> There is no way to know what's being passed around without reading the source of the whole chain. But that's not what a Clojure dev would do. 1) We use Malli [0] (or similar) to check specs and coerce types if needed at every point. Checks can be left on in production (I do), or disable–up to you. 2) If the coercion is difficult, use something like Meander. [1] 3) If even that isn't straightforward and you need act…

That's a lot of different tools for something that could simply be a statically defined type with compile-time checking.

Re: Why Clojure?

#220

Earlier quoted context omitted.

I've never seen anything but praise for clojure.

I was gonna reply something similar too. The only "counters" people have when talking about Clojure (that I see, as a non-Clojurian) are pretty weak, and are usually: "it uses JVM, and JVM bad mmmkay" and the typical lazy dismissal of Lisps as "omg it's parantheses everywhere".

Add "dynamic language" in this day and age where everyone thinks static languages are cool again.
Post reply on HN