Hacker News new | ask | show | jobs
by mlhpdx 927 days ago
The idea of an undo “graph” in memory is something I’ve implemented, and in C++ even, so it was fun to read the article. Couldn’t agree more — once you’ve had it, going back to the linear, often truncated thing most application implement is a little sad.

In my case when state A transitioned to B, was undone and further changes made to get state C I would retain the XOR of the changed memory of the A->B transition as run length encoded bytes B’ and similarly C’ so it was lightweight and extremely fast to undo and redo (the latter being exactly the same as the former but applied to A rather than B, since that’s how XOR works). Cool stuff.