5 ms·
It's a shame that there doesn't seem to be any decent open-source implementation of Datalog. If you go for full Prolog instead of Datalog, there are several (Sc
by FreeFull 3y ago
It's a shame that there doesn't seem to be any decent open-source implementation of Datalog. If you go for full Prolog instead of Datalog, there are several (Scryer Prolog being my personal favourite).
- cmrdporcupine 3y agohttps://en.wikipedia.org/wiki/Souffl%C3%A9_(programming_language) https://en.wikipedia.org/wiki/Souffl%C3%A9_(programming_lang... https://github.com/souffle-lang/souffle https://github.com/souffle-lang/souffle
- Jonovono 3y agoCozoDB: https://github.com/cozodb/cozo https://github.com/cozodb/cozo
- nezaj 3y agoHere’s a blog post showing you how to roll your own in ~100 lines of JS https://www.instantdb.com/essays/datalogjs https://www.instantdb.com/essays/datalogjs
- namingisharder 3y agoExcept that is not remotely Datalog. Would folks please stop publishing nonsense about simple relational algebra implementations claiming they are Datalog, even though there is no recursion. This is like seeing an article about how to implement context free parsing and finding one about implementing regular expressions with DFAs.
- kjqgqkejbfefn 3y ago1. Datomic - While not open-source, it has an open-source version called Datomic Free, which is a distributed database designed to enable scalable, flexible, and intelligent data storage and queries. Datomic's query language is closely inspired by Datalog. 2. DataScript - An open-source in-memory database and query engine for Clojure, ClojureScript, and JavaScript that is heavily influenced by Datalog and Datomic. 3. Crux (now XTDB) - A bitemporal database with Datalog-inspired querying capabilities. It is designed for efficient querying of historical data and offers ACID transactions. 4. Racket's miniKanren - While not strictly a database, miniKanren is an open-source logic programming extension to the Racket language, which is inspired by Datalog and can be used to manipulate and query data in a manner similar to Prolog. 5. LogicBlox - An open-source platform that combines a database system, a Datalog-based modeling language, and application server facilities. It allows developers to build complex, data-intensive applications. 6. Soufflé - A Datalog-inspired language that is designed for static analysis problems. It can be viewed as a database query language with a focus on performance, allowing for parallel execution of queries. 7. Dedalus - A Datalog-like temporal logic language used to express complex distributed systems. It is primarily a research tool but has informed the design of other Datalog-inspired systems. 8. Flora-2 - An open-source object-oriented knowledge representation and reasoning system that integrates a variant of Datalog with objects and frames. Top 3 are from the Clojure ecosystem. Additionnaly in this same space there is Datalevin & Datahike among many others
- persnickety 3y agoCozo uses Datalog for queries, and has several backends, including SQLite
- cmrdporcupine 3y agoCozo is very attractive. I just wish there was a native Rust DSL API for it, so it could be embedded in Rust programs without using datalog queries in strings.
- soraki_soladead 3y agohttps://github.com/cozodb/pycozo/blob/main/pycozo/test_builder.py https://github.com/cozodb/pycozo/blob/main/pycozo/test_build... Here's the python version of what I think you're looking for. Shouldn't be too difficult to port to rust.
- cmrdporcupine 3y agook but that's not what i want. the thing is written in Rust. but does not expose a Rust query API, you have to query it through Datalog queries in strings; what you shared there just builds those strings from python.. it'd be nice to have a directly native API, with horne clauses constructed in Rust.
- kevindamm 3y agoAlso GDL and its variants, but that is more of a domain-specific language for game descriptions and general game-playing runtimes. Still, they refer to Datalog as its basis.
- summarity 3y agoAlso Rego, which is Datalog with structured extensions, in use everywhere where OPA is used (as in many k8s environments)
- 3y ago
- manu3000 3y agoyou can use Datalig within Flix https://flix.dev/ https://flix.dev/
- refset 3y agoFor comparison, I previously translated that cart parts scheduling example on the Flix homepage to Datomic-style Datalog syntax: https://gist.github.com/refset/21b3fc1dec9a6928943073809e13356d https://gist.github.com/refset/21b3fc1dec9a6928943073809e133...
- dagipflihax0r 3y agoMangle https://github.com/google/mangle https://github.com/google/mangle is an open-source implementation in golang, it was an explicit goal to make it easy to learn. Meaning: it is easy to recognize the pure datalog part, the syntax is following the good old course material. It was discussed here: https://news.ycombinator.com/item?id=33756800 https://news.ycombinator.com/item?id=33756800