Hegel, a universal property-based testing protocol and family of PBT libraries
hegel.dev70 points by PaulHoule 5 hours ago
70 points by PaulHoule 5 hours ago
A bit of an intro/announcement blog post for Hegel ("Hypothesis, Antithesis, synthesis", [0]) was submitted here ~2 weeks ago [1] and got a fair bit of discussion (106 comments).
I didn't expect to see Hegel when opening up HN today! Feel free to ask any questions about it. We released hegel-go earlier this week, and plan to release hegel-cpp sometime next week, so look forward to that :)
How exciting! I wrote my own pbt lib for zig (https://github.com/AntoineBalaine/zlowcheck) and it made me sad I couldn't get it nearly close to hypothesis. Looking forward to see this grow! Any hope for ffi through the c abi?
Is the protocol documented so that other people can build language front-ends?
Yes! I just wrote up documentation for the protocol earlier this week: https://hegel.dev/reference/protocol.
In reality, we hope to provide more guidance than this to people who want to write their own language frontend. This protocol reference doesn't talk about the realities of [hegel-core](https://github.com/hegeldev/hegel-core) and how to invoke it, for example.
We intend to write a "How to write your own Hegel library" how-to guide. You can subscribe to this issue to get notified when we write that: https://github.com/hegeldev/website/issues/3.
If you're eager, pointing your favorite LLM at https://hegel.dev/reference/protocol + https://github.com/hegeldev/hegel-rust and asking it to write you one for your language of choice should be enough to get you started!
PSA: On the surface it looks great - but it's something that spawns a Python server (with uv - I think) and does communicate with it during tests. I don't think it's complexity we need to take on on our unit tests.
A saner approach would be to start with a FFI-friendly language and create bindings. I don't think just being able to use an already written framework in Python is worth the trade-off.
> A saner approach would be to start with a FFI-friendly language and create bindings. I don't think just being able to use an already written framework in Python is worth the trade-off.
For what it's worth the devs say their "current long-term plan is to implement a second Hegel server in Rust" [0], so the current state of affairs is probably a compromise between getting something usable for end users out and something more "sane", as you put it.
[0]: https://antithesis.com/blog/2026/hegel/#what%E2%80%99s-next
Awesome! I've been waiting for hegel-go and can't wait to take it for a spin
I’m studying currently Phenomenology of Geist. No code is so gard to read as it.
Did you start with the Preface, or are you going to read it at the end?
(I strongly recommend the latter.)
Just wait until you get into the Science of Logic
I'm starting with the Science of Logic!
I want to cry...
The first part of his Encyclopedia will help a lot, and might be better to read first before diving into SoL.
Oh god, as someone who studies and admires Hegel, please change the name from Hegel.
Completely agree. It's absolutely awful having software projects squatting on the names of great philosophers and artists. I appreciate that perhaps the author wanted to show their appreciation, but there are plenty of other equally communicative options.
Yo what has been the coolest thing about Hegel's philosophy you learned?
(I can really only do your question a modicum of justice by answering metaphorically.) That Anglo-American analytic philosophy, which has dominated much of 20th century Western philosophy and Western thought, was doomed from the start. It treated ontological Being as fixed, as beings nailed to a wall, lifeless and immobile. Hegelian philosophy, more than anything, is about movement.
Why? It’s perfectly coherent with the group of libraries and what they do.
It isn't. See: https://www.jstor.org/stable/2708045
I’ve read primary text excerpts from Hegel and some secondary sources too, and already knew that he didn’t write in that style, but the general idea that many forces in life develop themselves dialectically (the antithesis sometimes being expressed as alienation) is very similar in concept.
That a myth has developed around the terminology and methodology is persuading, but also there’s nothing wrong with a programming library to call itself Hegel.
Interesting paper regardless thanks for sharing.
On the other hand, I have quite the visceral reaction to the name because of the influence Hegel had on Marx, and subsequent 20th century critical theorists.
Off-topic but only today I was thinking of Hegel-related names for a certain business idea. Was wondering who had registered all the domains, well here's one. It would a completely different domain, and also a derivation of the name, so nothing to worry about there. But if I build something in Rust, I'll remember you :)
In the era of AI codegen, I think property-based testing will and should see greater uptake. Unit tests are too brittle for the grind on it till it works methods of agentic written code.
Now that's how you write a title.