<story><title>Datalog in JavaScript</title><url>https://www.instantdb.dev/essays/datalogjs</url></story><parent_chain></parent_chain><comment><author>jitl</author><text>It’s fascinating to see so many different parties converging on Datalog for reactive apps &amp;amp; UI.&lt;p&gt;- There are several such talks at &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;www.hytradboi.com&amp;#x2F;&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;www.hytradboi.com&amp;#x2F;&lt;/a&gt; (happening this Friday)&lt;p&gt;- Roam Research and its clones Athens, Logseq, use Datascript &amp;#x2F; ClojureScript &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;tonsky&amp;#x2F;datascript&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;tonsky&amp;#x2F;datascript&lt;/a&gt;&lt;p&gt;- differential-datalog isn’t an end-to-end system, but is highly optimized for quick reactivity &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;vmware&amp;#x2F;differential-datalog&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;vmware&amp;#x2F;differential-datalog&lt;/a&gt;&lt;p&gt;- Datalog UI is a Typescript port of some of differential-datalog’s ideas &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;datalogui.dev&amp;#x2F;&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;datalogui.dev&amp;#x2F;&lt;/a&gt;&lt;p&gt;I think an under appreciated aspect of Datalog is as a pure specification language for relationships. Schema languages like GraphQL specify a relation between types exists, but not how it is computed. Prisma and other  ORM DSLs like ActiveRecord do a better job specifying how to compute a relation from SQL tables, but support only a few strict computation types that can be modeled using SQL JOIN on columns.&lt;p&gt;Datalog lets you purely specify arbitrarily complex logical relationships between data types. Even if you were to only use Datalog as a rules engine at test time, it could still be quite powerful for validating logic implemented in different languages on the same data model, to say keep your Typescript, Kotlin and Swift logic in sync.</text></comment>
<story><title>Datalog in JavaScript</title><url>https://www.instantdb.dev/essays/datalogjs</url></story><parent_chain></parent_chain><comment><author>simongray</author><text>It is really great that people are discovering the utility of triplestores through their ubiquity in the Clojure ecosystem (e.g. Datomic and its many clones).&lt;p&gt;I do feel saddened that few seem to realise that the fundamental idea actually comes from RDF (i.e. the semantic web) and that Datomic&amp;#x27;s Datalog dialect is actually &lt;i&gt;very&lt;/i&gt; similar to SPARQL. Datomic&amp;#x27;s primary innovation is the immutability&amp;#x2F;time travel feature, not the fact that is uses triples and works like a graph database. If you find triplestores fascinating I implore you to explore the semantic web stack too.</text></comment>