
The Birth of Prolog (1992) [pdf] - mindcrime
https://web.stanford.edu/class/linguist289/p37-colmerauer.pdf
======
Stwerner
I've noticed prolog being mentioned here and a bunch of other places, but
haven't really found any good introductory books on the language.

Does anyone have any recommendations?

~~~
daviddaviddavid
Clocksin & Mellish has the benefit of being a slim volume, which makes it
approachable.

Sterling & Shapiro (Art of Prolog) has much more depth. Not sure I'd recommend
to a beginner. (It has a beautiful cover, though and is almost worth getting
just for that.)

My favorite Prolog book is Pereira & Sheiber's "Prolog and Natural-Language
Analysis". It's slanted toward NLP but the coverage of Prolog itself is top
notch.

[https://www.amazon.com/Natural-Language-Analysis-
Information...](https://www.amazon.com/Natural-Language-Analysis-Information-
Publication-1987-07-30/dp/B01FJ1DIH6)

~~~
tomcam
Uh, the cover did not move me. Especially at $150

~~~
Jtsummers
[https://mitpress.mit.edu/books/art-prolog-second-
edition](https://mitpress.mit.edu/books/art-prolog-second-edition)

That's the book they meant (referred to as having a "beautiful cover").

~~~
nyankosensei
...and it’s Open Access, i.e. free download.

~~~
mycl
Holy Cow, I had no idea. I have a physical copy, but now I can suggest this to
everyone.

------
pancomplex
It's a fun language to play around with and everything. Just have never seen
anyone us it at scale in the industry other than folks doing
research/academia.

~~~
emmanueloga_
"Datalog is a declarative logic programming language that syntactically is a
subset of Prolog." [1]

"Datomic is a distributed database and implementation of Datalog.". Datomic
seems to be quite succesful [2].

Related to datomic, I'm trying to learn Datascript these days ("An immutable
in-memory database and Datalog query engine in Clojure and ClojureScript.")
[3].

1:
[https://en.wikipedia.org/wiki/Datalog](https://en.wikipedia.org/wiki/Datalog)

2:
[https://www.datomic.com/customers.html](https://www.datomic.com/customers.html)

3:
[https://github.com/tonsky/datascript](https://github.com/tonsky/datascript)

~~~
cgrand-net
Datalog is a subset of Prolog syntax and logical semantics, but not of its
operational semantics, so in practice the link is tenuous.

I like the honest words of Serge Abiteboul (co-author of Foundations of
Databases [http://webdam.inria.fr/Alice/](http://webdam.inria.fr/Alice/)) on
this topic:

 _This is back to the advantages of “declarative programming”. The first scam
was Prolog: The language is not really declarative. The second scam was
Datalog: It is declarative, but there is not much you can do with it._

 _Datalog is simple and beautiful – Horn clauses. We theory guys had a ball
with it. There were beautiful results to obtain even at the cost of further
simplifications (e.g., monadic to be able to decide containment). But the scam
is that if you want to do anything serious beyond your stupid positive first-
order queries, you need more._

 _There was no fix that I know of for Prolog. There were fixes for Datalog.
Extend the language. And this was done during the last 30 years_

([http://abiteboul.blogspot.com/2012/08/datalog-revival-for-
da...](http://abiteboul.blogspot.com/2012/08/datalog-revival-for-database-
geeks-only.html))

~~~
YeGoblynQueenne
>> The first scam was Prolog: The language is not really declarative.

The language is not _fully_ declarative. It's something like 90% declarative,
but that is not enough to satisfy the purists, who demand 100% purity, or
else!

... or else they will stick to their C++'s and their Javas and SQLs, that are,
oh, about 0.01% declarative. Because that makes sense, right? If you can't
have a perfectly, purely declarative language, throw out the baby with the
bathwater and go back to your purely imperative languages.

That kind of criticism has never made any sense and it doesn't make sense now.

>> But the scam is that if you want to do anything serious beyond your stupid
positive first-order queries, you need more.

You can't do anything serious with Datalog? Sure you can- you can do _machine
learning_ with Datalog:

[https://github.com/metagol/metagol](https://github.com/metagol/metagol)

~~~
cgrand-net
>> Sure you can

The author spent decades on Datalog and when he says Datalog he talks about
the core Datalog not even Datalog¬, he is just stating that the core Datalog
is a wonderful seed for building actual applications by extending it.

------
armitron
I found Ivan Bratko's Prolog Programming for Artificial Intelligence excellent
(I've read the previous two editions, but not the current 4th).

~~~
agumonkey
I enjoyed it. I didn't read other prolog books since so I can't compare but
I'd still suggest it.

------
tempodox
I wish there was a way to electrify such paper scans into some roff or TeX
format for perfect reproduction and scalability. Anyone up for an ML project
doing that?

------
classichasclass
I emailed Dr Colmerauer about this once and asked about the Fortran source,
but his recollection is that it has been lost. :-/

------
christmm
What is the relation of Prolog constraint programming and "Google OR-Tools" ?

