Live data from Hacker News

Learn Datalog Today

learndatalogtoday.org

21–30 of 56 posts

Re: Learn Datalog Today

#21
post #4

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).

1. 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.…

Another one is Differential Datalog, for streaming data.

https://github.com/vmware/differential-datalog

Re: Learn Datalog Today

#22

Earlier quoted context omitted.

1. 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.…

Another one is Differential Datalog, for streaming data. https://github.com/vmware/differential-datalog

I'm sad their last commit was 2 years ago, seemed like a really cool idea

Re: Learn Datalog Today

#23
Datalog feels so much more intuitive than SQL or any other query language I've used. I'm able to write concise, complex expressions pretty easily. In a SQL-based system, there seems to be a (low) complexity metric where it's easier to write/debug/maintain what was supposed to be a 'declarative' SQL query in a functional/imperative language instead. It feels like datalog is the next evolution of a declarative query language, one that is much more declarative than SQL itself.

In the "day of datomic" videos, there is a segment where Stu debugs a slow query. He does the debugging without even looking at the data model, only by rearranging the clauses. It is really, really impressive, and I can't imagine having that capability in SQL.

Re: Learn Datalog Today

#24

Earlier quoted context omitted.

Cozo uses Datalog for queries, and has several backends, including SQLite

Cozo 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.

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.

Re: Learn Datalog Today

#25

Earlier quoted context omitted.

Cozo 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.

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.

ok 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.

Re: Learn Datalog Today

#27
For the idiot in the thread, why would I use datalog (which I've never heard of before) over SQL?

Having looked quickly at it just now it seems (Wikipedia article) similar to Web Ontology Language (OWL), though I believe datalog may have been around long before owl.

Re: Learn Datalog Today

#28
post #4

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).

1. 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.…

CodeQL is another datalog with the domain of code analysis as its use case. Too bad you cannot create a custom fact database with CodeQL. Otherwise, the implementation of CodeQL is pretty advanced and efficient.

Re: Learn Datalog Today

#29

I wish people would stop referring to Datomic as datalog. Datomic is many things, but only the query format (Horn clauses with unification of variables, similar to prolog) has anything to do with datalog. Real datalog is far more interesting since it implicitly encodes recursion allowing you to chain rules. Rule A derives new facts, which rule B uses to derive new facts, which rules A and C use to derive new facts, a…

Sounds cool. What's the complexity of running this kind of recursive reasoning? Reasonable? Can you suggest any tools to not have to implement it ourselves?

Re: Learn Datalog Today

#30
post #22

Earlier quoted context omitted.

Another one is Differential Datalog, for streaming data. https://github.com/vmware/differential-datalog

I'm sad their last commit was 2 years ago, seemed like a really cool idea

The authors spun it out into a startup, Feldera. A paper describing their idea also won Best Paper at VLDB 2023. The idea is very far from dead.
Post reply on HN