ilo 26.5.0

ilo - the token-minimal programming language AI agents write
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
-- Guaranteed-depth tail-call elimination: 1 000 000 recursive steps without
-- host-stack growth on every engine (tree, VM, JIT, AOT).
--
-- Tree:      trampolines tail calls in the interpreter.
-- VM:        OP_TAILCALL reuses the current CallFrame.
-- JIT/AOT:   `return_call` (CallConv::Tail) eliminates the stack frame.
--
-- A default ulimit stack (8 MiB) holds roughly 8–80 k ordinary frames
-- depending on frame size. Without TCO, `count-down 1000000` would overflow.
-- With TCO the depth is O(1) in host-stack space.

count-down n:n>n;=n 0 0;count-down -n 1

main >n;count-down 1000000

-- run: main
-- out: 0