Dear All,

A recent blog by Moritz indicated new material is needed for new commers.
Here is a short text from my experience. I was thinking of inserting it
onto the Perl Foundation's perl6 wiki. First I decided to preview it here
for the community to review first. If no comments for about a week, I'll
add it to the wiki (I obtained editing rights).

<start of howto>
Very easy perl6 installation.

I have just updated to Ubuntu Karmic and decided to do a fresh install. I
also decided to reinstall my perl6 environment. It was so very easy,
although writing it up unambiguously makes the sequence look difficult. (I
use rakudo. See below for reasons)

1) Obtain git and svn. I use Synaptic and searches on git yielded the
git-core package, while on svn yielded the Subversion package. Select and
install.

2) Open a terminal, and go to the directory that you want to use for perl6
things. I have a directory ~/development. You could go immediately to step
7 and let proto do everything for you. But I prefer a slightly slower chain
of steps.

3) The following automatically creates a subdirectory 'rakudo' and brings
in all the source files

cd ~/development
git clone git://github.com/rakudo/rakudo.git

4) The following sets up rakudo, but also brings in Parrot and puts it
under the rakudo directory.
Although other combinations exist, in my experience I have not had any
problem with this setup. It is also so much easier to handle. Note that
this step silently requires the svn program.

cd rakudo
perl Configure.pl --gen-parrot

5) Finally, make perl6 and install it. Installing is needed in order to
access perl6 from outside the rakudo directory

make ; make install

6) I like to have perl6 available on my path, so I install a link to
~/development/rakudo/perl6 in /usr/local/bin/perl6

sudo ln ~/development/rakudo/perl6 /usr/local/bin/perl6


_Getting perl6 modules_

7) There are an increasing number of pure perl6 modules that provide lots
of idiom. These can all be accessed via proto. First get proto, and
assuming you want proto to be under the ~/development directory (my
preference)

cd ~/development
git clone git://github.com/masak/proto.git

8) Then run proto, which the first time its called will generate a
configuration file. It will locate rakudo and will suggest the parent
directory as the root for proto modules. 

cd proto; ./proto

9) Actually I prefer to put proto modules into their own subdirectory,
which I call perl6projects. Hence after running proto I create the new
directory and edit the config.proto file. You need to change the line that
starts Proto projects directory

cd ~/development; mkdir perl6projects
[edit proto/config.proto]

9) Finally run proto again to install the modules. I install all the
projects. There are not too many at present. And looking at the code
provides a good way of learning about what can be done in rakudo. It is
possible to be more selective by looking at what modules there are and
installing them individually. proto looks after the dependencies.

cd proto; ./proto install all

[you will need to answer RSA fingerprint confirmations.]

At this point, there are likely to be a large number of errors (or at least
there are as I write). The main reason is that these modules are under
active development and there are likely to be problems in the make files.
Identifying and proposing patches to the errors may help the developers
alot.

Since rakudo is under rapid development, it is wise to update regularly.
This is now easy. Use:

1) Assuming rakudo is under a ~/develoment directory (just my preference) 

cd ~/development/rakudo
git pull

2) Occasionally, the configuration will need to be changed, and git will
tell you. If no message, then:

make

_Rakudo implimentation_

Perl6 differs from perl5 in that P6 is specified as a language instead of
being defined by the implementation of perl. This means that several
implimentations are possible.

The first workable implementation was pugs, but development there reached a
limit and it is no longer actively being developed. rakudo, the perl6
implementation over Parrot is now the easiest to use. 

The developers involved in rakudo have put a great deal of effort into
making rakudo accessible. The other implementations are more difficult to
get working. So for me rakudo is perl6 in practice.

<end of howto>



Reply via email to