The plan for items 9 to 14
missing.md lists what Zeno lacks, in the order to
build it. Items 1 to 8 are built, and went out in 0.7.0. This page is
the plan for the other six. It builds nothing. For each item it says
what is refused today, what the design is, which ways of writing it
were weighed and which one is chosen, which files change, what tests
it needs, and how it is shown to have cost nothing.
It was written on 2026-11-19, against main at b4417df (0.7.0).
Every "today" below was tried on that compiler; the list of what was
run is at the end.
A choice on this page is a recommendation with its reason. When a
part is built, the choice and the reason go into
decisions.md, as every choice has since chapter 0.
If the code shows that a choice here is wrong, the choice changes,
and the reason for the change is written down with it, there and in
the last part of this page.
| Item | Parts | Chapter of the decisions | |
|---|---|---|---|
| 9 | What a build still refuses, and raises in a function type |
9.1 to 9.9 | 56 |
| 10 | Several values from one function | 10.1 to 10.4 | 57 |
| 11 | Generic enums, bounds, generic interfaces | 11.1 to 11.5 | 58 |
| 12 | Cleaning up when a block ends, and files in pieces | 12.1 to 12.3 | 59 |
| 13 | Tools | 13.1 and 13.2. 13.3 to 13.6 are put off | 60 |
| 14 | More than one thing at a time | put off | 61 |
The order is the order of missing.md, and it is kept because later
items stand on earlier ones: generic enums that own what they carry
need 9.4, the queue of item 14 needs the generics of item 11, and an
open file needs the cleaning up of 12.1.
What is built now, and what is put off (the owner of the
language, 2026-11-19). Items 9 to 12 are built in full. Of item 13,
the message on assert (13.1) and tests of a compiled program (13.2)
are built. The debugger, the REPL, completion and renaming (13.3 to
13.6), and the whole of item 14, are put off. Their designs stay on
this page as they were written, for the day they are taken up: each
says so under its heading. Nothing that is built stands on a part
that is put off.
Rules for every part
What may change, and what may not
- Nothing that is accepted today may come to mean something else. Everything below is refused today with a message, or is a name that does not exist. This is the test of 11.6, and each part says how it passes.
- No word is taken. Not one of the six items needs a new reserved
word.
takeandisare reserved already, and the new names (Resource,Ordered, the moduletasks) come with Zeno asValueErrorandmathdo: a program that has its own declaration or its own file of that name keeps it, and means what it meant. Each part that brings a name has a test for exactly that. - A program that does not use a feature pays nothing for it: not an instruction, and not a byte of flash (decisions 34.5, 42.11).
- Every engine and every build says the same.
zeno run,zeno run --vm,zeno buildthrough C and through LLVM, each of them ordinary,--firmwareand--no-collector, and the fifteen targets print whatzeno runprints (5.5d). Where a build cannot do a thing, it refuses with a message that says what to write instead. It never does something else in silence. - The five questions of the audit (
audit.md) are asked of every new rule: one obvious way to write it, no line that reads two ways, nothing happens that the line does not say, every word plain and with one meaning, and a refusal that says what to write.
What "done" means for a part
A part is done when all of this is true, and not before.
- Tests in the place the feature lives. The parser's tests for
the syntax, the checker's for each rule and each message, and for
anything a build compiles a program that is built every way
(ordinary,
--firmware,--no-collector, each through C and through LLVM) and must print whatzeno runprints. With no collector the program must end with 0 blocks left, and the C build and the LLVM build must write the same memory report (5.11t). - Every refusal has a test of its words. A message is part of the language (4.2).
- The awkward paths are tested, not only the plain one. For
anything that owns memory: every way out of a block (its end,
return,break,continue, an error passing through, an error caught inside), a loop that runs it a thousand times in a pool that is not allowed to fill, and the same program run again with spare blocks overwritten (9.7 makes that a build option). - The targets. A program in
tools/targets/namededge-<feature>.zenofor anything the targets must do, and thetargetsworkflow green on the commit. It takes about ninety minutes, so it is read after the push and not waited for at each commit; a part is not called done while it is red. - The other workflows that the change starts are green:
board,minimalandplainafter any change toemit_c.rs,minimal.rsorruntime.c. cargo testpasses in a release build at every commit, and in a debug build at the end of each item. A debug build stops on an overflow in the compiler's own sums that a release build lets through.- Windows and macOS are tried with the
trialworkflow at the end of each item. tools/same.pyis run, and what it found is in the commit message or the chapter. (Until 2026-11-19 this line asked for all the speed checks below; see section 6 of the changes.)- It is written down. The chapter of the decisions, a page in
docs/that walks through how it is built and ends in "Things to try", the rows ofmissing.mdand of the README struck or changed, the limits pages (no-collector.md,generics.md,interfaces.md,testing.md,lsp.md) brought up to date, a paragraph indocs/releases/0.8.0.md, and a line for each commit intools/history-notes.txt. - What is left is listed, under "Left for later" in the chapter, each with the message it is refused with.
Showing that nothing got slower
Changed on 2026-11-19 (section 6 of the changes at the end): steps 2 and 3 below, the counting and the timing of the two engines, are not run for the parts of this page. Step 1 stays.
Timings on a shared machine move by more than the changes they are meant to show, so the proof comes in three steps, cheapest first.
- The same C means the same speed. Before a part is pushed, every
example, every program in
tools/targets/and every benchmark is built by thezenoof 0.7.0 and by the new one, each way a build can be asked for (ordinary,--firmware,--no-collector,--release,--fast,--minimal, and--llvm), and the C and the IR are compared byte for byte. So arezeno joinandzeno bytecodefor the same programs. A program that does not use the new feature must come out the same. This is how 33.4 was shown, and it settles the speed and the size of every built program in a minute, with no clock. It is worth a script,tools/same.py, since every part runs it. Where a file differs, the difference is explained in the chapter or mended. - The two engines are counted.
zeno runandzeno run --vmare thezenoprogram itself, and any change to the compiler can move them, also a change that no program reaches (24.29, 42.11). At the end of each item, and after any commit that touchesvalue.rs,ops.rs,vm.rs,bytecode.rs,emit_bytecode.rsorinterpreter.rs:
python3 bench/run.py --count --engines vm,run --zeno path/to/0.7.0/zeno
python3 bench/run.py --count --engines vm,run
Each of the six programs must stay within 0.1% of 0.7.0 in both
engines. More than that is found with callgrind and mended before
anything else is built on it (42.11 shows how).
3. And timed, because a count does not see the same instructions
laid out worse: python3 bench/compare.py --old path/to/0.7.0/zeno,
with the two binaries under names of one length in one folder. No
program may be more than 2% slower in the best of four rounds. The
one loss already known is zeno run on loop (50.7).
After a change to emit_c.rs, minimal.rs or runtime.c, the sizes
are measured again (tools/board.py --sizes, tools/minimal.py
--sizes). They must not move for a program that does not use the
feature.
How the work is laid out
- One part at a time, in the order of this page. Small commits, each
of which passes
cargo test, pushed tomain. - The first commit of all sets the version to 0.8.0 (
Cargo.toml,Cargo.lock,tools/install.sh) and beginsdocs/releases/0.8.0.md. - Each item ends in a state that could be released. A release itself is asked for separately, as always.
- Before a part is begun, its design is read against the code as it is, and what the code says differently from this page is settled first and written into "Changes to this plan" below.
9. What a build still refuses, and raises in a function type
The aim, in one sentence: a build should take what zeno run
takes. What is left after this item is refused by design, and says
so.
What is refused today
Tried on 0.7.0. The first column is the part of this item that takes it up.
| Program | Refused by | The message begins | |
|---|---|---|---|
| 9.1 | ["1", "2"].map(parse), where parse says raises |
--firmware, --no-collector |
"cannot compile a function that can raise, used as a value, yet" |
| 9.2 | return function(n) { return f(g(n)) } |
--no-collector |
"this function uses a value from outside it that has one owner" |
| 9.2 | let m = counter.bump |
every build | "cannot compile a method used as a value" |
| 9.3 | let t = slot.task, with task: Task or none |
--no-collector |
"holds an owned value, which cannot be taken out of the object it is in" |
| 9.4 | same([1, 2, 3]) with function same[T](x: T); Box([1, 2]) |
--no-collector |
"a value that has one owner cannot fill a type parameter yet" |
| 9.5 | let d: dict[str, list[int]] |
--no-collector |
"with no collector a value of a dict is an int, a float, a bool or a str for now" |
| 9.6 | let xs: list[int or none] |
--no-collector |
"a list of numbers that may be none keeps each item in a small block of its own" |
| 9.7 | zeno build --pool 4096 |
the command line | "cannot read --pool" |
| 9.8 | a function with a name inside a function | every build | "cannot compile a function inside a function or block yet" |
| 9.8 | function add(x: int, y: int = base * 2) |
every build | "cannot compile a default value that is not a plain literal yet" |
Two rows of missing.md are no longer true and only need striking:
raise e to pass a caught error on builds with no collector since
5.17, and a method that takes out what its own object holds builds
since 5.19k.
Three stay refused, by design, and 9.9 says so in one place: a
function that changes a var of the function around it (nothing is
shared in such a build), xs.append(xs.pop()) on one line (C does
not say which half runs first, 5.9q), and a function that reads a
var list at the top of a file (it could be replaced while the
function looks; a let works, audit part 5).
9.1 raises in a function type
function parse(text: str) -> int raises ValueError { ... }
function each(texts: list[str], convert: function(str) -> int raises ValueError) -> int raises ValueError {
var total = 0
for text in texts { total += convert(text) }
return total
}
The rule. A function type is written as the first line of a
function is, without the names: after what it returns it may say
raises and a kind of error. A call through a value of that type can
raise that kind, and is checked as a call of a function that says so:
its caller catches it or says raises itself. A function fits the
type if it raises that kind or nothing. raises Error takes a
function that raises anything.
How it is written: three ways weighed.
| Written | Verdict | |
|---|---|---|
| A | function(str) -> int raises ValueError |
Chosen. It is the function's own first line. Nothing new to learn, and the printer and the messages already write a function that way |
| B | raising function(str) -> int |
One more word, in a place no other word goes, and it cannot say which kind |
| C | function(str) -> int or raises ValueError |
Reads as if the error were a value that comes back. It is not, anywhere but in the C of a firmware build |
One kind, not a list. A function's first line may say raises
ValueError, IoError. A function type stands inside lists of its own:
function each(convert: function(str) -> int raises ValueError, IoError, text)
Is text a third kind of error, or a second parameter with no type?
The parser could be given a rule. A reader would have to know it,
which is question 2 of the audit. So in a type raises names one
kind, and a function that raises two kinds fits raises Error. A
second name after a comma gets a message that says so (where the
message comes from is in "Changes to this plan", 1). A list could be
let in later, inside brackets of some kind, without changing what any
type written today means.
What it changes for a program written before: nothing. A type
with no raises is checked as it is today. In a firmware build and a
build with no collector, a function that can raise fits only a type
that says so; those builds refuse every such program today, so they
only come to accept more. In an ordinary build and in zeno run a
function that raises is still accepted where the type does not say
so, as it is today, and the call is then checked as raising nothing,
as it is today. That is a gap in "an error a function must declare",
and it is older than this item. Closing it means refusing programs
that build now, so it is not done here. It is measured instead: the
check is run over every example, every target program and every
sample of the book in an ordinary build, the number it would refuse
is written into the chapter, and whether to close the gap is put to
the owner of the language with that number.
How it is built.
ast.rs:Type::Functiongainsraises: Option<String>.parser.rs(type_) reads it;printer.rs,modules.rs(the name is renamed as any name is) andformat.rs's tests follow.checker.rs:CallableTypegainsraises.callon aTy::Callablecallscan_raise, as it does for a function.fitsandsamecompare it.Displaywrites it. Avar f = parsegets the whole type (5.19l).map,filter,reduceandsortalready pass on what the function given to them raises, and stay as they are.emit_c.rsandemit_llvm.rs, firmware and no collector: a value of a type that saysraisesis called the way a function that raises is called (the answer through a pointer,trueorfalseback, 5.5l). A function that raises nothing, put where such a type is wanted, goes through a small function written for it, the first time it is needed (5.11k), which calls it and answerstrue. That covers a function of the program and a function written where a value goes. A value that is already of the plain type and is then put where the raising type is wanted needs a block of its own to carry it: it is made by the rule of 9.2, or refused with a message if 9.2 shows that to be more than it is worth.- An ordinary build needs nothing in its C: both kinds of function are called alike there (5.5i).
- The interpreter, the VM and the targets do not look at types, and need nothing.
Tests. The parser: the type, the type inside a parameter list
followed by another parameter, the message for a second kind. The
checker: what fits what, in both directions; a call through the value
must be caught or declared; raises Error; a function of an
interface compared with a function type; the message for raises
ZeroDivisionError on a type in a firmware build (5.19m holds for a
type as for a function). Both compilers: errors_as_values_match_in_methods_loops_and_function_values grows a program that hands a
raising function to map, to a parameter, into a field and into a
list, and catches what comes out of each, built every way. what_a_firmware_build_refuses_says_so loses its first line.
Speed. No ordinary build changes: tools/same.py must show
every C file as it was. The engines are not touched.
9.2 A function that is kept takes what it uses
function compose(f: take function(int) -> int, g: take function(int) -> int) -> function(int) -> int {
return function(n: int) -> int { return f(g(n)) }
}
The rule today (5.17d): a function written where a value goes, which uses a value that has one owner, only looks at it. So it lives for the statement that writes it, and cannot be kept.
The rule added. A function that is kept takes what it uses. If
the function is returned, put in a variable or a field, or given to a
parameter that says take, each value with one owner that it uses is
given to it, as let b = a would give it. The function owns them
from then on and frees them when it is freed. A function that is only
passed along, to map or to a parameter that looks, looks as before.
What it takes must be the surrounding function's to give: its own
let, or a parameter that says take. A use of the value after that
line is the error every use after giving away is, and names the line.
A value that is only lent to the surrounding function cannot be
taken, and the message says to write take on the parameter.
Why no word at the function, as Rust's move is. The line already
says the function is kept: it is after return, or =. A function
that is kept and still only looked would be gone before it could be
called, so there is no second meaning for a word to tell apart. The
first line of a function says take for a parameter because a call
does not show what the function does; here the line shows it.
A method as a value is the same thing. let m = counter.bump is
the function function(...) { return counter.bump(...) }. Passed
along, it looks at counter. Kept, it takes counter, with one
owner; where values are shared it shares it, as every engine but the
compilers does now. So one rule answers both rows of the table.
How it is built. checker.rs: where a function literal with
Captures is checked, the place it goes decides between
Borrowed(Function) and Owned(Function); in the second case each
capture is given away (owned state, as for let b = a). The
decision is noted for the compilers in Types. emit_c.rs and
emit_llvm.rs: the block of such a function already has a drop
entry (5.17f); the function written for it frees what was taken. A
bound method is a block with the object in it and one small function
that calls the method. The interpreter, the VM and the targets
already do the right thing where values are shared, and need nothing.
Tests. compose, built every way and called a thousand times
with 0 blocks left. A counter whose method is kept, and one whose
method is passed to map. The value used after it was taken, the
value that was only lent, a var of the surrounding function (still
refused, by design), and a kept function inside a loop.
9.3 take in front of a place: moving out what may be none
class Slot {
task: Task or none
}
let task = take slot.task # slot.task is none now
if task is not none { run(task) }
The need. With one owner, an object cannot give away what a field
holds, because nothing would be left in the field (5.8i). A list has
pop(). A field has nothing, so a state machine cannot hand on the
buffer it holds.
The rule. take in front of a field or an item gives what is
there and leaves none. The place must be one that may hold none,
so that what is left is something the type already allows. What comes
back may be none too, and is tested as any such value is.
Ways weighed.
| Written | Verdict | |
|---|---|---|
| A | let task = take slot.task |
Chosen. take is the word for exactly this since 5.19b: the value goes over, and the place it was in holds nothing. It is reserved, so the line reads one way |
| B | let task = slot.task empties the field |
Something happens that the line does not say: question 3 |
| C | slot.task.take() |
A method on a value that has not been tested for none, which nothing else allows |
| D | let task, slot.task = slot.task, none |
Needs item 10, and says in a riddle what A says in a word |
A variable is not a place for this word: let b = a already gives
a away. take a gets a message that says so. A field that cannot
be none gets one too, and it says to make the field Task or none.
It means the same in every build. Where values are shared it still
leaves none, so one program runs the same way under zeno run and
with no collector.
The three guards of 5.15e hold for it as for pop(): the place is
reached from an owner, no loop is walking that owner, and the line
has not already looked at it.
How it is built. One new expression, ExprKind::Take(place).
parser.rs reads take at the start of an expression. checker.rs
gives it the type of the place and checks the guards (takes_out).
The interpreter and the VM read the place and store none. Both
compilers do the same, and with one owner pass the value on instead
of copying it. lower.rs makes it two statements for the targets,
so no target's runtime changes. printer.rs, modules.rs.
Tests. The parser and the messages; a scheduler that takes its
current task and gives it to another, built every way, 0 blocks left;
take xs[i] on a list[Task or none]; the three guards.
9.4 A value with one owner as what a type parameter stands for
class Stack[T] {
items: list[T]
}
let frames: Stack[Frame] = Stack([]) # refused today with no collector
The rule. A copy of a generic is checked as if it had been
written by hand with the type in the place of T (3.16d). That is
all the rule there is, and with no collector it has simply not been
followed: the checker stops at the call. The stop is taken away.
Stack[Frame] is then a class with a list of frames, which a build
with no collector has taken since 5.15c.
take T is allowed (it was refused by 5.19f, "because T may be
a number"). In a copy where T is copied, the word changes nothing,
which is what it already does where values are shared (5.19a). A
generic that keeps or returns what it is given says x: take T, and
is then right for an int and for a list. One that does not say it,
and is used with a list, is an error inside the copy, with the note
that names the copy and the call, as every error inside a copy has.
How it is built. checker.rs: the refusal goes, infer and the
making of a copy let Owned and one-owner classes through, and take
T is read. emit_c.rs and emit_llvm.rs: the free functions of a
copy are written by Drops as for any class; a name such as
z_Stack_Frame is made as names of copies are (5.14c).
Tests. same, Box, Stack and Pair with a list, an object
and an enum value, built every way, 0 blocks left. The error inside a
copy that returns what it only looked at, with its note.
9.5 A dict that owns its values
10.14 wrote the plan: with no collector a dict is the owner of the lists and objects in it, as a list is of its items (5.15c).
| Written | With one owner |
|---|---|
d[key] |
lends the value: a look |
d[key] = value |
takes the new value, and frees the one that was there |
d.pop(key) |
hands the value to whoever receives it |
d.clear(), and the end of the dict |
free every value |
for key, value in d |
lends each value for the body |
d.get(key) |
lends, and may be none |
d.get(key, instead) |
refused: say get(key) and test for none. Who would own instead has no good answer |
d.values() |
refused: a second list of the same objects would be a second owner. The message says to loop with for key, value in d |
pop, d[key] = value and clear are held to the three guards of
5.15e. A dict is two lists and an index (6.40), so its values are
freed by the list free functions that exist.
How it is built. checker.rs: the rules above, beside those of
a list (owns_items, takes_out). emit_c.rs, emit_llvm.rs,
runtime.c: the dict's free function frees its values through
Drops; storing over a key frees the old value. Nothing changes for
a dict of plain values, and tools/same.py shows it.
Tests. A dict of lists and a dict of objects, each way in the table, built every way, 0 blocks left, a thousand stores over one key in a pool that does not fill. Each refusal and each guard.
9.6 list[int or none] with no collector
Today a number that may be none, inside a list, is a pointer to
a small block of its own, because a number and a flag do not fit in
one slot of a list (5.11i). With no collector those blocks have no
owner, and the list is refused.
Two ways.
| How | For | Against | |
|---|---|---|---|
| A | The list keeps a second, packed list of flags beside its values: one byte an item, as a list[u8] is packed (36.2) |
No block for an item at all: 9 bytes an item. Nothing to free, nothing to copy deep | Each thing a list can do must keep the two in step |
| B | The blocks stay, and the list owns them, as it owns the text in it (5.9x) | The free and the deep copy exist for text | 24 bytes an item and a trip to the pool for each number, which is what firmware cannot afford |
Changed on 2026-11-19 (section 6 of the changes at the end): A is built for a build with no collector alone, where such a list is refused today. Every other build keeps the list it writes today.
A is chosen, as missing.md already says: "store the number and
a flag side by side". It is used in every C build and LLVM build and
not only with no collector, so that there is one way such a list is
built and a list like this gets cheaper everywhere. The interpreter,
the VM and the targets hold values that know what they are, and do
not change.
If the code shows that A touches more than the runtime's list functions and the places both compilers read and write an item, B is built for a build with no collector alone, the reason is recorded, and A stays on the list.
Tests. Every list method on a list[int or none], a list[float
or none] and a list[u8 or none], built every way against zeno
run; none at the first and the last place; a list of them inside a
list; 0 blocks left. The C of a program with no such list must not
change.
9.7 The size of the pool on the command line, and spare blocks that are checked
zeno build --no-collector --pool 4096and--text-room 2048hand-DZENO_POOL=4096and-DZENO_TEXT_ROOM=2048to the C compiler (5.9c, 5.9j). Both, because a person who finds one will look for the other, and--memoryprints both numbers. They go with--board. Without--no-collector(or--board) they are refused with a message, and so is a number that is not a whole number above zero.- With
--memory, a block that is given back is filled with a pattern, and is checked to be untouched when it is handed out again. A write to a block after it was given back then stops the program with a message. It is the check 5.9k left as an exercise, and it stands in for the heap checkers that cannot see inside the pool. It is behind one#ifdef, so a build without--memoryhas not a byte of it.
Tests. A program that needs N bytes runs with --pool N and
stops with the pool's message at N - 1 (the test of 5.9j, driven from
the command line). A runtime test that writes to a block it gave back
and must be stopped. The options refused where they mean nothing.
9.8 A build takes what zeno run takes
| Today a build refuses | Built as |
|---|---|
| A function with a name inside a function | It is a function written where a value goes, kept in a let of its name at the top of its block (3.6d says so already, and lower.rs does it for the targets). It may call itself |
| A default that is not a plain literal | The default is worked out at each call that leaves the argument out (3.5), in the order of the parameters, by code written at the call |
| A method as a value | Done in 9.2 |
Before this part is built, every other refusal of the two compilers
is listed by searching emit_c.rs and emit_llvm.rs for their
refusing function, and each is either built here, or written into
compiler.md as left, with its reason. A named
argument to a function value, a built-in used as a value
(xs.map(str)) and print([]) are known to be among them.
Tests. the_examples_compile_and_match already holds every
example to zeno run; the examples that were kept from it for these
refusals are let in. A function inside a function that calls itself,
that uses a let around it, and that is returned.
9.9 The sweep
Last, every refusal named in no-collector.md,
firmware.md, functions-and-errors.md,
one-owner.md, chapter 11 and part 7 of missing.md
is run again on the new compiler. Each page then lists what is
refused by design, with the reason, and nothing else. A test,
what_a_build_with_no_collector_refuses_says_so, holds the list: a
refusal that is not on it fails the test.
Left for later after item 9 (each refused with a message): a
list of kinds after raises in a function type; d.values() and
d.get(key, instead) on a dict that owns its values; and whatever
9.8 writes into compiler.md as left.
10. Several values from one function
function divide(a: int, b: int) -> (int, int) {
return a // b, a % b
}
let quotient, remainder = divide(7, 2)
var low = 3
var high = 1
low, high = high, low
10.1 The rules
- A function may give two or more values. Its first line says
-> (int, str), andreturngives that many, with commas. - They are received by that many names:
let q, r = divide(7, 2),var q, r = ..., orq, r = ...for places that exist. Every value is received._in the place of a name receives one and drops it. - Several values are not a value. They cannot be put in one
variable, in a list, in a field, passed as one argument or
printed. Each of those is refused with one message: "
dividegives 2 values. Receive each:let a, b = divide(...). To keep them together, declare a class". A tuple that is kept is a class, asmissing.mdsays, because a class gives each part a name. - The right of
=is one call that gives that many values, or that many values written out. All of the right is worked out, left to right, before anything on the left is given a value; then the left is filled left to right. That is what makeslow, high = high, lowa swap. (int, str)is written only after->, in a function's first line or in a function type. Nowhere else is it a type.
10.2 How it is written: the ways weighed
| Written | Verdict | |
|---|---|---|
| A | -> (int, str), return a, b, let a, b = f() |
Chosen. It is Go's shape: brackets in the first line, bare commas where values are given and received, and no tuple as a value. for key, value in ages (10.12) already receives two names with a bare comma |
| B | -> int, str |
In a function type inside a list the comma reads two ways: function(int) -> int, str among parameters. The brackets are the fence |
| C | return (a, b), let (a, b) = f() |
(a, b) on the value side looks like a value that could be kept, and rule 3 says it cannot. And it is a second way to write the two names of a for |
| D | -> int and str |
A plain word, but return and let would still need commas, so the type would say one thing and the line another; and int or none and str reads against the order of or and and everywhere else |
| E | Named results, -> (quotient: int, remainder: int) |
That is a class. A class is how Zeno names the parts of a thing |
Why not a tuple as a value, as Python and Rust have. It would be
a second way to write a class with fields nobody named, and
reading[1] says less than reading.status (principle 2). What is
asked for, by a driver's read and by divide, is to give back two
things at once, and that needs no new kind of value.
Why every value must be received. A function that gives a value
and a status is written so that the status is looked at. let value,
_ = port.read() says in the line that it was dropped on purpose.
let a, b = 1, 2 is accepted, by rule 4. Refusing it would be an
exception to the rule that low, high = high, low needs.
10.3 How it is built
- The tree (
ast.rs):Type::Several(Vec<Type>), only after->.ExprKind::Several(Vec<Expr>), only as whatreturngives and as the right of the new statement.StmtKind::Receive { declare: Option<bool>, places: Vec<...>, value: Expr }, wheredeclareisletorvaror neither, and a place is a new name with an optional type,_, or a place that can be given a value. Three new kinds, and no change to an old one, so every stage that is not told of them fails to build until it is. - The parser:
(after->begins the list of types. A comma after the first name of alet, or after the first expression of a statement, begins aReceive. One result in brackets,-> (int), is refused: "one value is written without brackets". - The checker: a
Signature'sreturnsmay be several. A call that gives several is accepted only as the right of aReceivewith as many places, or afterreturnin a function that gives the same. Each place gets its type, and with one owner each value is given to its place. The record of uses (Use) notes each name. - The interpreter and the VM run programs with no types written,
so the values must travel as something that is not a list:
let a, b = [1, 2]has to stay an error. One new variant ofValue,Several(Rc<[Value]>), made only byreturn a, band taken apart only by aReceive. It is the last variant, and it is boxed, so no value grows. This is the one place in the item that can cost a program that does not use it (42.11 is the lesson), so the count of step 2 is run on the commit that adds it, before anything else is built on it. If the count moves and cannot be mended, the values travel beside the call instead, in a field of the interpreter and of the VM thatreturn a, bfills andReceiveempties, and noValuechanges. - Both compilers: the first value comes back as a function's answer does today. Each further one goes out through a pointer the caller passes, after the parameters. Why pointers and not a struct. It is what a firmware build already does with the answer of a function that can raise (5.5l), for the reasons given there: a struct for each shape of result is one more type for each, and C compilers for small chips return a struct through memory in any case. One rule, the same in every build. In a firmware build a function that raises and gives two values has two such pointers.
- Text as a second value, with no collector, needs care: a function's text answer travels in the text room (5.9n), and that road is built for one. The second text is kept by copy (5.9l) by the function and owned by whoever receives it. This is the part most likely to be got wrong, and it has a test of its own.
- The targets:
lower.rsmakesreturn a, ba call of the runtime that packs the values, and aReceivea temporary and one read for each place, which also says the error of rule 3 when a program with no types gets it wrong. Two small functions in each runtime, and two forms for each emitter to print. printer.rs,modules.rs,format.rs's tests, and the language server's hover, which shows-> (int, str).
10.4 Tests, and what is left
Tests. The parser: each form, and each refusal. The checker:
count and types on both sides, a call of several used as one value in
each of the places rule 3 names, _, a Receive into a field and an
item, a generic function swap[A, B](a: A, b: B) -> (B, A), a
function of an interface that gives two, a function type that gives
two. Every engine and build: divide; a swap of two numbers, of two
lists and of two objects, with 0 blocks left with no collector; a
function that raises and gives two, caught and not caught; two texts
built inside the function; a function value that gives two.
tools/targets/edge-several.zeno for the targets, with the error of
rule 3 in a program that has no types.
Speed. tools/same.py: no C changes for any program that exists.
The count of step 2 on the commit that adds the Value.
Left for later: swapping two items that have one owner (xs[i],
xs[j] = xs[j], xs[i] reads each item as a look; a swap(i, j) on a
list is the way in); several values in a for; a default for one of
several results.
11. Generic enums, bounds, generic interfaces
11.1 Generic enums
enum Maybe[T] {
Nothing
Just(value: T)
}
function first_even(numbers: list[int]) -> Maybe[int] {
for n in numbers {
if n % 2 == 0 { return Just(n) }
}
return Nothing
}
The rules are those of a generic class (3.16 to 3.16c), and
nothing new: square brackets after the name, a capital for the
parameter, and the types worked out at each use and never written
there. Just(3) is a Maybe[int] from its argument. Nothing
carries nothing that says what T is, so it takes it from the place
it goes: the type of the variable, of the parameter, or of what the
function returns (3.16b, rule 3). Where nothing says, it is an error
that shows how to write the type.
How it is built. ast::Enum gains type_params; the parser's
refusal goes. In checker.rs a generic's Template gains Enum,
and a copy is an EnumInfo with its origin, made as a copy of a
class is (5.14). A case of a generic enum that is not yet a copy is
worked out as a call of a generic function is. match needs no
change: it sees a copy. The interpreter and the VM run the generic
itself (5.14b). Both compilers write one enum for each copy,
z_Maybe_int, with its free function. With no collector a
Maybe[Frame] owns its frame (5.16), which is why 9.4 comes first.
The targets do not look at types.
Tests. Maybe[T] and Result[T, E] with numbers, text, a list
and an object; Nothing in each place that says its type and in one
that does not; match over a copy with a case left out; a list of
Maybe[int]; built every way, 0 blocks left.
11.2 Bounds: function largest[T is Ordered]
function largest[T is Ordered](items: list[T]) -> T { ... }
function total[S is Shape](shapes: list[S]) -> float { ... }
The rule. A type parameter may say is and an interface. Each
call is then checked first against that: the type that T stands
for must be a class that says it is the interface. If it is not, the
error is at the call and names both: "Task is not Ordered, which
largest asks of T". Inside the generic, the functions of the
interface may be called on a T.
How it is written.
| Written | Verdict | |
|---|---|---|
| A | [T is Ordered] |
Chosen. It is the sentence a class already says, class Circle is Shape, with the word that is already reserved |
| B | [T: Ordered] |
A colon in Zeno says "this name has this type" (port: int). T does not have the type Ordered |
| C | function largest[T](...) where T is Ordered |
A second place to look for what the first already has room for |
The body is still checked for each copy (3.16d). A bound is a
promise that is checked at the call. It is not the whole of what the
body may do: a generic with no bound that uses > is accepted today,
and stays accepted. Making the bound the whole truth would refuse
generics that build now, and it would need a bound for every operator
before the first one could be used; C++ took this road with concepts,
for the same reason. What a bound buys is what missing.md asked
for: the error moves from inside the generic to the call. And a
generic that nothing uses is checked with T as its interface, and
no longer as "anything" (5.14d).
Why a bound and not simply a parameter of the interface's type.
shapes: list[Shape] does not take a list[Circle] (10.7). [S is
Shape](shapes: list[S]) does, and gives back an S as a Circle.
Ordered comes with Zeno, and is the first such interface: a
type is Ordered when < works on two values of it, which is every
kind of number, a quantity, and text. It is what largest and a
sort of one's own need. A class cannot say it is Ordered yet:
that is "operators for a class" in missing.md, which is built later
by the same road, and the message says so. A program's own Ordered
is the program's, as with every name that comes with Zeno.
One interface for each parameter. [T is Ordered, U] must read
one way, so a second interface cannot follow a comma. Until a program
needs two, a second is refused with a message.
How it is built. ast.rs: a type parameter becomes a name and an
optional bound, on a function and on a class. parser.rs.
checker.rs: Generic keeps the bounds; infer checks each against
is_one before a copy is made or looked up; inside a copy T is the
real type, so calls of the interface's functions are checked as on
any object. Nothing else changes: a bound makes no code. The
compilers and the targets need nothing.
Tests. The message at the call, for a function and for a class;
largest over ints, floats, text and volts; a class given where
Ordered is asked; a user's interface as a bound, with a list[Circle];
a generic that nothing uses and that calls a function its bound does
not have; a program with its own Ordered.
11.3 Generic interfaces
interface Source[T] {
function next(self) -> T or none
}
class Countdown is Source[int] { ... }
class Lines[T] is Source[T] { ... }
An interface is a class to every stage after the parser (10.9), and
a generic class has copies. So Source[int] is a copy of the
interface, a class says which copy it is, and fits compares copies.
The parser's refusal goes, ast::Class::is becomes a list of types
where it was a list of names, and stands_for compares the functions
of the class with those of the copy. Both compilers write the
switch of 10.9 for each copy of the interface that the program
uses, over the classes that are that copy.
Tests. The two classes above, used through Source[int], in a
list, as a bound ([S is Source[int]]); a class that says Source[str]
and has the functions of Source[int]; built every way.
11.4 What interfaces left out (10.10)
- A default for a parameter of an interface's function. The class writes each function as the interface does (10.6), so it writes the same default, and the checker compares the two as written. Only a default that is a plain value is allowed here, so that "the same" has one meaning. A call through the interface and a call on the object then cannot differ.
- A function that takes out what its object owns, standing for one
of an interface, and an
owned classthat is an interface. They are one question (10.10): a call through the interface must be held to the guards of 5.15e when the function behind it takes something out. A function of an interface has no body to read, but the whole program is known (7.11): it takes out if the function of any class that is the interface does. The checker works that out the first time the function is called through the interface. Then both refusals go.
Tests. The program that 0.7.0 refuses ("take_last of Stack
takes out or replaces something its object owns"), called through
the interface inside a loop over the same list (refused, with the
loop's message) and outside it (built every way, 0 blocks left); an
owned class that is an interface in an ordinary build; a default
that differs from the interface's.
11.5 A method with a type parameter of its own
class Box[T] {
item: T
function convert[U](self, change: function(T) -> U) -> Box[U] { ... }
}
For a class and not for an interface: a function of an interface is
reached through a switch over classes, and a copy for each U in
each class is more than any program has asked for. The method is a
generic whose copies are made for each U, inside each copy of the
class. It is the last part of the item and the least needed, and it
is built only if the generic of 11.1 to 11.3 makes it a small step.
If it does not, it stays refused, with that reason written down.
Left for later after item 11: types written at a call
(first[int](xs) reads as an index followed by a call, so 3.16b
stays: the place the result goes says the type); two interfaces for
one parameter; an interface that is another interface; a generic kept
as a value; a class that is Ordered.
12. Cleaning up when a block ends, and files in pieces
12.1 A Resource: something that is put back when its owner ends
owned class Selected is Resource {
line: Pin
function release(self) {
self.line.on() # chip select is high again
}
}
function read_id(bus: Bus, line: Pin) -> u8 {
line.off()
let chosen = Selected(line)
return bus.transfer(0x9F)
} # chosen.release() runs here, however the block is left
The need. An open file, a chip-select line and a lock all have a
second half that must happen on every way out of a block. Today the
second half is written before each return, and forgotten before one
of them.
The ways weighed.
| How | Verdict | |
|---|---|---|
| A | A class says it has something to put back, and the end of its owner does it | Chosen. It cannot be forgotten at a use, and it is the moment that already exists: an owned value is freed "at a line the programmer can point to" (5.8) |
| B | defer file.close(), as in Go |
Written at each use, so it can be left out at each use, and nothing can check that. Principle 1 |
| C | finally |
The same, and a second way to leave a try. missing.md leaves it out for this reason |
| D | with files.open(path) as f { }, as in Python |
A new kind of block for one job (6.12 turned it down) |
How the class says it.
| Written | Verdict | |
|---|---|---|
| A | owned class Selected is Resource, with function release(self) |
Chosen. A class already says on its first line what it is (10.4), so the reader of a class sees there that its end does something. No new word. It is the second interface that comes with Zeno, after Ordered, and operators for a class are to come the same way |
| B | A function with a set name, such as close, in any class |
A name that changes what a function is for is a rule nobody can see (10.16 turned down test_ for this) |
| C | A block in the class, cleanup { ... } |
A new kind of member, with a self that is not written (3.8) |
The words: a resource is the common name for a thing that must be
given back, and release is what is done with a lock, a line and a
handle alike. Closeable has two spellings, and drop is a word
from one language.
The rules.
Resourcecomes with Zeno:interface Resource { function release(self) }. A program's ownResourceis the program's.- Only an
owned classcan be one. A shared object has no owner whose end could be the moment. The message says to writeowned. releasetakesselfalone, gives nothing and raises nothing: an error has nowhere to go from the end of a block. It cannot be called by hand: it runs once, and the message says how to end a resource sooner (give it to a function that takes it).- It runs when the owner ends: when the block of the
letthat holds it is left by reaching its end, byreturn,breakorcontinue, or by an error passing through. Of two in one block, the one made last is released first. Afterreturn x + y, the value is worked out first and the release runs second. - A resource has one owner, like every owned value.
returngives it to the caller, a parameter that saystaketakes it,let b = amoves it. Whoever has it at the end releases it; a resource that was given away is not released by the one who gave it. - It does not run when the program is stopped: by
program.exit, by a fault in a firmware build (5.5l), or by a failedassert. Stopping ends no block. - Where a resource can be, in this version: in a
let, or a parameter. Not in avar, a field, a list, a dict, a case of an enum, aT or none, a type parameter, or a function that is kept; and what a call gives must be received by aletand not used in passing. Each is refused with a message that says so. The reason is the next paragraph.
Why so narrow. The compilers free an owned value on every road it
can take, and for them a release in the class's free function would
be all there is to do. But the interpreter, the VM and the fifteen
targets free nothing: their values are shared, and collected by the
language they are written in. For them "the owner ends" has to be
made into something that runs, and for a let in a block that is
one thing: code at each way out of the block. For a field or an item
of a list it is the whole of chapters 5.15 to 5.17 again, in every
engine. A let covers the guard of a block, which is what the three
needs above are. The rest is refused, so letting it in later changes
no program (11.6).
How it is built.
checker.rs: the rules, and where the type of a value is not known, a resource may not go (so that an engine never has to find one out while the program runs). Thencheckedrewrites the program, as it already does for sized numbers: the statements afterlet chosen = ..., to the end of its block, go inside a new statement,StmtKind::Scoped { name, body }, and each use that gives the resource away becomesExprKind::Give(name). Both are made only by the checker, and no program can write them.- The meaning of
Scoped, for every engine: run the body; however it is left, if the name still holds its value, call itsrelease; then go on leaving in the same way. An error that passes through is passed on as it was: same kind, same message, same line. (raise ein a program gives the line of theraise, so it cannot be used for this.) - The interpreter: one arm, which runs the body, looks at how it
ended, and calls
release.Givereads the variable and leaves it empty. The VM: the cleanup is written at each jump out of the body, and one handler passes an error on unchanged. emit_c.rsandemit_llvm.rs: with no collector and in a firmware build every way out of a block already frees what the block owns (5.8h), and the call ofreleasegoes in front of that. An ordinary build jumps over the blocks between araiseand itsexcept(5.5i), so there aScopedis a frame of the kind atryhas, which releases and jumps on. It costs what atrycosts, and only in a block that owns a resource.lower.rs:Scopedbecomes atrythat catches whatever passes, releases and passes it on unchanged, with the release also written at each other way out. One new lowered statement, "pass this error on as it was", for each emitter and each runtime.
Tests. One program that prints a line from each release, for
every way out: the end, return with a value that uses the resource,
break, continue, an error passing through two blocks that each
own one, an error caught inside, two in one block, one given away on
every path, one given away on one path of an if, one taken by a
parameter, one at the top of the file, one made in each turn of a
loop, and program.exit. It is built every way, with 0 blocks left,
and is tools/targets/edge-resource.zeno. An uncaught error that
passed through a Scoped must be reported exactly as it is without
one. Each refusal of rule 7. A program with its own Resource.
Speed. tools/same.py: a program with no resource has the C, the
IR and the bytecode it had. The interpreter gains one arm for a
statement old programs do not have; the count of step 2 confirms it.
12.2 A file read and written in pieces
import files
let source = files.read_from("big.log")
let errors = files.write_to("errors.log")
for line in source {
if line.find("error") is not none {
errors.write(line + "\n")
}
}
| Written | Gives |
|---|---|
files.read_from(path) |
a files.Reader, at the start of the file. FileError if it cannot be read |
files.write_to(path) |
a files.Writer on a new, empty file, as files.write begins one |
files.append_to(path) |
a files.Writer at the end of the file, as files.append |
reader.read_line() |
the next line without its line end, as input() gives one (6.18), or none at the end |
reader.read_bytes(count) |
up to that many bytes as a list[u8]; fewer at the end, none after it |
for line in reader |
each line in turn, one at a time |
writer.write(text), writer.write_bytes(bytes) |
writes, and adds no line end (6.13) |
A Reader and a Writer are resources (12.1): the file is closed
when its owner ends. So there is still no close, which is what 6.12
wanted of an open file: nothing to forget.
Why three functions and two types, and not open(path, "r").
6.12 turned the letters down: a wrong letter is found when the
program runs. The three names are the three that exist (read,
write, append) with the word that says "and go on from here". And
with two types, reading from a file opened for writing is a mistake
found before the program runs (principle 1).
Why for line in reader. A loop over a dict is given its keys
(6.38), and a loop over a reader is given its lines; it is what
everyone writes first. It holds one line at a time, where
files.read(path).lines() holds the file.
With no collector a line is built text, in the text room for its
statement and copied to the pool when kept (5.9c, 6.20). The open
file itself is one small block from the pool. On a board these
are the C library's, and a board with no file system answers
FileError (6.20).
How it is built. These ask the machine, so they are written for
each engine (33.10): builtins.rs for the interpreter and the VM,
runtime.c for both compilers, and each target's runtime, beside
files.read in each. checker.rs knows the two types and their
methods as it knows a Serial. The for is the one piece of
language: a loop over a Reader in the interpreter, the VM, both
compilers and lower.rs.
Tests. tools/targets/edge-files.zeno grows: a file of a
thousand lines read by for and by read_line, with both line ends
and with no line end at the end (6.17); bytes read in pieces across
the end; a file written in pieces and read back; a file opened twice
in a row, which fails on Windows if the first was not closed; a
missing file; a line longer than the text room, which stops with the
room's message. With no collector the pool must not grow over a
thousand lines.
12.3 Folders
files.list(folder) gives the names in a folder as a list of text,
sorted, so that every engine and every system gives the same list.
files.make_folder(path) makes one, and its parents.
files.join(first, second) joins two parts of a path with one /,
which every system Zeno runs on accepts; it is arithmetic on text, so
it is written in Zeno, in library/files.zeno (chapter 33). The
other two ask the machine, and are written for each engine.
This part is the last of the item and is cut loose from the rest: it can go out a release later with no change to 12.1 or 12.2.
Left for later after item 12: a resource in a field, a list or a
T or none; moving to a place in a file; a file opened for both;
removing a file or a folder; the date and the time of day.
13. Tools
Six small parts. None of them changes the language but 13.1. The first two are built now, and the other four are put off.
13.1 A message on assert
assert reply == Ack, f"the board answered {reply} to the reset"
10.17 left it out and said it could be added without changing
anything. The text is worked out only if the assert fails, and is
printed on a line of its own above "this is false. The left of ...",
which stays. It must be text. A comma, as in Python: assert is a
statement, so a comma after its condition can be nothing else.
Built in: ast.rs (Assert gains an optional text), parser.rs,
checker.rs, Interpreter::assert, printer.rs.
13.2 Tests of a compiled program: zeno test --build
$ zeno test --build --no-collector examples/ring
Each file is built as a program that runs the file and then its
tests, and prints what zeno test prints, line for line. It takes
the options zeno build takes: --firmware, --no-collector,
--llvm, --release, and --board, where the program is written as
<name>-tests.elf and the line to run it is shown, as for any
program for a board (51.5).
What it changes about a test. zeno build leaves tests out
(10.20), and a test is not held to the rules of a build. Under
--build it is: a test that shares a list is refused with no
collector, by the message a program gets. That is the point of the
command: the program is tested as it is built.
How. A test is a C function. A failed assert prints its
message and leaves the test with a jump forward to the end of that
function, the one form of goto a firmware build already uses
(5.5l); assert stands only in a test (10.17), so the jump never
crosses a function. The line of source that a failure shows is
written into the program as text, in a test build only. assert
raises is a try. main runs the program, then each test, and ends
with 1 if any failed.
Tests. For every example with tests, and one written to fail
each way an assert can fail, zeno test and zeno test --build
must print the same, built every way. --only works with it (17.5).
13.3 Stepping through a .zeno file: zeno build --debug
Put off on 2026-11-19, and not built with the rest of this page. The design below stands as it was written.
The C that a build writes gets a #line mark in front of each
statement, naming the .zeno file and the line, and the C compiler
is asked for -g -Og. Then gdb, lldb and every probe for a board
step through the Zeno, set a breakpoint at blink.zeno:12, and show
a variable under the name it has in the C (z_count). The runtime
that follows the program is marked back to the C file, so a step
into it shows C.
It goes with every kind of C build and with --board. With --llvm
it is refused for now, with a message: debug information in IR is a
tree of its own.
Tests. A build without --debug writes the C it wrote before
(tools/same.py). With it, each mark names the right line, in a
program of several files too (7.12). Where gdb is installed, a test
drives it: a breakpoint at a line of a .zeno file is reached, and
next moves a line of Zeno at a time. A page, docs/debugging.md,
walks through a session on the computer and on the emulated board.
13.4 A REPL: zeno repl
Put off on 2026-11-19, and not built with the rest of this page. The design below stands as it was written.
$ zeno repl
> let rate = 9600 baud
> rate * 2
19200 baud
> function twice(n: int) -> int {
. return n * 2
. }
> twice(21)
42
- An entry is checked, as
zeno runchecks, and then run by the interpreter, in one program that grows. An entry with a mistake shows it and leaves nothing behind. - An entry that is a value shows it, as
printwould show it inside a list, so that text has its quotes;noneshows nothing. - A line that leaves a bracket open goes on to the next.
- A name can be declared again: the new declaration takes the place of the old one. In a file that is an error (3.2), and in a REPL it is what trying something twice means. This is the one rule that differs from a file, and the page says so in its first lines.
- It reads plain lines, with no library for editing them (5.2), and works the same when its input is a file, which is how it is tested.
Built in: main.rs and a new repl.rs, on the interpreter's
ability to keep going after a program ends, which run_tests
already uses.
13.5 Completion in the editor
Put off on 2026-11-19, and not built with the rest of this page. The design below stands as it was written.
9.11 left it out because the line being typed does not parse, and the checker never sees such a file. The answer keeps the rule of 9.11, that the server answers from the checker and guesses nothing:
- The server takes the text of the editor and puts a name that no
program can write where the cursor is. After a dot that is
port.made intoport.<that name>. It closes the brackets the line left open, so that the file parses in the common cases. - The checker, asked to, notes two things when it meets that name: after a dot, the fields and methods of the type in front of the dot, or the names of the module; anywhere else, every name that can be seen from that place, with its type. Both come from the scopes the checker already walks.
- If the file still does not parse, the answer is empty. An empty answer is honest; a guess is shown as if it were known (9.11).
Tests. After a dot on an object, a list, text, a dict, a module
and a value that may be none; a name at the top of a file and
inside a function with a parameter that hides a variable; a line
inside an open bracket; a file that cannot be mended. editors/talk.py
asks for it.
13.6 Every use of a name, renaming, and where a field is declared
Put off on 2026-11-19, and not built with the rest of this page. The design below stands as it was written.
The checker's record (Use) says for each use which declaration it
means. So "every use of this name" is the uses with one declaration,
in every file of the program, and renaming is writing the new name
at each of them and at the declaration. ast::Field and a method
gain the place they are written, which 17.4 held back; then a field
and a method are found, listed and renamed too.
A rename is refused, with a reason the editor shows, when the new name is not a name, is a word of the language, is declared already in a scope where it would hide or be hidden, or when the declaration is in a package and not in the program.
Tests. A variable hidden by a parameter of the same name (only
the right ones change); a function used in three files; a field; a
name of a module (shapes.area, where only the last part changes);
each refusal. After a rename the program must check and print what
it printed.
Left for later after item 13: lines run before each test; how much of a program its tests ran; debug information through LLVM; completion in a file that cannot be mended; the VS Code extension in the Marketplace.
14. More than one thing at a time
The whole of this item was put off on 2026-11-19. Neither part is built with the rest of this page, and the question that 14.2 kept for the owner of the language waits with it. The design below stands as it was written.
missing.md says to choose one model, and the one a board can run:
tasks that take turns, with a queue between them. This is that
choice, with its reasons, and it comes in two parts of very different
size.
The model
One thing runs at a time, and it runs until it returns. A task is
a function. Something says when it is due: a time, a queue with
something in it, an edge on a pin. A loop, tasks.run(), calls each
function that is due, one after the other.
| Model | Verdict |
|---|---|
| Threads that the system switches between (C, Java, Go, Rust) | Two pieces of code can then touch one value at once. Rust guards that with ownership through the whole language; in Zeno owning is one way to build a program. And a bare board has no system to switch them. 50.3 turned this down for interrupts, for the same reasons |
| A task with a stack of its own, switched by hand (Lua, early Go) | Switching stacks is not C: it is assembly for each processor, each stack is a size somebody guessed, and no tool can then say how deep a stack gets |
async and await (JavaScript, Python, Rust) |
Two kinds of function, where one kind cannot call the other in the plain way. It is the right machine underneath (see 14.2) and the wrong thing to write |
| Functions that take turns, with queues between them | Chosen. It is how most firmware is already written, as a loop that calls each job in turn. It is what a page already does in Zeno (web.every, web.after). It needs no stack, no switch and no lock, and the rule of 50.3 holds: the program's code never runs inside an interrupt |
What it gives up: two processors working at once. That is for a server, and can come later as programs that send each other messages through the same queues.
14.1 The module tasks
import tasks
from board import analog_pin, input_pin, pull_up, falling
let probe = analog_pin(0)
let button = input_pin(2, pull_up).interrupt(falling)
let readings: tasks.Queue[int] = tasks.queue(8)
function sample() {
readings.put(probe.count())
}
function show(reading: int) {
print(reading)
}
function pressed(edges: int) {
tasks.stop()
}
tasks.every(10 ms, sample) # a time
tasks.when(readings, show) # a queue that has something in it
tasks.when_edge(button, pressed) # edges the board counted
tasks.run() # until tasks.stop(), or nothing is left to wait for
| Written | Does |
|---|---|
tasks.every(period, do) |
calls do that often. The time has a unit, and comes first, as in web.every |
tasks.after(delay, do) |
calls do once, that much later |
tasks.queue(size) |
a tasks.Queue[T] that holds at most size items. put(item) answers false when it is full, and nothing grows; take() gives the oldest, or none |
tasks.when(queue, do) |
calls do with each item, in the order they were put |
tasks.when_edge(interrupt, do) |
calls do with the number of edges, in the loop and not in the interrupt (50.3). It is the "function of the program run at each edge" that 50.6 left for this item |
| what each of those gives | a tasks.Task, with stop() |
tasks.run() |
the loop. It returns when tasks.stop() is called or no task is left |
- Nothing is shared at the same moment, so there is no lock, no
volatile, and no rule of the checker for it. A function that is called reads and changes what any function may: aletat the top of the file (audit, part 5), with one owner too. - An error that leaves a task ends the program with its message, as an error that leaves the program does.
- A task that never returns keeps every other task waiting. That is the price of the model, and the page says it in its second paragraph.
It is written in Zeno, in library/tasks.zeno (chapter 33), on
what exists: time.now(), sleep, the edges of 50.2, a generic
class for the queue, and a list of the things that are waited for,
each an object of a class that is one interface. So it needs no line
in any engine, and it runs in all four and in every target that has
a clock. That is why it is last: it leans on the generics of item 11
and on 9.2 (a function that is kept), and it is their first real
user.
Three things the library itself must learn, each small: a part
written in Zeno has held only functions so far, and must hold a
class and a let; a part may import another module that comes with
Zeno; and a program's own tasks.zeno must still win, with a test.
On a page (--web, --target html) a loop that sleeps would hold
the page still, so import tasks is refused there with a message
that names web.every.
Tests. tools/targets/edge-tasks.zeno: tasks that are due
together run in the order they were made; a queue that fills; a task
that stops itself and one that stops another; after; an error in a
task; run() returning when nothing is left. Time is driven by the
simulated board's clock, so the test waits for nothing. On the
emulated Cortex-M3 (tools/board.py) the same program, with
when_edge, with no collector, and with the pool not growing over
ten thousand turns of the loop.
Speed. The module is joined only into a program that names it
(33.3), and tools/same.py shows that every other program is the
program it was.
Left for later: waiting with the processor asleep until the next
interrupt or the next time that is due, which needs one more function
of the board; tasks on a page.
14.2 A task that waits in the middle: designed here, and not decided here
With 14.1 a task that does three things with a pause between them is three functions, or one function and a variable that says how far it got. That is how firmware is written, and it is also the part of firmware that people dislike writing. The other way is a function that can stop in the middle and go on later:
task function blink(led: Pin) {
while true {
led.toggle()
wait 500 ms # the others run meanwhile
}
}
It can be built with no stack of its own: the compiler makes such a
function into an object that keeps its variables as fields and a
number for where it is, with a step that runs to the next wait.
That is a change to the tree before any engine sees it, so it would
be written once, and it would run on 14.1 as it stands.
It is not planned here, for three reasons. It is the first thing on
this page that needs new words (task, wait), and a word is taken
from every program. It asks a question 14.1 does not: what a wait
inside a function that a task calls should mean. And whether it is
needed is best seen from programs written with 14.1. So when 14.1 is
done, this part is put to the owner of the language, with those
programs beside it.
What was tried for this page
Each of these was run on the zeno of 0.7.0, and said what the page
says it says: a function that says raises handed to map and to a
parameter of a function type, under zeno run, zeno check --strict,
zeno build --firmware and zeno build --no-collector; list[int or
none] and a dict of lists with no collector; raise e in an except
with no collector (it builds); a method kept as a value; a function
with a name inside a function; a default that is not a literal; a
list as T of a generic function and of a generic class; compose;
a field that may be none moved out; xs.append(xs.pop()); a
function of an interface that takes out of its object; an owned
class that is an interface; a default in an interface; --pool;
-> (int, int); let q, r = f(); a, b = b, a; (1, "a"); enum
Maybe[T]; interface Ordered[T]; defer; a block that stands
alone; raise e after a caught error, which names the line of the
raise and not the line the error came from.
Changes to this plan
When building a part shows that a choice above should be different, or leaves something open, the change and its reason are written here, with the date, and in the chapter of the decisions.
1. 9.1, 2026-11-19: three things the parser asked
raises after a function that returns a function. This line
builds today, and means that make raises Missing:
function make() -> function(int) -> int raises Missing { ... }
A type that reads raises for itself would take the word from
make, and the line would come to mean something else without a
word of warning, which the first rule of this page forbids. So:
raises belongs to the outermost function whose result it
follows, in a first line and in a type alike. A function type that
is itself the result, and raises, stands in brackets:
function make() -> (function(int) -> int raises ValueError) raises Missing { ... }
Brackets may stand around a function type and around nothing else:
(int) is refused, since it would be a second way to write int.
They also make something writable that was not: (function(int) ->
int) or none is a function that may be missing, where function(int)
-> int or none is, as it always was, a function whose answer may be.
Item 10 writes several results as -> (int, str); one function type
in brackets is told from that by having no comma.
Where the message for a second kind comes from. In a list of
parameters, convert: function() raises ValueError, IoError and
convert: function() raises ValueError, text are the same words to
the parser, and the second is legal today: text is a parameter with
no type. So a type always ends at the comma. Where no comma can
follow a type (a field, a let, what a function returns) the parser
gives the message. In a list of parameters the checker gives it, when
a parameter with no type has the name of a kind of error.
The gap in an ordinary build has two sides. The page said that an
ordinary build goes on accepting a function that raises where the
type does not say so. The same must hold for a value: var f = parse
and then apply(f) builds today, and f now has a type that says
raises. So the rule is one sentence: in an ordinary build, and in
zeno run, whether a function value raises is not held against a
type that does not say so; a firmware build and a build with no
collector hold it. Both sides are counted when the gap is measured.
"Raises that kind" means a kind that except of that kind would
catch, which is the test except already has.
2. 9.1 as built, 2026-11-19: what the review settled
9.1 is accepted (commits e1d726d and 809ff55, chapter 56 of the
decisions). In review it was built every way, through C and through
LLVM, with programs of the reviewer's own: a raising type as a
result, in a field, in a list, in a dict, behind or none, under a
type parameter, as the type of a parameter of a function type, with
text for an answer, and failing part of the way through map,
filter, reduce and sort a few thousand times. Every build
printed what zeno run prints, and a build with no collector ended
with 0 blocks left.
Three things the page left open, and how they were settled.
- A fault after
raisesin a type has no rule of its own. A firmware build already holds a function that saysraises ZeroDivisionErrorto raising one by hand (5.19m). Only such a function, or one that raises nothing, can be put in the type, so what comes through it always travels as a value. - A value that already has a plain function type cannot be put where a raising type is wanted, in a firmware build. It is refused with a message that says to give it the raising type where it is made. Carrying it in a block of its own would cost a block at each such place for a program that can say what it means.
- The tests of both compilers check a firmware build as
zeno build --firmwarechecks it. Before, they checked it as an ordinary build. The review ran the whole suite before and after the change, with each firmware build that a test leaves out printed: the same 48 are left out both times.tools/targets/edge-u64.zenois one of them both times, by another message than before (5.19m now, "nothing in thistrycan be caught" then), so no program lost a firmware build that it had.
Four things the review asked for. They go in with 9.2.
function() raises ValueError or noneis to be refused, with a message that says to write the brackets:(function() raises ValueError) or none. As built, the line is taken, and means a function that may be missing. A reader can as well take it to say that the function raisesValueErroror nothing (question 2 of the audit). No program of today has the line, so nothing accepted changes.function(int) or noneandfunction(int) -> int or nonekeep the meaning they have.- The note that a plain function is made raising is kept by where
the function stands, and the copies of a generic function share
that place. A program whose one line needs the function both ways,
in two copies, is refused by a firmware build with "cannot compile a
function value that raises where one that does not is wanted", and
zeno runtakes it:
function fill[T](xs: list[T], n: int) -> int {
var ys: list[T] = []
ys.append(size)
return len(ys) + len(xs) + n
}
called once with a list[function(str) -> int raises ValueError]
and once with a list[function(str) -> int]. No wrong C is
written, since each compiler checks the two are called alike. The
note is to be kept for each copy.
- A second kind inside [ ], as in list[function() raises
ValueError, FileError], gets the message for a second kind, and not
the one about how many types a list takes.
- A function that is called straight from the call that made it is
never freed with no collector: make(2)("5") leaves one block.
0.7.0 does the same, so it is older than this part. It belongs to
9.2, where the function made is a value of the statement, and is
freed at its end whether the call works or fails.
What the measurement of the gap gave (56.4): over 443 programs, closing the gap would refuse none that a strict check accepts today. The question stays with the owner of the language.
3. 9.2, 2026-11-19: three things the code asked
- A method as a value is refused by both compilers in every build today, with a collector as well. So 9.2 builds it for every build, as a block that holds the object and one small function that calls the method. Where values are shared the block shares the object. With one owner it looks when it is passed along and takes when it is kept, by the one rule of 9.2. It is a second commit of the same part.
- A value that belongs to a function further out cannot be taken
by a function written inside a function written inside it. The
function in the middle may be called again, and would have nothing
left to give the second time. It is refused, and the message says
to hand the value in as a parameter that says
take. - Where "kept" is decided. The one place that knows is the place
a value is taken over (a
let,return, a field, a parameter that saystake,append). The steps that give a value away there are made one function, so that a function that is kept gives away what it uses by the same rule aslet b = a, and not by a copy of it. The note for the compilers lists names; what each is, and so how it is freed, is for each copy of a generic function to say.
4. 9.2, first half, as built, 2026-11-19: one thing the review found
The first half of 9.2 (commits a24bb55, 80be701 and 056ef17, decision
56.8) and the four fixes asked in section 2 were reviewed the same
way: read whole, and built every way with programs of the reviewer's
own. A kept function that takes a list, an object and text at once,
that is kept in a field, made in a loop, called after the function
that made it returned, and that fails through a type that says
raises, prints what zeno run prints in every build, with 0 blocks
left. The four fixes hold.
A var is refused in every build, and it was not. Decision 56.8
says that a var of the function around stays refused. The code
refuses it only where everything has one owner. With a collector, a
var whose type says owned was taken:
function f() -> int {
var xs: owned list[int] = [1, 2]
let g = function() -> int { return len(xs) }
return g()
}
print(f())
zeno run prints 2. zeno build and zeno build --firmware write a
program that stops with a fault of memory. If xs is given a new
list after the let g line, zeno build --llvm prints the length of
the old list where zeno run prints the length of the new one. 0.7.0
refused the program, so no program of before is touched.
The rule, in every build: a function that is kept cannot take a
var. A var can be given something new after the function was
made, and the two would then hold different things, or share one
variable, which a value with one owner cannot do. The message says to
declare it with let, and does not speak of a collector where there
is one. Each compiler refuses, and does not write, a taken value it
has no plain variable for.
Two smaller things. The test of both compilers builds the new
program with no collector through C, and every way through LLVM; it
is to build it every way through C too, and one program is to write
owned in a build with a collector. And for self, the message that
says to write take on the parameter cannot be followed; it is to
say to put what the function needs in a let first.
5. 2026-11-19: what is built now is cut down
The owner of the language cut what is built now to items 9 to 12 in
full, and 13.1 and 13.2 of item 13. Parts 13.3 to 13.6 (stepping
through a .zeno file in a debugger, the REPL, completion, and
every use of a name with renaming) and the whole of item 14 (the
module tasks, and a task that waits in the middle) are put off.
Why these. Items 9 to 12 change what the language can say, and
each later one stands on an earlier one. 13.1 and 13.2 are small, and
are what the tests of every later part want: a message on a failed
assert, and the same tests run on the compiled program. The four
tools that are put off change nothing a program means, so they can
come at any time. Item 14 is the largest thing on the page and
touches memory, errors and every engine.
What it changes on this page. Nothing in the designs. The table
at the top and a line under each heading say what is put off. Of the
two questions this page kept for the owner of the language, the
second (whether to build 14.2) waits with item 14. The first, about
raises on function values in every strict check (9.1), stays, with
the number chapter 56 measured. Chapter 60 of the decisions will hold
13.1 and 13.2 only, and chapter 61 is not begun.
6. 2026-11-19: no benchmarks, and every feature is asked for
The owner of the language said two things on 2026-11-19, and both change how the rest of this page is built.
No benchmarks for these parts. "Do not do any benchmark, just
directly test the code and push it. We can do the benchmark later if
I want." So steps 2 and 3 of "Showing that nothing got slower" are
not run: the two engines are not counted and not timed, and no part
waits for them. The sizes of a board's program are not measured
again either. Whoever wants the numbers later has bench/run.py
--count and bench/compare.py, and every commit to build.
tools/same.py stays. It is a test and not a benchmark: it takes
about a minute, uses no clock, and shows the thing the second rule
below asks for, that a program which does not use a new feature is
built into the same C, IR and bytecode as before.
What was known when the benchmarks stopped, so that nobody has to
find it again. Part 9.3 was the first to change the engines. Counted
against 0.7.0, both engines ran within 0.1% on every benchmark, after
raises was put in a box and the arms of take in a function of
their own. By the clock, zeno run --vm took 4.0% longer on fib,
5.1% on trees and 4.5% on nbody (six rounds, names of one
length), with the other three inside 2% or faster. Fewer
instructions and more time has meant, each time it was run down
before (24.29, 50.7), that the same code landed somewhere else in
memory. It was not run down this time. A build (zeno build) is not
touched by any of it: its C is the same, byte for byte.
Every feature is asked for. "If I want to use anything in this feature, I have to mention some keyword or some flag. Only then I can use that. Otherwise it will go like the normal one." This is the first rule of this page ("nothing that is accepted today may come to mean something else") said from the other side, and every part is held to both:
- A program that does not write the new word, and is not built with
the new flag, runs and builds as it did.
tools/same.pyshows it for a build, and the tests of 0.7.0 show it forzeno run: they still pass, but for the few that held a refusal which a part of this page lifts. - Each feature begins with something the program or the command line says. The table is what a reader looks for:
| Part | What asks for it |
|---|---|
| 9.1 | raises written in a function type |
| 9.2 | A function written where a value goes that is kept, or object.method with no call, in a program that a build refused before |
| 9.3 | take in front of a field or an item |
| 9.4, 9.5, 9.6 | --no-collector, with a type that build refused before |
| 9.7 | --pool N, --text-room N |
| 9.8 | A function with a name inside a function, or a default that is not a literal, in a build that refused it before |
| 10 | -> (int, str), return a, b, let a, b = f() |
| 11 | enum Name[T], [T is Shape], interface Name[T], the name Ordered where the program has none of its own |
| 12 | is Resource on an owned class; files.read_from, files.write_to, files.append_to |
| 13.1 | A second thing after assert: assert c, "text" |
| 13.2 | zeno test --build |
- Nothing is switched on for a program that did not ask. Two choices above did that, and are changed:
- 9.6. The packed flags beside a
list[int or none]were to be used in every C and LLVM build, "so that a list like this gets cheaper everywhere". That would change what an ordinary build writes for a program of today that has such a list. They are now used with no collector alone, where the list is refused today. Every other build keeps its list as it is. - The strict check of
raiseson function values (the first question this page kept): it stays off, and is not asked again. If it is ever wanted, it comes as a flag. - Where a part could be built either by a new word or by doing more by itself, the word is chosen, and the chapter says so.
The release. When the last part is accepted, 0.8.0 is released
with no comparison of speed against 0.7.0. docs/release.md asks
for one before every release that adds code; the owner of the
language has put it off for this one, and the release notes say that
the engines were not timed.
7. 9.6, 2026-11-19: the list owns a block for each number
9.6 chose A, flags packed beside the values, and named B, a block for each number that the list owns, as what to build "if the code shows that A touches more than the runtime's list functions and the places both compilers read and write an item". The code showed it, and B is built, for a build with no collector alone.
Why A is not built now. The flags need a second array in the runtime's list. The runtime is written whole into every C file, so a change to its list changes the C of every program, also of one with no such list, and section 6 forbids that. The other way to have A, a second kind of list with flags, needs a copy of every list function in both compilers for each program that uses one.
What B costs. One block of the pool for each number that is
there, and nothing for a none. That is more memory than A, and the
page for it says so, and says that a list of an enum, or a number
that stands for "nothing", is the cheap way on a small board. With a
collector nothing changes. A stays under "Left for later", for a day
when the runtime's list may change.
8. Item 9 as a whole, 2026-11-20: accepted, and what the sweep missed
Item 9 was reviewed as a whole at 6d22db6 (parts 9.1 to 9.9, chapter 56 of the decisions).
What was checked.
- Every commit of the item is written by the owner of the language, and nothing in it names anybody else.
- The reviewer's own programs for each part, sixteen of them, were
run again on the last commit:
zeno runagainst the six builds (C and LLVM, each ordinary,--firmwareand--no-collector), and the count of blocks left with no collector. They cover raising types, kept functions, methods as values,take, a value with one owner under a type parameter, a dict that owns its values, a list of numbers that may benone, the pool's size, functions inside functions and defaults worked out at the call. All agree, and none leaves a block. tools/same.pyagainst azenobuilt from the tag of 0.7.0: 451 programs, fifteen ways, 6,765 builds, 6,523 the same and 242 different. Of the 242, 114 are the eight new programs of this item. The other 128 are builds of 21 older programs that 0.7.0 refused: five builds of each of two, and thirteen of a third, are built now, and the rest are refused in other words. No program that 0.7.0 built is built differently, which is what section 6 asks.- The
trialworkflow on Windows and on macOS is green on the last commit;board,minimalandplainare green on the commit of 9.9;targetsis green through 9.7 and was still running for 9.8 and 9.9 when this was written.
Accepted, with the follow-up below.
What the sweep of 9.9 missed. 9.9 says that eleven refusals of a build can be reached by a program, and lists them. A quarter of an hour of trying found four more, so the list is not yet whole:
x in xs, wherexsis a list of numbers or text that may benone, is refused by every C build ("cannot compileinbetween these two types yet") and built by every LLVM build. 0.7.0 does the same. The two compilers are held to the same programs, so C builds it.3 in range(5)is refused by both compilers ("cannot compilerangeused this way yet").- With no collector,
[3] in xsfor a list of lists is refused with "indoes not work between list[int] and list[owned list[int]]", which shows the reader a difference that is not theirs.inonly looks. - With no collector, a default that makes a list, for a parameter
that looks, is refused with the message that says to give the list
a name with
let, which cannot be done in a default.
Each is built, or gets a row and a message that says what to write.
How the list is made whole. Not by reading the compilers again.
A script, tools/refused.py, writes small programs from a table of
things to do (in, ==, <, print, str, an f-string, sort,
min, sum, an index, a slice, a for, a comprehension, a key and
a value of a dict, a field, a parameter, a result, a default, map,
filter, reduce) and a table of types (each number type, text,
bool, a quantity, an enum, an object, a list, a fixed list, a dict,
a function, and each of them where it may be none), and for each
program that zeno run takes it asks each build, with no C compiler
run, whether it refuses. It prints every program that zeno run
takes and a build refuses, and every one that C takes and LLVM
refuses or the other way round. Each line it prints is mended or is
a row of a table, and the test of the tables reads the script's
answer. It is run before each later item is sent for review, since
each adds types.
9. 2026-11-20: two builders at once, and a review that holds nobody up
Partha asked for the work to go faster, with the code no worse for it. From here two builders work at the same time, and this section is how they stay out of each other's way.
Who builds what.
| Builder | Builds | Chapters of the decisions |
|---|---|---|
| The first | The follow-up of item 9 (section 8), item 10, item 11, and the release of 0.8.0 | 57 (item 10), 58 (item 11) |
| The second | 13.1, 13.2, then 12.3, 12.1, 12.2 | 59 (item 12), 60 (13.1 and 13.2) |
A number of a chapter belongs to its item whoever comes first, so chapter 60 may stand in the file before chapter 59 is written, and each is put in its place by number, not at the end. The second builder's order is its own proposal, and it is taken: 13.1 is small and every later test can use it, 12.3 touches only the library and the built-ins, and 12.2 stands on 12.1.
A review holds nobody up. Until now the next item waited until the one before was accepted. That wait is given up, and nothing else of the review is. A builder sends an item when it is whole and goes straight on to its next one. What a review finds is mended before that builder sends anything further for review. The release is the gate: 0.8.0 is not released until every item of both builders is accepted and every finding is mended. The reason: the wait bought nothing a later mend does not also buy, since nothing reaches a user before the release, and it cost the builder the whole time of each review.
One history, in one line. Both push to main. Before each push:
fetch, put one's own commits on top of main as it is (a rebase,
never a merge commit, never a forced push), run cargo test again if
the other builder's commits touched the compiler, then push. Small
commits pushed often keep what must be put together small.
Where the two meet in a file, both are kept.
docs/decisions.md: chapters in the order of their numbers.docs/releases/0.8.0.md: each feature under its own heading, in the order of the items; "Fixed" stays last.tools/history-notes.txt: in the order of the commits onmain.docs/missing.md: each builder writes only the rows of its items.- The tables of what a build refuses, and
tools/refused.py: the first builder writes the script. The second adds its kinds of value to it once it is onmain, and runs it before its item 12 is sent. - Operations of the virtual machine: a new one goes after the last
one on
mainat the time of the push. Whoever pushes second moves its own. The bytecode of a program that uses no new feature stays what 0.7.0 wrote, whichtools/same.pyshows. - The interfaces that come with Zeno.
Ordered(11.2) andResource(12.1) are not one mechanism.Orderedis a question the checker answers about a type (does<work on two of it), and no class can say it yet.Resourceis an ordinary interface with one function, declared before the program is read. Each builder builds its own. Both follow one rule, which is already in both designs: a name the program declares itself is the program's. If both come to the same place in the checker where such a name is looked up, the second to push keeps the first's code and adds to it. - Each builder names its test programs after its own item, so no two have one name.
Neither builder mends the other's code. A builder that finds a fault in the other's work, or a workflow made red by the other's commit, tells the other and the planner, with the program that shows it. It mends only what its own item cannot go on without, and says so in the commit.
Where two items meet in a program, whoever pushes second tests the pair. The pairs that are known now:
- Several values from one function (10) where one of them is a
Resource(12.1): when is it released, if the values are taken apart at the call, and if the result is not used at all. - A
Resourceas what a type parameter stands for, and in a case of a generic enum (11.1): it is released once, when the enum's owner ends. [T is Resource]as a bound (11.2): built like any interface of a program, or refused with a message. Not left to chance.- A message on
assert(13.1), andzeno test --build(13.2), in a test that takes several values from one function (10).
The planner tries each pair again in the last review before the release, whoever wrote the test.
What stays as it was. No benchmarks. Every feature is asked for
by a word or a flag. tools/same.py against a zeno built from the
tag of 0.7.0. Six builds that agree with zeno run, and no block
left with no collector. Commits in Partha's name alone. The release
is made by the first builder, with no comparison of speed, after the
last acceptance; the second builder writes its own part of the
release notes and tells the first what the book and the website need
for items 12 and 13.
10. 2026-11-20: the follow-up of item 9, and a runtime that grows only for a program that asks
The follow-up of section 8 is on main (0ddcb6a, 5d8b280, chapter
56.19) and is accepted, with one thing to mend.
What was checked. A program of the planner's own with every case
of section 8 (in on lists of numbers, text, floats and bools that
may be none; in range(...) with one, two and three numbers and a
step below zero; range as a value, printed, measured, indexed, empty
and summed; [3] in rows; a list and a dict made in a default):
zeno run, zeno run --vm and six builds agree, and no block is left
with no collector. tools/refused.py: 705 programs, 4,044 builds,
138 refused in six ways, each a row of a table, and C and LLVM refuse
the same programs. Three commits, in Partha's name, with no other
name in them.
The one thing. range(...) as a value added a function,
zeno_range_list, to the runtime, and every build holds the whole
runtime. So every C file and every IR file is now written differently
from 0.7.0: tools/same.py against the tag says 3,091 of 6,765
differ. The builder said so, and showed with a second zeno, built
without the function, that nothing else changed. That is honest and
it is not enough, for two reasons.
- The test is the proof of Partha's rule that a program which asks
for nothing is built as before (section 6). A test that must be run
against a
zenomade by hand for the purpose will not be run that way every time, and with two builders adding to the runtime it would soon say "everything differs" and nothing more. - A compiler that does not drop a function nobody calls (the plain C of item 8 is for such compilers) would put the function into the flash of a board whose program never asked for it.
The rule, for both builders, from now on. The runtime of a
program that uses nothing new is, to the byte, the runtime 0.7.0
wrote. Whatever a part adds to the runtime is a piece with a name,
and a piece is written into a program's runtime only if the program
uses what the piece is for, in C and in LLVM alike. It is the way
with_spares_checked already writes the checking of spare blocks
only into a build that asks (56.15), made general: one table of
pieces, one set of the pieces a program used, filled while the
program is compiled. The first builder builds it now, with
zeno_range_list as its first piece, before item 10 goes further
into the runtime; the second builder uses it for whatever 12 and 13
add. A test holds that the runtime with no piece is the text of
0.7.0's runtime, so a line slipped in outside a piece fails at once.
After it, tools/same.py against the tag must again say that no
program 0.7.0 built is built differently, with the zeno everyone
uses and no other.
Turned down: teaching tools/same.py to leave the runtime out of
what it compares. It would make the test pass and leave the second
reason standing, and the runtime is half of what a program is.
The targets workflow. The run for 9.9 (e9a4346) is green. The
run for 9.8 (fae3563) has stood "in progress" since 00:12Z; its
commit is under 9.9's, which passed every program in every language,
so it is taken as a runner that hangs and not as a fault of 9.8.
11. 2026-11-20: three builders
Partha said more threads may be used. Item 11 has a builder of its own from now on, and section 9 holds for three as it held for two.
| Builder | Builds | Chapters of the decisions |
|---|---|---|
| The first | The runtime in pieces (section 10), item 10, and the release of 0.8.0 | 57 (item 10) |
| The second | 13.1, 13.2, then 12.3, 12.1, 12.2 | 59 (item 12), 60 (13.1 and 13.2) |
| The third | Item 11: 11.1, 11.2, 11.3, 11.4, and 11.5 only if it is a small step | 58 (item 11) |
Why item 11 can be cut loose. Its design is nearly all in the
parser and the checker, and the compilers write one more copy of
what they already write for a generic class. It stands on 9.4 (a
value with one owner as what a type parameter stands for), which is
on main. Nothing in it waits for item 10.
The third builder sends 11.1 to 11.3 as one piece for review, then 11.4, then 11.5 or the reason it stays refused. 11.4 changes what the checker asks of a call through an interface with no collector, which is a different matter from generics and is read by itself.
Ordered (11.2) is the third builder's, as section 9 gave it to
whoever builds item 11.
Where the items meet, whoever pushes second tests the pair. With those of section 9:
- Several values from one function (10) in a generic function, and
where one of the values is a
Maybe[T]. matchon a generic enum inside a test with a message on itsassert, underzeno test --build(13.2).
The release is still the first builder's, after the last acceptance of all three. The second and the third each write their own part of the release notes and tell the first what the book and the website need.
12. 13.2, 2026-11-20: five things the code asked
The second builder read 13.2 against the code and found five places
where this page was wrong or silent. zeno test prints, for a file,
its path, what the program prints, a line for each test, and then the
report of each failure; and after the last file one line of totals.
- An
assertin a function written inside a test. This page said anassertstands only in a test, so the jump out of a failed one never crosses a function. The parser takes anassertin a function literal that is written in a test.zeno testgoes on taking it, as 0.7.0 did.zeno test --buildrefuses it and says what to write: let the function give back what it found, andassertthat. A way out of a function whose type says it raises nothing does not exist in a firmware build, and making one for this would be a second kind of error. It is a row of the table of what a build refuses. - A failed
assertleaves the test asreturndoes. It reports, and then takes the road each build already has out of atryand past what must be freed. No new road, no block left, and noexceptcatches it. - The reports are held until every line is printed, as
zeno testprints them. They are held in a fixed room of 8 KB that exists only in a test build: nothing is asked of the pool, so it works with no collector and on a board. A report that does not fit is left out whole and counted, and one line says how many were left out and thatzeno testshows them all. Two things are added to the builder's proposal. The room is not written intosrc/runtime.c(section 10): it is text of the test build. And a program that is stopped before its last test, by a fault or byprogram.exit, prints what it holds before it ends, where the platform has a moment for that (a host has), so a fault in the fifth test does not cost the reports of the first four. - How the command learns the count. Not from the number the
program ends with, which the builder proposed. A program that an
error or a fault stops already ends with 1, and
program.exitcan end it with any number, so "ended with 1" would mean one failed test, or a fault, or neither; and a number that stops at 100 makes the line of totals wrong past it. Instead: - The program ends with 1 if a test failed and 0 if none did, as this page said. - Run by itself, on a board or by hand, the program prints the line of totals for its file itself, since nobody else will. - Run byzeno test --build, it is given the name of a file to write to (in the environment), prints no line of totals, and writes one mark there as each test ends, passed or failed, and a last mark after the last test, each written through at once. The command adds the marks up. A file with no last mark is a program that was stopped: the test it was in is counted as failed and named, and the command says the tests after it were not run. Nothing the program prints is read for its meaning, so no line a program prints can be taken for a result. - An error that leaves a test is shown at the line that raised
it, in whatever file. A test build holds the text of every file
of the program and looks the line up, so the report is the one
zeno testprints, notes and all. It costs flash on a board, in a test build only, and chapter 60 says so. A fault of a firmware build stops the test program as it stops any program (5.5l); the command says which test it was in, by the marks of 4. That is a real difference fromzeno testand is written down as one.
13. Item 11, 2026-11-20: the numbers inside chapter 58, and how 11.1 is built
- Chapter 58 is in two runs, so that 11.4 can be built by another hand than the rest: 58.1 to 58.19 for 11.1, 11.2, 11.3 and 11.5, and 58.20 onward for 11.4. Where the two meet is the checker's code for interfaces: 11.3 changes what a class says it is from a list of names to a list of types, and 11.4 reads the same list. Whoever pushes second keeps the first's code.
- 11.1 as the builder means to build it is right: a copy of a
generic enum is an enum of its own with its origin kept, as a copy
of a class is; each case expression notes which copy it means; a
matchfinds its case in the enum of what it matches on; an enum that is not generic takes none of these roads, so what is written for it does not change. One thing is asked of it: the note of which copy a case means is kept for each copy of the generic it stands in, by declaration, line and column (56.8), sincereturn Just(x)inwrap[T]means anotherMaybein each copy ofwrap. Item 9 had this fault once. And what a reader sees isMaybe[int], in every message and in whatprintshows, in every build.
14. 11.4, 2026-11-20: a fourth builder, and three things the code asked
11.4 has a builder of its own, with 58.20 onward (section 13). It read 11.4 against the code and found three things.
58.20. A default in an interface. This page said the class writes the same default as the interface, always. But 0.7.0 takes a class with a default where its interface writes none, and such a program must go on being taken. So:
- Where the interface writes a default, the class writes the same one, or it is refused with both shown.
- Where the interface writes none, the class may have its own, as in 0.7.0. A call through the interface then gives every argument, and a call that leaves one out is refused there, so the two calls still cannot differ without the reader being told.
- A default in an interface is a plain value: a number (a minus in
front of it allowed), text with no
{ }in it,true,false,none, a quantity such as5 ms, and a case of an enum that carries nothing. A timeout with a unit is the default firmware writes most, so it is not left out. "The same" is the same value:1_000and1000are,5 msand5000 usare,FastandFastare. Anything else as a default in an interface is refused.
58.21. What takes out, through an interface. This page said the checker works it out the first time the function is called through the interface. That breaks where a class calls through its own interface while it is still being checked, and where a copy of a generic is made later (11.3). Instead the checker keeps the set of functions of interfaces that some class's function takes out for; a class adds to it where it was refused before; a call through the interface is held to the guards of 5.15e when its function is in the set. The set only grows, so the rounds the checker already makes end. One thing is asked: what is reported comes from a round in which the set did not grow, so that a call read before a class that comes later in the file, in another file, or in a copy made later, is held to the same guards as one read after. A program of 0.7.0 has an empty set and is checked as before.
58.22. owned interface. Taking out is not the whole of why an
owned class could not be an interface. With a collector a value of
an interface is shared, and an owned object put where a shared one is
wanted would be an owned thing inside a shared one, which 5.8
forbids.
| How | Verdict | |
|---|---|---|
| A | owned interface Shape: its values have one owner, only an owned class can be it, and an owned class can only be an owned interface |
Chosen. It is the sentence owned class already is, with the word already reserved, on the first line of the interface where its reader looks. Each mismatch is refused and says which word to write |
| B | A value of an interface is owned when what was put into it is | The same type would be shared at one line and owned at the next, and nothing on the page would say which |
| C | Leave the refusal | 10.10 left it open, and a Resource (12.1) needs it |
With no collector, and in a file that says memory owned, nothing
changes: an interface is owned there already.
Where this meets 12.1. Only an owned class can be a Resource
(12.1, rule 2). So Resource is an owned interface, and 12.1's
rule 2 is this rule and not one of its own, once 58.22 is on main.
Where it meets 11.3: owned interface Source[T]. Whoever pushes
second tests the pair.
Tests asked for beyond those of 11.4: a class that calls through
its own interface; the class that takes out declared after the call,
and in a second file; each kind of default, equal in another
spelling, and unequal; a plain class that says it is an owned
interface, and an owned class that says it is a plain one; an
owned interface in a list, as a parameter with and without take,
as a field; built every way, no block left.
15. 2026-11-20: the runtime in pieces is in, and several values where no type is written
The mend of section 10 is accepted (43c17bf). tools/same.py
against the zeno built from the tag of 0.7.0, run by the planner
with the ordinary zeno and no other: 6,492 of 6,765 the same and
273 different, which is the 242 of section 8 and 31 more. The 31 are
two samples of the book that 0.7.0 refused and that are built now
(print(range(5)) and let numbers = range(1, 11), thirteen ways
each) and one that is refused in fewer words (five ways). No program
that 0.7.0 built is built differently.
Item 10, rule 3, in a program with no types. The builder asked.
Where a type is written, or the function called is known by its
name, a call that gives several values in a place for one is refused
before the program runs; return a, b in a function's body says that
it gives several, with no type needed. What is left is a call
through a function value of no known type, as in function apply(f)
{ return f(7, 2) }. There:
- It is held where the values are received: the count, and one against several, when the program runs. This is the builder's ruling and it is taken. To hold it at every use would put a test into every call and every store of every program, and the bytecode of a program that uses nothing new would no longer be what 0.7.0 wrote.
- Shown, it never reads as values. The builder had it print as
1, 2. Inside a list that reads[1, 2], a list of two, where there is a list of one thing that is no value at all. It prints as<2 values: 1, 2>, in every engine and every target, as a function prints as<function one>: a thing that can be shown and is plainly not data. It costs no test anywhere, since it is only what the one place that already writes it out writes. - An operator, an index or a field on it gets the message such a thing gets on a wrong kind of value, and the kind is named "2 values", with the line of rule 3 after it: receive each.
- Chapter 57 says that carrying several values through names with no type is not caught until they are received or looked at, and why.
16. Item 10 as a whole, 2026-11-20: accepted, with one fault and four small things to mend
Item 10 is on main in one commit (0c6e6f8, chapter 57) and is
accepted, with the mending below before the release.
What was checked. Three programs of the planner's own, in zeno
run, the virtual machine, six builds, and JavaScript, Python, Ruby,
PHP, Go and Java: two numbers, two texts, an object with an enum, two
lists with a number, a function that raises and gives two, values
that may be none, a result passed on, a generic swap, a function
that calls itself, swaps of numbers, lists, objects, fields and
items, a method, a function of an interface, a function inside a
function, a kept function, a method used as a value, _, and the
order in which the right is worked out and the left is filled. All
agree. Each misuse that rule 3 names is refused with its message, and
with no types written the values show as <2 values: 3, 1> and a
wrong count is caught where they are received. The formatter leaves
all three as they are. tools/same.py against the tag: 6,795 builds,
303 different, which is the 273 of section 15 and the thirty builds
of the two new programs. tools/refused.py ends with 0. One commit
and its note, in Partha's name, with no other name in them.
The fault. With no collector, when several values are written
out, in a return or on the right of =, and a later one raises
after an earlier one made something that has one owner, the earlier
one is never given back:
function both(n: int) -> (list[int], str) raises ValueError {
return make(n), fail(n) # fail raises: the list of make stays
}
Four blocks are left by a loop that runs this four times, in the C
build, the LLVM build and the firmware build alike, and the same
with let xs, s = make(n), fail(n) and with xs, s = make(n),
fail(n). The same two calls as the arguments of one call, or as the
fields of a new object, leave nothing, so the road exists; several
values written out do not take it. It is mended, and the three forms
become a test that counts blocks.
Four small things.
- A name twice on the left.
a, a = divide(7, 2)is taken and leaves 1 ina.let a, ais refused already. The same plain name twice on the left of=is refused too: one of the two values would be thrown away by a line that says it is kept. (Two items,xs[i], xs[j], stay as they are: which item is not known until the line runs, and the order of rule 4 says what happens.) _where the program has a_._is a name a program of 0.7.0 may give a variable. Invar _ = 9followed by_, b = divide(7, 2)the_is left at 9 with nothing said. Where a name_can be seen,_as a place on the left is refused, and the message says to give the variable another name. No program of 0.7.0 has such a line.- Several values given as arguments.
divide(divide(9, 2))says thatdivideneeds a value forb. It should say what rule 3 says, which is the mistake that was made. - The message for
(int, int)written as a type elsewhere shows(int, str)in quotes whatever was written. It shows what was written.
Taken as the builder ruled: the line of rule 3 is not added after each message for a wrong kind of value where no type is written. There are some thirty such places in each of fourteen engines, and the kind is named "2 values" in each, which says it.
Not seen by the planner: Lua, Dart, Kotlin, C#, C++, Rust,
TypeScript and WebAssembly, which the targets workflow checks. The
builder reads that run and says how it ended.
17. 13.1 and 13.2, 2026-11-20: accepted
13.1 (56d31ac) and 13.2 (3a7b737, with e2c9d2c where it meets item 10) are accepted, with nothing to mend. Chapter 60.
What was checked. A file of the planner's own with twelve tests
that pass and fail each way a test can: a message that is worked out,
an error that leaves, an assert that fails while its test holds two
objects and is inside a loop, an enum on both sides, assert raises
that raises nothing, several values, floats, an assert inside a
try, a bare bool. zeno test --build prints what zeno test
prints, to the byte, built through C and LLVM, each ordinary, for
firmware and with no collector, and with --release; with no
collector no block is left. A folder of three files, one of which
fails inside a file it imports, gives the same totals and the same
report, and --only chooses the same tests. A fault in the third of
four tests in a firmware build: the report of the first is printed
before the program ends, the command names the test it stopped in and
says one was not run. program.exit(0) in a test is said the same
way. Sixty failures with long messages: twenty-four are shown and one
line says thirty-six did not fit. An assert in a function written
in a test, and a test that shares a list with no collector, are
refused before anything is built, by a message that says what to
write. tools/same.py against the tag gives the 303 of section 16,
so nothing that 0.7.0 built changed; tools/refused.py ends with 0;
src/runtime.c is not touched. Five commits in Partha's name, with
no other name in them.
One place the builder differs from section 12, and is right. The
refusal of an assert in a function inside a test is not a row of
the table of what a build refuses: the test of that table holds each
row to a program that zeno build refuses, and zeno build leaves
tests out. It is a sentence under the table that points to
docs/testing.md, which has the refusal and the table of what
differs from zeno test.
Not seen by the planner: a board. The builder ran a test build
for boards/qemu-cortex-m3 under QEMU and reports the same lines and
an end with 1.
18. 2026-11-20: 12.3 is accepted, and three things 12.1 asked
12.3, folders (4390fa8, b57c0f8, decisions 59.20 to 59.23) is
accepted. A program of the planner's own makes folders (one
there already, one with a file in the way, one with an empty path),
writes names that sort differently by every language's own order,
and lists them, a file, a missing folder, "" and ".", fifty
times over in a loop: zeno run, the virtual machine, six builds and
JavaScript, Python, Ruby, PHP, Go and Java print the same, and with
no collector no block is left. tools/same.py against the tag: 318
different, the 303 of section 17 and the fifteen builds of the new
program, so the two pieces of the runtime are written only into a
program that lists or makes a folder. Three small things for the
page, none of them in the code:
files.join("a//", "b")givesa//b. The page says "one/between the two parts, whatever they had at their ends". It should say what is done: where both have one, one is dropped.files.join("a", "")givesa/. The page says what an empty first part does and not what an empty second does.- Java, run where the system's locale is not UTF-8, lists
éas?(seen here with noLANG; withLC_ALL=C.UTF-8it agrees). It belongs in "What it does not do", beside the other limits of the JVM.
12.1, three things the code asked.
- A
Resourceamong several values (item 10).let file, count = open_both()is refused in this version, under rule 7, and the message says to give back the resource alone or to put the two in anowned class. Rule 7 keeps a resource to aletof one name because the rewrite works for one name; letting several in later changes no program. So the pair of section 9 is tested as a refusal. - A resource at the top of a file, and the file's tests. The
builder proposed to refuse a test that uses one, since
zeno testruns the tests after the file's last line, when it would have been released. That is not taken, because it cannot be made whole: a test can reach the resource through a function it calls, or through a function held as a value, and with no collector a miss is a block used after it was given back. Instead: when a file is run for its tests, the top of the file ends after its last test. A test sees the file's variables, asdocs/testing.mdhas always said, and a list that the top of a file owns is already alive in a test of a build with no collector, where it is given back after the tests. A resource is a value with one owner and goes the same road: itsreleasestands in front of that giving back. So inzeno testand inzeno test --builda resource of the top of the file is released after the last test, last made first, and inzeno runandzeno buildafter the last line, as before. If that is more than a small step in some engine, the builder says which before building anything else in its place. - Where the release of a resource at the top runs. After the
last statement of the top, when the program ends as it should. An
error that nothing catches releases on its way out and is then
reported as it was: the lines a
releaseprints come before the report, in every engine, and a test holds that order.program.exitand a fault of a firmware build do not release (rule 6).
Rule 6 is set right on one point. It named a failed assert
among the things that stop a program and release nothing. An
assert stands only in a test, and a failed one leaves its test, as
an error does in zeno test and as return does in a test build
(section 12). So it releases what the blocks of that test own, which
is what lets the next test open the same file. It does not release a
resource of the top of the file: the tests go on.
19. 2026-11-20: the mending of item 10 and 11.4 are accepted
Item 10's mending (510336b) is accepted, and item 10 is closed
but for the targets run the builder is to report. The planner's
program that left eight blocks leaves none, in the three builds with
no collector, and so do the other two; all three still agree in six
builds. a, a = ... is refused; _ on the left where a variable
_ can be seen is refused, with let and without; several values
given as arguments get the message of rule 3; a list of types
written elsewhere is shown as it was written.
11.4 (f5d4e01 to 3c28ca2, decisions 58.20 to 58.23) is accepted, with nothing to mend.
- What was checked. A program of the planner's own with an
owned interfaceof two owned classes, one that takes out of a list and one that takes out of a field that may benone; defaults in the interface that are a number, text, an enum's case under both spellings, a float below zero and abool; the interface as what a function returns, as a parameter that takes, in an owned list, as a field and as a field that may benone; two hundred rounds of making, filling and draining.zeno run, the virtual machine, six builds, JavaScript, Python and Go agree; with no collector no block is left; with a collector the C build runs under valgrind with nothing lost. Taking out through an interface is refused for a parameter that only looks, when the class is declared after the call and when it is in another file, and a class that calls through its own interface builds every way. Each mismatch ofownedand each wrong default is refused with a message that says what to write.tools/same.pyagainst the tag: 378 different, which is the 318 of section 18, the fifteen builds of the new program, and forty-five builds of three new samples in the book's chapter on functions;tools/refused.pyends with 0. - Where the builder differs from section 14, and is right.
5 msagainst5000 uscannot arise, since the unit is the parameter's type. With no collector a class withoutownedmay be anowned interface, as a plain class there may hold anything owned. - Left for 11.3. The set of what takes out is kept by the interface's declaration, so the copies of a generic interface would share one entry. That refuses more than it need and nothing it should take; whoever builds 11.3 looks at it then.
Resource (12.1) can now be declared as an owned interface.
20. 12.2, 2026-11-20: a Reader and a Writer are written in Zeno
This page said the two types are known to the checker "as it knows a
Serial": built in, and written for each engine. The second builder
proposed another way, before building, and it is taken.
A. The two types are classes of library/files.zeno. Each is an
owned class that is a Resource (12.1) and holds the number of an
open file; read_line, read_bytes, write and write_bytes are
its functions, and its release closes the file. What asks the
machine is five small built-in functions beside files.read: open,
the next line, up to so many bytes, write, close. The reason: the
release, its order, every way out of a block and every target then
come from 12.1 with nothing new, where a built-in type would have
been a second thing that is released, written again in four engines
and fifteen runtimes. It is also how math.hypot came to be written
once (chapter 33).
Four things are asked of it.
- A program cannot make one, or touch its number. Only
files.read_from,files.write_toandfiles.append_tomake aReaderor aWriter.files.Reader(3)in a program is refused, and so is reading or changing the number it holds. In C the number is the address of the open file, so a number a program made up would be a wild address. The five built-ins are reached only fromlibrary/files.zeno; anywhere else they are not defined, so there is still noclosefor a program to forget. - A
writehands its text to the system before it returns. Zeno holds nothing back to be written when the file is closed. Areleaseraises nothing (12.1, rule 3), so whatever was still waiting at the close and could not be written would be lost without a word. This way thewritethat met the full disk raises theFileError, on its own line. A writer that gathers its pieces is left for later. - A file is opened as bytes on every system, so that a line end is what Zeno says it is (6.17) and not what Windows makes of it.
- The five built-ins are pieces of the runtime (section 10), and the two classes are in a library that gives a program only what it uses, so a program that opens no file is built as before.
B. for line in reader is rewritten by the checker into the loop
a program would write with read_line, with a name of its own that
no program can write, so break and continue mean what they mean
in any for and no engine learns a new loop. A for over any other
class stays refused. for line in files.read_from(path), with no
let, is refused by rule 7 of 12.1, and the message says to give the
reader a name first.
Also to settle in chapter 59, by the builder: what read_bytes
does with a count below zero, with its message; and that a line that
is not UTF-8 raises what files.read raises for such a file.
The tests of 12.2 stay as they were written, and one is added: a
write to a place that cannot be written raises at the write.
21. 11.1 to 11.3, 2026-11-20: accepted
Generic enums (b0a22b2, 58.1 and 58.2), bounds (7357805, 58.3 to 58.5) and generic interfaces (144f4f6, 58.6) are accepted, with one small thing to add.
What was checked. Two programs of the planner's own. The first:
Maybe[T], Result[T, E] and a Tree[T] that holds itself; a
generic function that wraps a number, text, a float, a bool and a
list, each a copy of its own; Nothing given its type by a result,
a variable and a parameter; match that takes an object and a list
out of a case; a list and a dict of Maybe, a Maybe that may be
none, a Maybe of a Maybe; == between cases; three hundred
rounds. The second: largest[T is Ordered] over ints, floats, text,
a quantity and u8; a bound that is an interface of the program,
with a list[Circle]; a class with a bound on one of two
parameters; Source[T] with a class that is Source[int], one that
is Source[str] and a generic one that is Source[T]; a
list[Source[int]]; a bound that is a copy, [S is Source[str]].
zeno run, the virtual machine, six builds and JavaScript, Python,
Go, Java, Ruby and PHP agree on both, and with no collector no block
is left. Twenty-six misuses each get a message that says what to
write: Nothing where nothing says its type, a case left out of a
match, a case name in two enums, a type that is not Ordered, a
class that says it is, a bound that is not an interface, two
interfaces for one parameter, a function the bound does not have, a
class that says Source with no type, the wrong copy. A program's
own Ordered is the program's. tools/refused.py ends with 0.
tools/same.py against the tag: 541 different of 7,035; each is a
program 0.7.0 refused, or one of two that item 9 accounted for
(the mend of a crash on a field of a parameter that may be none).
Six commits in Partha's name, with no other name in them.
Section 19 is set right: the copies of a generic interface do not share an entry in the set of what takes out; each copy has its own, and a test holds it.
The one thing to add. The builder found that first([200 ms, 1
s]), a list of two units of one kind given to a generic, runs under
zeno run and is refused by every build ("cannot tell what T
is"), in 0.7.0 as now. By the rule of 9.9 a build takes what zeno
run takes or the refusal is a row of the table. It is built, or it
becomes a row with a message that says to write both in one unit,
and tools/refused.py learns the case.
The targets run on item 10 (0c6e6f8) ended green in every
language, so item 10 is closed.
22. 11.5, 2026-11-20: it stays refused, and item 11 is accepted
11.5, a method with a type parameter of its own, stays refused
(ba41819, decision 58.7), as section 11.5 allowed if it was not a
small step. The builder's count is taken: a method read with a dot
is one function to the checker, so it would need a generic that is
bound to its object as a value, copies made for each copy of the
class and found as methods by both compilers, and the rules of one
owner for self in each copy; a dozen places in four files, none
shared with 58.1 to 58.6, and no program has asked. What a reader
gets instead is the way to write it today: the message shows the
function of the file that takes the object first, with the class's
own type parameters in front, function convert[T, U](box: Box[T],
...). The planner wrote that function for a Box[T] and changed
its type three times over; it agrees in six builds and leaves no
block.
The list of two units (section 21) stays refused by a build, for
a reason that holds: a build gives a list one type, and a list of
ms would print 1000 ms where zeno run prints 1 s. The message
now says why T cannot be told and what to write (58.8), for two
units and for an int beside a float; it is a row of the table, and
tools/refused.py tries both.
One small thing, older than 0.8.0: the refusal of such a method points at the first line of the class, and the method is lines below. It should point at the method.
Item 11 is accepted: 11.1, 11.2, 11.3 (section 21), 11.4 (section 19), and 11.5 refused with its reason.
23. 12.1, 2026-11-20: accepted, with one fault to mend
Read: 117c236 (the code, in every engine, build and target, with its
tests and tools/targets/edge-resource.zeno) and 9fb78a8 (decisions
59.1 to 59.5, docs/resource.md, the release notes).
What was tried, with programs of my own.
- Every way out of a block: its end, a
returnthat uses the resource in its value,break,continue, an error passing through two blocks, an error caught inside, two resources in one block (the last made is released first), one given away on one path only, one taken by a parameter, one returned, one moved, a recursion, an innerletof the same name, and a hundred rounds of a loop.zeno run, the VM, the six builds and the targets js, py, go, java, ruby and php print the same lines. - With no collector (C, LLVM, and with
--firmware): 0 blocks left at the end. The C build with a collector is clean under valgrind. - A resource held as
Resourcethrough the interface, taken by a parameter of that type, returned as that type and met in the arms of amatch: released once in each case.program.exitreleases nothing, as rule 5 says. - An error nobody catches: the releases print before the report, in
every build. A fault that stops a firmware program releases
nothing, as
docs/resource.mdsays. - Tests: resources at the top of a file used by its tests, a failed
assertinside a loop, an error leaving a test.zeno testandzeno test --buildprint the same bytes in seven builds, with 0 blocks left. - Each place rule 7 forbids is refused with a message that names it:
a
var, a field, a list, a dict,or none, a case of an enum, a result nobody keeps, a call ofreleaseby hand, areleasethat raises or takes a parameter or gives a value, a class with norelease, a class that is notowned, a use after giving away, a giving away inside a loop, and a function that is kept. tools/same.pyagainst a zeno built from tag v0.7.0: 646 of 7,155 different, none a program 0.7.0 built (541 before; the 105 are the new program of 12.1 and six new programs of the book's chapter on generics, fifteen ways each).tools/refused.pyends with 0.
The two choices the builder made stand. A resource may be held as
Resource (let r: Resource = h), because Resource is an owned
interface (58.22) and one owner is all the rule needs. A bound
[T is Resource] is refused at the call and not at the function, as
every bound is (58.3).
The fault. Several values written out, one of them a resource, are taken:
let a, b = hold("received"), 1
and a is never released, in every engine. With no collector its
block is freed and its release never runs. Rule 7 keeps a resource
to a let of one name, and a call that gives several is refused
already; the values written out must be refused the same way, in a
let and in the plain form, on either side of the comma, with a
test for each.
Two messages.
- The refusal of a resource among several values ends "or put the
values together in an
owned class". A field cannot hold a resource (rule 7), so that advice leads into the next refusal. It is to say only: give the resource back alone. This corrects the wording I asked for in section 18, item 1, which was mine and wrong. - A resource made in a default (
function f(h: Held = hold("d"))) is refused with "nothing keeps it, so it would be released at once", which is not what happens there. It is to say that a default cannot make a resource, and to pass one at the call.
12.1 is accepted. The fault and the two messages are mended before 12.2 is sent, and seen with the last check before the release.
24. 12.2, 2026-11-20: read, and sent back with two faults
Read: 0d12e31 (the code), 9645274 (decisions 59.6 and 59.7,
docs/files-in-pieces.md), and ab9fdc7, the mend of 12.1 that
section 23 asked for.
The mend of 12.1 is accepted. A resource written out among
several values is refused in a let and in the plain form, on either
side of the comma, and so is one that is moved (let c, d = h, 2); a
default cannot make a resource and says so; the refusal of several
values no longer points at an owned class.
What holds in 12.2, tried with programs of my own.
- A thousand lines with both line ends by
forand byread_line;breakandcontinuein theforand the reader going on after it; lines and bytes mixed; a reader looked at by one function, taken by another, given back by a third and held asResource; two readers of one file; an error going past a writer, after which the file is removed and made again; every shape of line end;append_tomaking a file; a line that is not text, and the reader going on after it;/dev/full, caught at thewrite, for text and bytes.zeno run, the VM, the six builds and the targets js, py, php, ruby, go, java, cpp and rust print the same lines. - With no collector: 0 blocks left, the pool the same for ten lines and for a thousand, a file opened five thousand times in a row (more than a program may hold open), a line longer than the text room stopping with the room's message, a small file asked for a million bytes taking only its own size. The C build is clean under valgrind and leaves no file open.
- A file of three million bytes in one line, and copied 8,192 bytes at a time: the copy is the same file.
- The four conditions of section 20. A program cannot make a Reader
or a Writer, read or set its number, or name any of the six
built-ins, by
importor byfrom; each is refused in the words a program would have got before they were there. Awritehands its text over before it gives back. The file is opened as bytes. The six are one piece of the runtime, and a program that reads whole files only is, in C and in LLVM IR, byte for byte what 0.7.0 made. - Each misuse is refused with a message:
forover a reader nobody keeps,forover a Writer, writing to a Reader, reading from a Writer,releaseby hand, and each place rule 7 forbids. - A program's own
Reader,Writer,read_from,write_toandhandle_openwin, and its C is 0.7.0's. Its ownReaderbesidefiles.Readeris two types. - Tests of a file that holds a reader at its top:
zeno testandzeno test --buildprint the same bytes through C in four builds. tools/same.pyagainst a zeno built from tag v0.7.0: 691 of 7,185 different, none a program 0.7.0 built (646 before; the 45 areedge-files.zeno, which now uses a Reader, and two new programs of the book's chapter on ownership).tools/refused.pyends with 0.
Fault 1: a file that grows after its end was reached. The engines disagree, which no gate allows:
let out = files.write_to(path)
let source = files.read_from(path)
print(source.read_line()) # none: the file is empty
out.write("one\n")
print(source.read_line()) # zeno run: one. A build: none
zeno run, the VM and the targets py, ruby, go, java and rust read
what was added. The six builds, js, php and cpp give none for ever
(in C the end of a file is remembered by getc; read_bytes there
reads on, because its fseek forgets it). Lua, dart, kotlin, cs, ts
and wasm were not tried here.
The rule, which 59.6 gains: the end of a file is where it ends at
that moment. read_line gives none and read_bytes gives no bytes
there, and a later read looks again. It is what the first paragraph
of docs/files-in-pieces.md promises ("a file that grows while the
program runs"), what the interpreter does, and the only rule under
which a program can follow a log. The other rule, a reader that has
said none says it for ever, would be as easy to make equal and
would forbid that use. What is at the end without a line end is given
as a line, as the last line of any file is; a reader does not wait
for a line to be finished, and "What it does not do" says so.
Every engine and target is made to agree, and
tools/targets/edge-files.zeno and the test of the builds gain the
case: a line, bytes and a for, each after more was written.
Fault 2: zeno test --build --llvm does not link a file that uses
a piece of the runtime. Where 13.2 meets the pieces of section 10:
the LLVM road of the tests (build_and_run_tests in main.rs, and
the one in test_build.rs) takes the runtime without
with_pieces(.., pieces_in_ir(..)), so every piece is left out and
the link fails with undefined reference to zeno_files_handle_open.
It is older than 12.2: a test that calls files.list fails the same
way, and files.make_folder and a list made of a range must. Both
places are mended, with a test that builds one file per piece of
PIECES through --llvm, so that a piece added later is tried by
itself.
The targets run is red. At 12.1's commit (run 56): Lua, mended
since by 615a32b, and wasm, where files.list("") in
edge-folders.zeno lists the folder the program runs in and every
other engine raises there is no folder ``. That is 12.3's, and
it is mended. The release waits for a green run.
Three things in the documents.
- "How it is tested" says
edge-files.zenois built every way.zeno buildrefuses that program (its function literals raise without saying so), as it did in 0.7.0; the builds are held bya_file_in_pieces_is_the_same_in_every_buildand its neighbours inemit_c.rs. The list names those. - With no collector: a line longer than the text room stops the
program with the room's message, and
read_bytes(count)takes its bytes from the pool. Both are tested and neither is in the document. -
An error nobody catches is reported at its line in
library/files.zeno, wherefiles.readnames the line of the program:error: uncaught FileError: there is no file
nope.txt--> library/files.zeno:86:19
This is 33.2 (a part of the library is named like any file), in
every engine, and it stays for 0.8.0: naming the program's line as
well needs the line of the call carried into every engine and
target, which is a piece of work of its own. The document says it,
with zeno join as the way to read that file, and
docs/missing.md lists it as something to do.
12.2 is not accepted yet. The design, the four conditions, the refusals and the builds as they stand are right; the two faults, the wasm folder and the documents are mended and sent again, and I read the mend with the last check of where the items meet.
25. 2026-11-20: the last check of where the items meet, and one crash
With every item in, I wrote programs that use the new things together, and ran them every way.
What holds.
- One function that holds two resources (one its own, one a
files.Reader), reads a file withfor, catchesFileError, and gives several values of which one is a generic enum (-> (Result[str, str], int)); a generic that gives(Maybe[T], int); a function type that says what it raises and is given a reader to look at; a reader and the program's own resource taken throughtake Resource;_for a value not wanted; files made in a folder withfiles.join, listed and read back.zeno run, the VM, C in three builds, and js, py, php, ruby, go, java, cpp and rust print the same lines; 0 blocks left with no collector. LLVM in three builds agrees once the crash below is stepped around. - Tests: a generic with a bound that gives several values, a generic
interface as a bound, a failing
assertwith a message beside several values, and one inside a block that holds a resource.zeno testandzeno test --buildprint the same bytes in seven builds. - A bound of
Resource([R is Resource]) is refused at the call with the message of rule 7, as section 23 let stand;take Resourceis the way, and it works.
The crash: a function that is named, given to a function that gives several values, in every LLVM build (item 10):
function count(at: str) -> int {
return len(at)
}
function apply(each: function(str) -> int) -> (int, int) {
return each("abc"), 2
}
let n, big = apply(count)
print(n, big)
zeno run and C print 3 2. zeno build --llvm, with and without
--firmware and --no-collector, stops with a segmentation fault,
or prints text that is not the program's. The IR shows why: the
function is @z_apply(ptr %arg.each, ptr %gives.2), and the call is
call i64 @z_apply(ptr @zeno.value.count), without the place for
the second value. A function literal in the same spot is called
rightly, and so are a method value and a variable that holds the
function; a generic (both(4, double) with -> (T, T)) and a second
value that is text fail the same way. It is mended in the call, with
the program above and those two in edge-several-2.zeno, which every
build runs.
Still open before the release: this crash (first builder), the
mend of 12.2 (second builder, section 24), and a green targets run.
The wasm case of files.list("") was mended in fe23d35 while this
was written.
26. 2026-11-20: the crash of section 25 is mended
Read: 6c93f7a. The small function that makes a named function a
value set the places for several values for its own inner call and
did not put back what was there, so the call around it found an
empty list. It now keeps its own apart and restores the outer ones;
the two other places in emit_llvm.rs that set them already did.
Tried: the programs of section 25, and a wider one (a named function
given at the top of the file and inside a function, one that gives
several values given to one that gives several, a method value that
gives several, one call inside another, a thousand rounds), through
zeno run, the VM, C with and without a collector, and LLVM in three
builds, each under valgrind: the same lines, no fault, 0 blocks left.
The program that uses everything together now agrees in every LLVM
build as it stands. tools/same.py against the tag is unchanged:
691 of 7,185, none a program 0.7.0 built.
Accepted. Left before the release: the mend of 12.2 (section 24) and a green targets run.
27. 2026-11-20: 12.2 is accepted, and with it every item
Read: fe23d35 (wasm, files.list("")), 53c24be (the code), c1b5897
(decision 59.6 and the documents).
- A file that grows. The program of section 24 (a line, a line
with no end yet, bytes, a
for, each after more was written, a write after a failed write, a writer whose file was removed) prints the same lines inzeno run, the VM, the six builds and js, py, php, ruby, go, java, cpp and rust. 59.6 has the rule, and the document has "A file that grows" and says the reader does not wait. - Tests built through LLVM. A test file that holds a reader at
its top, and one that lists a folder, give under
zeno test --build --llvm(three builds) the byteszeno testgives. The new test builds one file for each piece of the runtime, and fails on a piece nobody wrote a file for. - The documents say how the builds are tested, what a line longer
than the text room does with no collector, and where an error nobody
catches is reported;
docs/missing.mdlists the last. tools/same.pyagainst the tag: 691 of 7,185 different, as before the mend, none a program 0.7.0 built.tools/refused.pyends with 0. No name but Partha's in any commit.
12.2 is accepted, and item 12 with it. Items 9, 10, 11 (11.5 refused with its reason), 12 and 13.1, 13.2 are all accepted, every finding of every review is mended, and the last check of where the items meet is done (sections 25, 26).
The release. The first builder releases 0.8.0, with no speed
comparison (section 6). One thing stands between this and the tag:
the targets run on the commit that is tagged must be green. Run 56
was red (Lua and wasm, both mended since); the run on 6b81910 holds
both mends and the grown edge-files.zeno on dart, kotlin and cs,
which no builder could run by hand. If it is red, its target is
mended by the builder whose item it is, before the tag.
28. 2026-11-20: folders on Windows and macOS, found by the trial
The trial on the other systems (trial.yml, run for the release) is
red in 12.3, which section 18 accepted on Linux alone. That was my
miss: docs/folders.md says "on Linux, macOS and Windows", and I
took it without a run there. Two things, both the second builder's.
bandB. A test makes both and expects two names. On a disk that takes them for one name (macOS and Windows as they come) there is one file, and that is the disk's rule, not Zeno's. The tests use names that differ by more than their case, keeping one capital among them so the order by character number is still tried; and "What it does not do" says that Zeno lists what the disk holds, so two names that differ only by case may be one file.éthrough the C build on Windows. A name thatfiles.listgives must open its file when handed tofiles.read, and must be the textzeno runlists, on every system. In the C build on Windows it comes back encoded twice. It is mended inside the piecesZENO_FILES_LISTandZENO_FILES_MAKE_FOLDER: by the runtime rule (section 10) the runtime of a program that lists no folder stays 0.7.0's, byte for byte, so the wayfiles.readopens a path is not changed to fit.
The tag waits for both: the trial green on Windows and macOS, and the targets run green, on the commit that is tagged.
29. 2026-11-20: folders on Windows and macOS are mended
Read: dc369eb, 132e3a1, 728f562, f65f31e. The trial is green on Windows (run 46) and macOS (run 47).
- Names that differ only by case are gone from the tests, and
docs/folders.mdsays that Zeno lists what the disk holds. - A name through the C build on Windows. The pieces of
files.listandfiles.make_foldernow take a name as bytes through the code page, asfopendoes, so a file the program wrote is listed by the name it was given and a listed name opens, byfiles.readand byfiles.read_from(tested). The change is inside the two pieces, as section 28 asked:tools/same.pyagainst the tag shows no program of 0.7.0 built differently (721 of 7,215 different; the 30 since section 27 are two new programs of the book's chapter on reading and writing, which use a Reader). - What is left, and said in 59.20 and
docs/folders.md: in a C or LLVM build on Windows a file name goes through the code page, as it did forfiles.readandfiles.writein 0.7.0. A name the code page cannot hold, made by another program, is listed with question marks and does not open. To take names as UTF-8 there changes how every file function opens a path, in the runtime of every program, so it is a decision for a later version;docs/missing.mdgains a row for it.
Accepted. The tag waits for a green targets run on the commit that is tagged, and for nothing else of mine.
30. 2026-11-20: the targets run is green, and what the tag may hold
Targets run 60, on 6b81910, is green on all fifteen targets. That commit holds every item, the mend of the crash through LLVM (section 26) and the mend of a file in pieces (section 27).
After it came the mend of folders for Windows and macOS (section 29):
the Windows half of two runtime pieces, tests, and one name in
tools/targets/edge-folders.zeno (B.txt became C.txt). Run 61,
on 14ad637, tries that; the second builder ran the three programs of
item 12 on all fifteen targets by hand on that code, and they agree.
The rule for the tag. It goes on a commit that differs from the
last commit with a green targets run only in documents, the book,
the history and the text of the version. So: run 61 green, and then
nothing but such things before the tag. A change to src/,
library/ or tools/targets/ after it wants a run of its own.
With that, nothing of the plan is open. What was put off stays in
docs/missing.md: 13.3 to 13.6 and item 14 (section 5), a line for
an error raised inside the library (section 24), and UTF-8 file
names in a build on Windows (section 29).
31. 2026-11-20: Zeno 0.8.0 is out, and this plan is closed
Released 2026-11-20 12:26 UTC: tag v0.8.0 at bc9f25b, 23 files.
- Targets run 61, on 14ad637, is green on all fifteen targets, and
the tag differs from that commit in documents, the book, the notes
and one workflow of the stores only: nothing under
src/,library/ortools/targets/(the rule of section 30). - The trial is green on Windows and macOS (section 29).
- From
v0.7.0tov0.8.0: 137 commits, each written and committed as Partha, and no other name in any message or any line. - No speed comparison was made, as section 6 says, and the notes say so.
What 0.8.0 holds of this plan: item 9 (what a build with no
collector used to refuse, and raises in a function's type), item 10
(several values from a function), item 11 (generic enums, bounds,
generic interfaces, defaults in an interface, owned interface),
item 12 (is Resource, a file read and written in pieces, folders),
and of item 13 the message on assert and zeno test --build.
What it does not, and where each is written down: 11.5, a method
with a type parameter of its own (refused, 58.7); 13.3 to 13.6 and
all of item 14 (section 5; their designs stay above); an error raised
inside the library naming the program's line too (section 24); UTF-8
file names in a build on Windows (section 29); removing a folder
(docs/folders.md). docs/missing.md lists them.
Every feature is asked for by a word or a flag, and tools/same.py
against a zeno built from v0.7.0 showed, at the last review, no
program that 0.7.0 built being built differently.
This page is docs/plan-9-14.md in the language repository.