Ovid (publius_ovidius) wrote,
Ovid
publius_ovidius

  • Mood:

Prolog Talk

If anyone's interested in Prolog, at the next Perl Mongers' meeting I will be giving a *brief* introduction to Prolog and a couple of strategies on embedding it in Perl. Info, as usual, is at The Portland Perl Mongers' Wiki.

This is a preview of a "work in progress". This is the talk I'll be giving at OSCON, but I'm hoping for feedback prior to submitting my finished work.

I've also managed to write a stunningly boring description of it.



Wednesday, May 11th, 2005 6:30pm at Free Geek, 1741 SE 10th Ave

The "holy grail" of computing, for many, is simply telling the computer what you want and have it figure out how to do it. Prolog is a step in this direction.

And are you proud of your refactoring in Perl? Do you worship DRY? (Don't repeat yourself?) Have you ever cringed when you had to reverse map a hash to lookup something by value? This and other "forced duplication" hacks are often unnecessary in Prolog. By the time the talk is done, programmers will understand why Prolog is code reuse on steroids.

And despite all of that, it's probably one of the easiest languages to learn (though it can be rather hard to master.)



As a side note, if you're at all interested in artificial intelligence, Prolog is one of the premier languages for such research. Time permitting, I'll be using it to demonstrate a simple text adventure that I bundle with my software to show people how Prolog works. While the adventure is written entirely in Prolog, the Prolog compiler is written entirely in Perl (because I'm crazy):

You are in a meadow. To the north is the dark mouth
of a cave; to the south is a small building. Your
assignment, should you decide to accept it, is to
recover the famed Bar-Abzad ruby and return it to
this meadow.


start

?- s
You are in a small building. The exit is to the north.
There is a barred door to the west, but it seems to be
unlocked. There is a smaller door to the east.

There is a flashlight here.

s

?- take(flashlight)
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 11 comments