Keep keyed things inside a fixed memory budget
Keep many keyed things inside a fixed memory budget, each read after the first being one array index, and let the least recently used go first when the budget is full
Keep many keyed things inside a fixed memory budget, each read after the first being one array index, and let the least recently used go first when the budget is full
Give steps, applied in order to a slot table made from capacity_bytes (the budget, 24 MB when left out) and columns (DATA: [{ kind, field, as: number | text }], the fields kept in typed arrays): set { key, kind, value, bytes? } admits or updates a key (bytes is what it costs the budget, its JSON length when left out), find { key }, read { key }, drop { key }, kind { kind } (every key of that kind still held) and clear. Answers answers (one per step: set gives its slot and version, find its slot or -1, read whether it is held and its kind, value, version and bytes) and held (slots, bytes, capacity_bytes, evictions, kinds, words). Nothing is kept after the run: send the same steps again for the same table.
Nothing: your AI starts it with your words.
Connect the AI you already use to Trillion once. Then ask in your own words; your AI finds this tool by what it does and runs it.
Say to your AI: “Use Trillion to keep many keyed things inside a fixed memory budget, each read after the first being one array index, and let the least recently used go first when the budget is full”