News for hackers. Stuff that matters.

Ask HN: Good books to learn Prolog?

I'm on a quest to if not actively programm in it but at least take a look at different programming paradigms. One of the few things missing are logic programming languages. There are quite a bunch of books about Prolog, which is good on the one hand but on the other it renders it difficult to pick one to read. :D

I'd prefer a book that doesn't start with very basic stuff, eg explaining loops, if-statements and what not, I know that already. ;) "Programming Erlang" by Joe Armstrong was really perfect in that regard.

So, dear HN, do you have any recommendations? Or maybe there is something better to check out than Prolog?

( 13 comments | 10 points | on HN )
Re:Ask HN: Good books to learn Prolog? by sb on Thursday October 08, 2009 @10:34AM (#869042)
one of the best texts around is "the art of prolog, advanced programming techniques" 2nd edition, by leon sterling and ehud shapiro.

however, by now, it seems a bit dated (e.g. on the constraint logic programming side), so there is another recommendable text "programming prolog for artifical intelligence" by ivan bratko

so if you can afford, i would recommend both texts for self-study.

Re:Ask HN: Good books to learn Prolog? by plinkplonk on Thursday October 08, 2009 @10:36AM (#869047)
"one of the best texts around is "the art of prolog, advanced programming techniques" 2nd edition, by leon sterling and ehud shapiro."

Seconded. This is a really good book, though a bit hard to find, the last time I checked.

Re:Ask HN: Good books to learn Prolog? by shaunxcode on Thursday October 08, 2009 @10:49AM (#869080)
I got mine right off of amazon - and yesterday I noticed you can buy it straight from the MIT press page as well.

http://www.amazon.com/Art-Prolog-Second-Programming-Techniqu... (if you click on the used link there is a hardback going for 13 bucks right now)

http://mitpress.mit.edu/catalog/item/default.asp?ttype=2&... (they use asp..? regardless brand new hardback for 65)

Re:Ask HN: Good books to learn Prolog? by plinkplonk on Thursday October 08, 2009 @12:51PM (#869386)
hey Thanks I didn't know new copies were available. I have a falling-to-pieces used copy.
Re:Ask HN: Good books to learn Prolog? by steve19 on Thursday October 08, 2009 @08:35PM (#870329)
I have got a copy of "The Art of Prolog" sitting on my desk :) It is pretty good, but I agree with you, it is dated.
Re:Ask HN: Good books to learn Prolog? by JustAGeek on Thursday October 08, 2009 @10:52AM (#869086)
Thanks will check them out! :)
Re:Ask HN: Good books to learn Prolog? by jherdman on Thursday October 08, 2009 @10:24AM (#869026)
Prolog is a pretty neat language. It feels really strange at first, but as you grow used to its weirdness, it becomes much more enjoyable.

I learned Prolog in university using the book "Prolog Programming in Depth", by Michael A. Covington, Donald Nute, and André Vellino. Frankly, I didn't use the book all that much. It was a handy reference now and then, but it wasn't essential. Perhaps there's some good tutorials online?

Re:Ask HN: Good books to learn Prolog? by jonjacky on Thursday October 08, 2009 @11:42AM (#869192)
"Clause and Effect" by Clocksin. Also, the worked exercises at Ninety-Nine Prolog Problems, https://prof.ti.bfh.ch/hew1/informatik3/prolog/p-99/
Re:Ask HN: Good books to learn Prolog? by fogus on Thursday October 08, 2009 @11:28AM (#869166)
I loved Prolog Programming for Artificial Intelligence by Ivan Bratko.
Re:Ask HN: Good books to learn Prolog? by JustAGeek on Friday October 09, 2009 @04:03AM (#870836)
Thanks everybody for the suggestions!
Re:Ask HN: Good books to learn Prolog? by BigO on Thursday October 08, 2009 @10:37AM (#869050)
if statements and loops in prolog oh man
Re:Ask HN: Good books to learn Prolog? by JustAGeek on Thursday October 08, 2009 @10:51AM (#869082)
Maybe it could've occurred to you that I don't know Prolog yet, thus my post here. :P
Re:Ask HN: Good books to learn Prolog? by mahmud on Thursday October 08, 2009 @11:38AM (#869182)
How good is your Lisp?

LISA does forward chaining within CLOS, so you always have a real language on standby when you need one. JESS has Java.

Prolog: what a frustrating language to use in the Real World and what a delightful lab language.