Hacker News new | comments | show | ask | jobs | submit login
Learn Prolog Now (union.edu)
57 points by JoelMcCracken 2312 days ago | hide | past | web | favorite | 13 comments

An interesting aspect is that some of Prolog's ideas, such as the signature one of backwards-chaining, unification-based queries, are starting to resurface in other languages, so it might be worth learning even if you don't plan to use Prolog itself.

I wrote an opinion piece a while ago about why Prolog had fallen out of favor (http://www.kmjn.org/notes/prolog_lost_steam.html), and one of the reasons was that other declarative programming approaches, like forward-chaining, SQL w/ recursive queries, and LINQ-style dataflow variables, have bitten off a simpler but useful subset of what it bought you. In response, Mark Proctor from Drools argued that they're well on their way to importing nearly everything important from Prolog, rather than only a useful subset, including backwards chaining with unification: http://blog.athico.com/2011/04/backward-chaining-emerges-in-...

This includes a very interesting mashup of the two ideas, "reactive derivation", which does Prolog-style queries, but where the results, like with truth-maintenance systems or SQL "views", update in real time when the underlying data changes: http://blog.athico.com/2011/06/truth-maintenance-over-direct...

Imo, the simultaneous use of Prolog-style derivation and real-time forward-chaining style truth maintenance is both really interesting and a bit mind-bending, so learning Prolog first might be a good foundation.

can you point me to something that discusses dataflow style variables in linq? (i don't use ms software and had missed this). thanks.

I took two Prolog classes at University, and it was one of those great experiences for me as a programmer. Highly recommended for everyone, don't get stuck on just functional languages!

Sadly the only thing i can remember now are all the biblical examples of The Art Of Prolog, but prolog it's anyway something well worth a try (especially if you develop rule engines in other languages).

There is a much better example where the witch sketch from Monty Python is subtitled in prolog, but I can't seem to find it for the moment.

Long ago and far away there was only one PC implementation for Prolog and like a good little programmer I gave it a shot. It was an 'interesting' ride (interesting in the Chinese sense) but I stuck with it long enough to understand that I was better off building my projects in the languages that Prolog seemed to have been built from. Never looked back; finished the project without further confusion or delay, took that as a sign. Similar to how many on HN seem to feel about Lisp :)

I tend to think that prolog is better as a language library, such as with Racklog:


Peter Norvig also has two implementations of Prolog in Paradigms of AI Programming (first one is interpreted, second is complied) in Common Lisp. The book is highly recommended because Norvig's code is very elegant and his exposition is wonderful.

Allegro Prolog [1] is based on Norvig's implementation, although I'm sure they've done a fair bit of optimizing.

[1]: http://www.franz.com/products/prolog/

Yeah, I've heard. I really need to acquire and work through that book.

You should totally do it... it's fantastic. Norvig makes it quite clear in the beginning that he expects you to know atleast some lisp beforehand (the "intro" chapter is a bit sparse), so you might want to brush you on your CL skills before you dive in.

I think I will. I'm fairly novice at CL, and it would be good to learn it.

Franz supports a port of his Prolog in their AllegroGraph products, in addition to Allegro Prolog.

Looks like a good beginning text.

I have over a half a dozen Prolog books, my favorite being "The Art of Prolog." Bratko's books, "Prolog and Natural Language Analysis," and "Natural Language Processing in Prolog" are also favorites. I started decades ago with C&M - also a great start.

It has been over 5 years since anyone has hired me to do any Prolog development. I am not sure how widely used it is now.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact