- demonstrates streaming lexical scope that crosses frontend/backend seamlessly
20230224.two.clocks.mp4
Code notes:
- server and client clocks
s
andc
are defined in the same expression (- s c)
shows local and remote values are consumed in the same expression- Lexical bindings
c
ands
are reactive values - Clojure itself is made reactive by
e/defn
which compiles Clojure forms to DAGs - everything is reactive, so it feels like nothing is reactive
- Lexical bindings like
c
can be thought of as either a flow and a value, both worldviews are valid, sometimes you need one sometimes the other - the latency can skew negative because the client and server sampling rates are not synchronized. Note it doesn’t drift.