Hacker News new | ask | show | jobs
by whartung 1409 days ago
I'm going to look at the Art of Prolog book.

Prolog is one of those things that has alluded me all this time. Mostly I don't think I've had an application for it, and, bluntly, at least for me, I need to have a "real" application to solve to best learn something. Seeing the "animal" program repeated over and over and over again was never any help.

In hindsight, maybe it would have been appropriate in an email messaging application I did long ago. It's message routing workflow was not inscrutable, but certainly difficult (and it didn't help that the route could split, sending the message to more than one place with their own workflows -- that was fun).

I've done a bunch with rule engines (and the message routing was done with an ad hoc one), but less so with inferencing.

Maybe this book will give me some insight to explore further. It's always one of those things that sort of nags the back of my brain that I don't quite grok it.

1 comments

The Art of Prolog and PAIP are full of small Prolog usecases.

The Craft of Prolog is also very much worth looking into.

A related approach is ASP, which combines SAT with logic programming. These are the two canonical books:

* Answer Set Programming: https://www.cs.utexas.edu/users/vl/teaching/378/ASP.pdf

* Answer Set Solving in Practice: https://potassco.org/book