Hacker News new | ask | show | jobs
by RBerenguel 4774 days ago
Every time I use prolog for something (or more like I think "Ha! This is meat for Prolog!") I feel like I'm just using an awesomely sharp knife. As I like to put it, it's like a database on steroids.

A few months ago I was "bored" and decided to write a "scrapper" (kind of) to get all my tweets (this was before twitter opened tweets for download). It was relatively easy: write a little javascript that scrolls to bottom and then regex-matches all the (correctly loaded now) tweet data in the webpage. Then collect the tweet text in a plain ol' list that then is dumped on-screen as prolog terms... and saved as plain text.

With this simple thing I could make interesting queries (who I mention more often, when I'm more prone to tweet...) in a breeze, and I could made even better queries with a little more work/available data.