r/Clojure • u/Soft_Reality6818 • Oct 19 '26
Clorch 0.4.0
Clorch 0.4.0 is out!
r/Clojure • u/sharificles • Oct 17 '26
I'm learning clojure for the first time, I don't have very much experience with lisp-like languages. I worked through the tutorials on clojure's official site and now I'm currently on clojure for the brave and true chapter 3, everything was going 'fine' until I hit the section on matching parts and "symmetrize-body-parts" which took me a whole two DAYS to understand on its own. It's only now that I can kind of code those functions without looking at it.
At this pace I'm never going to finish the book, is it supposed to take this long just to understand what one function is doing?
Edit: thank you for the positive messages everyone, seems like it's not just me. Currently on chapter 4 now!
r/Clojure • u/mac • Oct 16 '26
r/Clojure • u/k7d • Oct 15 '26
https://github.com/WhimsicalCode/clojurific
r/Clojure • u/andersmurphy • Oct 12 '26
r/Clojure • u/philip_schwarz • Oct 12 '26
r/Clojure • u/ertucetin • Oct 12 '26
r/Clojure • u/SimonGray • Oct 12 '26
This is just a way to get completely usable full-text search with operators and fuzzy matching in a couple of lines of Clojure(Script)
I was previously using Datalevin for this feature (which is an amazing database, highly recommend it), but while I love modelling things as triples, the triplestore/Datomic-like aspect didn't really fit my use case here, so I made this instead.
r/Clojure • u/didibus • Oct 11 '26
A MacOS native app that locks your computer during "sleeping" blocks to force you to go to sleep.
And yes, I've been sleeping much better ever since!
r/Clojure • u/alexdmiller • Oct 09 '26
https://clojure.org/news/2026/10/09/clojure-1-13-alpha9
:defaults directive - use cases better handled by others nowinto and update-valsmeta via RTr/Clojure • u/seancorfield • Oct 07 '26
Just before Conj, the Clojure team released an early version of a new REPL they're developing for the Clojure CLI. It's very configurable and feature-rich. I took it for a spin, customized it, and found I could replace the custom REPL startup project I'd been maintaining for myself for the past five and a half years!
I wrote up my experience and provided a walkthrough of my customizations:
r/Clojure • u/andersmurphy • Oct 06 '26
r/Clojure • u/yogthos • Oct 04 '26
r/Clojure • u/ZlunaZelena • Oct 03 '26
What do you think about it? Personally, I didn't have a great feeling about it. Maybe because I've had similar discussions several times already. Maybe because I was humbled a few times when I let AI rewrite stuff I used to do manually. Maybe because AI allows me to do things I couldn't do otherwise. And even though the risks of all technologies are clear to me, whether it's AI, an iPad, the internet, or weapons, I can also talk about the reasons why something brings us value. And that's what I missed in the talk. Am I being too critical and the positives just don't need to be said?
r/Clojure • u/yogthos • Oct 01 '26
r/Clojure • u/AutoModerator • Sep 30 '26
Please include any restrictions (remote/on-site, geographical, workpermit, citizenship) that may apply.
r/Clojure • u/alexdmiller • Sep 30 '26
Selectors
A developer may need to apply the same key-selection logic embedded in a map destructuring form (as directives, :keys!/:syms!/:strs!/etc., nesting, etc.) against multiple maps, or want to hand that selection logic to another part of the program. Currently that logic is oriented around binding in destructuring and not for programmatic use.
This release adds a new selector macro that takes a destructuring form and returns a function that can be applied to maps:
(selector [m])
Builds a selecting-fn from m, a map destructuring form that must
include one or more of the :select, :all, :missing, and :excess
directives. The return function takes a collection, destructures it
per m, and returns a map of the result(s).
If m has exactly one directive, the result is the value that
directive would yield. If m has more than one directive, then it
returns a map of directives to values.
As in destructuring, :missing controls whether missing required keys
throw or are collected.
While a map destructuring form may and sometimes must include
bindings, selector doesn't produce bindings, thus ignoring the
associated directive names.
Throws an exception if the argument is not a map.Transient map performance
This release contains many performance improvements around the use of maps, particularly transient maps, and functions like into, merge, and merge-with.
Transient array maps now grow larger before transitioning to transient hash maps (similar to recent persistent array map changes), and can be loaded significantly faster. The increased use of persistent and transient array maps will also make many more call sites inside the Clojure runtime monomorphic, encouraging greater JVM inlining. For more info see CLJ-2980.
Improvements and bug fixes
r/Clojure • u/gtrak • Sep 30 '26
I've been programming clojure by hand since 2010, but these days I do a lot of brownfield work with agentic/LLM help in clojure and other languages. I prefer to use the models I can run at home to avoid high token costs today and mitigate a future rugpull. For things I intend to ship to production, I usually generate a bunch of code upfront, then carefully review and rework it, and that pattern has been effective for me.
Qwen 3.8 27b is amazing for what it is, excellent at thorough analysis, and not too clever to overcomplicate outputs, but it can still waste a ton of time on failed clojure edits and paren-counting. Even Claude Opus struggles with this, although much less. LLMs don't 'think' in trees, they think in token streams.
I had been using a wrapper over parinfer-rust (clojure-mcp-lite also just shells out to this), which got me 80% there, but it's flawed in a few specific ways:
After a working session like this, I had Qwen suggest what kind of tool might prevent all the problems we hit, then I handed that spec over to GLM 5.3 flash and iterated with it, eventually having the session drive a local qwen subagent, trying to trip it up with adversarial examples. It is similar to what's proposed here, but I never mentioned the article, and I wasn't prescriptive about how to do it: https://lispmeister.github.io/deeprecursion/posts/2026-02-13-sexp-native-editing.html
The tool is at https://github.com/gtrak/cljform as a rust CLI and pi extension wrapper, and it's better than what I had before on the next unattended agentic run. It uses tree-sitter for parsing and blake3 for form hashes. Posting it here in case it's useful to someone else or if someone has a better way.

