clojure-bay-area

benwen 2021-02-12T07:44:57.015600Z

@sekao 🙏 thank you for the video presentation. Uploaded to YouTube: https://youtu.be/27KuJU8r4-U (currently still processing ATM)

benwen 2021-02-12T07:47:13.016Z

(oh, just realized you have it on your channel too. I linked to your YT channel.)

ghosttoaster 2021-02-12T17:37:22.017600Z

@sekao is it possible to see what rules names have been added to a session? I thought (:rule-ids @*session) would do the trick but it doesn't seem to work?

sekao 2021-02-12T18:47:07.019200Z

in the most recent version it is :rule-name->node-id so it would be (-> @*session :rule-name->node-id keys) . i would never do a breaking change in the public api but since that's an internal detail i did rename it :P

1
sekao 2021-02-13T09:21:56.027Z

that's right, a fact will only be retained if it matches at least one rule, and if you add a fact before a rule is added, it won't be in the results when you call query-all with that rule name

👍 1
ghosttoaster 2021-02-12T22:55:27.026200Z

Thank you! Having a lot of fun exploring this. Do I have to match every entity for queries to work? Lets say have a hero entity with attributes {::x 10 ::y 10 ::health 100} and a background tile entity with attributes {::x 100 ::y 80 ::color "green"}. Should I be able to match on just the ::x and ::y attributes and get both entities back?

ghosttoaster 2021-02-12T23:06:21.026400Z

Ok. It definitely looks like partial matches are a thing but my queries are only working for entities inserted after the query-rule has been added.

ghosttoaster 2021-02-12T23:21:55.026800Z

I did try to o/fire-rules but that didn't seem get the older entities picked up. It was only after I re-inserted the entities did they get picked up. Is that the way things are supposed to work?