Hacker News new | past | comments | ask | show | jobs | submit login
Datalog for trees in Clojure (juxt.pro)
88 points by jonpither on Oct 22, 2015 | hide | past | favorite | 6 comments



Cool article! Datalog is definitely worth more attention!

Just a detail: In fairness, I think one can say that there is actually one more "implementation" of datalog for Clojure, though it is built upon the Hadoop ecosystem, Cascalog [1].

I just hope they get Apache Spark support out of the door soon, as that would make it a lot more useful for things with any kind of requirements on delay.

But most of all, I wish there was a solid open source disk-based database/data system out there that did NOT need the overhead of a Hadoop, nor Spark installation. That would be killer!

[1] http://cascalog.org


Cascalog isn't really datalog.

It is a datalog like fragment without recursion but with added negation. Which makes it more like a pretty syntax for conjunctive queries with negation and thus equivalent in power to SQL.

The tree example of the article would thus not be possible in cascalog.


IC, many thanks for the clarification!


If anybody wonders, the no. 1 reason I find datalog so compelling, is the support for "named queries", which basically means that you can store a complex lookup as named "concept", which is then usable in other queries.

This, combined with the pattern-matching oriented syntax that leverages implicit JOINs, makes it so much more useful (it seems to me), than SQL VIEWs (which would be the SQL counterpart to datalog's named queries) will ever be (Correct me if I'm wrong!).


By the creator of ditaa apparently http://ditaa.sourceforge.net/


I often wondered how you could use datalog to do tree matching in compiler backends, this is cool.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: