Datalog in 100 lines of JavaScript (2022)

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • micro-datalog

  • How is the language being presented connected to Datalog whatsoever? It uses a very alien syntax, and has no mention of Datalog's defining feature, recursion that is always guaranteed to terminate.

    Here's an __actual__ small (and very fast) full blown datalog engine: https://github.com/brurucy/micro-datalog

  • crepe

    Datalog compiler embedded in Rust as a procedural macro

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • ascent

    logic programming in Rust

  • datascript

    Immutable database and Datalog query engine for Clojure, ClojureScript and JS

  • Hi pests, I don't think the criticism in the comments gives a full picture.

    I wrote about a particular flavor of datalog, in common use today. [1] [2]. The earliest representation I know, which matches the syntax of my essay, was in SICP [3]

    There's another, more academic form of datalog, which looks a lot more like prolog. Both have lots of similarities: both systems have a set of facts and rules. Both systems have can take a partially filled fact or rule, and find all matching facts. The more academic flavors of Datalog are useful for general logic, and particularly powerful for recursive questions. The variant I showed is more tailed for database queries.

    [1] https://github.com/tonsky/datascript

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts