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.


?- 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.


?- take(flashlight)
  • Current Mood: geeky geeky
Yes. We hold Perl Mongers meetings on the second Wednesday of every month and they're always free. We usually head over to the Lucky Lab after the meeting. If you show up, be sure to introduce yourself!
Wow, Prolog looks really cool.
Maybe when I get some more MIDI gear I will write a AI::Prolog::MIDI :)
To bad I have engagements every Wednesday otherwise I would make it to more P.M. meetings, I haven't been to one since R.S. gave a talk at Produce Row something like 3 years ago.
In fact you where there and we met...

The applications are endless

The tempo is 120 beats per minute. Play a C#2 for the first two beats every measure for four measures.
We met? I'm surprised. I'm also a bit embarrassed that I don't remember.

As for Prolog, if you're interested in learning more you can check out this online Prolog course. It's basic Prolog but it does have an interesting applet that allows you to test some Prolog features online without having to install Prolog.
Not to worry, like I said it was something like 3 years ago.
I could probably figure it out because that was right around the time I stopped posting on PerlMonks.
I could probably say I was the youngest person there...
This is vaguely tickling my memory. I checked your Perl Monks node and that's familiar. Did we talk about meeting at some point? I think that may even have been before Portland Perl Mongers was resurrected.
Its possible that we talked about meeting at some point though I don't really recall.
I didn't even know that Portland Perl Mongers died, I guess maybe it was longer than that because I was working for a different company than I am now, and I've been here for almost 5 years.
I've been detached from anything Perl community wise for quite some time now...
I see. Well, basically, while there was technically a local PM group before I took over, it was defunct. We never had any meetings. Randal convinced me to take the reins and I ran it for about a year before I decided to stop herding cats. Since I've restarted it, not only have we never missed a meeting, we've become one of the best attended PM groups in the country (and possibly the world.) It's a very strong group and we've been blessed by having some heavy-duty Perl folk living in the area.
Hmm, well maybe I should try and jostle some stuff in my schedule and try and make it out sometime.
Having played with Prolog a little bit in a CS class some years ago, this seems absolutely awesome. I wish I lived in the area to make the meeting.