This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-04-02
Channels
- # announcements (1)
- # architecture (1)
- # aws (21)
- # babashka (37)
- # beginners (173)
- # boot (12)
- # chlorine-clover (5)
- # cider (36)
- # clara (11)
- # clj-kondo (25)
- # clojure (128)
- # clojure-europe (7)
- # clojure-finland (3)
- # clojure-germany (2)
- # clojure-nl (57)
- # clojure-uk (23)
- # clojurescript (71)
- # clojurex (1)
- # core-async (30)
- # core-typed (5)
- # cursive (35)
- # datomic (8)
- # duct (4)
- # emacs (8)
- # exercism (41)
- # fulcro (116)
- # jackdaw (4)
- # jobs-discuss (6)
- # juxt (4)
- # kaocha (16)
- # leiningen (14)
- # malli (5)
- # observability (4)
- # off-topic (2)
- # pathom (19)
- # pedestal (29)
- # re-frame (64)
- # reitit (18)
- # ring (8)
- # shadow-cljs (3)
- # sql (13)
- # tools-deps (32)
- # tree-sitter (5)
- # yada (17)
BTW I think that I have a very interesting use case for Clara rules, once done ill share it but I'm very excited about it
👀 4
Hi Clara team, is there an option to run a query that matches any fact? for example:
(defquery get-failures []
(?f <- [_ true]))
Assuming that the first value in the vector is not important we only care for the second true valueOr alternatively:
(defquery get-failures []
(?f <- _ (= ?failure true)))
(looks like ancestors-fn might be useful in such a case?)
In my case I'm using a keyword as the fact type, if I understand this correctly (ancestors :foo) is nil so Object dosent capture this?
(defquery get-failures []
(?f <- Object (= ?failure true)))
Sounds like I need to use an actual clojure keys hierarchy?
ah when using a custom fact-type-fn i think the only reliable way to achieve this would be to also provide a matching custom ancestors-fn
Makes sense, ill continue to fiddle with it