15 comments

[ 3.4 ms ] story [ 61.5 ms ] thread
> Datafrog was initially developed by Frank McSherry and was later transferred to the rust-lang-nursery organization.

Is its present membership in rust-lang rather than rust-lang-nursery a mistake?

(I find its membership even in rust-lang-nursery mildly surprising; in rust-lang, perplexing.)

Borrow checking is a good fit for datalog. And trait resolution is Prolog, though Rusty's backtracking makes it a worse fit for datalog than typeclasses in Haskell.
What would be the practical use cases of using something like this as a library in your application?
In modern contexts (outside of compilers): policy evaluation, see e.g. OPA's ReGo which uses Datalog enhanced with structured data support.
Would you want to use a Prolog/Datalog for things like authorizing users in a RBAC system? I give the engine a bunch of rules and properties of things, and the engine figures out whether or not the user is authorized to perform some specific action.
That's exactly what OPA does.
You ever run into a situation with SQL where you're trying to do something that's sorta tree shaped, and it makes the code awkward even if you use say vendor extensions for recursive queries? Datalog excels at those sort of problems.
But I still need to send a SQL query to the database. How does a Datalog engine in Rust help me?
Oh, well you’ll get to post something to HN that’s “written in Rust”, isn’t that enough?

/s

You can do recursive queries in SQL via standard CTE's, no vendor extensions needed whatsoever.