Signals, the push-pull based algorithm | Hacker News
TL;DR AI
2 min readKey summary
The system isn't actually glitchy: it doesn't eagerly run user computations, it only marks values dirty.
Dirtying is idempotent, so the order of dirty operations doesn't change results.
The pull mechanism only returns values when explicitly pulled and doesn't provide subscriptions unless subscribers are notified after dirtying.
A priority queue may not be required for correctness; it seems intended to avoid recomputation when intermediate nodes change.
The author's use of 'push-pull' may differ from Conal Elliott's definition, and weak references might be warranted.



