Parrotlog - Getting started

The inspiration for this project is primarily due to my reading On Lisp by Paul Graham, which talks about implementing non-deterministic search (or backtracking, if you will) with continuations (chapter 2022). Since I know Parrot supports continuations natively, it was an obvious choice. Some googling also revealed a very interesting PerlMonks post, entitled Perl and Prolog and Continuations... oh my!, which it turns out is the inspiration for Ovid's AI::Logic as well (which I discovered a few days ago).

Now, on to the implementation. Most of the documents I've found tell you to start your Parrot HLL project with a script called, but I found that it doesn't do quite what it say on the tin. Instead I used tools/dev/ This script creates a basic folder hierarchy similar to the one used by Rakudo. A quick tour of the files and folders:

  • build/ contains everything that has to do with the build process. Most interesting is PARROT_REVISION which specifies which Parrot is required, and which is where the build process can be extended.
  • does what it's called. Call it with --gen-parrot to build the required Parrot version as well.
  • t/ and src/ contain the usual bits

EDIT: I lied. Backtracking is chapter 22 of Graham's book. Chapter 20 is continuations.


I really wanted to continue work on AI::Prolog. Specifically, adding list support would have made it fairly robust (at least in Prolog terms). Other projects have led me astray, though.

I'm looking forward to you having something useful. Logic programming is the single biggest weakness of Rakudo.

Leave a comment

About Arne Skjærholt

user-pic Norwegian, computational linguistics student, classical philologer.