@pervognsen@mastodon.social
@blackeggs@infosec.exchange Persistent trees are way too much overhead compared to an undo log, though, if you can't make use of any of their other advantages.
@pervognsen@mastodon.social
@blackeggs@infosec.exchange An easy way to implement any data structure like this is to implement the memory itself semi-persistently. That is, you have a semi-persistent abstract data type which is called a memory. It implements read_uint16, write_uint32, copy_bytes, undo, redo, etc, and it keeps an undo/redo log of what it overwrites and at what offset so you can undo/redo it later.