

News Feed in 38 lines of code using Cascalog - nathanmarz
http://nathanmarz.com/blog/cascalog-news-feed/

======
AndrewS
Without understanding the language, I get the impression that the author
prizes a low line count over readability.

~~~
nathanmarz
"Without understanding the language"

Certainly any language is unreadable without understanding it. I don't pretend
to make any comments on the readability of Chinese because I don't understand
it.

Most people aren't familiar with logic programming, which is a different way
of thinking about programming. It's not a huge leap to make, and I've tried to
ease the process with tons of examples in the introductory tutorials.

Once you understand the basic concepts, Cascalog is much more readable than
any of the alternatives. Here's the query for all people that are 25 and male.

(?<\- (stdout) [?p] (age ?p 25) (gender ?p "m"))

It reads as "Find all ?p where ?p's age is 25 and ?p's gender is "m". That's a
lot better than specifying a query in terms of explicit joins and filters.

------
jacquesm
In case you're wondering what cascalog is (like I was):

<http://nathanmarz.com/blog/introducing-cascalog/>

"A Clojure-based query language for Hadoop"

