What does HackerNews think of datafrog?

A lightweight Datalog engine in Rust

Language: Rust

Funny you say that, the Rust borrow checker tried to adopt differential-dataflow directly - the library behind this language - but Frank McSherry told them it's too complicated, let me build you an easier-to-use Datalog instead [blog]. So he built [datafrog] which is at the heart of the borrow checker today.

I'm not sure what the delta between Salsa and differential-dataflow is. My experience with differential-dataflow is that it's also galaxy brain.

[blog]: https://github.com/frankmcsherry/blog/blob/master/posts/2018...

[datafrog]: https://github.com/rust-lang/datafrog

What is the difference with https://github.com/rust-lang/datafrog? It’s a Datalog engine written by Frank McSherry on top of differential dataflow, that’s used here also
C++ is arguably the most complex programming language ever. There is not much to be gained by comparing against the supremum.

Take a look at the languages that rust was influenced by (https://en.wikipedia.org/wiki/Rust_(programming_language)) those aren't languages with straightforward compilation semantics.

There is a reason why rust has a datalog engine build into the compiler (https://github.com/rust-lang/datafrog). Which is imho totally rad and awesome, but really hard to fully form a mental model of without a spec.

There's also a Datalog implementation at https://github.com/rust-lang/datafrog .

The Polonius reimplementation of the Rust borrowchecker uses Datafrog: https://github.com/rust-lang/polonius/

They used to but Frank McSherry (author of differential dataflow) wrote them a specialized version without all the dataflow infrastructure [1]. It's part of the rust-lang nursery [2] now but hasn't been updated in a while, so I'm not sure what happened to it.

Edit: Looks like the rustc_mir crate that implements the non-lexical borrow checker uses `polonius_engine` [3] which uses `datafrog` so it's still used by the compiler!

[1] https://github.com/frankmcsherry/blog/blob/master/posts/2018...

[2] https://github.com/rust-lang/datafrog

[3] https://crates.io/crates/polonius-engine

Moar links!

(caveat: I am involved in many things)

1. You can implement some minor flavor of Doop in differential dataflow (https://github.com/TimelyDataflow/differential-dataflow/tree...). The fragment came from Yannis which he described as a minimal non-trivial analysis (vs other, even smaller fragments), but it still uses some 900 dataflow operators (updates in 10s of ms when inputs change, though). The DD impl isn't meant to be understood, I'm afraid.

2. Many ex-LB folks are now at relational.ai doing .. advanced weird tech like they did with LB. I'd watch them (I do).

3. Polonius (https://github.com/rust-lang/polonius) defines the Rust borrow checker as Datalog rules, and went from differential dataflow to datafrog (https://github.com/rust-lang/datafrog).

4. If you want to check out other incremental Datalog environments, in addition to IncA, there are

https://github.com/comnik/declarative-dataflow

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

https://github.com/TimelyDataflow/differential-dataflow

Good times for Datalog, imo.