Live data from Hacker News

Clojure 1.12.0 is now available

clojure.org

101–110 of 120 posts

Re: Clojure 1.12.0 is now available

#101
post #100

Earlier quoted context omitted.

I guess that the GP didn't talk about the language itself, but the users. For me it looks like Scala and Clojure had lost many of its users because of Kotlin and newer Java versions. Generally I see a decline in the usage of functional languages since their heyday in the 2010s. I guess that's because imperative languages either get "functional features" or are "functional enough" - new ones like Rust or Swift.

Clojure is more lindy than Scala. If someone tells you their project is written in Scala, Golang, Groovy, Coffeescript it almost dates the project doesn't it? Not so much in Clojure. It's niche but I can bet it's still going to be there 10 years from now, going at least as strongly as now.

I'm not so sure. I wish it were as you say but there are currently 5600 job postings mentioning Scala on LinkedIn in the USA, vs 82 that mention Clojure. 82! In the entire USA. So even in its state of relative decline, Scala might be about 70 times as used in industry as Clojure is.

Even as I flip through the 7 postings mentioning Clojure in all of Canada, only 4 of them seem to indicate the job itself makes use of the language (rather than mentioning it just as an example language as in "* Fluency in one or more languages like Ruby, Clojure, Scala, ReactJS, JavaScript, TypeScript, Java, Python - Deep understanding of internet protocols and standards.")

Re: Clojure 1.12.0 is now available

#102
post #84

Earlier quoted context omitted.

Java's REPL is like a kick in the nuts compared to using one in Common Lisp. How does Clojure's REPL feel like in comparison?

Haven't used neither Java's repl nor Common Lisp (just read about both of them) but at a glance Clojure's repl is much closer to CLs repl than Java's. In fact, I think it's confusing to call the repls of language like Ruby, Java, JavaScript et al "REPL" at all, compared to what lisps offer, as the experience is so different. They're more like "Code evaluators" than anything else. Typically when using repls outside of…

> Typically when using repls outside of lisps, you'd type your code into the actual repl window, while in lisp-land you typically connect your editor to the repl and program like usual, selecting stuff to evaluate and so on.

I think that's neither typical in the history of Lisp nor in other languages. For example in Mathematica and Jupyter one interacts via a Notebook interface. Smalltalk interacts via an integrated IDE. Many editors connect via LSP to language servers.

In Lisp the idea of an editor connecting to a Lisp is a bit of a historic accident. After the AI winter the Lisp development environments were no longer used.

A typical way to start Lisp from an external editor was via the editor starting a subprocess (the "inferior Lisp") and talking to it. GNU Emacs did that with IDEs for Lisp, like ILISP.

The next generation used GNU Emacs as its external development environment (instead of developing a new one in Lisp) via a network interface. SLIME was the most important one, with SWANK being the component loaded into the external Lisp, which provided a server interface.

Unfortunately the SLIME REPL itself (its read eval print loop) is not great (in general SLIME is okay to use) and other languages sadly copied the SLIME model, failing to copy various other important REPL features of Lisp. For example Clojure lacked the error handling of Lisp REPLs, which typically provide features like break loops, where one can inspect and repair errors. SLIME goes directly into a backtrace window. Thus people copied it, without knowing that there is a tradition of completely different REPL interaction. GNU Emacs is bad at multitasking, thus one REPL buffer could block the editor for a while -> multiple REPL windows were not that useful. Another way of working got lost...

Re: Clojure 1.12.0 is now available

#103

We had to dump a Clojure code base for Golang because it was too slow for lambda usage. Does any of this release help with startup time?

No changes from clojure.

But from java world: With GraalVM/NativeImage, it is possible to compile (clojure or java) .jar files into native binaries.

Those binaries have a way faster to startup (less than 10ms for non-trivial apps)

Also, lambda engines (like AWS lambda) continuously improve their "java" target, with preloading and other things,which also benefits clojure.

TLDR; clojure startup isn't a thing that needs to be fixed. JVM startup used to be slow. And this is being resolved in the JVM itself.

Note: clojure DEV startup time is still slow-ish. Clojure DEV is usually not AOT compiled and etc. the new "sync deps" feature helps to solve this DEV problem

Re: Clojure 1.12.0 is now available

#104
post #102
post #84

Earlier quoted context omitted.

Haven't used neither Java's repl nor Common Lisp (just read about both of them) but at a glance Clojure's repl is much closer to CLs repl than Java's. In fact, I think it's confusing to call the repls of language like Ruby, Java, JavaScript et al "REPL" at all, compared to what lisps offer, as the experience is so different. They're more like "Code evaluators" than anything else. Typically when using repls outside of…

