Matt's Roof Garden

Powered by 🌱Roam Garden

May 5th, 2021

datalog using clojure

[:find ?title:name ?title:uid ?time:date
 :where [?page :node/title ?title:name]
        [?page :block/uid ?title:uid]
        [?page :edit/time ?time:date]
        [(clojure.string/starts-with? ?title "roam/")]]

:q [:find ?title
    :where 
        [?e :node/title ?title]
        [(re-matches #"(?i)\b.*(Book/).*" ?title)]    
    ]

let queryText = `[:find ?title
                              :where 
                                  [?e :node/title ?title]
                                  [(clojure.string/starts-with? ?title "Book/")]]`;


window.roamAlphaAPI.q(queryText,);

let queryText = `[:find ?title 
                              :where 
                                  [?e :node/title ?title]
                                  [(clojure.string/starts-with? ?title "roam/")]
                                  [?t (clojure.string/join "TT" ?title )]]`;


window.roamAlphaAPI.q(queryText,);


{{tweet}}

Today I was better at moving from idea to mockup. Saw that @andy_matuschak open-sourced his spaced repetition app @withorbit today and immediately wondered if I could have it read blocks from my @RoamResearch graph with roam/render. Turns out, yes! sent