hyperfiddle

braai engineer 2025-11-07T08:39:05.267729Z

Idea: would be nice if e/Offload took f! & args and called (apply f args): we often want query to re-run when a related stream changes that is not used by the primary function body, so end up moving it out to a clj function. Would mess with optional m/blk setting, but maybe an explicit e/OffloadIO vs e/OffloadCompute. I guess this could be a helper 🙂

👌🏻 1
Dustin Getz (Hyperfiddle) 2025-11-07T11:05:38.765429Z

(e/Offload #(partial apply f xs)) ?

xificurC 2025-11-07T11:19:21.052849Z

the wordy pattern is when f should rerun on an unrelated value. I.e. rerun (e/Offload #(f a b c)) when db changes and we get (e/Offload ((fn [_db] (fn [] (f a b c))) db))

xificurC 2025-11-07T11:19:58.123129Z

I just realized we can simplify to (e/Offload (fn [] db (f a b c)))

🎉 1
Dustin Getz (Hyperfiddle) 2025-11-07T11:24:43.005499Z

ah