Perl 6 Archives

Think Python in Perl 6 Chapter 4: Interface Design

It is time for Chapter 4 of Allen Downey’s Think Python refashioned in Perl 6. I just needed some time to make a simple wrapper for his Swampy framework. Feel free to install and play along, but don’t rattle Swampy.pm6 too much. I have only implemented enough to finish this chapter.

Then again, go ahead.


Last night I reached chapter 4 of Think Python, which is full of good old fashioned turtle graphics stuff.

It’s just - well - there’s a problem. I don’t think there is a port of the swampy library to Perl 6. I could write one, but that would probably require a Tk interface with Perl 6. Even just writing a Perl 5 Tk version of Swampy is beyond my spare time attention span.

I know what I’ll do. I’ll cheat and have perl6 call python.

Think Python, But Perl 6 - Chapter 3: Functions

On to chapter 3 of Allen B. Downey's Think Python book, as interpreted through Perl 6.

Think Perl6-ish Variables, Expressions, and Statements

Continuing the Perl 6 adventures with Allen B. Downey's Think Python book.

(my $title = "Think Python") ~~ s/Python/Perl 6/ && $title.say;

I'm rereading Allen B. Downey's Think Python, but this time with an eye for writing the equivalent code in Perl 6. I am not sure how deep I'll dig into this, as I am limited by spare time and tools from the book like Swampy would have to be made accessible to Perl 6 somehow. BTW, Think Python is available under a CC-by-nc 3.0 license.

Just using this space as a public scratchpad at the moment. I've got $RAKUDO_HOME/install/bin on my path to simplify things.

$ perl6 --version
This is perl6 version 2012.12 built on parrot 4.10.0 revision 0

About Brian Wisti

user-pic I’m a geek in Seattle. I write code. I enjoy writing about code, regardless of whether anyone else reads it. I also knit.