Version 26 (modified by fbrito, 11 years ago)

Remove old (probably deleted) attachments

New parrot image

Newcomers Welcome!

We're going to do our best to document the experiences of newcomers to Perl, Parrot and Open Source software development. Hopefully this will evolve into a road map for those who wish to contribute but are having trouble getting started.

Before you start

Before you download and compile Parrot, you may want to check you system to make sure you have the following packages installed.

Getting Parrot

If your going to become part of the development team, you'll need to check out a local copy of the source code. You can visit the  download page on the main Parrot web site for full details.

Assuming you've got Perl, perldoc and Git installed you'll be doing something like this.

~$ git clone git://github.com/parrot/parrot.git
~$ cd parrot
~$ perl Configure.pl
~$ make
~$ make test
~$ make html

One make target to avoid right now is install. Running make install is not currently recommended.

A guide on how to use Git to work on Parrot can be found on  docs/git_workflow.pod

Running Parrot

Make compiled a binary in the parrot build directory.

~$ ./parrot --version

You may want to create a symbolic link to this binary, somewhere in your path, so that you can run parrot from anywhere.

~$ ln -s ~/parrot/parrot /usr/bin/parrot
~$ parrot --version

Learning Parrot

You've downloaded, configured, compiled, tested and created the html documentation for Parrot. Now it's time to start reading. Parrot's source documentation is stored in  POD format. If you ran make html you can the view the documentation in any HTML browser. The file docs/html/index.html is the place to start. An alternative and more flexible method for viewing the documentation is to use  perldoc to view the actual pod files, formatted as man pages. It cannot be stressed enough how important it is to read the documentation for this project.

The bare minimum reading needed to get you off the ground is:

The directory docs/book/ contains a book on Parrot. This book has a finer details of various aspects of Parrot. However be aware that the book in not up to date.

After you read those, you'll want to run through all of the tutorials in examples/tutorial.

Next on your reading list should be the PDDs (Parrot Design Documents) in docs/ppds. You will learn much by reading these, so don't skimp.

You'll probably need to read some of Parrot's code.  This article will give you some tips on how to do so effectively.

Contributing

By now you've read the introductory documentation and reviewed the example/tutorial files. Now you have to decide what area of the project you'd like to contribute to.

Test Suite

Original Parrot tests were written in Perl. Those Perl tests can be ported to PIR test. This is a good place to earn your feathers and learn more PIR at the same time. ConvertTestsToParrot covers what you'll need to know about the format of a PIR test. If you're not familiar with the test suite functions, you'll want to review parrot/runtime/library/Test/More.pir. The functions section gives a description of the different testing functions, mainly: plan, diag, ok, nok, is, is_deeply, like, isa_ok, skip, isnt and todo. This is a good time to point out that POD can and usually is embedded in PIR files. So if you're in the root build directory, you can run the following to view the module documentation:

~$ perldoc runtime/parrot/library/Test/More.pir

You already know that make test runs the test suite, but when working on individual tests you'll want to run only the test you're concerned with. You can do this using Perl's  prove for a Perl test, or either prove or Parrot itself for PIR tests.

~$ prove t/oo/names.t
t/oo/names....ok                                                             
All tests successful.
Files=1, Tests=2,  0 wallclock secs ( 0.05 cusr +  0.01 csys =  0.06 CPU)

or

~$ parrot t/oo/names.t
1..2
ok 1 - HLL obj w/ name different than parrot obj created
ok 2 - HLL obj w/ same name as parrot obj not created

More information about the subject can be found on our docs/ folder. More precisely, here:  docs/tests.pod

Submitting your work

In general you'll need to create a patch and then create a ticket on Parrot's  ticket tracking system. Give as much details as you can. A good idea is to provide a list of all files affected with summary of the changes made in each file and the reasons that made you change them. And don't forget to attach your patch directly to the ticket.

~$ git status
~$ git diff --stat
~$ git diff > names_test_rewrite.patch

Once again there is a POD covering this topic. Read  docs/submissions.pod for specific details on how to submit your work.

Attachments