disp is under heavy development and much of the codebase is AI-written — explore this website at your peril :)

disp

abbr.

disp is an aspiring general-purpose programming language with and , and a based on that models hardware as imperfect interaction-net reduction. Based on Barry Jay's tree calculus.

Read the Docs
$ git clone github.com/libdither/disp && npm i && npm test
starting engine… Playground

Why disp?

The goal of disp is a language where you write only the specification and the implementation is derived from it. A specification is a type, and in disp a type is a predicate you can run, so the type checker is an ordinary function from programs to a yes or a no. Multiply that verdict by a cost score from a model of the hardware, and "find the best program" becomes a search with a fitness function. Because the checker, the cost model, and the search are all disp programs, the search can be aimed at itself: an optimizer that improves its own optimizer, and stays readable while it does.

Everything else about disp exists to make that loop close: the tree calculus underneath (programs are data, with no quote/eval border), types as predicates, a trusted kernel small enough to audit, and the plan for user-definable syntax. A survey of the neighbouring languages reduces the goal to five requirements and scores each of them on the same scale, disp included.

  1. G1

    Substrate

    Programs are data, and the type checker is written in the language as a function that returns a verdict; quotation is fine

    programs as data — metchecker in the language — metchecker as a function — met 100% native
  2. G2

    Specification

    A spec can say what matters: types that mention values (dependent types or stronger), proofs, and an equality for specs like "behaves like f"

    dependent types — metfirst-class proofs — halfway (no library)equality theory — halfway (a few instances) 72% claims, library
  3. G3

    Trust

    A search that maximizes the checker's verdict will find and exploit any bug in it, so the code that verdict rests on is kept small and every clever layer hands it evidence to re-check

    auditable core — halfway (two checkers mid-move)evidence objects — halfway (certificates in tests only)independent re-checking — halfway (one core) 50% two checkers
  4. G4

    Execution

    The programs found run fast, by any route; the checker can reason about the target through axioms or a model; and a primitive hands work to an external faster language and returns outputs plus time and memory

    fast programs — not mettarget in the logic — not methandoff primitive — halfway (cost report) 15% interpreted
  5. G5

    Search

    From spec to implementation automatically: a search over candidate programs scored by the checker times measured cost, which writes its own score functions to practice on, and is eventually aimed at its own code

    spec → implementation — halfway (basic search)checker × cost — halfway (checker only)self-play — halfway (counterexamples kept)self-application — not met 42% cegis

The figure on each row is where disp stands today (as of commit a5e051f49b1b), one dot per clause of the requirement: filled = met, half-filled = halfway, empty = not met, dashed = still open. The percent is their weighted mean, the word is how it's reached, and hovering a dot names its clause; hovering the row shows what disp's design could reach in theory. Text and scores come from _AXES.md.

33 neighbouring projects are scored on the same five axes. None of them combines native reflection with search, the pair disp is built around. Per axis, these score higher than disp could in theory:

  • G1 Substrate nobody scores higher
  • G2 Specification nobody scores higher
  • G3 Trust Metamath Zero, Blight, CakeML + Pancake
  • G4 Execution nobody scores higher
  • G5 Search nobody scores higher
See the full comparison