clara

http://www.clara-rules.org/
eraserhd 2019-04-05T17:23:58.025700Z

ha! I just found out that (-> session inspect :insertions keys * :name) is not a fully qualified symbol, but a symbol with a slash in the name part.

1
2019-04-05T17:27:32.026100Z

I do not get it šŸ˜µ

1šŸ‘†
2019-04-05T17:27:42.026300Z

doing crazy things with the symbol fn?

devn 2019-04-05T20:33:10.027200Z

What is * in there @eraserhd? When you say symbol do you mean keyword? I had the same thought as mikerod: (symbol "not/valid")

eraserhd 2019-04-05T20:40:56.028200Z

* was pseudo-code for "some integer". I guess first would actually work.

eraserhd 2019-04-05T20:41:31.028800Z

the value at :name on a rule map is a symbol

2019-04-08T16:47:39.029100Z

When I tried this I got a string:

clara.other-ruleset=> (-> (mk-session) (insert (->ColdAndWindy 15 15)) fire-rules inspect/inspect :insertions  keys first :name)
"clara.other-ruleset/is-lousy"
clara.other-ruleset=> (-> (mk-session) (insert (->ColdAndWindy 15 15)) fire-rules inspect/inspect :insertions  keys first :name class)
java.lang.String 
Do you have a reproducing case or maybe Iā€™m misunderstanding something?

2019-04-08T16:48:06.029300Z

clara.other-ruleset is a test namespace in Clara

eraserhd 2019-04-08T17:22:34.031800Z

hmm

eraserhd 2019-04-08T17:26:58.032100Z

Here's the function: https://gist.github.com/eraserhd/b7276d42de798e04b3f1cda0fb8e76ab ... I don't see that I'm doing anything weird there...

eraserhd 2019-04-08T17:27:54.032300Z

However, a bunch of rules are generated by some macros. I'm pretty sure they expand clara.rules/defrule with a normal, unqualified symbol. But maybe something in the macros is weird?

eraserhd 2019-04-08T17:29:49.032500Z

(the code on line 22 in the gist was added to work around the observed problem)

eraserhd 2019-04-08T17:30:49.032700Z

https://github.com/eraserhd/clara-eql/blob/develop/src/net/eraserhead/clara_eql/core.clj <-- the macro in question