play 2's frame keeps and a dropped file: a var() join made at once, the hint rail emptied in place, save_read gives its text back
- ludic.ui cv_join (units_pieces.ludic:93): a var() value's pieces were joined by +, a text left behind per piece on every memo miss; it is written at its length at once (units_join.ludic), and the miss is its own declared function (cs_vars_miss), bounded by the memo. - ludic.hints hn_slots (rail.ludic:41): hints_reset made a new rail every time; the rail is emptied in place, made again only for another count (rail_slots.ludic). - value_spare_put (value.ludic:138): a list's spares grow only past the most it has ever cut off; declared as such. - ludic.save: save_read reads, parses and frees the file's text - the tree's strings are the parser's own - and says whether the text was whole (SaveRead.intact) for the words of a refusal. Maroon Lake's trip and home reads kept the whole file on every load and every menu card read. Tests: ludic.save (10), ludic.hints (8); the 36 ui examples; value_list_regrow, json_saves and alloc_fence_declared unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
9b3d3e3298
commit
338202c41b
10 changed files with 53 additions and 13 deletions
|
|
@ -13,7 +13,17 @@ export function save_parse(text: string, f: SaveFormat) -> SaveRead {
|
|||
return read_new(SAVE_OK, v)
|
||||
}
|
||||
|
||||
export function save_read(path: string, f: SaveFormat) -> SaveRead { return save_parse(Fs.read_text(path), f) }
|
||||
# the file read and parsed, and its text given back - the tree's strings are the parser's own, and a
|
||||
# load that kept the whole file for good kept it on every load and every menu card read
|
||||
export function save_read(path: string, f: SaveFormat) -> SaveRead {
|
||||
let text = Fs.read_text(path)
|
||||
let r = save_parse(text, f)
|
||||
if text != null {
|
||||
r.intact = save_text_intact(text)
|
||||
free(text)
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
||||
# The version checks, then the chain. True when the object is now in today's shape; a newer file is
|
||||
# SAVE_FUTURE and read-only, an older one than the format carries is SAVE_CORRUPT.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue