- 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>
15 lines
525 B
Text
15 lines
525 B
Text
# rail_slots.ludic - the rail's places: made for a count, emptied in place
|
|
# the rail emptied in place: made again only when it is to hold another count
|
|
function hn_empty(hints_st: mut HintsState) -> void {
|
|
if len(hints_st.hn_top) != hints_st.hn_shown {
|
|
hints_st.hn_top = hn_slots(hints_st.hn_shown)
|
|
return
|
|
}
|
|
for i in 0 .. len(hints_st.hn_top) { hints_st.hn_top[i] = -1 }
|
|
}
|
|
# a rail of n empty places
|
|
function hn_slots(n: int) -> []int {
|
|
let out = new []int
|
|
for i in 0 .. n { push(out, -1) }
|
|
return out
|
|
}
|