News for hackers. Stuff that matters.
Re:The Prolog Story by silentbicycle on Thursday May 20, 2010 @09:26AM (#1363942)
If you want to learn about Prolog, the best book IMHO is _The Art of Prolog_ by Sterling and Shapiro. The newer edition is out of print and expensive (but worth it!), the previous edition is more like $6 and will give you a good taste. _Programming in Prolog_ by Clocksin & Mellish is a pretty straightforward overview of the language, but TAoP really gets at Prolog's real potential.

I also liked _Clause and Effect_, which is somewhat like a "Little Schemer" for Prolog, with a couple fairly substantial projects at the end. "Learn Prolog Now" (http://www.learnprolognow.org/) is free online, but a bit basic.

CTM has a great chapter on relational programming and Prolog, too - Peter Van Roy worked on Aquarius Prolog (http://www.info.ucl.ac.be/~pvr/Peter.thesis/Peter.thesis.htm...), and he also follows up with constraint programming. I highly recommend using a Prolog with constraint programming libraries, because it will make a big difference when Prolog's default behavior is too naive.

I would recommend learning Prolog, because it's sufficiently different from every other language that it will change the way you think, and even if you never use it in production, it's an excellent prototyping language. As a bonus, learning Prolog will help with Erlang, and vice versa. (Erlang was initially a DSL on SICStus Prolog, and many Prolog idioms came along.)

Re:The Prolog Story by rdtsc on Thursday May 20, 2010 @11:35AM (#1364259)
> As a bonus, learning Prolog will help with Erlang, and vice versa. (Erlang was initially a DSL on SICStus Prolog, and many Prolog idioms came along.)

As far as Erlang I have always been put off by the lack of backtracking. They took the best feature from Prolog and threw it out. Everything else is already strange and quite awkward, and those are the parts they kept but threw away backtracking. (I am looking at Elang as a general purpose language here, I know that there is no need for backtracking in a realtime telephony system).

By the way, if you want to experiment with prolog try SWI prolog. It's open, it has an IDE and a bunch of modules, including support for CHR (constrain handling rules).

http://www.swi-prolog.org

Ubuntu has it in its apt repository so you can just install from there.

Re:The Prolog Story by JustAGeek on Thursday May 20, 2010 @09:38AM (#1363967)
When you say "newer edition", are you referring to the edition from 1994 or is there an even more recent one?
Re:The Prolog Story by silentbicycle on Thursday May 20, 2010 @09:46AM (#1363984)
Newer and older are '94 and '86, respectively.

The (at the time de-facto) standard for Prolog shifted between the two editions, and the latter has several more chapters with larger example projects. Still, the core of the book is about logic programming itself, with Prolog is used an example language.

Re:The Prolog Story by JustAGeek on Thursday May 20, 2010 @09:58AM (#1364012)
Ok, thanks!

Turns out it's still available at Amazon.de, just ordered it along with "Clause and Effect".