clojure

Kyle Kingsbury 2026-05-05T18:11:50.124879Z

A little thing I've been working on the last few weeks: Clojure bindings for Hegel, a new property-based testing library from the folks who wrote the excellent Hypothesis. Still janky, but it does a significantly better job of shrinking than test.check: https://github.com/aphyr/hegel-clj

💡 1
👀 11
❤️ 3
🎉 8
Kyle Kingsbury 2026-05-08T20:53:26.127799Z

I don't think so, the project was just announced at a conference two weeks ago and I started talking to the authors there

Max 2026-05-06T20:57:09.952799Z

Is there anything published about the planned Rust rewrite of the server?

2026-05-05T18:15:46.241069Z

this is super cool. could the core of hegel be ported to clojure/java? or is it built on something specific to the python ecosystem?

Kyle Kingsbury 2026-05-05T18:16:53.946779Z

In theory sure, but the idea is that writing good generators and shrinking heuristics is really hard, and we should do that work once and re-use it across different languages.

👍 3
Kyle Kingsbury 2026-05-05T18:17:31.310229Z

Basically "the Hypothesis folks put decades of work into this; what if you didn't have to reimplement it all yourself"

Kyle Kingsbury 2026-05-05T18:17:54.968179Z

It's definitely fragile though, and the protocol is IMO kind of a mess at the moment.

Alex Miller (Clojure team) 2026-05-05T18:19:08.332289Z

Sounds like it would be a cool Conj talk! https://2026.clojure-conj.org/cfp 😉

Kyle Kingsbury 2026-05-05T18:20:10.092469Z

Gosh I've wanted to come back to Conj for a while! It's right before a different conference though--probably not this year

❤️ 1
Alex Miller (Clojure team) 2026-05-05T18:21:10.910389Z

Then keep it in mind for next ….

Kyle Kingsbury 2026-05-05T18:22:36.876979Z

Yeah!

Kyle Kingsbury 2026-05-05T18:23:32.948949Z

If this tickles anyone's fancy, I'd appreciate a few folks trying this out and offering feedback/fixups. I think (as a long-time test.check user) it might actually be better for some of my projects.

Kyle Kingsbury 2026-05-05T18:26:53.114939Z

I know the Hegel folks are planning to rewrite this in Rust, BTW, so I expect a lot of the python packaging/perf issues will be resolved later.

😮 1
2026-05-05T18:31:30.394089Z

This is awesome.

❤️ 1
2026-05-05T18:48:58.840119Z

the readme mentions test.check integration, and I see some tests comparing test.check shrinking, but I don't see test.check mentioned in the code side

Kyle Kingsbury 2026-05-05T18:49:25.572509Z

Ah, pardon, that should be clojure.test.

2026-05-05T18:50:09.014919Z

was hoping to see how that was done (I've tried some similar in the past and failed)

Kyle Kingsbury 2026-05-05T18:50:13.465909Z

I'm not sure it'd be useful in the context of test.check, but probably would be useful in other test runners like midje.