5 ms·
Simple, pure, and total functional language that generalizes Datalog
- bcherny 7y agoI just listened to Michael’s episode on Future of Coding — highly recommended for context!
- alexchamberlain 7y agoHave you got a link to that? Is it this one https://podcasts.apple.com/gb/podcast/future-of-coding/id1265527976 https://podcasts.apple.com/gb/podcast/future-of-coding/id126...?
- bcherny 7y agoYup, that’s the one.
- djhaskin987 7y agoI totally thought the article was going to be about prolog. Datalog was formulated as a subset of prolog. Prolog generalizes datalog, and is functional, etc. So generalizing a language that was the subset of a larger one in the first place is something I find odd.
- galaxyLogic 7y agoFrom Wikipedia: "Datalog does not have Prolog's cut operator. This makes Datalog a fully declarative language." So Datalog is a better starting point, extend it in some other better ways than Prolog does.
- YeGoblynQueenne 7y agoProlog is not functional. Datalog literals [1] and arguments of literals cannot have as arguments functions of arity more than 1 (i.e. constants). Prolog literals and their arguments may have functions of arity more than 1 as arguments. However, Prolog predicates are relations, not functions. i.e. they have no fixed "input" and "output" arguments. So Prolog is not a functional language. ______________________ [1] In "p(X):- q(X)", p(X) and q(X) are literals.
- antisemiotic 7y agoProlog isn't a total language, as a total language can't be Turing-complete.
- galaxyLogic 7y agoWhat kind of sound does a Turing machine make?
- carterschonwald 7y agoI really enjoyed the original datafun paper. Glad to hear there’s more follow on work!
- iamwil 7y agoHas anyone had experience with Datalog or Datafun? What was the programming experience like? What did you build with it? Did you find that you were more productive or less? What sorts of problems was it a good fit for, and what sorts of things was it a bad fit for?
- whazor 7y agoFor my database course I had to write all queries in: SQL, Relational Algebra, and Datalog. I remember that Datalog was the easiest way of writing queries if you understood all the tricks. However, this was on paper, never executed on real databases.
- alexchamberlain 7y agoI’ve been playing with some ideas of applying Datalog to RDF graphs; there’s a very rough and ready implementation at https://github.com/alexchamberlain/mutant https://github.com/alexchamberlain/mutant. This isn’t a new idea; Apache’s Marmotta is very similar. I think we’ve really missed a trick with declarative programming beyond the database. I find it much easier to think about simple rules, and I think it would be easier to share these rules with less technical business partners too.
- iamwil 7y agoAre people using RDF a lot nowadays? I don't see it often, besides in the Java world. What use case did you want to use datalog for with RDF graphs?
- alexchamberlain 7y agoTo be honest, I'm not 100% sure. The tooling that exists - at least in the open source space - seems to be vastly dominated by Java and academic endeavours. That being said, I think the ideas behind RDF are pretty awesome, and its simplistic structure makes full indexing, datalog inference and layering possible.
- 7y ago