From cc54cd6077fc5902217060d284ab4aeeb34c69bd Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Thu, 24 Sep 2026 10:06:28 +0200 Subject: [PATCH] Correct the prose the pin set made false, and delete what the code already says --- README.md | 2 +- hold.go | 8 ++++---- holdset.go | 3 --- path.go | 6 ++++-- pins.go | 7 ++----- todo.md | 14 ++++++-------- 6 files changed, 17 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 78ca477..c8d3bf5 100644 --- a/README.md +++ b/README.md @@ -1338,7 +1338,7 @@ record.go records: Record, the JSON/CSV/SQL serializers, and their entry p struct.go structs: FakeStruct, fake tags, and a field's Go type as its column's datatype inline.go inline templates: Template, NewTemplate, FakeTemplate, IsTemplate, and their compile and link template.go the {token} grammar: scanning, tokens, operands, validation, compiling a format -hold.go the hold: one draw per expansion for paths and operands +hold.go the hold: one draw per held name, and reading a field through it holdfence.go the load fences over the hold: the routes and spellings that read one held name two ways holdset.go one reference draw per render and group: the hold set a render reads its paths through drawfence.go the load fences over reference draws: a drawGroup's, a render's and a record's columns, and the walk over what a render reads diff --git a/hold.go b/hold.go index ecb7f2a..b12dc21 100644 --- a/hold.go +++ b/hold.go @@ -4,10 +4,10 @@ import ( "fmt" ) -// hold is what has already been drawn for held names: the variant each was drawn as, -// so every path under it reads one row, and the draw each read made, by its one -// spelling, so the same read written twice reads one draw, and the table rows its reads pinned. An -// expansion keeps one for its sibling names, and a render one per group for its reference paths. +// hold is what has already been drawn for held names: the variant each was drawn as, so every +// path under it reads one row; the draw each read made, by its one spelling, so the same read +// written twice reads one draw; and the table rows those reads pinned. An expansion keeps one for +// its sibling names, and a render one per group for its reference paths. type hold struct { variant map[string]node value map[string]draw diff --git a/holdset.go b/holdset.go index 303509e..db1e022 100644 --- a/holdset.go +++ b/holdset.go @@ -19,8 +19,6 @@ type renderScope struct { row int } -// eagerHoldSet makes the unnamed group's maps where the set is declared, keeping them on that frame's -// stack for a render that reads through them; a zero holdSet makes them on its first read instead. func eagerHoldSet() holdSet { return holdSet{unnamed: hold{variant: map[string]node{}, value: map[string]draw{}}} } @@ -48,7 +46,6 @@ func (sc renderScope) in(t *template) renderScope { return sc } -// hold is the set's hold for sc's draw group. func (sc renderScope) hold() *hold { if sc.group == "" { return &sc.set.unnamed diff --git a/path.go b/path.go index 4b388d8..22226c7 100644 --- a/path.go +++ b/path.go @@ -127,7 +127,8 @@ func names(segs []string) []string { // pathWalk is what one walk of a dotted path does at each kind of level: choice // returns the variants to continue into (none stops the walk), and where it is nil -// the walk draws one, or stops; level runs at each template a segment descends +// the walk draws one with s, takes the first where s is nil, or stops where pins is +// nil too; level runs at each template a segment descends // into; leaf runs where the tail ends; pins is where the walk pins the table rows // it selects and draws, nil skipping tables. A nil action is skipped. A render's // walk sets only pins, so it allocates nothing. @@ -141,7 +142,8 @@ type pathWalk struct { // walkPath descends tail from n and returns the node it ends at: a folder or // template by its next segment, a choice by w.choice, which consumes no segment, a // table by walkTable. A missing segment is an error, so no walk reaches past what -// the data holds. s draws rows and variants; nil, the walk only proves the path. +// the data holds. s draws rows and variants; where it is nil, only selectors pin. +// s is a parameter: a pathWalk field beside pins moves the hold maps to the heap. func walkPath(s *session, n node, tail []string, w pathWalk) (node, error) { if len(tail) == 0 { return n, w.atLeaf(n) diff --git a/pins.go b/pins.go index 8d33cde..ca6b57c 100644 --- a/pins.go +++ b/pins.go @@ -7,21 +7,19 @@ import ( "strings" ) -// tablePin is one table's pinned row. type tablePin struct { t *table row int } -// pinSet is the rows of tables fixed so far: by a render, by a path read replayed at load, and by -// a fence walk over the rows a render can enter, which also holds a row rendered whole, alone. +// pinSet is the table rows fixed so far. A fence walk's set also holds a row rendered whole alone, +// which pin never does. type pinSet struct { inline [8]tablePin // sized so a render over a country's five-deep geo tree stays off the heap n int spill map[*table]int } -// pinned is the row pinned for t, if any. func (p *pinSet) pinned(t *table) (int, bool) { for _, q := range p.inline[:p.n] { if q.t == t { @@ -136,7 +134,6 @@ func (p *pinSet) pinRow(t *table, r int) error { return nil } -// selectRow pins the row a selector names. func (p *pinSet) selectRow(t *table, sel string) error { r, err := t.find(sel, p) if err != nil { diff --git a/todo.md b/todo.md index 8e81116..4383a05 100644 --- a/todo.md +++ b/todo.md @@ -15,10 +15,7 @@ scoring run names too little to steer one. A fresh run replaces the items below. Scores, newest last: 5.9 on 2026-09-20 (Navigation 7.0, Locality 5.2, Shape 5.9, Self-sufficiency 5.7); 5.8 on 2026-09-22 (Navigation 6.7, Locality 5.0, Shape 5.9, -Self-sufficiency 5.6), every seat capped by Locality or Self-sufficiency. Eight of nine -named `drawWalk.walk` and `rowSet` or `checkFamilies` hardest and least wanted to modify: -a load-time copy of the pinning `hold.pin` and `hold.rowOf` do at render, tied to them -by nothing but tests, whose premise lives only in the README's Decisions. +Self-sufficiency 5.6), every seat capped by Locality or Self-sufficiency. This round, in order: @@ -42,9 +39,8 @@ This round, in order: `operandReader`, `checkNoRepeatedRead` and `compileOps`, and function-versus-field is decided by `indexOutside(body, '(')` in two of them and by `funcCall` in the rest. - Name `pathWalk`'s modes: render, probe, check and cover are chosen today by which - callbacks are nil and whether its session is, and `walkChoice` returns `nil, nil` where - none is set. The mode may live in `pathWalk`; the session may not, since beside `pins` - it moves the hold maps to the heap. + callbacks are nil and whether `walkPath`'s session is, and `walkChoice` returns + `nil, nil` where none is set. - Have the check mode report the tables a read draws, so `tableRead.drawn` and `entered`'s `pinsAncestors` flag stop restating `walkTable`'s draw condition and `rowOf`'s ancestor rule: a change to how a render draws rows still leaves the fence @@ -59,7 +55,7 @@ This round, in order: - Split `drawCheck.reads`'s six-term condition into named predicates. - Rename what names two things: `template.go` holds the token grammar while `template` is `node.go`'s type and `Template` `inline.go`'s; `kind` `'b'` is a brace body in - `ftoken` and a builtin in `op`; `hold`'s receiver is `d`; `drawAt.alt` holds the rows + `ftoken` and a builtin in `op`; `drawAt.alt` holds the rows a walk entered. - Run the nine-seat panel again and file what it names here. @@ -307,6 +303,8 @@ because pairing a street with its exact postnummer rewrites shipped rows. - Delete `doc.go`'s "The draw fences are …" sentence: it names a function, a type and a helper reached only through `drawWalk.check`, and misses `checkDrawGroup`, `checkOwnFamily` and `checkColumnDraws`; the README's Layout indexes the fences by file. +- Cut the README's Layout block to the lines that say what a file name cannot: + `calc.go`, `doc.go` and `cmd/fejkdata/` restate their names. - Cut `AGENTS.md` to the rules only it states: the round procedure stands word for word in `todo.md` and the `gh` rule opens with the README's GitHub decision, so each is a second copy that drifts. Split the comprehension rule while there, which packs the