This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-04-27
Channels
- # announcements (9)
- # aws (1)
- # aws-lambda (12)
- # babashka (18)
- # beginners (37)
- # calva (27)
- # clerk (15)
- # clojure (16)
- # clojure-conj (13)
- # clojure-europe (44)
- # clojure-germany (3)
- # clojure-norway (27)
- # clojure-uk (1)
- # cursive (6)
- # data-science (24)
- # datahike (7)
- # datomic (40)
- # fulcro (5)
- # hoplon (33)
- # hyperfiddle (9)
- # introduce-yourself (6)
- # jobs (1)
- # lsp (22)
- # nbb (2)
- # off-topic (15)
- # pathom (37)
- # pedestal (3)
- # polylith (7)
- # portal (1)
- # re-frame (7)
- # releases (1)
- # remote-jobs (1)
- # rewrite-clj (6)
- # sci (1)
- # scittle (1)
- # xtdb (7)
Hi all, I'm experimenting with reverse of control style: https://cycle.js.org/ i.e the computed state variable reads events from input and compute its state, (as opposed to the event handlers sets some state variable). What is the most idiomatic way to extract an event stream from event handlers? I know missionary can expose a very similar abstraction to Rx so I'm guessing that there should be some simple primitive I could use to get an event stream out of event handler. Thanks in advance š
If I'm setting listeners on all events but no one is reading them are they still costing performance? or is there some kind of optimization on the graph that eliminates orphan signals?
event callbacks are eager (due to how the platform works), use (m/relieve rf) to relieve backpressure by dumping events into an accumulator via reducing fn. the accumulator is then lazily sampled thereafter
see http://electric.hyperfiddle.net section about backpressure and lazy clocks, and please ask clarifying questions here so i can improve the docs
> ā¢ The clocks pause when the browser page is not visible (i.e. you switch tabs), confirm it Wasn't able to confirm it, switched tabs but clocks kept on running
@U09K620SG did you happen to think about the nature of signals vs imperative state (swap!) at the event handlers (either dom events or async tasks) boundaries? This is where FPR seems to fall back to imperative, and I wonder about that: ā¢ is this the best abstraction for "importing" data into the signals graph? if so why? ā¢ what happens if we try to take the declarative (frp) approach all the way (like cycle.js did)? If you had the chance to think about the nature of external inputs and how they fit best into the frp system I'd love to get some insight š Thanks
electric compiles to https://github.com/leonoel/missionary which supports discrete streams and continuous signals under a single protocol
m/observe is the way to import events into the dataflow graph