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.
I do not get it šµ
doing crazy things with the symbol
fn?
What is *
in there @eraserhd? When you say symbol do you mean keyword? I had the same thought as mikerod: (symbol "not/valid")
*
was pseudo-code for "some integer". I guess first
would actually work.
the value at :name
on a rule map is a symbol
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?clara.other-ruleset is a test namespace in Clara
hmm
Here's the function: https://gist.github.com/eraserhd/b7276d42de798e04b3f1cda0fb8e76ab ... I don't see that I'm doing anything weird there...
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?
(the code on line 22 in the gist was added to work around the observed problem)
https://github.com/eraserhd/clara-eql/blob/develop/src/net/eraserhead/clara_eql/core.clj <-- the macro in question