Clone this wiki locally
The easiest way to start using Parrot is to install one of the available pre-compiled binaries. Packages are available for many packaging systems including Debian, Ubuntu, Fedora, Mandriva, FreeBSD, Cygwin, and MacPorts. The Parrot website lists all known packages on the download page. A binary installer for Windows is also available at http://sourceforge.net/projects/parrotwin32/.
If packages aren't available on your system or you'd just rather install Parrot from scratch, download the latest supported release from http://www.parrot.org/release/supported.
You need a C compiler and a
make utility to build Parrot from source code.
make are the most commonly used tools but Parrot can be built with many other compilers on different operating systems. Perl 5.8.0 is also required for configuring and building Parrot.
Once you have all the required dependencies installed, build Parrot by running:
$ perl Configure.pl $ make $ make test
By default, Parrot installs to the
/usr/local/lib directories. If you have write permissions for these directories, install Parrot with:
$ make install
To install Parrot beneath a different prefix, provide the
--prefix switch to
$ perl Configure.pl --prefix=/some/other/directory
If you intend to develop a language on Parrot, install the necessary developer tools with:
$ make install-dev
Once you've installed Parrot, take it for a test drive. Create a file called
contain Parrot Intermediate Representation (PIR) instructions or opcodes; Parrot's native low-level language that has some high-level features.
# hello.pir say "Hello world!"
Now run this file with:
$ parrot hello.pir
which will print:
Running a Language on Parrot
Next, try out one of Parrot's high-level languages: Not Quite Perl 6 (NQP). Create a file called
# news.nqp say("No parrots were involved in an accident on the M1 today...");
Then run it as:
$ parrot-nqp news.nqp
which will print:
No parrots were involved in an accident on the M1 today...
For information on other languages available on Parrot, see the Languages page.