Loading lesson…
Courses›Bounded file memory: the Hermes pattern

Bounded file memory: the Hermes pattern

DetailedOverviewQuizFlashcard

Bounded file memory: the Hermes pattern

Budget lab: two curated Markdown files under hard character ceilings — MEMORY.md 2,200 and USER.md 1,375, 3,575 characters or 894 tokens, and an add that errors rather than trimming. The fixture arrives at 19 entries and 2,759 characters, 559 over: 6 load-bearing facts, 9 compressible entries, 4 dead ones. Truncating to fit reaches 2,017 characters and keeps 2 of the 6 facts; deleting all four dead entries still leaves 2,282, 82 over; merging nine entries into four lines frees 854 and fits at 1,905 with 295 to spare. Three new facts arrive and two land (128 at 2,034, 130 at 2,165) while the third, 126 characters, is refused at 2,292, 92 over, until one 122-character eviction brings it to 2,170. The replace drill counts its matches first: the string 900 matches twice, once inside 0900.

This Memory Engineering lesson is part of a paid plan. Sign in with a plan that includes this course to read it.