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 288 — The sound studio- Tracks live a whole life: every chip renames, moves and removes a track — a track is a voice and one row in every pattern, so the rows follow the voice everywhere, mute/solo and the active track follow the same index map, the last track stays. The volume slider reaches 0. The WAV cache keys the last render on the exact document bytes, so an unchanged song never renders twice. Audition follows the band: an octave shift sounds the new bottom note, a row label plays its note before anything is placed.
- Gated by execution: a reordered and a reduced session render through the real codec. web 225.
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]