finds.dev← search

// the find

VictorTaelin/Interaction-Calculus

★ 951 · C · updated Nov 2025

A programming language and model of computation that matches the optimal λ-calculus reduction algorithm perfectly.

Interaction Calculus is a minimal term rewriting system that sits between the Lambda Calculus and Interaction Combinators, using affine variables and first-class superpositions/duplications to achieve optimal beta reduction. The C implementation (IC32) packs terms into 32-bit words and runs reductions directly on a heap. It's for people who want to understand HVM's theoretical underpinnings or who are building their own runtime.

The 32-bit term encoding is well thought out — packing sub/tag/val into a single word means no pointer chasing for the common case, and the substitution-via-heap trick (set the sub bit, read it from the variable side) avoids a full traversal on every beta step. The Haskell reference implementation with step debugger is genuinely useful for learning the rules before reading the C. The README is unusually complete: formal grammar, all interaction rules in pseudocode, memory layout, parsing strategy, and worked normalization examples — rare for a research-adjacent repo. The labeled DUP-SUP rule is the key insight that makes the system Turing-complete and capable of cloning, and the README explains exactly why.

The 26-bit val field caps addressable heap at 64M nodes — fine for a reference implementation but a hard wall if you try to run anything serious. There's a Metal GPU backend (ic.metal, ic_metal.mm) that appears to be unfinished and undocumented; it will confuse anyone who finds it. The examples directory has six test files with no explanation of what they demonstrate or what the expected output is, so you're on your own figuring out whether your build is correct. No type system and no tooling beyond a bare Makefile means this is strictly a research artifact — anyone wanting to write real programs in it needs to use HVM instead.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →