Caterpillar

Daily Thought - 2024-12-03

< back to list

I've been talking about rewinding in terms of rather simple examples. Undoing an addition (or any kind of math operation) is easy, if you know its inputs. But what about I/O?

All I/O in Caterpillar is represented in terms of effects. So the language understands which instructions can have an effect outside of the system, and handle those in an appropriate manner. This is another one of those topics where I expect to work out the details, once I start with the actual implementation. But I do have some thoughts.

So, the language understands what effects are. When an effect is encountered during rewinding it can remember that, and then just not do the effect again, when the user is stepping forward again. So as long as the user is stepping through the program (in either direction) without making changes, we're good. I expect that approach to form a baseline, but there's more we can do.

<< previous thoughtnext thought >>

Hey, you! Want to subscribe to my daily thoughts? Just let me know (maybe include a nice message, if you're up for it), and I'll send you an email whenever I post a new one.