Fork me on GitHub
#missionary
<
2023-09-20
>
Panel08:09:27

This is useful if a continuous time variable is defined not in term of successive states, but in term of successive diffs. Do you have an example ? In terms of electric or else, I have trouble thinking of when I will use that.

Dustin Getz10:09:58

e/for implementation as well as rendering streaming events such as streaming chatgpt responses, or Rama subscriptions

❤️ 1
Dustin Getz10:09:31

what if our reactive UI views were not a function of the current value of a query resultset, but rather reductions over history of changes/updates to that resultset

Panel11:09:59

I’m working on displaying large dataset of spatial data with electric, definitely keen to get more streaming of incremental data.

👍 1
Dustin Getz14:09:41

This delay-flow has unexpected result, what have we done wrong?

Dustin Getz14:09:23

it's the initial value (from reductions) that is not doing what i expected

xificurC14:09:40

does this exhibit the expected behavior?

(defn delay-flow [>x]
  (->> (m/reductions (fn [[_ b] nx] [b nx]) [] >x) (m/eduction (map second))))

Dustin Getz15:09:02

yes that produces the expected behavior

leonoel18:09:21

(->> (m/eduction (drop 1) >x) (m/reductions {} v0)) and (m/ap (m/amb v0 (m/?> (m/eduction (drop 1) >x)))) are equivalent and produce the same result on my machine

leonoel18:09:30

i.e. nil 2 3

xificurC18:09:31

he wanted to "cons" a value to the front, i.e. return nil 1 2 3

Dustin Getz20:09:50

why is the 1 not seen in the second test assertion

leonoel20:09:30

because it's discarded by (drop 1)

Dustin Getz20:09:35

oh, i need to put the initial value on the zip, >y