Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A Perl 6 glue wrapper for the Python Swampy environment - WARNING VERY DUMB
Perl6
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
.gitignore
LICENSE.txt
META.info
README.md

README.md

perl6-swampy

A Perl 6 glue wrapper for the Python Swampy environment - WARNING VERY DUMB

Author

Brian Wisti https://github.com/brianwisti

Prerequisites

Installation

Download perl6-Swampy. Extract it and run panda install on the extracted folder.

$ unzip perl6-swampy-master.zip
$ panda install ./perl6-Swampy-master

Documentation

Access existing documentation via p6doc once perl6-Swampy is installed.

$ p6doc Swampy

Usage

Really. It's a bad idea right now. I'm pretty sure it only works on my machine, and only a handful of the Swampy functions are wrapped.

Oh, fine.

use v6;
use Swampy;

my $turtle = make-turtle();
set-delay($turtle, 0.01);

for 1..8 {
    fd($turtle, 100);
    lt($turtle, 45);
}

pu($turtle);
rt($turtle);
fd($turtle, 10);
pd($turtle);

for 1..4 {
    fd($turtle, 100);
    rt($turtle);
}

draw-it();

That's it right now. You can go forward and turn right or left to your heart's content.

Goals

In rough order:

  1. Make it a real live module with documentation and tests and stuff
  2. Wrap enough Swampy functionality to finish Think Python in Perl 6
  3. Interactive mode: you type in a directive, and the little turtle works its magic.

LICENSE

This code is distributed under the terms of The Artistic License 2.0. See LICENSE

Something went wrong with that request. Please try again.