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.
Clojure 1.12.0 is now available
81–90 of 120 posts
Re: Clojure 1.12.0 is now available
#82Earlier 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 :)
Re: Clojure 1.12.0 is now available
#83Earlier 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.
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
#84Earlier 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?
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
#85Earlier 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.
Re: Clojure 1.12.0 is now available
#86Earlier 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?
However that doesn't mean Java REPL is useless.
Re: Clojure 1.12.0 is now available
#87Re: Clojure 1.12.0 is now available
#88We 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?
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
#89Earlier 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…
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
#90This 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.