Everything here is open source. These are Constructive Programming’s open-source contributions: libraries that put the methodology into production, and the research artefacts that justify it in the first place. Each one is free to use, independently versioned, and developed in public at github.com/Constructive-Programming.

eo

Existential optics for Scala 3, built on cats.

One Optic[S, T, A, B, F] trait unifies Lens, Prism, Optional, Traversal, Grate, AlgLens and Kaleidoscope. Discipline-checked laws, scoverage-driven quality, JMH benchmarks against Monocle, and circe + avro integrations with an observable-by-default Ior failure surface.

  • Stack Scala 3 + cats
  • Status Active — v0.1.0 (2026)

surreals

Conway's surreal numbers as a cats-algebra Field.

A small Scala 3 exploration of surreal numbers, encoded with droste recursion schemes (Fix[SurrealStructure]) and memoised with scaffeine. Discipline laws under test.

  • Stack Scala 3 + cats algebra + droste
  • Status Experimental

rivoli

A 744B mixture-of-experts decode engine on one 128 GB APU.

Rust + tokio streaming inference for GLM-5.2 (744B int4, 78 layers, 256 experts) on a single AMD Strix Halo APU, with hand-written HIP/ROCm kernels. Every milestone is gated on a measured number, not a vibe: 1.31 tok/s sustained over 512 tokens at 90.9% expert-cache hit, 0% run-to-run variance. The design law is to win by removing bottlenecks — the decode proved dispatch-bound, not bandwidth-bound.

  • Stack Rust + tokio + HIP/ROCm (gfx1151)
  • Status Active — ≥1 tok/s goal met (2026)

cardinality

Counting type inhabitants — keep your types small.

A type-cardinality calculator for Scala ADTs (|T| over +, *, ^) that reads compiled TASTy via tasty-query. The sbt-cardinality plugin puts a number on every definition inside your build, so a CI diff shows whether each change shrank the state space or grew it.

  • Stack Scala + sbt + tasty-query
  • Status Active — sbt-cardinality 0.0.6 (2026)

Fixed

A functional language for multi-million-line codebases.

Whole-system guarantees without compromising speed, designed for development alongside coding agents. Programs describe the capabilities their methods need (cap); the compiler picks data structures and machine layout, using algebraic effects, Perceus reference counting and functional-but-in-place updates. Properties (prop) and refinement types are first-class.

  • Stack Language design
  • Status Phase 0 — design

eo is the flagship: an existential-optics library for Scala 3 with discipline-checked laws, JMH benchmarks against Monocle, and circe + avro integrations. It is what we reach for when a client needs the same lens to work over an in-memory record, a JSON byte buffer, and an Avro wire payload — and when they need that lens to keep its laws under change.

cardinality is the research artefact behind the Total Program Cardinality thesis — the metric that counts the inhabitants of an ADT and informs the narrowing work we do on client codebases. Now under active development, it keeps surprising us: it puts an actual number behind YAGNI, it found a flatTraverse we had missed, our ScalaCheck suites run much faster, and it roots out primitive obsession and string-based programming. surreals is an algebraic exploration of Conway’s surreal numbers using cats algebra and droste recursion schemes; it is the proving ground for the recursion-scheme techniques that show up later in production pipelines.

rivoli is a research artefact: a 744B mixture-of-experts decode engine running on a single 128 GB APU, where every milestone is gated on a measured number.

Fixed is the longest-running output: a new functional language for multi-million-line codebases, designed around the same constructive principles and for development alongside coding agents. Phase 0 — design — is in flight; the implementation will follow.

Working with us

If your team is putting optics, effects, or typed-FP into production, or moving toward agent-native development with constructive guardrails, book a 30-minute scoping call or email consulting@constructive.dev. The libraries above are the ground we stand on; the consulting offer is how we bring it to your codebase.