This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-04-15
Channels
- # asami (6)
- # babashka (74)
- # babashka-sci-dev (164)
- # beginners (50)
- # biff (3)
- # calva (71)
- # clj-kondo (4)
- # cljdoc (39)
- # cljsrn (4)
- # clojars (8)
- # clojure (70)
- # clojure-austin (7)
- # clojure-czech (5)
- # clojure-europe (4)
- # clojure-losangeles (1)
- # clojure-nl (10)
- # clojure-norway (1)
- # clojure-uk (3)
- # clojurescript (38)
- # community-development (18)
- # cursive (129)
- # datomic (9)
- # fulcro (7)
- # graalvm (4)
- # improve-getting-started (1)
- # jobs (1)
- # kaocha (2)
- # liberator (9)
- # lsp (22)
- # malli (3)
- # membrane (95)
- # off-topic (86)
- # releases (2)
- # sci (5)
- # specter (2)
I'm trying asami to store var information and then query it transitively, but I don't know what's the best way to store the data. E.g. given this:
(def data [{:entity/type :call
:var/name 'assoc
:var/ns 'clojure.core
:from/var 'foo
:from/ns 'example}
{:entity/type :call
:var/name 'foo
:var/ns 'example
:from/var 'bar
:from/ns 'example}])
You can see that a call was made to clojure.core/assoc from the var example/foo. And there was a call from example/bar to example/foo. So transitively example/bar was calling clojure.core/assoc too. How could I accomplish this with asami? Any ideas?This is for XT's Datalog, not Asami's, but sharing just in case this snippet is helpful/illustrative: https://gist.github.com/refset/57a910e2b746332ec7a0a31886f57cfb
I was explaining in a DM that rules were needed here, since there is no attribute to be transitive over. My thoughts were either: • use a production rule that creates an attribute to create the connections, which can then be traversed transitively • use a rules system like Datomic's which can make those connections without having to materialize them
For anyone looking on, the rules that @U899JBRPF shows are the Datomic-style that I was referring to in the second suggestion