

A Prolog Introduction for Hackers - marshallp
http://www.kuro5hin.org/story/2004/2/25/124713/784

======
henning
Every one of you owes it to yourself to read The Art of Prolog. If you liked
On Lisp, SICP, or Paradigms of AI Programming you will love it and it will
change how you view programming. And, as Alan Kay said, point of view is worth
80 IQ points.

~~~
silentbicycle
Absolutely. While some of the other introductions to Prolog cover the language
quite well (_Programming in Prolog_ by Clocksin & Mellish is good), _The Art
of Prolog_ unapologetically dives headfirst into the deep ideas in logic
programming, then comes back to the surface and shows how standard Prolog
captures them. Its focus on the big ideas ties it less to Prolog, and it sits
very comfortably next to books such as SICP and CTM.

It's out of print and a bit expensive ($80-130ish), but the first edition goes
for much cheaper. Prolog standardized between the two editions, and the second
edition has 100+ pages of new material (including projects), but the former
(closer to $6) will give you a pretty good taste.

~~~
parenthesis
_The Art of Prolog_ is available new from amazon.co.uk :

[http://www.amazon.co.uk/Art-PROLOG-Advanced-Programming-
Tech...](http://www.amazon.co.uk/Art-PROLOG-Advanced-Programming-
Techniques/dp/0262691639/ref=sr_1_1?ie=UTF8&s=books&qid=1251378359&sr=8-1)

~~~
silentbicycle
Well, new copies are available from Amazon in the US, etc. as well, it's just
a bit pricey because it was last printed in 1994. (There's not a newer UK
edition.)

------
silentbicycle
Learn Prolog Now (<http://learnprolognow.org/>) is covers the basics better,
IMHO, as does _Programming in Prolog_ by Clocksin & Mellish.

~~~
silentbicycle
("is covers"? Oops. Missed the edit window.)

As an aside: There is a really good section on Prolog in Chapter 7 (Logic
Programming) in CTM. Peter Van Roy is quite familiar with Prolog (including
several published articles about efficient implementation), and he includes a
good summary of its strengths and weaknesses. The chapter on amb/backtracking
in SICP doesn't really do Prolog justice, IMHO.

------
hristov
Wow this brings back memories. I studied this language in europe back when I
was a kid (must have been around 20 years ago). Very interesting and it
definitely changes the way one thinks about programming. Too bad the purpose
it was written for (the so called expert systems) never really became popular.

~~~
asciilifeform
> Too bad the purpose it was written for (the so called expert systems) never
> really became popular

My impression is that expert systems became _too_ popular (for a while, they
were an overworked subject in CS academia and industrial hype literature
alike) and died from an excess of broken promises.

~~~
gchpaco
Expert systems are everywhere, actually; it's just that nobody hypes them much
any more.

~~~
nwatson
For a current successful commercial expert system see for example
<http://www.zenprise.com> \-- Zenprise is a rule-based expert system that
monitors Microsoft Exchange and Blackberry server deployments, and Active-Sync
(Windows Mobile, iPhone, etc.) and Blackberry phones. It automatically
monitors system configuration and real-time telemetry to find where problems
are in a corporation's message system and help administrators avoid those 3
a.m. phone calls from irate CEOs who aren't getting their emails while
working/traveling in Asia.

There are several thousand rules actively monitored and rule violations
trigger alerts with resolution plans ... IT personnel can go through the
resolution to further troubleshoot and fix their problems. It also identifies
the underlying cause for a particular problem (root-cause analysis) ... when
one link goes down there are many symptoms. The system's set up to identify
the most likely common cause for all those systems. Pretty nice.

------
gchpaco
A pretty minimal introduction to the language; it doesn't much discuss why one
would prefer programming in Prolog to writing the same things in Erlang or
Scheme. But within its scope it's pretty fair.

~~~
hristov
Well, prolog is especially good at a certain task. And that is storing and
dealing with logically organized language like data. Back in the time, people
used to refer to this as storing and dealing with knowledge instead of data.

The main idea of prolog is to kind of mimic the way the human mind stores
knowledge. So eventually one would be able to store the knowledge obtained by
an extpert, such as a botanist, engineer, car mechanic, attorney, etc. and be
able to recall it or use it to solve problems in simple language like queries.

That is a pretty ambitious goal and, to the best of my knowledge, I don't
think it has ever really worked. Nevertheless, it is a very cool language and
its ultimate goal may work now that computing power is so high.

------
dfarm
Holy %*&% -- I didn't know kuro5hin was still around...

Seems like semantic web stuff today is Prolog on the network. I still need to
learn it at some point.

