clara

http://www.clara-rules.org/
Matthew Pettis 2020-01-16T02:29:05.195900Z

I'm having some trouble with understanding the mk-session function documentation (http://www.clara-rules.org/apidocs/0.20.0/clojure/clara.rules.html#var-mk-session). In particular, it references rule sources. Are those namespaces that the rules live in (if they aren't in the current namespace)? I'm wondering what the alternative ways there are to giving rules to a session if you don't use defrule in the current namespace. Can you construct a vector of rules (that don't have names) that you'd get from defrule and feed it to a session?

2020-01-16T04:33:20.197Z

@matthew.pettis you can pass a collection of rules and queries

đź‘Ť 1
2020-01-16T04:33:33.197300Z

So a vector yes

2020-01-16T04:34:19.198300Z

If you pass an ns name it’ll be automatically expanded to a collection of all rules sources within it

2020-01-16T04:34:34.198800Z

Rule sources are defined by a protocol

2020-01-16T04:35:08.199600Z

There are a few more built in impls but those are the main 2

2020-01-16T04:36:16.201200Z

And “rule” is a bit overloaded here unfortunately since it includes queries. Clara typically calls them “productions” when referring generally to both.