This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-10-26
Channels
- # 100-days-of-code (1)
- # aleph (4)
- # beginners (112)
- # boot (2)
- # business (4)
- # calva (3)
- # cider (37)
- # clara (26)
- # cljs-dev (6)
- # cljsrn (1)
- # clojars (4)
- # clojure (89)
- # clojure-brasil (1)
- # clojure-conj (1)
- # clojure-dev (81)
- # clojure-dusseldorf (8)
- # clojure-italy (41)
- # clojure-nl (3)
- # clojure-spec (11)
- # clojure-uk (14)
- # clojurescript (73)
- # cursive (1)
- # data-science (3)
- # datomic (2)
- # dirac (9)
- # duct (6)
- # emacs (4)
- # figwheel-main (1)
- # fulcro (47)
- # incanter (3)
- # jobs-discuss (43)
- # leiningen (18)
- # luminus (6)
- # lumo (4)
- # mount (4)
- # off-topic (31)
- # portkey (8)
- # protorepl (5)
- # re-frame (9)
- # reagent (15)
- # reitit (2)
- # ring-swagger (7)
- # shadow-cljs (28)
- # specter (4)
- # tools-deps (8)
- # uncomplicate (1)
@jvtrigueros that is correct, the parameter of the query should be :?last-name
, and would work similar to a filter on the ?last-name
binding in the lhs of the query.
Where did you find that example, it should probably be updated?
nvm, i found it: https://github.com/cerner/clara-rules/blob/master/src/main/clojure/clara/rules.cljc#L51
Sweet! Thanks 🙂
I'm curious about a number of Clara's language restrictions. For example, not being able to use :and
inside not, not being able to use :and
on the rhs of an accumulator.
Are these technical limitations of the underlying matching engine, or front-end limitations?
ya that one is a tangled web of very complicated issues...let me see if i can find the logged issues on them because there is a lot of good conversation on them
https://github.com/cerner/clara-rules/issues/373 this is one of them
In general negated conjunctions and rete have complexities due to the structure of the network
Most of the times if things get weird in a rule doing this stuff I think you can typically just break the logic up across more rules to keep the structures simpler
How cheap are intermediate facts? I mean, clojure records themselves are cheap, but is memory used by facts interesting? They are alpha-pruned, I assume.
The idea of a NegatedCondition, for example, is that going to be more memory. (Also, I’m not sure how that could work, because it would need to join on a variable number of bindings.)
You can make a rule that does the conjunction and inserts a fact if it is true. Then a rule with a negation on that fact. Clara actually sometimes automatically does something similar to that.
Intermediate facts in memory are about the same as just making a new record of whatever is what I meant. Cpu timewise just depends on what it interacts with. The actual working memory insert and retract operations are pretty fast (optimized it quite a bit)
With preference on making simple rules that models smaller concepts at a time and then compose them together for main outcome models for query. If that makes any sense.