Skip to content
Rezzi the Residual, the Resid mascot

Resid

An eager compile-time language. The compiler reduces everything it can prove; only the residue runs.
Int fib(Int n) { return if (n < 2) { n } else { fib(n - 1) + fib(n - 2) }; }
Int main() {
// Every argument is known, so the compiler computes this while it builds.
println(f"fib(25) = {fib(25)}");
return 0;
}
Output
fib(25) = 75025

Resid treats compilation as reduction of knowledge. Anything the compiler can prove, it computes at build time; what stays is the residual program, lowered to native code through LLVM. Every reduction is recorded in a knowledge graph that the debugger and tools read, so you can always ask why something ran at runtime.

Values, not variables

Immutable bindings, no null, no shadowing. Maps, lists and strings are values, yet updated in place when the compiler proves nobody else can see them.

Authority is explicit

No ambient authority. Every function that touches the filesystem, the network or processes says so with @requires, checked transitively, and libraries can be sandboxed.

Numbers that don't lie

Int(8) to Int(512), Float(16) to Float(128), exact Dec(N). Arithmetic is checked at every width; nothing wraps or truncates silently.

Self-hosted, no C

The compiler is written in Resid and compiles itself in about a second. The runtime is Resid too: binaries need no C library.