Code Monkey home page Code Monkey logo

rakudo's Introduction

Rakudo Perl 6

This is Rakudo Perl, a Perl 6 compiler for the Parrot virtual machine.

Rakudo Perl is Copyright (C) 2008-2009, The Perl Foundation. Rakudo Perl is distributed under the terms of the Artistic License 2.0. For more details, see the full text of the license in the file LICENSE.

Building and invoking Rakudo

Because Rakudo is under rapid development, we generally recommend downloading Rakudo directly from github and building from there:

$ git clone git://github.com/rakudo/rakudo.git

If you don't have git installed, you can get a tarball or zip of Rakudo from github by visiting http://github.com/rakudo/rakudo/tree/master and clicking "Download". Then unpack the tarball or zip.

Once you have a copy of Rakudo, build it as follows:

$ cd rakudo
$ perl Configure.pl --gen-parrot
$ make

This will create a "perl6" or "perl6.exe" executable in the current directory. Rakudo doesn't currently have a "make install" target.

The "--gen-parrot" option tells Configure.pl to automatically download (via 'svn') and build the version of Parrot most appropriate for the copy of Rakudo you currently have. It's okay to use the --gen-parrot option on later invocations of Configure.pl; the configure system will re-build Parrot only if a newer version is needed for whatever version of Rakudo you're working with.

To run a Perl 6 program with Rakudo, issue a command like:

$ ./perl6 hello.pl

This binary executable feature is still somewhat experimental, and may not work on all platforms. Also, the binary has hardcoded paths to the Parrot build tree (especially the dynamic libraries and modules), so removing or moving the build tree will cause the binary to stop working.

If the Rakudo compiler is invoked without an explicit script to run, it enters a small interactive mode that allows Perl 6 statements to be executed from the command line. Each line entered is treated as a separate compilation unit, however (which means that subroutines are preserved after they are defined, but variables are not).

Running the test suite

Entering "make test" will run a small test suite that comes bundled with Rakudo. This is a simple suite of tests, designed to make sure that the Rakudo compiler is basically working and that it's capable of running a simple test harness.

Running "make spectest" will import relevant portions of the official Perl 6 test suite from the Pugs repository http://svn.pugscode.org/pugs/t/spec/ and run all of these tests that are currently known to pass.

At present we do not have any plans to directly store the official test suite as part of the Rakudo/Parrot repository, but will continue to fetch it from the Pugs repository.

You can also use "make" to run an individual test from the command line:

$ make t/spec/S29-str/ucfirst.t
t/spec/S29-str/ucfirst.rakudo .. 
1..4
ok 1 - simple
ok 2 - empty string
ok 3 - # SKIP unicode
ok 4 - # SKIP unicode
# FUDGED!
ok
All tests successful.
Files=1, Tests=4,  1 wallclock secs ( 0.02 usr  0.00 sys +  0.57 cusr  0.06 csys =  0.65 CPU)
Result: PASS

Where to get help or answers to questions

There are several mailing lists, IRC channels, and wikis available with help for Perl 6 and Rakudo on Parrot. Figuring out the right one to use is often the biggest battle. Here are some rough guidelines:

If you have a question about Perl 6 syntax or the right way to approach a problem using Perl 6, you probably want the [email protected] mailing list. This list is primarily for the people who want to use Perl 6 to write programs, as opposed to those who are implementing or developing the Perl 6 language itself.

Questions about the Rakudo compiler for Parrot and the Parrot compiler tools can go to [email protected]. Discussion about Parrot itself generally takes place on [email protected].

The Rakudo and Parrot development teams tend to hang out on IRC a fair bit, either on irc.freenode.net/#perl6 or irc.perl.org/#parrot.

There is also a Rakudo related blog at http://rakudo.org/, and a Parrot blog at http://parrotblog.org/. Most Perl 6 related news is assembled at http://planetsix.perl.org/.

Reporting bugs

Bug reports should be sent to [email protected] with the moniker [BUG] (including the brackets) at the start of the subject so that it gets appropriately tagged in the RT system (https://rt.perl.org/rt3/). Please include or attach any sample source code that exhibits the bug, and if appropriate identify the svn revision number of the code that you're working from. There's no need to cc: the perl6-compiler mailing list, as the RT system will handle this on its own.

Submitting patches

If you have a patch that fixes a bug or adds a new feature, please submit it to [email protected] with the moniker [PATCH] (including the brackets) at the start of the subject line. We'll generally accept patches in any form if we can get them to work, but unified diff from the git command is greatly preferred. In general this means that in the languages/rakudo/ directory you make your changes, and then type

git commit -m 'Your commit message'
git-format-patch HEAD^

This will generate a file called 001-your-commit-message.patch, or more of them if you made multiple commits; please attach these to your email.

(Note to the maintainers: you can apply these patches with the git-am command; it preserves meta information like author).

Other ways to create and submit patches are discussed here: http://wiki.github.com/rakudo/rakudo/steps-to-create-a-patch.

How the compiler works

See docs/compiler_overview.pod.

AUTHOR

Patrick Michaud [email protected] is the primary author and maintainer for Rakudo Perl 6 on Parrot.

rakudo's People

Contributors

pmichaud avatar jnthn avatar moritz avatar particle avatar bschmalhofer avatar coke avatar infinoid avatar chromatic avatar tene avatar cspencer avatar petdance avatar paultcochrane avatar jkeenan avatar perlpilot avatar audreyt avatar allisonrandal avatar notfound avatar fperrad avatar ambs avatar jhorwitz75 avatar whiteknight avatar util avatar chrisdolan avatar timtoady avatar leto avatar tewk avatar kjs avatar nunorc avatar simoncozens avatar obra avatar

Stargazers

Angus H. avatar SriHarsha Halvi avatar

Watchers

SriHarsha Halvi avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.