Comment by ๐Ÿ undefined

=> Re: "State diffing for undo?" | In: s/programming

Oh ok I think I get it. So anybody that wants to modify the state, instead of doing it directly, uses an auxillary function, and it does whatever paperwork needs to be done. I've thought about that, and it seems like a pretty good solution if every action is atomic, but the way I'm doing things now is that some actions can be partially conplete if they require user input. Maybe I could convert those to be atomic, but I'm not sure if that would work for all of them.

=> ๐Ÿ undefined [OP]

2024-12-21 ยท 4 weeks ago

Original Post

=> ๐ŸŒ’ s/programming

State diffing for undo? โ€” Let's say I can identify all the parts of the program that need to interact with undo/redo system, and put all of them into a single contiguous chunk of memory. Then, when someone creates an undo point, I just calculate a diff over that memory, more or less. What I'm interested in is, in your experience, is there a downside to this approach? The program doesn't do any network requests or database connections (and won't, for the forseeable future). Rn I'm using a system...

=> ๐Ÿ’ฌ undefined ยท 7 comments ยท 2024-12-19 ยท 4 weeks ago

Proxy Information
Original URL
gemini://bbs.geminispace.org/u/undefined/23051
Status Code
Success (20)
Meta
text/gemini; charset=utf-8
Capsule Response Time
38.756967 milliseconds
Gemini-to-HTML Time
0.27659 milliseconds

This content has been proxied by September (ba2dc).