Where this is at the end of the day, and what is not merged

This commit is contained in:
Joseph Ferano 2026-09-13 16:11:57 +07:00
parent 861f591bb0
commit 3b15501c4f

63
NEXT.md
View File

@ -1,3 +1,66 @@
# Where this is — end of 2026-09-13
**Branch `dev-loop` at `861f591`, working tree clean, `dune test` green.** Read this section first;
everything below it is the standing queue and the decision record.
## Landed today, merged
- **Generics.** Monomorphisation, checked abstractly, `$t` at the binding site and bare `t` at a use.
`{:where (ordered? $t)}` as a Clojure-style map at the head of a body — five predicates: `ordered?`,
`equal?`, `hashable?`, `numeric?`, `copyable?`. **A type variable is move-only by default**; `copyable?`
is the opt-out. Prelude went 80 → 69 defns. A generic may also key a map now, which was a hole closed
the same day. `Tast` and every backend are untouched — instantiation lives entirely in `check.ml`.
- **The x86 backend runs.** `flan build --x86` writes `.s` and hands it to the same clang. **40 of 111
test programs build through it and print exactly what the LLVM build prints.** Off by default.
- **`pause` marking, both halves.** `C-u` before an eval marks the innermost form, `C-u C-u` the
top-level one.
- **`spy-num`.** A watch slot keeps count, min, max, last, mean, windowed to the editor's last tick.
- **Frame rollback**, `PORTING.md` Tier 1 item 6. `restore` goes in the `continue` clause, not a defer.
- **The dev allocation registry is finished.** `M-x flan-inspect-address`, `M-x flan-allocations`,
`M-x flan-leaks`.
- **15 raylib examples**, an idiomatic layer over the bindings, and `vendor/raylib/vector.flan`.
- **The raylib header is tracked** at `vendor/raylib/raylib-5.5.h`. `FLAN_RAYLIB_H` is gone and the
check runs on every build.
- **`{K V}` is dropped.** `(Map K V)` is the only map type spelling.
- **Two test-infrastructure fixes worth not re-deriving:** the socket flake was an ordering bug, not a
race (the test checked for a socket before completing any round-trip); and `the daemon never
listened` was never a race either — it was an llc-and-link taking 6.6s against a 5s await, because
`Build.cachedir` sat under dune's per-run `TMPDIR` and every build was cold. Both fixed.
## Unmerged, and deliberately so
**`worktree-agent-a859480edc827ab73` — macros importable from a package.** Builds clean,
`test/programs/pkg-macro.flan` runs and prints the right answers, **but `dune test` was never run** and
the acceptance wiring is unfinished. `HANDOFF-macros.md` on that branch has the six remaining items.
The finding in it is worth keeping whatever happens to the code: the old refusal claimed collecting a
package's macros needed a second import resolver at the Form level. It did not. The file being compiled
is parsed before `Load` runs too, so no shape of the feature could have left import resolution where it
was — `Load.program` takes forms now and uses the one resolver that always existed.
Its customer is `with-drawing`/`with-mode-2d` over raylib's begin/end pairs, which a lane tried to add
and could not.
**`worktree-agent-a4dca263c97eb0b66`** is an older WIP, "the inspector's address root, half wired on
the Emacs side". **Superseded** — the registry lane built that properly. Delete it.
## What I would do next
1. **Finish the macro branch.** Run `dune test`, fix the mechanical breakage from `Load.program`'s
changed signature, then the five other items in its handoff.
2. **The pointer-length question** — its own queued section below. It blocks three raylib examples and
leaves the hand-written `Font` surface with no example caller.
3. **Generic structs and `$n` array lengths** — queued below, decided, and now unblocked since the
generics lane has merged.
4. `HANDOFF-f1.md` has one item left: whether `merged_serve`'s 10s warning path
(`lib/dev.ml:2322-2326`) deserves a test.
## For siam-farmer
`PORTING.md`'s verdict is unconditional now: the game's state is **fixed arrays with counts**, so it
fits in `defvar` globals, nothing is move-only, and generics is off its critical path. Tier 0 and Tier 1
items 4, 5 and 6 are all done. Nothing blocks writing it.
## Queued: a pointer from C needs a length before it can be indexed
**Sequenced after the generics lane**, which holds `lib/check.ml`.