4 ms·
Whatever language this is... This is not datalog. This looks like a particular implementation of datalog in closure. Actual datalog looks like prolog.
by anon291 4y ago
Whatever language this is... This is not datalog. This looks like a particular implementation of datalog in closure.
Actual datalog looks like prolog.
- cmrdporcupine 4y agoIn reality, people are using "datalog" for a genre of datastore concepts based around horne clauses, or, basically relations + implicit joins. Datalog as a subset or dialect of prolog is only one variant of this. And Datomic has made an sexpr-syntaxed variant built around binary relations popular. To the point where some people in this thread can't seem to tell the two apart. I am more interested in the general category of relational data model + logic programming than I am in any purity about Datalog in particular. In particular I'm very excited by "data/knowledge + behaviour sitting in a tree, k-i-s-s-i-n-g"
- bogomipz 4y agoThanks. Is Datomic also a dialect of Prolog then?
- cmrdporcupine 4y agoNo, and I wouldn't call Datalog a dialect of Prolog either necessarily. It's more like, classic Datalog syntax looks Prolog-ish (similar syntax, and is kind of a subset of Prolog). And you can do Datalog-type stuff in Prolog. But from what I've read of Datomic it's got a totally different syntax, but similar semantics to Datalog .. but not Prolog... Basically, Prolog can do more than Datalog. Datalog is like, some subset of concepts of Prolog, but specialized for relational data queries, so it can achieve some optimizations and focus on data retrieval only. Is that confusing enough?
- dragonwriter 4y ago> No, and I wouldn’t call Datalog a dialect of Prolog either necessarily. It’s more like, classic Datalog syntax looks Prolog-ish (similar syntax, and is kind of a subset of Prolog). Datalog originated specifically as a restricted subset of Prolog, which is why the “classic” syntax looks prolog-ish. > Basically, Prolog can do more than Datalog. Datalog is like, some subset of concepts of Prolog, but specialized for relational data queries, so it can achieve some optimizations and focus on data retrieval only. Datalog is a purely declarative, non-Turing complete subset of Prolog, removing the imperative features and assuring termination. This gives up lots of power, obviously, but it also, well, provides a termination guarantee. Removing imperative features (cut) from Prolog also means that Datalog implementations can use different (or multiple, switchable) strategies, while differing in what kinds of data sets and queries they perform well on, not correctness.
- refset 4y ago> Datalog implementations can use different (or multiple, switchable) strategies Including distributed strategies, as seen in Bloom http://boom.cs.berkeley.edu/ http://boom.cs.berkeley.edu/
- anon291 4y agoAs others have said, datalog arose as a dialect of prolog that removed turing-completeness and expressivity, thus guaranteeing termination.
- anon291 4y agoYeah I know, I'm just being pedantic.