keechma

Keechma stack. Mention @U050986L9 or @U2J1PHYNM if you have any questions
carkh 2019-07-12T15:18:31.265700Z

@mihaelkonjevic When i do this, am i correct in assuming that on each app-db change, there are two blackboard reactions working? what i'm trying to do here is to have the blackboard computation (quick in this example, but might be heavier) only being performed once

carkh 2019-07-12T15:20:54.266300Z

you mentioned caching earlier, but is this a sub only thing ?

mihaelkonjevic 2019-07-12T15:34:35.268300Z

AFAIK it should use same reaction, that's on the reagent core

carkh 2019-07-12T15:34:49.268500Z

ok thanks

mihaelkonjevic 2019-07-12T15:35:20.268900Z

My understanding comes from https://github.com/Day8/re-frame/blob/master/docs/SubscriptionFlow.md

carkh 2019-07-12T15:36:18.269800Z

i'll read this again (has been years) ... mhh i have a time value in this database i can log it in the reaction and see the result

carkh 2019-07-12T15:36:23.270Z

thanks !

carkh 2019-07-12T15:38:08.270300Z

nope runs twice ='(

carkh 2019-07-12T15:42:48.271200Z

in that page you linked, they use def'ed vars so there is only one instance of each reaction, gonna have to make some cache to make it work the way i want

carkh 2019-07-12T15:43:14.271500Z

or some registry

carkh 2019-07-12T15:43:28.271900Z

the sad thing is that it's going to be duplicating part of your work on subs

carkh 2019-07-12T15:53:34.272Z

that does the trick ! I can't see a production app restarting the keechma app so many times that the memory loss gets in the way

carkh 2019-07-12T15:55:42.272600Z

might be trouble for parametrized reactions though ...

mihaelkonjevic 2019-07-12T16:08:43.275Z

Hm, reactions are cached on the keechma level but using them directly is out of keechma's scope. I wonder if there's a simple way to optimize it

carkh 2019-07-12T16:09:41.275600Z

i've been looking for an lru cache memoize, but that's only available clojure side

carkh 2019-07-12T16:10:10.276200Z

not such a big deal, i can cache the result of heavy computation by sticking the result in the app-db

carkh 2019-07-12T16:10:47.276600Z

and my dependent subscriptions would then check on that

carkh 2019-07-12T16:11:04.276900Z

bit messy, but gets the job done