93 Commits

Author SHA1 Message Date
c1018d87c5 Every reference to the removed .flan files is updated, generated.fln's stale banner line is regenerated, and the ported .fln files read like handwritten Flan. 2026-09-26 18:13:56 +07:00
5d5018011e Vendor packages, examples/*, and sand.flan are ported from .flan to .fln, and flan generate-c writes generated.fln. 2026-09-26 17:07:04 +07:00
6c6b5a60cb ?? continues a line, a chain or an unwrap is no place to assign, nested marks and a ? on a value say what to write, a lowercase type takes ?, and a predicate reads as a word with its name beside it. 2026-09-26 15:36:49 +07:00
7db1a81d1f Builtins, prelude, vendor and raylib predicates are named with is- or has- and no name carries a ? or !. 2026-09-26 14:34:36 +07:00
4eefd25df9 A class instance refuses a key its class does not declare, read or written, through get, put, .field and [:key]. 2026-09-26 06:02:51 +07:00
1022b7c7f9 Merge branch 'master' into worktree-agent-af3c12884ed5f2255 2026-09-26 05:54:17 +07:00
605eb97e75 A dyn value's .field and [:key] read as get and assign as put. 2026-09-26 05:52:56 +07:00
267db2cd91 The typed read-only text type is spelled str, and string is refused with that fix. 2026-09-26 05:22:24 +07:00
a14e633a21 A pointer's element type can be cast and a slice made from a pointer and a count with slice-from 2026-09-25 22:35:34 +07:00
a39d96149d slice-from-ptr is refused with the slice-from call to write, and the pointer cast's const rule is documented as covering the outer pointer only 2026-09-25 22:35:24 +07:00
70b9040512 type-of answers a dyn value's kind as a keyword, and a class cannot be named after a built-in kind 2026-09-25 22:29:26 +07:00
4b1e722854 slice-from makes a slice from a pointer and any integer count, and ((Ptr U) p) casts a pointer's element type without dropping const 2026-09-25 22:24:11 +07:00
e80411d283 type-of answers a value's kind as a keyword or an instance's class name, and a class named like a kind is refused. 2026-09-25 22:18:36 +07:00
a1e5e39dba Master's changes are merged into the dyn printing lane, with its converter fixture 2026-09-25 22:11:04 +07:00
4f060bb648 Dyn and typed containers print as [1 2 3] and {:a 1}, a refused dyn view names the value and a dyn fix in the file's own syntax, and a dyn function whose body gives no value says so by name 2026-09-25 22:01:40 +07:00
c3a05d7447 The site says a match over a bool needs no _ arm 2026-09-25 21:37:44 +07:00
18581a452c = and != compare bools, a match over a bool takes true and false arms, a match over a dyn takes keyword arms, and where predicates joined with and are refused with the comma or vector form as the fix 2026-09-25 21:35:31 +07:00
111ee66a4b A match arm can be a number, char or string literal compared with =, over a number, a string or a dyn, with a _ arm required 2026-09-25 20:51:24 +07:00
89e4f53895 Places are evaluated once, enums have a predicate, CFn values live in structs, and a program's names cannot break the prelude 2026-09-25 17:12:56 +07:00
4c336687ef Master's error recovery is merged, and the refusal memos are consulted only where a refusal is raised 2026-09-25 17:03:32 +07:00
2c8bd61a20 (free s) hands a slice (bytes s) or (clone xs) made back to the context allocator or a named one, a dev build traps on the wrong allocator, and a sliced array literal lives for its whole function on x86 2026-09-25 16:48:09 +07:00
b8c81d94ee enum? admits exactly the enums, entails ordered? and equal?, and licenses a generic conversion from an enum to a number beside numeric? 2026-09-25 15:26:27 +07:00
b0323606fc spike/ is gone: the x86 and JS surveys and the cells check live in test/, their probes in test/programs as x86-p* and js-p*, and dump.sh in tools/ 2026-09-25 15:14:27 +07:00
5646ae148e Merge master; an expression evaluated at a stop runs against a scratch temp arena that is wiped after it, and the program's own temp arena is never rolled back 2026-09-25 14:09:30 +07:00
b2eb81f7bf A slice or pointer can be read-only, and what it reaches cannot be written through it 2026-09-25 13:39:04 +07:00
d2f25a6e44 Merge branch 'master' into worktree-agent-a9288676abb278ffb 2026-09-25 13:35:10 +07:00
53880eb685 A class slot's type names its own package's class first, an int widens into a float slot exactly when it round-trips, and a constructor's refusal names the call that was wrong 2026-09-25 13:29:30 +07:00
042c969e30 Every description of an Allocator value says it is two words 2026-09-25 12:55:38 +07:00
16427f8d07 A class slot may be a class or an Option, an int widens into a float slot when exact, a gained typed slot starts at its zero, and a migration never re-enters itself 2026-09-25 12:55:25 +07:00
37e577d5e1 (Ptr const T) is documented beside [const T], and the TODO entries for it are closed 2026-09-25 12:46:07 +07:00
1d219b526c Merge master into the typed class slots lane 2026-09-25 12:14:42 +07:00
6e8cc52bc7 Merge branch 'master' into worktree-agent-ad097f67134ba0552 2026-09-25 12:02:48 +07:00
e0af3c9b1d A method of update-instance-for-redefined-class runs on each instance as it migrates, and one that signals offers migrate-by-name 2026-09-25 11:55:40 +07:00
2ff1da88da A slice can be read-only: bytes-view answers a [const u8], and a store through one is refused at compile time 2026-09-25 11:43:41 +07:00
2682214499 A defclass slot may declare a type that every store into it checks, and set writes a declared slot 2026-09-25 11:40:08 +07:00
0d771494a6 Merge branch 'master' into worktree-agent-a8f5ad274482eeb9c 2026-09-25 11:07:02 +07:00
39d35f51db A function whose signature changed installs, and a caller compiled against the old one stops on StaleCall at the call
A dev cell carries its body's signature word beside the body, every call through a cell (and every function value taken from one) compares it with the word the site was compiled for, and the session lists the stale callers by file and line on the reply. Both backends, both installers; release builds have neither the word nor the compare.
2026-09-25 10:40:18 +07:00
dd160aa31b A return computes its value before it runs its defers 2026-09-25 10:19:09 +07:00
793b0eea9e A defn- is private to its module, the package's own macros may write calls to it, and the refusal names the fix 2026-09-25 08:55:37 +07:00
63f1a1357f Merge branch 'master' into worktree-agent-ad23aafb29b84cc8b 2026-09-25 08:33:28 +07:00
6fd456c0a2 A function declared with defn- is callable only from the files of its own package 2026-09-25 07:42:40 +07:00
8b354d4bc8 The notes say what is built: no pool, frames on x86, implicit widening, and the budget in the spec 2026-09-25 07:05:55 +07:00
45cc4d20e8 One file holds what five did
# Conflicts:
#	FIX.org
2026-09-21 21:07:40 +07:00
57fe91f303 Five records become one, and every citation lands somewhere
FIX.org, NEXT.md, DISCUSS.org, docs/DISCUSS.md and the session handoff at the
root are one TODO.org now: 293 entries under seven subsystem headings, each
carrying an org keyword that says where it stands. A DONE entry is a few lines
saying what was decided and what that rules out; the reasoning that would not
compress — the embedding spike and the four reports the hand-written x86
backend was built from — moved into docs/BUILT.md instead, and its entries
point there in one line.

Every entry was checked against the tree before it got a keyword, and the
prose was wrong in both directions. Things the deleted files called open were
built: the first-evaluation stall, main being redefinable, macro parameter
lists, the type-limit constants, the array constructors, the byte fills,
inc/dec, the discard's fontification, the Emacs buffers, rt_die's _exit, the
backtrace surface, and the acceptance failure that could print and still exit
zero. Things they called done were not: the backend reports' no-plan buckets
had gone stale in the other direction, the value-dependent defvar was
superseded rather than built, and macro-expansion source locations are on an
unmerged lane, so that entry is NEXT and names the branch.

Every comment that cited one of the five by name now cites a heading that
exists, in TODO.org or in docs/BUILT.md. The session reports under
docs/handoffs/ keep naming the files they worked on, because rewriting them
would falsify what those sessions did; each carries a note saying where the
content went.
2026-09-21 21:05:48 +07:00
23e272a24f The reference page describes the language that exists, dyn and classes included 2026-09-21 19:34:08 +07:00
4cb53a0a9f What the two function types changed in the documents
The four refusals the function-value lane wrote down are now three and a
half: capture is a feature, the escape is the refusal in its place, and a
struct field or a global of function type is refused for the same zero as
before with a sharper reason behind it.  The handler note is amended
rather than deleted -- its reading was right, and saying so is worth more
than a clean paragraph.

The convention section carries both rulings, the name and every name it
beat, the warning that CFn is not C interop today, the four reasons to
reach for it, what was measured rather than asserted about an ordinary
defn, and the wasm32 finding that killed the first design -- being
exactly typed is checkable by a verifier and the alternative was an
argument from a calling convention.

FIX.org carries the rulings verbatim, what the escaping lane inherits and
changes, the thunk's environment holding a code pointer rather than a GC
object, and two things recorded and not built: a CFn under a future
--no-conditions reaching C's exact convention, and CFn in a struct or a
fixed array, which ZII refuses and capture has nothing to do with.
2026-09-21 13:41:44 +07:00
a885c1b0f1 The page quotes the usage and the grid it has now
Two quotes had drifted: flan check's --warn-memory line, which the page
never carried, and the sand hash, which changed when the generator did.
2026-09-21 13:12:51 +07:00
d6fc15474b The count is length, so len is a name a program can have
The author: "I think I prefer length over len, because then I'll use len as
the variable name". One arm in check.ml, one row in the table beside it, and
every (len x) in lib, test, examples, vendor, spike, docs, web, emacs,
plan.org and NEXT.md rewritten.

Shadowing and builtin/ had already taken most of the sting out: a (defn len
...) was legal and won in its own file, and builtin/len reached past it. What
was left is that len was still a builtin — the defn earned a warning, and a
wrapper had to say builtin/ at every inner call. Now there is nothing under
the short name: len is an ordinary identifier in every position, which is
what (let [len (length xs)] ...) wants.

length takes over as shadowing's worked example rather than the feature
losing one. shadow-builtin.flan, builtin-qualified.flan, pkgs/shadowed and the
builtin/ rows in test_flan move to it and go on testing shadowing.

A call to a len nothing defines is answered where an unknown function is,
after every table and after the shadowing guard, so a program with its own len
never reaches it. The sentence is said rather than guessed at — len and length
are three edits apart and the did-you-mean's net is one — and the call is
written back out through spell_arg, as-slice's spelling lifted out of it and
now shared, so what is printed compiles.

sand.flan:33 still calls the old name and is the author's to change; until it
does, test_acceptance and test_session abort there. Both were run green
against a copy with that one line changed. FIX.org says so.
2026-09-21 11:58:56 +07:00
a0278378ab Five randomness functions, and a draw wide enough to answer them
rand-int, rand, rand-bool, rand-int-range and rand-float-range, at the widths
the author ruled: a u64 draw and an f64 in [0, 1). rand-seed and rand-state
keep their names. The four old names are not names, and each is refused by the
one that is, with a call that compiles — in both the call and the bare-name
position, because a Lisp-1 makes the second a real thing to write.

The generator's step is untouched, so a seed means what it meant. Its output
function is not: PCG-XSH-RR folded the state to 32 bits, and no honest u64 or
53-bit f64 comes out of 32 bits without a second step. PCG-RXS-M-XS 64 answers
64 from the same one, so all five still cost exactly one draw and a seeded run
is reproducible. The price, written where it lives: the permutation is a
bijection of the state, which is what 64 output bits from 64 state bits costs.

The sequence is therefore a different one, and programs/rand.flan pins it —
reproducibility across the five, the single-draw cost of each, the half-open
boundaries, and rand-bool's count over a thousand flips.

sand.flan is not touched. It calls rand-f32, so the cases that compile or
re-evaluate it skip themselves on the fixture rather than on a comment: fix
its two calls and every one of them runs again. Its hash is the old
generator's grid and gets re-taken then.
2026-09-21 10:57:18 +07:00
9ce51ba94e One slice over everything with elements, and the warning at the push
as-slice was a warning, not an operation. The input type already decides
which of the two things happens — a Vec can only be borrowed, an array or a
string can only be viewed, and no call site picks between them — so the second
name expressed no choice a reader could make. And it warned at the moment the
view is taken, which is the one moment nothing is wrong; the danger arrives
later, at the push. slice now takes a Vec at all three arities and as-slice
is gone.

(slice v lo) was free, and is the arity the Vec never had: the runtime already
reads a hi of -1 as "to the end", so the tail form passes the caller's lo and
the same -1 — no slot, no length read, no second evaluation. The merge is
entirely in the checker; the Vec path builds the flan_vec_as_slice call it
always built and neither backend has a line about any of it.

A Vec a call returned is refused at every arity, and not for the array's
reason. (slice (mk)) over an array dangles. (slice (make-vec)) does not — the
storage outlives the expression — but the header is a temporary, so nothing
can ever free the block. The refusal says that and names the let.

The name's own refusal sits in ordinary_call after every table, so a program
that defines an as-slice still reaches its own. It reads for somebody who has
never heard of the old name and writes the call back out, spelling each
argument that is a name or a number.

The warning moved to where it bites: BUILT.md gains a section beside the Vec
table and the push row points at it, spec-memory.md's Borrowing says the same.
Investigated and deliberately not built — a diagnostic for a live view at the
push. (reserve v 100) then a slice, a push and a read is correct code under
the contract the spec chose, so any flag on it is a false positive by the
language's own semantics rather than by an approximation. FIX.org has the
finding and the syntactic sketch that does not work.
2026-09-21 09:51:35 +07:00