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.
git clone github.com/libdither/disp && npm i && npm test 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.
- G1 100% native
Substrate
Programs can take other programs apart and run them directly — no encoding step, no separate quote/eval layer — so the type checker is just an ordinary program in the language
- G2 55% dependent, library
Specification
A spec can say everything that matters: types that mention values (dependent types or stronger), proofs you can run, resource and cost budgets, and a workable answer to when two different programs count as the same — with the whole type system built as library code, not baked into the core
- G3 80% two-op core
Trust
A verdict is only as believable as the code you must audit to accept it, so that code is kept tiny: every clever layer — elaborator, solver, search — is untrusted and must hand a small core replayable evidence for its claims, and only what the core re-checks counts (the tradition LCF started); a fast path installed in place of a slow definition carries evidence of the same kind
- G4 30% interpreted
Execution
Runs at C/Rust speed, with a model of the target the checker can reason about and a cost account that is exact and replayable rather than a benchmark
- G5 0% designed
Search
From spec to implementation automatically: a search over candidate programs scored by the checker (pass/fail) times measured cost — and eventually that optimizer aimed at its own code
The figure on each row is where disp stands today, 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. Text and scores come from _AXES.md.