This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-06-26
Channels
- # adventofcode (2)
- # beginners (69)
- # boot (37)
- # cider (6)
- # clara (31)
- # cljs-dev (75)
- # cljsrn (5)
- # clojure (72)
- # clojure-dev (7)
- # clojure-italy (11)
- # clojure-nl (8)
- # clojure-russia (2)
- # clojure-spec (56)
- # clojure-uk (54)
- # clojure-za (1)
- # clojurescript (156)
- # cursive (2)
- # datomic (34)
- # emacs (1)
- # fulcro (227)
- # hoplon (74)
- # jobs (1)
- # jobs-discuss (16)
- # leiningen (5)
- # lumo (17)
- # off-topic (9)
- # om (3)
- # onyx (10)
- # other-languages (1)
- # portkey (2)
- # re-frame (2)
- # reagent (36)
- # reitit (1)
- # remote-jobs (1)
- # ring-swagger (8)
- # shadow-cljs (85)
- # slack-help (2)
- # spacemacs (6)
- # specter (3)
- # sql (17)
- # test-check (15)
- # tools-deps (80)
hello friends, is there a way to save the entire LocalSession in a db
I mean serialize/deserialise for later analyse
@baptiste-from-paris there is some support for this. Itās referred to as durability in the Clara codebase. You do have to implement a protocol though to serialize the working memory facts that are specific to your domain of use
nice š
Also, the durability is currently targeted at being fast for serialization, but especially for deserialization. It doesnāt attempt to be able to deal with evolution to the stored data structures. If you have a change of rules, or a change of Clara version, sometime you may have to rerun rules and re-serialize.
ok, got it
Well to clarify, any change in rules requires a new run. A change in Clara version may or may not. It just depends on what changes.
yes offcourse
thanks for your time š
How might I accumulate facts of the same type to test if they are: all contain the same value and any contain a certain value?
@jeremy642 Sounds like 2 separate things, if so
;; ?all contain the same value for :val
[?all <- (acc/all) :from [A (= ?val val)]]
;; ?all has at least one containing :some-val for :val
[?all <- (acc/all) :from [A]]
[:test (some #(= :some-val (:val %))
?all)]
[?all <- (acc/all) :from [A (= ?val val)]]
and this will group each A
where they have the same value for val
Iām not seeing anything in the docs that would allow you to separate rule sets, and defrule
seems globalā¦is there support (planned) for having ārule setsā for different things, or is the idea that you just keep your domains separate by having facts that donāt cross over and trust that the optimizations in the engine will make it mostly ānot matterā when your rule set gets big because it covers 10 different domains?