Jim Cheung

Saturday, May 04, 2024

trying datascript as memory database for my project

it has pure javascript api, fits my no-npm requirement

once familiar with the syntax, it's very powerful:

Find directors who have directed Arnold Schwarzenegger in a movie.

[:find ?name
 :where
 [?p :person/name "Arnold Schwarzenegger"]
 [?m :movie/cast ?p]
 [?m :movie/director ?d]
 [?d :person/name ?name]]

I'm learning it from Learn Datalog Today!


found a beautiful font: Alegreya ht

Blog Archive