This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-10-09
Channels
- # announcements (2)
- # babashka (11)
- # beginners (9)
- # biff (7)
- # calva (20)
- # catalyst (1)
- # cider (8)
- # clerk (46)
- # clj-kondo (18)
- # clj-otel (2)
- # clojure-brasil (22)
- # clojure-europe (18)
- # clojure-gamedev (23)
- # clojure-italy (5)
- # clojure-nl (2)
- # clojure-norway (14)
- # clojure-uk (6)
- # clr (1)
- # datomic (13)
- # emacs (1)
- # hoplon (13)
- # hyperfiddle (53)
- # introduce-yourself (1)
- # java (23)
- # malli (7)
- # obb (35)
- # off-topic (31)
- # polylith (2)
- # portal (9)
- # rdf (15)
- # reitit (12)
- # releases (3)
- # ring (4)
- # shadow-cljs (6)
- # solo-full-stack (3)
Hello, When I add this code block to my project then I get stale output error when I delete that part code the project works. It is strange because I used the same code in my other project this code is working without a problem I just added in this project extra datomic db here. What am I missing?
(def columns
#js
[#js {:name "Title", :selector (fn [row] (.-title row))}
#js {:name "Year", :selector (fn [row] (.-year row))}])
;If you want to take a look that is my page's gist: https://gist.github.com/Bariscanates404/0813204149ba8b5a3c4e3fac46d75963I guess this is a cljc file and the clj part failed to compile. Try wrapping the js-specific data in a #?(:cljs
reader conditional
as peter says #js reader literal only valid in cljs (also valid in e/client)
you also use it in β(def data)β not just columns
in general what does it mean when you get can't process event - consumer is not ready
when you call !
in observe
for the initial value? the consumer I assume is the electric code that calls new
on the flow returned by`observe` , but that should happen after observe
is run, so the initial !
shouldn't do this since there are no consumers yet?
it could be a backpressure issue, do you need m/relieve ?
i.e. the flow has notified but electric has not pulled the value through yet, and another event has appeared
crash course in m/relieve: (m/relieve {} >x) β {} will drop the stale event on the floor, replacing it with new event (m/relieve conj >x) β [i think that type checks? i'm worried about the initial empty value] conj will build up a vector of events (i.e. a queue) for you to deal with it upstream and now it is your fault when you run out of memory sometimes you'll chain with (m/reductions) so you can have a discrete reducer stage with a reducing function that is guaranteed to see every event, and then m/relieve after that.
here's a real world example of that
that will return a set of presently depressed keys
its a reducing fn, i.e. (reduce conj [] [1 2 3])
(reduce conj [] [1 2 3]) := [1 2 3]
(reduce {} nil [1 2 3]) := 3
I think there is an initial value issue, i think you need to use m/reductions with conj to provide the initial value prior to the relieve
The set of transferred values must form a semigroup with given function `sg` as the internal
binary operation, i.e. `sg` must be associative
maybe i'm dumb but I thought {} is associative because it always returns the rightmost value no matter what order it's applied, that can't be case for conj unless it's a set?what docstring is that
semigroup is monoid but without the initial value, i.e. a reducing function as I understand it
this is where you'd pass the diff operator for differential signals β you want the diffs to squash inside m/relieve as they build up
isn't the idea for the associativity constraint that diffs can come in any order, like crdts
i don't understand "sg must be associative" and it actually doesn't compile in my mind
i think he means the semigroup's binary operator must be associative
Yeah I must be mistaken, conj needs to be applied at the reductions stage before the relieve
I don't actually understand why m/relieve cannot take a reducing function, and why conj has to be done at a prior stage
hm maybe, I dont understand the new associative requirement
unclear if it's a new requirement or just the docstring was strengthened
i understood the change to be backwards compatible
i.e. i suspect it was an old requirement and the old docstring may have been unrigorous
> i suspect it was an old requirement and the old docstring may have been unrigorous yes, that
wow into
even comes with brackets (into [1][2 3]) (into [1 2][3])
. I was struggling to figure out how to even denote associativity with prefix notation
> isn't the idea for the associativity constraint that diffs can come in any order, like crdts that would be commutativity
@U797MAJ8M yes i was struggling too. Leo what is the conceptual reason for m/relieve not taking a RF?
why not
why can't it be
regarding using conj as a semigroup operator, it is also invalid because it is not βinternalβ which is to say the inputs and outputs are not the same type
prior art? https://github.com/parenthetical/webflex https://bobkonf.de/2019-summer/slides/adriaan-leijnse.pdf
ha we found him in literature review (i think? i forget exactly). looks like heβs put more work into it, there was just the 2019 talk when i saw him in 2020
he probably found motivation by seeing our blog post in 2021