Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Ovid (2709)

  (email not shown publicly)
AOL IM: ovidperl (Add Buddy, Send Message)

Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.

Journal of Ovid (2709)

Sunday January 23, 2005
03:24 PM

AI::Prolog heading to the CPAN

[ #22850 ]

I have uploaded AI::Prolog 0.02 and it should be hitting the CPAN soon. If you know Prolog, there's enough there to get you started including an examples/ directory showing its use. If you don't know Prolog, it points you to Michael Barták's Guide to Prolog Programming. It's an easy language to learn, though a tough one to master.

Eventually the interface will allow something like this:

  use AI::Prolog
    functors => [qw/append/],
    vars     => [qw/W X Y Z/],
    import   => 1; # imports builtins like HEAD(X)

  my $logic = AI::Logic->new;
    append([], X, X),
  $logic->query(append(X,Y,[qw/a b c d/]));
  while (my $results = $logic->next) {
    my $x = $results->X;
    my $y = $results->Y;
    print "X is [@$x].  Y is [@$y].\n";

But that's not going to happen too soon. For the time being, I'll be happy to start knocking off items on the TODO list (such as math.)

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.