r/Clojure • u/andersmurphy • Sep 29 '26
r/Clojure • u/regular_hammock • Sep 29 '26
Sorry for the long post. The TL;DR is: why doesn’t there seem to be a macro for composing comparators into a lexicographic comparator?
Long-winded version follows:
I wrote a macro that solves a real problem for me, but it seems so trivial that I've got a feeling I must be missing something (either this has already been solved in the standard library, or my solution doesn’t work).
I want to sort a list of maps by :date, with :label as a tie-breaker, and :amount as a second-level tie breaker.
As per the clojure comparators guide, if compare already sorted in the order I want for dates, labels and amounts, I could just sort-by (juxt :date :label :amount).
However, while compare works fine for dates, I want to use a localised Collator for the labels, and a comparator from the money library for the monetary amounts.
So, I have to roll my own multi-field comparator
(defn by-date-label-amount [x y]
(let [c (compare (:date y) (:date x))]
(if (not= c 0)
c
(let [c (.compare string-comparator (:label x) (:label y))]
(if (not= c 0)
c
(let [c (money/compare (:amount x) (:amount y))]
c))))))I find this clunky and repetitive, so I wrote the macro I mentioned in the beginning of this post
(defmacro lexicographic-compare [& comparisons]
(reduce
(fn [else-branch c]
`(let [c# ~c]
(if (not= c# 0)
c#
~else-branch)))
(reverse comparisons)))and now I can use it like this
(defn by-date-label-amount [x y]
(lexicographical-compare
(compare (:date y) (:date x))
(.compare string-comparator (:label x) (:label y))
(money/compare (:amount x) (:amount y))))I don’t know that my macro can pull its own weight if used a single time, but to me it looks like something that would make sense in the standard library one of the utility libraries (encore, medley, clojure+...), but I wasn’t able to find it (or an equivalent anywhere), which leads to the suspicion that I must be missing something.