Managing State with Signals
It&#x27;s interesting how every build system, frontend framework, programming language implements its own promise pipeline&#x2F;delayed execution&#x2F;observables&#x2F;event propagation.<p>But the implementations are rarely extracted out for general purpose usage and rarely have a rich API.<p>I&#x27;ve been thinking a lot about a general purpose &quot;epoll&quot; which be registered on objects that change. I want to be able to register a reaction to a sequence of actions on arbitrary objects with an epoll style API.<p>One of my ideas is GUI thunking. The idea that every interaction with the GUI raises a new type that can be interacted with, to queue up behaviours on the GUI. This is essentially Future&lt;&gt; that are typed and the system reacts to the new type based on what you did and presents a GUI that is as if the operation you queued up was completed. (You can interact with the future because any action on something that isn&#x27;t done yet, is queued up)<p>It&#x27;s a bit like terraform plan and apply, but applied to general purpose GUIs.<p>For example, you can click download file, then queue up installation and then using the application, ALL BEFORE it is installed. Because the actual computation is separate from the type information that was queued up.<p>Imagine using AWS Console to set up an entire infrastructure and wire everything together but not actually execute anything until the very end when you click &quot;Run&quot;.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;samsquire&#x2F;gui-thunks">https:&#x2F;&#x2F;github.com&#x2F;samsquire&#x2F;gui-thunks</a><p>I feel we are still early days with regard how to build computer user interfaces that are easy to build, maintain and understand the code for.<p>I used knockout and angularjs 1 and I enjoyed Knockout especially. ko.observables and the map plugin makes creating reactive code very straightforward.