Live data from Hacker News

Clojure 1.12.0 is now available

clojure.org

81–90 of 120 posts

Re: Clojure 1.12.0 is now available

#81
post #77

This is really a massive release with many cool new features My personal favorite is add-libs You can now write single file demos or minimal examples for issues. Really lowers the friction to share small runnable snippets with people You can also actually use it to demo Java libraries as well without all the Java boilerplate. Just poke around in the REPL and paste code into a comment on HN or wherever and anyone can…

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?

Re: Clojure 1.12.0 is now available

#82
post #57
post #42

Earlier quoted context omitted.

> But I hope it doesn't end up like a hairball a few releases down from increase of pace or something. Rich Hickey and the rest of the Clojure Team are very careful designers. I wouldn't worry too much

> Rich Hickey and the rest of the Clojure Team are very careful designers. I wouldn't worry too much I am aware of this, which is why I suppose previous releases haven't included as many features at once as this one. It's this possible change of pace that raised the question in me :)

Add to which, a lot of "new, big features" come in libraries, not the core language itself.

Re: Clojure 1.12.0 is now available

#83
post #57

Earlier quoted context omitted.

> Rich Hickey and the rest of the Clojure Team are very careful designers. I wouldn't worry too much I am aware of this, which is why I suppose previous releases haven't included as many features at once as this one. It's this possible change of pace that raised the question in me :)

Add to which, a lot of "new, big features" come in libraries, not the core language itself.

But my point is specifically about the features mentioned in this very release, which are all in the built-in clojure namespaces. Or did I miss something from the release notes?

In fact, the separate libraries have their own release process and isn't part of this release at all, as things should be. So not sure what you're referring to here exactly?

Re: Clojure 1.12.0 is now available

#84
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?

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 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.

Re: Clojure 1.12.0 is now available

#85
post #47

Earlier quoted context omitted.

Just tested it: You run `clj` to get a Clojure REPL Then you can for instance paste the following into the REPL (add-libs {'thi.ng/geom {:mvn/version "1.0.0-RC4"}}) (use 'thi.ng.geom.viz.core) (use 'thi.ng.geom.svg.core) (->> {:x-axis (linear-axis {:domain [-10 310] :range [50 550] :major 100 :minor 50 :pos 150}) :y-axis (linear-axis {:domain [0 4] :range [50 150] :visible false}) :data [{:values [[0 100] [10 90] [80…

Using (add-lib 'thi.ng/geom) is sufficient here - it uses the newest version by default.

Parent specified a RC version, does it automatically use the latest RC versions as well? AFAIK, it only uses the latest stable version, but I could be wrong, it happened before.

Re: Clojure 1.12.0 is now available

#86
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?

Many tools are like that, unfortunately Common Lisp didn't took off, and we are still catching up, see Python and Machine Learning, instead of using a powerful dynamic language with native compilers.

However that doesn't mean Java REPL is useless.

Re: Clojure 1.12.0 is now available

#88

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?

> Does any of this release help with startup time?

Clojure (and indirectly Java) was never created with "fast startup speed" in mind. This is why things like `add-lib` (that was added in this release) is so useful, because you start your developing session once, and it stays open until you either have to restart your computer or done developing the project.

Then the typical deployment target is either "Push this .jar to a server somehow, start the process and let it run" or "User double-clicks executable, waits for application to be ready".

If you really need fast startup, you can go through something like https://github.com/ionutbalosin/faster-jvm-start-up-techniqu...

Or if you're fine with slightly worse runtime performance, give https://github.com/babashka/babashka a try

Finally, if you're OK with JavaScript you could give ClojureScript a try, has fast startup (as fast as NodeJS I suppose) but yeah, it's JavaScript.

But overall, Clojure/Java isn't optimized for the use-case of "Start process for each request, stop process once processed" so I'm guessing you'll face an uphill battle there.

Re: Clojure 1.12.0 is now available

#89
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…

> In fact, I think it's confusing to call the repls of language like Ruby, Java, JavaScript et al "REPL" at all

Agreed. I always call them “consoles,” since I work largely in JS and that’s what the browser calls it. There’s no way in a console to jump into a module and modify a single function without resetting any state that the module was tracking.

Re: Clojure 1.12.0 is now available

#90

This is really a massive release with many cool new features My personal favorite is add-libs You can now write single file demos or minimal examples for issues. Really lowers the friction to share small runnable snippets with people You can also actually use it to demo Java libraries as well without all the Java boilerplate. Just poke around in the REPL and paste code into a comment on HN or wherever and anyone can…

Does anyone remember Groovy? It has @Grab annotation which does essentially the same as add-libs you described. Very conventient for writing scripts.

Jbang has a similar feature: https://www.jbang.dev/documentation/guide/latest/dependencie...
Post reply on HN