Caterpillar

Daily Thought - 2024-04-23

< back to list

I've been talking about how to step through Caterpillar programs, forward and backward, undoing and redoing changes to their state. But so far, I've completely glossed over the topic of I/O. How would that interact with such a capability?

Graphics are typically re-rendered every frame, based on the current frame. So it wouldn't matter in that case. File I/O could work, if instructions/events carry enough information to rewind changes there too. With a log file, you could acknowledge the rewind by logging a message about it, then just continue from there.

What's not at all clear to me, is how to hook I/O into this whole system in the first place. It seems pretty straight-forward on the instruction level. But what about Event Sourcing? That's designed to explicitly not do any I/O when applying events. More to think about, for sure.

<< previous thoughtnext thought >>