Fork me on GitHub
#hyperfiddle
<
2023-12-11
>
Dave Mays13:12:33

This new runtime offers local-first cross platform with "any" back-end that can communicate via std-out. I'm not smart enough to package this, but I'm wondering if this would open up the ability to run electric as a local first desktop and even mobile app? https://socketsupply.co/

nivekuil15:12:49

idk what this does (found the HN thread which is hilariously astroturfed https://news.ycombinator.com/item?id=38581754) but you can already use electric just as a js library, so the usual tools like nw.js should just work

😆 1
Dave Mays11:12:03

Ah I did not know you could use electric as a js library, that's nifty.

nivekuil16:12:58

does anyone have an example of using m/group-by with electric directly?

nivekuil16:12:36

(e/for [process (new (->> (m/seed ["apple" "aardvark" "bat" "bar"])
                          (m/group-by first)))]
   (dom/text (new (m/reductions conj process))))
some code I was playing around with, no idea how it works. I thought group-by would return a [key mapentry

xificurC16:12:27

glancing at it it seems to almost type check. (e/for-by first [[_k >x] ...] (dom/text (new (m/reductions conj >x))))

nivekuil16:12:02

that's what I would think but it's an error

xificurC16:12:47

actually group-by probably requires a concurrent fork (`m/?=`), like https://cljdoc.org/d/missionary/missionary/b.33/api/missionary.core#group-by

nivekuil16:12:17

but isn't electric supposed to abstract over that

nivekuil16:12:13

or is it always ?<