clara

http://www.clara-rules.org/
misha 2019-06-28T07:47:33.034900Z

first paper link is $$$, thank you, Mike

misha 2019-06-28T07:54:01.037600Z

(2nd link is probably golden too, but, man, 800pages :kappa:)

2019-06-28T09:23:49.046Z

Another point to consider is that since forward-chaining computes results upfront, applying diffs e.g. new facts can be quite fast once an initial "batch" has been completed.

misha 2019-06-28T09:50:19.047500Z

I wonder if datomic's datalog is still implemented with backward chaining, given team recommends to put the most specific query clause first

misha 2019-06-28T10:09:54.055300Z

so what I am actually trying to achieve/figure out, – is how to sneak rule-based parasite system onto datomic/datascript, without any changes to user api, e.g.: there are d/q, d/transact, d/transact!, and I'd like the defrule to be just a composition of those from user point of view (with some cleverness under the hood, like extra working memory or knowledge base). For example, clara-eav seems to have lots of internals leaking out into user api, making it less and less looking like datomic/datascript, which people already are used to "dev-flow"-wise. One seemingly minor, but I think very important from usability/adoption point ov view – is it is still dsl with custom tokens, which will be highlighted all over the ns as undefined in Cursive and probably some other IDE, on top of being yet another DSL you need to remember semantics of.

misha 2019-06-28T10:11:13.055900Z

re dsl, from https://github.com/clyfe/clara-eav#fact-dsl

;; Clara fact syntax
[?eav <- :todo/text (= (:e this) :new)]
[?eav <- (a/all) :from [:eav/all (= (:e this) :new)]]

;; ClaraEAV fact syntax
[?eav <- [:new :todo/text]]
[?eav <- (a/all) :from [[:new]]]

misha 2019-06-28T10:15:26.057800Z

why this, if everyone is familiar with let-style bindings, and many libraries manage to represent domain-specific bindings with their custom let forms, eg: let for monads: https://github.com/funcool/cats/blob/master/src/cats/core.cljc#L233-L255 let for generators: https://github.com/clojure/test.check/blob/master/src/main/clojure/clojure/test/check/generators.cljc#L1590-L1630