I would opt for a couple of small examples that are almost self-explanaotry
and then describe in a high level way a seriously useful Prolog application. 
Folks are not going to be able to pick up complex new constructs in 45 
minutes, so give then simple stuff they feel like they can get their head 
around and then tempt them with power.

I learned Prolog back in the 80's when it was still a hot language and liked 
it alot. For constraint programming, it truly makes easy problems easy and 
many hard problems possible with a minimum of hassle. More recently, the 
Mercury language seems like a cool declarative approach as well.

However, I am happy to be a devil's advocate as well :-) Here are some 
aggressive questions you might have to field from folks who have heard of 
Prolog:

1) Prolog was hot in the 80's but is hardly ever used these days. If it hasn't 
stood the test of time, why should I care?

2) There are about 20 Prolog compilers out there, all incompatible due to a 
weak language spec. This a recipe for vendor lock-in; how could I make my 
prolog programs last?

3) Why is Prolog a good match with Perl?

4) Pretty CS langauages are all well and good, but how do I get real work 
done? Are there Prolog bindings for databases, network  and systems 
libraries, graphical toolkits? Is there a decent Prolog IDE?

        -Mark


On Tuesday 08 March 2005 11:18 am, Ovid wrote:
> Hi all,
>
> I need some advice.  I'm going to be at a conference giving a
> presentation about logic programming to a bunch of Perl programmers.
> However, after reviewing the notes of my presentation, I've realized
> that I have a more daunting task than I realized and I'm beginning to
> second-guess my approach.  I possibly go in a couple of different
> directions.
>
> One approach is to start by showing them the basics of embedding Prolog
> in Perl (http://search.cpan.org/dist/AI-Prolog/ and
> http://search.cpan.org/dist/Language-Prolog-Yaswi/) and show them
> beginning Prolog (family trees, the append function, and maybe a simple
> text adventure).  The advantage is the programmers get a chance to
> understand how to actually use this stuff.  This was my initial
> approach.  However, it's been pointed out to me by several people that
> the smaller the example, the more difficult it is to show the strength
> of logic programming (the multiple uses of append/3 are cool, but
> people want to know how this helps them write purchase order software.)
>
> The other approach is, instead, to give them a tiny taste of *how*
> Prolog works and then show a powerful example or two that's difficult
> to replicate in an imperative, OO, or functional environment.  I've
> considered snarfing an example or two from "The Art of Prolog" by
> Sterling and Shapiro, but I'm not sure of the legal implications and,
> in any event, I don't know if I'd have enough time to really get those
> examples across.
>
> My question in a nutshell:  given 45 minutes to show a roomful of
> programmers with no prior experience in logic programming just how
> powerful it can be, what approach would you take?  Do you have any
> particular sample applications that would be worthwhile?  Everything
> that I've come up with seems too small to really be more than a toy or
> too large to show in 45 minutes.
>
> Cheers,
> Ovid
>
> If this message is a response to a question on a mailing list, please send
> follow up questions to the list.
>
> Web Programming with Perl -- http://users.easystreet.com/ovid/cgi_course/

Reply via email to