Dual-license your content for inclusion in The Perl 5 Wiki using this HOWTO, or join us for a chat on irc.freenode.net#PerlNet.


From PerlNet

Jump to: navigation, search

This is the current collaboration of the moment! Help improve this article to make it a definitive source on the topic.

Pugs is an implementation of the Perl 6 language in Haskell(GHC). It was started in february 2005 by Audrey Tang as an exercise in language implementation and has gathered quite a bit of momentum on the Internet talking commits of source code from many contributors. Audrey has been very careful to emphasise that the development of Pugs should be optimised for fun.

It is considered "experimental", but already includes much of the language spec, as well as a few exploratory features (such as compiling Perl 6 code to JavaScript and other languages).



 say "Hello, world!";
 @squares = (1 .. 10) »**« 2;
 sub make_tag ($tag) {
     return -> $text { "<$tag>{$text}</$tag>" }
 my $bold = make_tag("b");
 my $ital = make_tag("i");
 say $ital("lightweight syntax for closures is { $bold('fun') }!");


Regardless of whether Pugs becomes "the" official implementation of Perl 6, it will have proved immensely useful for the language.

  • Pugs comes with a large test suite for Perl 6, most of which can be used directly by other implementations.
  • Pugs development is fast, reaching prospective problem areas in the language spec quickly and triggering refactoring of the spec.
  • Pugs is lots of fun, which means people work on it, which means the community prospers.
  • SVN access is quite freely available, on request and users are encouraged to commit new tests.


Installation is going to be different depending on whether you install Pugs from prebuilt packages or from source code.

Installation from binaries.

Binaries are available for a number of different platforms.

Installation from source code.

If you wish to run a more recent version of pugs it may be necessary to obtain the source code from the Subversion repository http://svn.openfoundry.org/pugs/

   svn co http://www.jwcs.net/~jonathan/perl6/
   perl Makefile.PL
   make test
   make install

Be aware that you might have to install build dependencies as listed in the INSTALL file, and that the make test step can take some time to complete.

Contributing to the pugs project

In the Subversion repository there is a file called TASKS that lists a number of things that need to be done. They can be one off tasks or tasks that need to be repeated regularly. There are tasks that need programming skill in a particular language (eg Perl 6, Perl 6 or Haskell) or non-technical skills (eg polite nagging). Your next step to contributing would be to hang out on #perl6 on irc.freenode.net. Audrey has been quite willing to give people the commit bit which represents the ability to add contributions to the central subversion repository.

External Links

Personal tools