Live data from Hacker News

My thoughts after using Clojure for about a month

acdw.net

131–140 of 204 posts

Re: My thoughts after using Clojure for about a month

#131
post #6

With respect, this topic in particular has been beaten to death. I too liked Clojure when I tried it some years ago (agreed on the composition and data structures; both are _great_). But the real value-add is in the runtime, not the syntax. Java has a solid runtime but it's not yet as good as Erlang's, maybe even not up to the standards of Golang -- I am talking concurrency / parallelism here (for memory management I…

Not even to optimize for, but to write correct programs you really need to understand the runtime which is usually broader than the syntax.

All Clojure (lisps) do is remove the stupidity of syntax.

Even if syntax is the minor thing, why wear a stupid, uncomfortable shirt while running when you could wear one so comfortable you scarcely feel it?

Re: My thoughts after using Clojure for about a month

#132

Earlier quoted context omitted.

Clojure is about its rigorous and pragmatic "immutability first" paradigm that you simply don't get from other PLs. LISP is much more than just a runtime syntax, such as its distinct evaluation model and metalinguistic core. The JVM was chosen for Clojure because of its reach and vast ecosystem. People have ported Clojure to other runtimes, even Beam (Clojerl), where it enjoys decent success, too.

You don't think Erlang has an "immutability first" paradigm?

Erlang is weird in this regard. It has very strong guarantees when it comes to per-process heap that make GC much simpler: no escape hatches for mutability when most immutable languages do include them! But on the other hand inter-process communication is a form of mutability (using another process as a global mutable variable is trivial) and ETS etc. present a mutable interface.

Re: My thoughts after using Clojure for about a month

#133
post #6

With respect, this topic in particular has been beaten to death. I too liked Clojure when I tried it some years ago (agreed on the composition and data structures; both are _great_). But the real value-add is in the runtime, not the syntax. Java has a solid runtime but it's not yet as good as Erlang's, maybe even not up to the standards of Golang -- I am talking concurrency / parallelism here (for memory management I…

> With respect, this topic in particular has been beaten to death.

Yes and no. From the discussion here I've learned about the existence of jank, which wouldn't have come up a year or so ago and might be an interesting solution to a problem for me as it evolves (that problem mainly being me not wanting to use C++ or any of the other directly supported languages in a plugin ecosystem). So these things are worth bubbling up every now and again just for the discussion to have a chance to play out.

Re: My thoughts after using Clojure for about a month

#134

Earlier quoted context omitted.

> the real value-add is in the runtime, not the syntax. Java has a solid runtime but it's not yet as good as Erlang's, maybe even not up to the standards of Golang won't lie, this is hilarious. you got me from nodding along to being the spitting out food meme guy in a span of couple seconds. JVM runtime is undeniably the most well researched and optimized runtime in history of runtimes, specifically in realm of concu…

Well, you are kind of using my comment to vent your frustrations about AI while it has barely anything to do with it -- but you tried to link the two, unsuccessfully. Which is not fair as you have no clue of my stance on AI and are extrapolating a bit too much. Syntax does not matter simply because it's an extremely leaky abstraction of the runtime below, is my point. Of course syntax must be high signal/noise ratio,…

> you have no clue of my stance on AI and are extrapolating a bit too much

apologies, but maybe next time try to elaborate more on sweeping statements like "syntax doesn't matter", because in current context my assumption for why you would say that is not all that outrageous.

> Syntax does not matter simply because it's an extremely leaky abstraction of the runtime below, is my point.

that would be the reason why syntax does matter, wouldn't it? nobody wants leaky abstractions!

ironically, Clojure is a great example of a hosted language that does not leak much in terms of underlying runtime, as evidenced by the fact that it has been implemented on top of a variety of runtimes with decent control over cross-runtime code reuse.

> acknowledged that the JVM is a great and mature runtime but it's lagging behind on STM / actor capabilities

you're stating this as if it's a fact, but what is your evidence? afaik jvm has a very extensive actor model library (Akka) and clojure does include a solid STM implementation (https://clojure.org/reference/refs).

the reality is that both of these approaches to concurrency are simply not popular enough, so your grievances with JVM for (allegedly!) lacking some important features relevant to them are not in sync with the demand.

> Tearing down a straw man is not impressive and it comes across as you trying to gain visibility by deliberately misrepresenting your discussion opponent's arguments.

don't debate-bro me bro, there are no straw men and no misrepresentations of your messages. if there are invalid assumptions - it's because instead of turning this into a dozen-messages-deep interrogation of what you really meant, i'm taking shortcuts and assuming what i believe is most plausible interpretation.

Re: My thoughts after using Clojure for about a month

#135
post #2

The functional paradigm is a bit uncomfortable at first, but it does make problem solving feel... different. I personally find OOP to be the most intuitive for large scale systems design, but that's just me. Most models do not perform particularly well in Clojure, but OpenAI models fully utilize the power of the language. Subjectively, it kind of seems to match the personality. Data at https://gertlabs.com/rankings?p…

It's fascinating that Clojure has consistently the best performing solutions and yet at the same time such a low success rate. Do you have an idea as to why that is? If I had to guess, two things lowering reliability: A) Balancing parens might be tough on an LLM one-shot. B) LLMs generate tokens sequentially, but s-expressions mean the first forms to be evaluated in a body are usually the last to be written, so the L…

I've found it helps to give the model a lower nesting limit than you might give a human who has access to a paren-balancing editor. If all functions are shallow, there's less opportunity for paren balancing to get out of control, and reasoning about the evaluation flow doesn't have to jump back and forth so much.

This also doesn't hurt the code from a human reader's point of view.

Re: My thoughts after using Clojure for about a month

#136
post #6

With respect, this topic in particular has been beaten to death. I too liked Clojure when I tried it some years ago (agreed on the composition and data structures; both are _great_). But the real value-add is in the runtime, not the syntax. Java has a solid runtime but it's not yet as good as Erlang's, maybe even not up to the standards of Golang -- I am talking concurrency / parallelism here (for memory management I…

> the real value-add is in the runtime, not the syntax. Java has a solid runtime but it's not yet as good as Erlang's, maybe even not up to the standards of Golang won't lie, this is hilarious. you got me from nodding along to being the spitting out food meme guy in a span of couple seconds. JVM runtime is undeniably the most well researched and optimized runtime in history of runtimes, specifically in realm of concu…

LLM bashing aside (although I tend to agree), I agree with midnight_eclair. The claim that Erlang or Go are outright superior to the JVM doesn't really stand up. They're better at some things, and worse than others.

Regarding language syntax, it definitely matters. In the same way the vocabulary we use shapes our thoughts, the expression of a programming language shapes the implementation. Of course, as Clojurists know all too well, it's entirely possible to write Java in any language!

Re: My thoughts after using Clojure for about a month

#137

Earlier quoted context omitted.

If that’s your concern you don’t need to be concerned with any technical quality of any language. Just count job postings by language and learn the one with the highest value.

if there isn't any jobs for it it probably doesn't have the appeal or communicate economic value

The question is appeal to whom. Large employers want you to learn popular languages so that you're a commodity in a liquid market. But that's not a signal of economic value; it's the reverse. It's saying "I'm entirely replaceable."

What you can predict is that those employers for whom clojure (or any other minority language) is either acceptable or preferred are deciding that they don't want commodity, low-margin employees. It's a signal that they prefer not to buy the mass-market offering, and ought to expect to pay a premium.

What that means is that if your only way of finding jobs is to be one of the mass-market crowd, you're unlikely to find a premium-paying employer because that's not where they're looking.

Re: My thoughts after using Clojure for about a month

#139
post #6

With respect, this topic in particular has been beaten to death. I too liked Clojure when I tried it some years ago (agreed on the composition and data structures; both are _great_). But the real value-add is in the runtime, not the syntax. Java has a solid runtime but it's not yet as good as Erlang's, maybe even not up to the standards of Golang -- I am talking concurrency / parallelism here (for memory management I…

The JVM is perfectly capable of Golang-style green threads now. As for Erlang, the creator of Clojure have commented in the past on why he dislikes the Actor model, and I think it is a fair criticism. Sometimes I see people praising Erlang VM as some panacea in which all the VMs should strive to be like. This is overly simplistic in my opinion, and ignores the huge trade-offs that the Erlang VM has.

Re: My thoughts after using Clojure for about a month

#140

I spent a week with Clojure and coming from other functional languages my problem was not Clojure, it was dynamic typing. I got strange bugs in the standard library because I accidentally sent in nested incompatible instances of objects and it was really hard to figure out what was wrong in a quick way. With typesafe languages you are stopped at compile time.

Clojure was explicitly designed to be dynamic. It’s a feature, not a bug. https://clojure.org/about/dynamic Until you get better at not making mistakes that the training wheels of a static type system “protect” you from, lean into the REPL as a means to build up small correct expressions into larger ones.

It’s both.
Post reply on HN