This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-01-09
Channels
- # asami (10)
- # babashka (11)
- # beginners (24)
- # braveandtrue (1)
- # cider (4)
- # cljs-dev (4)
- # clojure (88)
- # clojure-europe (19)
- # clojurescript (6)
- # code-reviews (7)
- # conjure (2)
- # core-async (2)
- # css (3)
- # cursive (11)
- # expound (81)
- # fulcro (2)
- # hoplon (1)
- # off-topic (42)
- # pathom (1)
- # re-frame (5)
- # shadow-cljs (17)
- # spacemacs (25)
- # testing (6)
- # tools-deps (3)
- # xtdb (12)
cooked up that JS datalog thing - https://gist.github.com/alandipert/4e390808b5dcee9020b6622c0a24023e
no optimizations or anything (indexes, query planning)
came out a little wordier than i'd hoped, not sure i arrived at the highest leverage representation of relations. but any thoughts or ideas for improvement would be most welcome
the algorithm is basically: map the clauses over the facts to get a set of relations. then join the relations, either cross-join or inner-join depending on whether or not they share variables
It’s always weird when a simple idea ends up taking a lot of space. It makes me feel suspicious of what I’ve done
The inner join is clear, but I’m so used to working with large data sets that the m×n algorithm makes me a bit uncomfortable. Your use case shouldn’t have an issue though
between template literals and Proxy, ES6+ has job security
thanks for taking a look. i'll keep going towards the dom mgmt idea i have and post back if i arrive anywhere interesting. hope everyone has a great weekend!