I've just seen your recent talk https://fosdem.org/2022/schedule/event/nim_pararules/ and was delighted by the results you achieved.
That sparked a ton of thoughts which I'd like to mention here and ask for reaction on them 😉.
- Any performance benchmark measurements? Reimplementing e.g. the demo from https://fosdem.org/2022/schedule/event/nim_polymorph/ and measuring differences (SLOC, CPU performance as fps, memory usage, etc.) seems like a viable option.
- Is making a "common rule" the only way to specify/enforce a certain order of (dependent) rules execution?
- Why is
then = false not the default behavior? It'd guarantee no cycles and maybe even make the code slightly shorter. Is it due to performance reasons? If not, then why not to introduce overwrite = true (basically saying "overwrite is the only possible culprit of cycles" making the whole understanding of the rules yet easier).
- Introduce something like
session.retractCascade() instead of manually writing session.retract( id, ... )?
- How does the rules engine parallelizes the computation among multiple cores? Do you (plan to) use anything like Weave?
- Automatically implicitly (internally) add
ref to non-primitive (or generally any bigger struct, sequence, etc.) non-ref attributes as there doesn't seem to be any real world use case for copying them.
- It seems the rules engine might not be very optimal when it comes to cache locality (but I might be horribly wrong as I didn't look at the generated C code), so do you think it'd make sense to manually write a specialized routines substituting chosen sets of rules to make their evaluation significantly faster?
- Maybe further "dynamize" the
staticRuleset by maintaining "active" and "inactive" state of chosen (each?) rule(s) in the facts DB. This should provide a tradeoff between slow dynamic tables and fast static structure by "paying as you go".
- ...
Your thoughts & wishes & plans?
I've just seen your recent talk https://fosdem.org/2022/schedule/event/nim_pararules/ and was delighted by the results you achieved.
That sparked a ton of thoughts which I'd like to mention here and ask for reaction on them 😉.
then = falsenot the default behavior? It'd guarantee no cycles and maybe even make the code slightly shorter. Is it due to performance reasons? If not, then why not to introduceoverwrite = true(basically saying "overwrite is the only possible culprit of cycles" making the whole understanding of the rules yet easier).session.retractCascade()instead of manually writingsession.retract( id, ... )?refto non-primitive (or generally any bigger struct, sequence, etc.) non-refattributes as there doesn't seem to be any real world use case for copying them.staticRulesetby maintaining "active" and "inactive" state of chosen (each?) rule(s) in the facts DB. This should provide a tradeoff between slow dynamic tables and fast static structure by "paying as you go".Your thoughts & wishes & plans?