Learn Datalog Today – An interactive Datomic query tutorial
learndatalogtoday.orgThe standard Racket environment also includes an implementation of Datalog.
Why, when I was surveying lisps to learn, was Racket an afterthought for me? I ultimately started learning Clojure, which is great, but has the benefit / curse of the JVM. As I play around in Racket (and look over at Typed Racket), I realize how nice a language it is.
The one thing I really miss from Clojure, however, is the destructuring bind. I'd love it if someone smarter than me could opine on how hard it would be to extend Racket with destructuring bind...
Racket is actually both a language and a distribution of a set of tools for building languages - e.g. the Racket distribution includes not only Racket and Datalog, but Algol-60 just to show off how flexible the tool set is.
One of the advantages and curses of the Racket community is that it comes out of academia rather than business like Clojure. The benefit is that it has good documentation and someone somewhere is writing or has written a thesis about just about anything based on Racket. The downside is that Racket is many things to many people and there is no canonical source like Rich Hickey or Linus.
I'm not smarter - Hell, I don't even know what a destructuring bind is. But [it is the internet after all] maybe you want
http://docs.racket-lang.org/reference/match.html?q=match&q=r...(match...)Anyway, There's always IRC.
A good way to think of the difference between pattern matching and destructuring is that pattern matching is a conditional construct and destructuring isn’t.
Why is that a problem? No one ever learns just one Lisp. Must collect them all :-)
> The order of the data patterns does not matter (aside from performance considerations)
I just started using Datomic for a little project. The performance implications of the order of the data patterns matters a lot. It's not a minor performance consideration when swapping two patterns results in having a full cartesian product of two moderately large fact sets stored in memory. You fill up your heap and wait a long time to just get an OOM error. Very quickly, you realize that you need to think about how the query engine will deal with your request.
It seemed strange to me to dismiss this when it's something that I had to face on day 1.
Here's an online Datalog IDE and evaluator, running wholly client-side. Made with Emscripten.