- Zig 55%
- Python 23%
- TypeScript 13%
- C 7%
- Shell 2%
1A Internal Network presents
interv -- A tiny, mathematically simple, modular language that bootstraps itself from minimal Zig code. It also carries a cubical proof system simply because it can.
"Interv" is pronounced "inter V", just as RISC-V is pronounced "risk five".
Please do not use Interv if you... #
If you do not need proofs and want to know how all your terms are allocated, use Zig.
If you need proofs but can accept the downsides of using Lean, use Lean. Lean is designed well as a language, but its implementation generates a huge pile of garbage in the output ELF that is never used.
Learn Interv in Y minutes #
This example covers inductive data, pattern matching, recursion, tuples, floats, strings, linear types, etc:
// Lowercase types; Uppercase constructors
data shape {
Circle(r);
Rect(w, h)
}
area :: fn (s) {
case s {
Circle(r) -> 3.14159 * r * r;
Rect(w, h) -> w * h
}
}
fib :: fn (n) {
case n {
0 -> 0;
1 -> 1;
_ -> fib(n - 1) + fib(n - 2)
}
}
// Several values form one tuple
divmod :: fn (a, b) { (a / b, a % b) }
write :: fn (world, s) {
// Raw Linux x86-64 syscalls
(_, w) := syscall(world, 1, 1, s, string.length(s), 0, 0, 0);
w
}
// Only World orders effects
main :: fn (world: 1 World -> world: 1 World) {
(q, r) := divmod(17, 5);
msg := "area {float.to_string(area(Circle(2.0)))}; fib {int.to_string(fib(10))}; 17 / 5 = {int.to_string(q)} rem {int.to_string(r)}\n";
write(world, msg)
}
See docs/language.dj for the surface language and its executable parser references.
See docs/sugar.dj to extend the language. It's actually quite modular!
Repo Inventory #
No time to explain! Get in! -> zig build demo <-
Run zig build -l for build steps and interv -h for Interv commands.
inspired by... #
Interv is largely composed of random ideas that I found while surfing the Internet. Still, some original thought is included inside it.
- formal math -- when compared to it, nearly every piece of software out there feels like jank.
- The interval -- the name: the object level's primitive is the cubical interval
I;intervis shorthand for the interval. - Idris 2 -- for creating one of the authors of Interv.
- Koka & algograph -- the "the compiler may reorder; a
1binder pins the order of effects" principle. Algograph is a visual algorithmic notation that began as a feature-parity visual re-encoding of Koka (a language with algebraic effects). Its view that a function is just a refactorable block of code, free to be reordered, is where the compiler's cross-function optimization freedom comes from. (algograph:<https://www.1a-insec.net/stuff/algograph/>) - Wu Wei (non-interference from "Daoism") -- the governance the project tried: set the rules, then do not meddle; the law governs, not the king. It ran as a parallel-worktree kingdom on
omp,herdranddinit, retired on 2026-09-20 (the pre-retirement tree is taggedpre-cleanup); the whole thing began by asking an AI (Deepseek) to write the compiler. - Odin -- the declaration and binding separators: a top-level definition
name [ : type ] :: valueand a block bindingname := valuefollow Odin's constant/type-declaration (X :: 5) and shorthand-assignment (x := 42) forms.::and:=parse as single tokens, so a binding is never ambiguous with an expression. - Lean 4 -- the language the first bootstrap engine was written in (it retired at T0.5,
research/plan/t0.dj). Its elaborator patterns (metavariables, levels, Monad, unification) are why it was chosen; and the author's discomfort with itsQuotientwas the original spark. - Homotopy type theory / univalence -- the framework: paths as propositions, higher inductive types, and univalence as a theorem rather than an axiom.
- soma -- the second crib (
../soma), a repository of the same cubical type theory. - Gleam -- the surface syntax goal: "easy to remember and simple like Gleam". A small keyword set, one way to do each thing; familiar shapes (function calls, lists,
if) are borrowed because familiar is what people remember. - Cubical type theory (CCHM) -- Cohen, Coquand, Huber and Mortberg. The object level's core (interval,
Path,comp,Glue,ua, higher inductive types) follows the CCHM rules, with the theory from Huber's thesis. The operational lineage is cubicaltt -> redtt -> cooltt. - cubicaltt -- the concrete crib for the object level's M1, pinned as
../cubicaltt @ 9baa6f2.