> Typically when using repls outside of lisps, you'd type your code into the actual repl window, while in lisp-land you typically connect your editor to the repl and program like usual, selecting stuff to evaluate and so on. I think that's neither typical in the history of Lisp nor in other languages. For example in Mathematica and Jupyter one interacts via a Notebook interface. Smalltalk interacts via an integrated…

> Unfortunately the SLIME REPL itself (its read eval print loop) is not great

> Another way of working got lost...

You singled out SLIME, but you've mentioned before that you use LispWorks - do you think it's also "not great"? Just curious ...

Re: Clojure 1.12.0 is now available

#105
post #104
post #102

Earlier quoted context omitted.

> Typically when using repls outside of lisps, you'd type your code into the actual repl window, while in lisp-land you typically connect your editor to the repl and program like usual, selecting stuff to evaluate and so on. I think that's neither typical in the history of Lisp nor in other languages. For example in Mathematica and Jupyter one interacts via a Notebook interface. Smalltalk interacts via an integrated…

> Unfortunately the SLIME REPL itself (its read eval print loop) is not great > Another way of working got lost... You singled out SLIME, but you've mentioned before that you use LispWorks - do you think it's also "not great"? Just curious ...

> You singled out SLIME

Especially the REPL of SLIME / GNU Emacs.

LispWorks provides a better REPL experience.

Re: Clojure 1.12.0 is now available

#106
post #105
post #104

Earlier quoted context omitted.

> Unfortunately the SLIME REPL itself (its read eval print loop) is not great > Another way of working got lost... You singled out SLIME, but you've mentioned before that you use LispWorks - do you think it's also "not great"? Just curious ...

> You singled out SLIME Especially the REPL of SLIME / GNU Emacs. LispWorks provides a better REPL experience.

Do you use LW's built-in editor, or emacs?

Re: Clojure 1.12.0 is now available

#107
post #71

Dumb question: what is clojure usually used for ? (in my view, Java is for "enterprise" stuff, python for AI/data sciences, C for performance, etc.)

Exoscale, a cloud provider is also using clojure heavily.

Pretty much anywhere where the jvm is a good fit, but given it’s a hosted language you can also use it to emit dart code or js and find it running on shoulders of others (like jank, llvm based dialect, or babashka)

Re: Clojure 1.12.0 is now available

#108
post #106
post #105

Earlier quoted context omitted.

> You singled out SLIME Especially the REPL of SLIME / GNU Emacs. LispWorks provides a better REPL experience.

Do you use LW's built-in editor, or emacs?

The built-in editor. With LispWorks I don't use GNU Emacs. I have GNU Emacs configured, so that I could use it, but I don't... I use SLIME with SBCL, but mostly because of SBCL, which is a great implementation.

I'm faster and more in the flow with the LispWorks IDE.

Re: Clojure 1.12.0 is now available

#109

This is a wonderful language I've only just started paying attention to, watching the talks from Rich on YouTube have ruined things I loved (like Either types.) I'm struggling with how to introduce it into my company without recommending my colleagues follow my path of working through 3 books and then watching most of the conj talks from the last 12 years on 1.75x speed, while building a personal project and re-imple…

I've been at an organization that went from Java to Clojure about 12 years ago. I think there were two main things that allowed us to make the move: * No one was in love with Java. It was fine but we were doing the whole spring style super verbose Java and it felt like a lot of ceremony to get anything done. There had been an experiment with Scala previously but that hadn't taken off. * We had a service-oriented arch…

> Bought loads of books and left them lying around

At strategic locations? Such as the bathroom?

Re: Clojure 1.12.0 is now available

#110
post #77

Earlier quoted context omitted.

Note that Java has a REPL now and scripting support, although something like add-libs is still missing from available meta commands.

Java's REPL is like a kick in the nuts compared to using one in Common Lisp. How does Clojure's REPL feel like in comparison?

> Java's REPL is like a kick in the nuts compared to using one in Common Lisp.

An IDE connected to a running Java process via JDPA/JDI (Java debug interface) is probably a better comparison.

Sure, Common Lisp will allow you to load more substantial code changes into the running process, but using JDI you can "break on specific/ all exceptions" which will allow you to inspect code before the stack is unwound, you can drop frames and re-run stuff possibly after changing values.

What's funny is that I started noticing and using these possibilities at my Java job while learning Common Lisp. Before learning about Common Lisp I was almost exclusively an edit/compile/run guy, now I often take the shorter route of edit/CTRL-SHIFT-F9.

Post reply on HN