POLYTONE
The AI-native programming language
polýs + tónos — why the name?One canonical form for every construct. Errors that teach instead of scold. Tests built into the language. POLYTONE is designed for the way code is written now — by humans and machines, together.
fn main() -> Void:
let name = "world"
print("Hello, {name}!")
print("2 + 2 = {2 + 2}")New in this release
Sprint 313 — M48 close- The fourth audit's true record: 54 findings — 52 fixed, one fixed in the spec, one recorded; nothing deferred, no non-defect. Both S1s fixed ahead, every fix verified by the finding's own probe and pinned on both sides of every mirror. Phase M48 complete.
- Five lessons: prove a closed form before writing it; a deterministic contract admits a formula, so hidden tests hand the entry the document; the endgame of a mirror is one shared function; whitespace is a specification; a tool is exactly as strict as its codec, both ways. Next: Baseline 11 over the 52-task corpus.
Fewer tokens, same work
POLYTONE is designed for LLM generation. The effect is measurable: same task, equivalent runnable programs, counted with the cl100k tokenizer.
- Repair in one lineA teaching error names the canonical form: 86 tokens of error text instead of 268 for the equivalent Python traceback.
- One canonical formNo style negotiation in the prompt, no post-generation format diffs — ptc fmt is local and costs zero tokens.
- Frozen surfaceSpec §27 freezes the language and stdlib API: one stable system prefix that providers can cache forever.
Measured 2026-07: equivalent, verified-runnable programs (byte-identical output) and the reproducible context benchmark (benchmarks/context, CI-gated); tokenizer cl100k_base. Honestly: on a two-file project the slice is a wash — it wins as soon as real modules are imported.
Code that proves itself
Tests live next to the function, not in a foreign framework. And when one fails, the message already explains what to do:
fn double(x: Int) -> Int = x + x
test "doubling four":
assert double(4) == 8
test "this expectation is wrong":
let xs = [1, 2].map(fn(x: Int) -> Int = double(x))
assert xs == [2, 5]