Getting started with Rakudo * (2013.11) on Mac OSX

Another release of Rakudo Star. Let's see how can we get start using it on Mac OSX.

Note! This site is about Perl 6.
If you are looking for a solution for Perl 5, please check out the Perl 5 tutorial.

Before we get started

I use Homebrew for installing various open source libraries and technologies. As Rakudo relies on the ICU project for some of the Unicode features I installed it using

$ brew install icu4c

though I think in the end the Rakudo build process did not find it. I'll have to further research this.

Downloading Rakudo Perl 6

I read the most recent announcement and downloaded the latest release in source code version:

$ wget
$ tar xzf rakudo-star-2013.11.tar.gz
$ cd rakudo-star-2013.11

then I followed the instructions in the README file of the distribution. In a nutshell:

$ perl --gen-parrot

(I am sorry, I don't remember how I installed the original Perl 5 on this system. I think it came with XCode or was that Homebrew?. In any case, once I had that perl 5 installed I built my own version using Perlbrew. You can probably use any version of perl 5.)

$ make

Optionally also run the tests:

$ make rakudo-test
$ make rakudo-spectest

The first is fast, and only provides a minimal coverage. The second test-suite is big, and took a very long time to run.

$ make install

This will install the perl6 executable in the install/bin/ subdirectory of the rakudo-start-2013.11 directory where we built the whole thing.

Running Rakudo

At this point we can check if the installed version of Perl 6 runs:

$ ./install/bin/perl6 -v

This is perl6 version 2013.11 built on parrot 5.9.0 revision 0

Let's make it a bit more convenient:

The following commad

$ echo $(pwd)/install/bin

will print the full path to the bin directory (in my case it was /Users/gabor/work/rakudo-star-2013.11/install/bin )

then I edited ~/.bash_profile, and added:

# Rakudo
export PATH=/Users/gabor/work/rakudo-star-2013.11/install/bin:$PATH

and reloaded the file using:

source ~/.bash_profile

This let me run

$ perl6 -v

anywhere in the file system.

It will print the version number as above.

Simple command line Perl 6

Then try the following:

$ perl6 -e " 'Hello world'.say "

It should print the "standard" Hello world.


Because the p6doc command comes with Rakudo *, I can now type the following commands:

$ p6doc 

What documentation do you want to read?
Examples: /Users/gabor/work/rakudo-star-2013.11/install/bin/p6doc Str
          /Users/gabor/work/rakudo-star-2013.11/install/bin/p6doc Str.split

Then I can follow the instruction and type p6doc Str to get the documentation of the Str class.

The modules that come with this release of Rakudo * are listed in the modules/MODULES.txt in the unzipped directory.

When tyring the previous release of Rakudo (2013.10) some directories were missing from the distribution, and when I tried to install Panda mannually that failed too.

In this release, when I tried to run panda it got stuck. Apparently a problem on the server.

Nevertheless Rakudo can already be used for some tasks.

For examples this pages is generated by a set of Perl 6 scripts using the Rakudo * 2013.11.

The Perl 6 Tricks and Treats newsletter has been around for a while. If you are interested to get special notification when there is new content on this site, it is the best way to keep track:
Full name:
This is a newsletter temporarily running on my personal site ( using Mailman, till I implement an alternative system in Perl 6.
Gabor Szabo
Written by Gabor Szabo

Published on 2013-12-07


In the comments, please wrap your code snippets within <pre> </pre> tags and use spaces for indentation.
comments powered by Disqus
Suggest a change
Elapsed time: 2.34992967

Perl 6 Tricks and Treats newsletter

Register to the free newsletter now, and get updates and news.