{
  "id": 20255652,
  "title": "Announcing Hegel-clj",
  "url": "https://urgent.news/2026/11/16/announcing-hegel-clj",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-16T04:12:25.000Z",
  "source": {
    "name": "Lobsters",
    "slug": "lobsters",
    "url": "https://aphyr.com/posts/428-announcing-hegel-clj"
  },
  "original_language": "en",
  "account": "In this announcement, the author introduces hegel-clj, a Clojure interface for the Hegel generative testing library. They explain their motivation for creating an alternative testing library, highlighting the frustrations they faced with test.check, a popular Clojure testing tool. The issue was that complex generators in test.check could get stuck during shrinking, leading to unnecessarily large vectors that were difficult to shrink down to simpler cases.\n\nThe author provides an example of using test.check to find a vector containing the value 42, which resulted in an enormous vector with many zeroes. They explain the underlying concept of shrink trees in test.check, where generators return a lazily evaluated tree of values, and the way test.check performs a depth-first search to shrink the tree and find smaller failing cases.\n\nThe author then introduces Hegel as an alternative approach to generative testing. Hegel provides deterministic generators and a rich family of shrinking tactics, aiming to simplify the process of finding minimal failing cases. Hegel's core library handles the complex work of generator creation and shrinking, while simpler wrapper libraries can be built on top of it for various languages.\n\nThe author demonstrates how to use hegel-clj to test a vector of booleans and a map representing a person. They show that Hegel can find minimal failing cases, such as a single draw of the number 1 causing an assertion error in the test. The author emphasizes the purity and composability of Hegel's generators, similar to test.check.\n\nOverall, the announcement highlights the challenges of generative testing with test.check, particularly the issue of generators getting stuck during shrinking. The author presents Hegel as a promising alternative that offers deterministic generators and a streamlined approach to shrinking, potentially making the process of testing and debugging more efficient in Clojure.",
  "summary": null,
  "key_points": [
    "Announces hegel-clj, Clojure interface for Hegel generative testing library",
    "Addresses test.check's shrinking issues with complex generators",
    "Hegel offers deterministic generators and streamlined shrinking process"
  ],
  "editors_take": "By offering deterministic generators and superior shrinking tactics, hegel-clj provides Clojure developers with a more efficient way to isolate minimal failing cases than the existing test.check library.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}