This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-02-27
Channels
- # announcements (2)
- # asami (5)
- # beginners (22)
- # biff (2)
- # cider (1)
- # clara (3)
- # clojure (17)
- # clojure-europe (7)
- # clojurescript (29)
- # core-async (2)
- # datahike (1)
- # fulcro (11)
- # gratitude (2)
- # integrant (2)
- # lsp (6)
- # music (2)
- # observability (1)
- # off-topic (36)
- # polylith (4)
- # quil (2)
- # reagent (15)
- # tools-deps (36)
- # xtdb (16)
Hi - has anyone tried building auto generated documentation for Clara rulesets? I'm thinking of a Javadoc style HTML listing of all rules in the set and the facts they use and/or insert - and similarly for all facts - that you could browse around?
I think that this an interesting idea. I think that on the LHS of a rule it is achievable statically inspect the forms to generating information on the facts that are involved and matched on. The rules themself are compiled in a way that already must be able to inspect it in this regard.
The RHS (action) of the rule though is fairly free form clj-code, so there is no guarantee that they can be inspected statically to know which sorts of facts are inserted. Of course if you constrain this either via a custom DSL, or just a convention, you can set up rules in a way that the types of facts that are RHS insert!
(or similar) are inspectable.
Yes that was along the lines I was considering. Our rules and facts are mostly very plain... if A & B insert! X .. but hopefully it would be possible to do in a fairly general form :thinking_face: