
Learn Datalog Today – An interactive Datomic query tutorial - jonase
http://www.learndatalogtoday.org/
======
brudgers
The standard Racket environment also includes an implementation of Datalog.

[http://docs.racket-lang.org/datalog/](http://docs.racket-lang.org/datalog/)

~~~
peatmoss
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...

~~~
brudgers
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

    
    
      (match...)
    

[http://docs.racket-
lang.org/reference/match.html?q=match&q=r...](http://docs.racket-
lang.org/reference/match.html?q=match&q=replace&q=regex#%28tech._match._expander%29)

Anyway, There's always IRC.

~~~
fogus
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.

------
Adrock
> 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.

------
iso-8859-1
Here's an online Datalog IDE and evaluator, running wholly client-side. Made
with Emscripten.

[http://ysangkok.github.io/mitre-
datalog.js/wrapper.html](http://ysangkok.github.io/mitre-
datalog.js/wrapper.html)

