r/Clojure • u/geokon • Jun 27 '26
r/Clojure • u/Savya16 • Jun 26 '26
My journey into Clojure dependency automation
savyasachi.devHave been using Clojure at work for years, but only now started dabbling in its open-source space! This was an obscure learning that I thought was worth sharing, since no else has written about it AFAIK
r/Clojure • u/whamtet • Jun 26 '26
Ever wanted to put Clojure into your sql?
Sqlite is my database of choice and when my schema is in flux I often dump a bunch of pseudo columns into a TEXT column as edn. This means that regular SQL does not work.
I recently came across the very nice sqlit TUI app and realized that creating an extension to Sqlite syntax could make it easy to update my db when necessary
https://github.com/whamtet/sqlit
The fork provides an extension of Sqlite syntax
updateclj company set details = (assoc *input* :hi :there) where company_id > 9 use primary key company_id*input* is the existing edn value of the column as seen by babashka
Is anybody else using this approach?
r/Clojure • u/simple-easy • Jun 26 '26
Thoughts on a Clojure facade over LibGDX
While working on my game, I ended up creating a thin Clojure facade over LibGDX where each Java class is represented by exactly one Clojure namespace.
Current code: https://github.com/damn/moon/tree/da56223d5f0b0c3d51ae037c4cec7c8aed1a8f64/src/com/badlogic/gdx
The idea is simple:
* each LibGDX class is imported in exactly one namespace
* application code never imports LibGDX classes directly
* application code calls Clojure functions instead
* the facade only wraps the constructors and methods that I actually use
For example, if a LibGDX class has 100 methods but I only need 15, only those 15 are exposed.
The motivation isn't to replace LibGDX or provide a complete wrapper. It's to reduce the Java interop surface, give my project a stable Clojure API, and have a single place where each Java class is referenced.
I'm considering extracting this into its own open-source repository, even though it's primarily written for my own projects.
A few questions I'd be interested in hearing opinions on:
* Does this seem like a reasonable use of the facade pattern in Clojure?
* Is there a precedent for wrapping Java libraries this selectively?
* Would you keep the namespaces as `com.badlogic.gdx.*` to preserve the 1:1 mapping with the Java classes, or would you prefer a Clojure-specific root namespace such as `clojure.gdx.*`?
I'd appreciate any thoughts, especially from people who have built Clojure APIs over existing Java libraries.
I am sharing this because I have struggled now for a few years with this topic and seem to finally found a simple solution.
r/Clojure • u/Borkdude • Jun 23 '26
Replicant now runs under squint!
See https://github.com/squint-cljs/squint/tree/main/examples/replicant for an example project.
Optimized output is around 18kb gzipped right now. Thanks Christian Johansen for accepting minor changes to accommodate using replicant with squint!
r/Clojure • u/fadrian314159 • Jun 23 '26
FOL (Functional Object Lisp) 0.1.1 is released
reddit.comr/Clojure • u/Clojure-Conj • Jun 22 '26
Workshop Day Pass is live. Clojure/Conj2026, Sep 30.
One pass from $42 gets you a morning and an afternoon session of your choice. Babashka, Datomic, Calva, AI tooling, and more, all on Wednesday, September 30, one day before the main conference in Charlotte, NC.
Lower-priced tiers will go fast.
Full program here: 2026.clojure-conj.org/workshops
r/Clojure • u/asterix276 • Jun 21 '26
I've been using PyTorch from Clojure for 3 years — finally cleaned it up into a library
Been doing ML work in Clojure for a few years using the excellent libpython-clj to bridge into PyTorch. Kept rewriting the same boilerplate across projects so I finally consolidated it into a clj-pytorch library.
The main thing that makes it more than just a thin wrapper is a defmodule macro for defining real nn.Module subclasses:
(nn/defmodule MLP [in-features hidden out-features]
:layers {:fc1 (nn/linear in-features hidden)
:act (nn/relu)
:fc2 (nn/linear hidden out-features)}
:forward (fn [self x]
(-> x
((nn/get-layer self :fc1))
((nn/get-layer self :act))
((nn/get-layer self :fc2)))))
(def model (MLP 128 256 10))
(model x) ;; modules implement IFnAlso includes training loops, dataloaders, optimizer helpers, and some inference utilities. If you're doing ML in with Pytorch and Clojure, maybe it saves you some time. There was a very good post some time ago on clojure civitas explaining pytorch and how to use it within clojure if you need a refresher.
It's not published to Clojars yet — if you want to try it, just add the GitHub sha to your deps.edn:▎
clj-pytorch/clj-pytorch {:git/url "https://github.com/rthadani/clj-pytorch"
:git/sha "642504807aa96bb3e72963b9170836b32324f95a"}github-link: https://github.com/rthadani/clj-pytorch
r/Clojure • u/netb258 • Jun 21 '26
Huffman tree compressor and decompressor written in Clojure
github.comr/Clojure • u/Borkdude • Jun 19 '26
Babashka CLI: automatic help and shell completions
blog.michielborkent.nlr/Clojure • u/dustingetz • Jun 18 '26
ClojureWasm: A JVM-free Clojure runtime in Zig, with a WebAssembly FFI.
github.comr/Clojure • u/Clojure-Conj • Jun 18 '26
Clojure/Conj 2026: Group hotel rate + Workshop Day heads up
For those planning to attend, there's a room block at the DoubleTree by Hilton Charlotte City Center (230 N College St, Charlotte). Rate is $206.30/night and includes a hot breakfast buffet. The promotional pricing closes on August 31, after which rooms go back to standard rates.
Book here: www.hilton.com/en/attend-my-event/nubankclojureconj2026/
The link defaults to Sep 29 – Oct 3. If you need different dates, hit "Edit Stay" at the top of the booking page.
For reservation help: BernsteinT@gfhotels.com
Workshop Day: Wednesday Sep 30
More details coming soon, but there will be a Day Pass starting at $42, covering one morning + one afternoon session of your choice. Worth factoring in when you book your room.
Sessions planned:
- AI Tools & Practices Showcase - Eric Dallo
- Babashka: Fast Native Clojure Scripting - Michiel Borkent & Rahul De
- Fast, Lean, Native Clojure - Adrian Smith
- Calva Backseat Driver - Peter Stromberg
- Advanced Datomic - João Nascimento Mello
- Clojure Camp Pairing/Mob Session/Hackathon - Rafal Dittwald & Jordan Miller
The workshop day is Wednesday the 30th, one day before the main conference, so book your hotel nights with that in mind.
And remember that early bird pricing won't last much longer. Conference tickets move to Regular once the full program drops.
r/Clojure • u/Jeaye • Jun 17 '26
Help me get jank into your hands by filling in this survey
forms.gler/Clojure • u/bozhidarb • Jun 16 '26
CIDER 1.22 is out!
I'm happy to report that CIDER 1.22 is finally out!
I meant to release this a couple of months ago, but there was always something extra I wanted to fix or include and that kept pushing the release date. Today I finally told myself that enough is enough. (plus, I liked 16.06.2026 as the release date :D )
Lots of (mostly small) improvements in this release and a TON of fixes. Check out the release notes for all the details. For me the highlights are:
- Fixed severe editor lag in Clojure buffers with no REPL connected (#3933) — friendly-session matching is now a cheap project-dir check instead of a per-redisplay classpath scan.
- Now requires cider-nrepl 0.59+ / nREPL 1.7 — CIDER uses namespaced nREPL ops (
cider/info, etc.); injected middleware was bumped accordingly. - Pluggable jack-in tools (#3884) — register your own project tools via
cider-register-jack-in-tool. - Default session (#3865) —
cider-set-default-sessionpins one session for all dispatch, bypassing sesman's project inference. - nREPL transport decoupled from the UI (#3892) plus a new keyword-arg
nrepl-make-eval-handlerAPI (#3890) — nicer for extension authors (old forms kept as shims). - Much sturdier remote/TRAMP jack-in (#3885, #3886, #3887) — remote probes via
process-file, upfront command verification, no-shell ssh tunnel, and correctlocalhost/wildcard bind-address handling. - Long-session stability (#3894, #3896, #3897, #3898) — plugged request-id leaks, bounded handler tables, resilient response queue, and ssh-tunnel teardown on abnormal disconnect.
- Project detection no longer depends on clojure-mode (#3922, #3924) — works in any buffer, e.g.
M-x cider-connectfrom Dired. - Test spinner in the mode line (#3645) while tests run.
- REPL history: crash fix +
cider-repl-history-doctor(#3921) to clean up malformed entries. let-goruntime support (#3926).
Big thanks to Clojurists Together, and everyone who has contributed to this release or is supporting my OSS Clojure work. You rock!
r/Clojure • u/eeemax • Jun 16 '26
Deft 0.2.0 released!
https://github.com/sstraust/deft
This update adds support for namespaced keys in type and protocol definitions. i.e., you can now do:
(defp Positioned :required-keys [::pos - ::Point])and
(deft Circle [::location/position radius])
(>Circle ::location/position [1 2] :radius 12)this is useful because you can now write implementations that depend on the presence of these keys, i.e.:
(defp Gremlin :extends [location/Positioned])
(defmethod game-object/get-hitbox ::Gremlin [self]
(js/Matter.Bodies.rectangle
(get-in self [::location/pos ::location/x])
(get-in self [::location/pos ::location/y])
15 15))r/Clojure • u/ertucetin • Jun 14 '26
Clojure is almost as fast as C (with some help)
ertu.devr/Clojure • u/liwp • Jun 14 '26
listora/again v2.0.0 has shipped - a simple retry library
I've just released v2.0.0 of listora/again after a very long hiatus 😅 — a tiny library for retrying flaky operations with composable strategies. GitHub
What's new in v2.0.0…
An addition to the existing retry functionality:
max-wall-clock-durationlets you bound retries by real elapsed wall-clock time, not just the summed delays.
Circuit breakers (the big-ticket item — commonly used alongside retries, and asked for in the past):
with-circuit-breakercomplements the existingwith-retries. They compose by nesting, so you decide whether the breaker counts every attempt or only the final failure.- Pluggable trip policies via a
BreakerPolicyprotocol allows for custom policies on top of theconsecutive-failurepolicy included in the library. - An
on-eventhook for state transitions, successes, and short-circuits (observability, etc.).
General house-keeping:
- Moved from Leiningen to the Clojure CLI.
- Fixed
InterruptedExceptionhandling: it now stops retrying immediately and restores the interrupt flag before rethrowing.
Heads up if you're upgrading: this is a major bump because with-retries ::status gains an :interrupted value. If you dispatch exhaustively on ::status without a :default arm, add an :interrupted case.
A basic usage example:
(def breaker (circuit-breaker (consecutive-failures 5)))
(with-retries [100 200 400] ; retry with backoff
(with-circuit-breaker breaker ; ...but stop hammering once it trips
(call-the-flaky-thing)))Clojars: listora/again {:mvn/version "2.0.0"}. Still Clojure 1.8+ compatible.
Feedback welcome — especially on the circuit-breaker API. Probably best to open issues on GitHub so they don't get lot in Reddit comments.