State how every read of a name stays on one pick, and why a fresh read leaves it

This commit is contained in:
2026-10-05 23:08:53 +02:00
committed by Lillem4n
parent dc9d962690
commit 977431b1e3
3 changed files with 8 additions and 6 deletions
+5
View File
@@ -141,6 +141,11 @@ func (sc renderScope) frameOf(scope *nameScope) *pickFrame {
return nil
}
// readName reads a from its name's pick in the frame rendering the name's scope. Every read of
// one pick stays on it: the pick keeps each path's value and variant in its memo and its rows in
// its pins. A read entering another category takes the frames of the name scopes there from the
// memo too (enter), and renderFrame finds them and opens none. So {a.street} and {a.postal-code} in
// data/sv_SE/address.json read one pick of the name l that data/geo/SE/address.json binds.
func readName(s *drawstate.State, sc renderScope, a arm) readValue {
f := sc.frameOf(a.named.scope)
if f == nil {
+3 -1
View File
@@ -144,7 +144,9 @@ func expand(s *drawstate.State, t *template, sc renderScope) string {
// readField renders one arm of a token. A read of a name, or of a level a read of the name
// rendering addresses, is kept in that name's pick; every other read draws afresh, so {word}
// {word} draws twice and {p.a} {p.b} reads two draws of p.
// {word} draws twice and {p.a} {p.b} reads two draws of p. A fresh read leaves the pick: a read
// below it would key the pick's memo by sc.pickKey, the level the pick rendered, and read the
// pick's value for a node the pick never drew.
func readField(s *drawstate.State, t *template, sc renderScope, a arm) readValue {
switch {
case a.kind == namedRead:
-5
View File
@@ -74,7 +74,6 @@
| 96 | 0.1.0 | | **Refuse two reads into one sibling, category or struct category that no name joins, `{place.postal-code} {place.locality}`, showing the spelling for one pick and the one for two.** | 4 | 4 | 7 | 7 | 5.6, 4 | 20.9 |
| 128 | 0.1.0 | decision | **Run the nine-seat comprehension panel and the scoring run again once items 118 to 126 have merged, and file what the panel names.** | 1 | 3 | 3 | 9 | 3 | 20.4 |
| 91 | 0.1.0 | | **Accept a path through a name as a `calc` operand, so `{/misc.coordinate as c}{c}: {calc(c.lat * 60)}` computes from the coordinate `{c}` prints.** | 3 | 4 | 6 | 7 | 4.1, 5.3 | 19.9 |
| 119 | 0.1.0 | | **State at `readName` how every read of a name stays on one pick (`enter` reuses the memo's frames, and `renderFrame` opens none where `frameOf` finds one), and state at `readField` why a fresh read clears the pick.** | 2 | 2 | 2 | 9 | 3.4, 3.2 | 17.7 |
| 89 | 0.1.0 | | **Fail `New` without `WithSeed`, naming the option, and seed the CLI from the system.** | 3 | 3 | 6 | 7 | 10.1 | 16.0 |
| 127 | 0.1.0 | | **Give a Swedish street only postal codes whose delivery digit means street or rural delivery, dropping codes whose delivery digit is 9, or record why they stay.** | 3 | 3 | 4 | 6 | 4 | 14.4 |
| 118 | 0.1.0 | | **Give a pick key one type, so `pathArm`, `compileArm`, `addressedKeys`, `keeps`, `readUnder` and `checkTemplateOnce` spell it one way, and `arm.levels` start at the same level for a fresh read and a named read.** | 5 | 5 | 2 | 9 | 3.2, 3.3 | 13.9 |
@@ -257,10 +256,6 @@ The decision "comprehension floor: every dimension and the overall at 7.0 or abo
A calc operand parses as a bare identifier, so `{calc(c.lat * 60)}` fails with `unexpected ".lat * 60"`, and a second binding of `/misc.coordinate.lat` would draw another coordinate. Resolve the path through `compileArm`'s leaves, as `operandNodes` does for a bare name.
### 119. State at `readName` how every read of a name stays on one pick (`enter` reuses the memo's frames, and `renderFrame` opens none where `frameOf` finds one), and state at `readField` why a fresh read clears the pick.
All nine seats in the panel of 2026-10-05 named `readField`, `readName`, `readUnder` and `enter` hardest, and six of the seven unit-level seats would least want to modify them. Each seat had to trace why `{a.street}` and `{a.postal-code}` in `data/sv_SE/address.json` read the same locality, the one the name `l` picks in `data/geo/SE/address.json`. Two seats asked why a fresh read in `readField` sets `sc.pick = nil`.
### 89. Fail `New` without `WithSeed`, naming the option, and seed the CLI from the system.
Goal 10.1 has the caller supply the seed, and today `New` without `WithSeed` seeds itself. This item ships in 0.1.0 beside item 77, so `New` breaks once before anyone depends on it. Mark `WithSeed` required in the Library section's options table. Its tests then stop swapping `randomBytes`, as `fejkdata_test.go` does today, which fails every `New` in the package while that test runs.