Live data from Hacker News

Who killed Prolog?

vanemden.wordpress.com

51–57 of 57 posts

Re: Who killed Prolog?

#51
post #18

Earlier quoted context omitted.

> I think it would be best to have a Prolog-like language > as a library (like Lua or SQLite), to embed it for rules > & scripting. You may be interested to know that there are various prolog Perl modules on CPAN, particularly AI::Prolog and Language::Prolog::Yaswi .

Perl isn't really my thing* , but I'll take a look at how they're implemented. I was thinking a C library with a C API that will make it easy to use from Lua, Python, Ruby, etc. Yaswi is probably just a wrapper to SWI-Prolog. There are a few of those, and I'm tempted to write one for Lua. I think designing a Prolog-like language primarily for embedding, rather than wrapping a standalone Prolog, will have an interesti…

The nicest embeddable Prologs I've found are, for whatever reason, in Java. I use Tuprolog (http://alice.unibo.it/xwiki/bin/view/Tuprolog/) a bit, which embeds a Prolog interpreter pretty cleanly. There's also a compiler, PrologCafe (http://kaminari.scitec.kobe-u.ac.jp/PrologCafe/), though I find it a little harder to use seamlessly.

I agree that something as easy to embed from C or languages with C-embedding hooks would be nice.

Re: Who killed Prolog?

#52
post #11

Prolog was dynamically typed and in the 80'es that usually meant slow execution (sans Orbit/T I am told). What made C damn popular was the sheer speed in the produced code. When you have 7-20 Mhz computers a slow language hurts.

Types in prolog could be added as system predicates, and I think some extensions do this. I know there was a version called Turbo Prolog that generated compiled code. So, Prolog can be compiled or not, it is just that interpreting is far easier to do.

Re: Who killed Prolog?

#53

Prolog isn't dead, it just doesn't seem to get a whole lot of attention these days. I use SWI-Prolog for prototyping and exploratory programming, and I didn't need a shovel and a lantern to install it. I don't think Prolog is practical as a fully standalone language, though. Like SQL, it has a model that strongly skews it towards certain kinds of problems, and which makes I/O and side effects awkward. I think it woul…

About Prolog-as-a-library, you might like to see how it was done for Lisp at http://norvig.com/paip/README.html

I guess for C the API would need to be very different like Lua's C API, but that's life.

Re: Who killed Prolog?

#54

Earlier quoted context omitted.

Perl isn't really my thing* , but I'll take a look at how they're implemented. I was thinking a C library with a C API that will make it easy to use from Lua, Python, Ruby, etc. Yaswi is probably just a wrapper to SWI-Prolog. There are a few of those, and I'm tempted to write one for Lua. I think designing a Prolog-like language primarily for embedding, rather than wrapping a standalone Prolog, will have an interesti…

The nicest embeddable Prologs I've found are, for whatever reason, in Java. I use Tuprolog ( http://alice.unibo.it/xwiki/bin/view/Tuprolog/ ) a bit, which embeds a Prolog interpreter pretty cleanly. There's also a compiler, PrologCafe ( http://kaminari.scitec.kobe-u.ac.jp/PrologCafe/ ), though I find it a little harder to use seamlessly. I agree that something as easy to embed from C or languages with C-embedding hoo…

It's odd that there isn't a C one, really. I've done very little with Java and the JVM, but hopefully those will prove helpful to someone else.

I don't have a time frame for a C-embedded Prolog (I've already got several other projects I'm trying to finish), but it's high on my list.

Re: Who killed Prolog?

#55

Prolog isn't dead, it just doesn't seem to get a whole lot of attention these days. I use SWI-Prolog for prototyping and exploratory programming, and I didn't need a shovel and a lantern to install it. I don't think Prolog is practical as a fully standalone language, though. Like SQL, it has a model that strongly skews it towards certain kinds of problems, and which makes I/O and side effects awkward. I think it woul…

About Prolog-as-a-library, you might like to see how it was done for Lisp at http://norvig.com/paip/README.html I guess for C the API would need to be very different like Lua's C API, but that's life.

I've got that book, too. :) (And I recommend it to people all the time...)

I'm thinking something like Lua's C API, both because I know it well and because its design does a particularly good job of bridging C and a dynamically-typed language.

Re: Who killed Prolog?

#56
post #11

Prolog was dynamically typed and in the 80'es that usually meant slow execution (sans Orbit/T I am told). What made C damn popular was the sheer speed in the produced code. When you have 7-20 Mhz computers a slow language hurts.

Types in prolog could be added as system predicates, and I think some extensions do this. I know there was a version called Turbo Prolog that generated compiled code. So, Prolog can be compiled or not, it is just that interpreting is far easier to do.

There's a de-facto standard bytecode and virtual machine design for byte-compiled Prolog, known as the Warren Abstract Machine. There are links concerning it and derived designs here: http://news.ycombinator.com/item?id=1649138

Also, wamcc (http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.45.1...) compiles Prolog to C.

Re: Who killed Prolog?

#57
post #26
post #9

What people wanted Prolog to do, it couldn't do. People wanted to step away from the control flow specification of imperative language, the message-passing of OOP, and let the compiler solve your problem for you by feeding it a specification of the constraints the completed system would follow. Prolog did not, and cannot do this, because it is not strong AGI. When people realized this, they gave up on it, because it…

You mean something like Cyc or Open Cyc? http://www.cyc.com/opencyc/ I am not sure that I fully agree. Even without that, Prolog is very useful for many problems.

Cyc failed because it succeeded.

Doug Lenat was able to run a very good business (hiring about 50 people for 10+ years) running about 50% off government contracts, about 50% off sales to big companies that could use better KB management tools that his competitors had.

Cyc didn't need to change the world in order to succeed, so it didn't change the world.

That said, the fundamental trouble in NLP is the lack of common-sense knowledge. The proper word-sensing of pen in "the pig is in the pen" vs "the ink is in the pen" is a matter of semantics, not syntax. You can do Noam Chomsky stuff until you're blue in the face and it will get you nowhere... But then some stupid Markov Chain comes along that conflates syntax and semantics and beats it.

Post reply on HN