Answer prose round 2: item 79 names every set it loads, New maps a data author's keys, and fewer comments restating the code
This commit is contained in:
@@ -499,7 +499,7 @@ table, `{/misc.currency[SEK].symbol}` on one row and `{/misc.currency[EUR].symbo
|
||||
on the next, since only one row renders. `New` proves the header, the options and every
|
||||
cell token, and refuses a TSV no category names, a key that is empty or repeats, a
|
||||
weight that is not a positive number, and a key or name holding `[`, `]`, `{`, `}`,
|
||||
`"` or `|`, which a selector cannot spell; the table's load maps the keys, and a name or parent column
|
||||
`"` or `|`, which a selector cannot spell; `New` maps the keys, and a name or parent column
|
||||
is mapped on the first draw that selects by name or descends through the table. A `name` needs a `key`, since a name naming several rows is reported by
|
||||
their keys, or a `parent`, inside whose row a name names one row, so `first-name[Kim]`
|
||||
is settled by the `sex` selected before it and a name repeating inside one parent row
|
||||
|
||||
+2
-2
@@ -673,8 +673,8 @@ when a source carries it.
|
||||
Sweden fits whole in 700 KB; every US place of 10,000 would pass a megabyte and fetch
|
||||
1,200 counties of TIGER files, so the threshold sits where the two countries match in
|
||||
size, and `--min-population` and `--streets-per-locality` on the import scripts build a
|
||||
fuller set. The two trees add about 20 ms to `New`, which loads the shipped set in about
|
||||
45 ms.
|
||||
fuller set. The two trees add about 20 ms to loading the shipped set whole, which took
|
||||
about 45 ms.
|
||||
|
||||
Withdrawn by the maintainer on 2026-10-03; `todo.md` item 78 replaces it.
|
||||
|
||||
|
||||
+5
-7
@@ -45,8 +45,7 @@ func unloadedTree() folder {
|
||||
return root
|
||||
}
|
||||
|
||||
// unloadedCategory is a shipped category not loaded yet: the folder holding it, that
|
||||
// folder's path, and its name there.
|
||||
// unloadedCategory is a shipped category not loaded yet.
|
||||
type unloadedCategory struct {
|
||||
dir []string
|
||||
in *folder
|
||||
@@ -65,9 +64,8 @@ func unloadedAt(root *folder, segs []string) (unloadedCategory, bool) {
|
||||
return unloadedCategory{dir: segs[:i:i], in: g, name: segs[i]}, true
|
||||
}
|
||||
|
||||
// loadShippedAt loads the shipped category a caller's path names or descends into, unless
|
||||
// it is loaded already. An entry point calls it before walking root: a walk is a query and
|
||||
// loads nothing.
|
||||
// loadShippedAt loads the shipped category a caller's path names or descends into. An entry
|
||||
// point calls it before walking root: a walk is a query and loads nothing.
|
||||
func (f *Generator) loadShippedAt(segs []string) {
|
||||
if u, unloaded := unloadedAt(&f.root, segs); unloaded {
|
||||
loadShipped(&f.root, []unloadedCategory{u})
|
||||
@@ -97,8 +95,8 @@ func unloadedReads(root *folder, dir []string, scope nodeScope) []unloadedCatego
|
||||
return out
|
||||
}
|
||||
|
||||
// loadShipped loads the shipped categories wanted, with every category they read and the
|
||||
// family of each, then binds what it loaded as a whole load binds.
|
||||
// loadShipped loads the shipped categories wanted, every category they read, and the table
|
||||
// family of each one it loads, then binds them as a whole load binds.
|
||||
// TestEveryShippedCategoryLoadsAlone reaches each category, so a failure here means a stale
|
||||
// index.
|
||||
func loadShipped(root *folder, wanted []unloadedCategory) {
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
| 12 | 0.1.0 | defect | **Strip the whitespace `data-import/territory.py` copies from its register.** | 1 | 1 | 5 | 7 | 4 | 20.6 |
|
||||
| 5 | 0.1.0 | | **Run the nine-seat comprehension panel after the draw restructure, and file what it names.** | 1 | 3 | 3 | 9 | 3 | 20.4 |
|
||||
| 71 | 0.1.0 | | **Accept a name as a `calc` operand, so `{calc(n * 2)}` computes from the pick `{n}` prints.** | 3 | 4 | 5 | 7 | 5.3 | 17.2 |
|
||||
| 79 | 0.1.0 | decision | **Beside a `--data-path`, load in `New` only the user's categories, the shipped ones they override and the shipped ones they read; load the rest on first reach.** | 6 | 6 | 7 | 8 | 12 | 13.7 |
|
||||
| 79 | 0.1.0 | decision | **Beside a `--data-path`, load in `New` the user's categories, the shipped ones they override or read, and the shipped ones whose reads reach an overridden one; load the rest on first reach.** | 6 | 6 | 7 | 8 | 12 | 13.7 |
|
||||
| 58 | 0.2.0 | | **Ship prebuilt binaries, a container image, and packages for Homebrew, Scoop and the biggest Linux package managers, so the CLI needs no Go.** | 3 | 7 | 8 | 9 | 1.1, 7 | 29.2 |
|
||||
| 81 | 0.2.0 | question | **Refuse at load every `calc` divisor not proven nonzero, in a string column too.** | 4 | 4 | 6 | 8 | 4, 6 | 20.6 |
|
||||
| 36 | 0.2.0 | | **Report every mistake a load finds in one error, as the decision "A load reports every mistake at once" states.** | 5 | 6 | 7 | 8 | 6 | 19.5 |
|
||||
@@ -255,7 +255,7 @@ Needs item 4.
|
||||
|
||||
`checkCalc` and the value proof read an operand as a sibling field, so `{calc(n * 2)}` is refused with `no field "n"` today. Item 4 stops an operand holding its field for the expansion, after which a name is the one way to show the operand a calc computes from, as the README's Computation example does.
|
||||
|
||||
### 79. Beside a `--data-path`, load in `New` only the user's categories, the shipped ones they override and the shipped ones they read; load the rest on first reach.
|
||||
### 79. Beside a `--data-path`, load in `New` the user's categories, the shipped ones they override or read, and the shipped ones whose reads reach an overridden one; load the rest on first reach.
|
||||
|
||||
The decision "With only the shipped set, a category loads on the first call reaching it; beside a `--data-path`, every category loads in `New`" parses the whole shipped set on every `--data-path` run, about 45 ms today and seconds once items 61 and 78 land. Goal 6 needs only the user's categories, the shipped ones they override, the shipped ones they read, and the shipped ones whose reads reach an overridden category, so the index would carry each category's reads.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user