* This version: 2006-05-22 (Updated approximately weekly.)
* Latest version at: (http://www.AthenaLab.com/Perl_6_Users_FAQ.htm)
* About perl.perl6.users (and this FAQ)
* About Perl 6 # True marketing hype, in both senses. :-)
* General Perl 6 status # On the move! Picking up speed!
* Where to get Perl 6 # <----- "I want it now!!" <-----
* Perl 6 info and docs # For the few that will RTFM first. :-)
* Perl 6 features in the latest Perl 5
* Perl 5 modules implementing Perl 6 features
* Incremental migration from Perl 5 to Perl 6
* How you can help out with Perl 6
* Glossary # <----- Note!
* Copyright, license, and disclosure
* Parrot 0.4.4 "Feather" Released!
(http://www.nntp.perl.org/group/perl.perl6.language/25366)
<<Recent language changes.>>
<<Recent prototype advances.>>
<<Temporary gotchas>>
Some important developments to watch:
* PITA - The Perl Image Testing Architecture (http://ali.as/pita/).
* Darren Duncan's work on a Perl 6 Relation type (as in relational
algebra and data structures). <<Summary link?>>
* <<Many more....>>
(Newbie warning! Perl 6 is still UNDER CONSTRUCTION. Don't make
critical plans that depend on it just yet. Please see other sections
below about intermediate Perl 6-related solutions you can use now.)
perl.perl6.users is a *mailing list* that is also available by nntp.
A major aim of this mail list is to help out early-adopters of Perl 6
(including early learners and early test drivers). This is a forum for
seeking and sharing the latest general news and information about
*using* (versus creating) Perl 6. (Presently, the other Perl 6 mailing
lists are primarily for developers *of* Perl 6, versus for Perl 6
developers.) However, the time for sharing the -Ofun more widely has
arrived. Some enterprising folks are already using *pieces* of the
emerging Perl 6 infrastructure for $work. Parts of Perl 6 are being
implemented in Perl 5 (some internally, some as modules). Wider
experimentation with Perl 6 will help test out the emerging collection
of docs, and help determine practical priorities for improvements.
After years of seemingly glacial but important preliminary work in
2000-2004, there has been a gathering avalanche of Perl 6 development
work since early 2005. Over-optimism is now in danger of replacing
over-pessimism, so we're strictly limiting ourselves to mere wild
enthusiasm here (strictly for -Ofun++, of course).
Suggested additional content (preferably including the content, or
links to it) and corrections for this FAQ are always welcome. Please
post them to perl.perl6.users with the subject line "FAQ feedback".
Think of this mailing list as the prototype for the future
comp.lang.perl6.<something> newsgroup. When traffic warrants it, we'll
apply for official Usenet "big 8" comp.* status.
You can access this mailing list (perl.perl6.users)several ways:
* Subscribe by emailing "perl6-users-subscribe@perl.org".
* Some time soon, you should be able to find us by pointing your
newsreader to (nntp.perl.org). Need a decent Windows
newsreader? (http://www.mozilla.com/thunderbird/) works for me.
* Some time soon, you should also be able to find us on Google Groups:
* Subject lines of mailing list posts with link to each post can be
found at this archive:
(http://www.nntp.perl.org/group/perl.perl6.users).
* Here's the RSS feed:
(http://www.nntp.perl.org/rss/perl.perl6.users.rdf).
<<FAQ "to do" notes and meta-comments are in double angle bracket
pairs, as illustrated here.>>
What is Perl 6? Perl 6 is an extensively refactored, super-modernized,
and ultra-supercharged derivative of Perl 5. Simple things will still
be simple to do, but you'll have enormously more "programming
leverage" available for tackling challenging tasks. Here is a good
introductory article on why Perl 6 is needed, and what it is:
(http://www.perl.com/pub/a/2006/01/12/what_is_perl_6.html). Also see
"Refuting Perl6 Myths":
(http://svn.openfoundry.org/pugs/docs/talks/p6myths2.html). (By the way,
"Perl 5.9 [will have] many Perl 6 features you can start using -- see
features.pm for details." That should be "feature.pm" (no "s"), and it
will be in Perl 5.10 (the production release branch that will follow the
5.9 development branch):
(http://search.cpan.org/~rgarcia/perl-5.9.3/lib/feature.pm)
When it comes to embracing "embrace and extend", Perl 6 is
exceptionally promiscuous in selectively borrowing from other
languages (and Perl 6 is very tenacious about refining and
generalizing their best ideas). Here is a brief summary of some
notable Perl 6 features, starting from the list in
(http://dev.perl.org/perl6/faq.html), plus a variety of additions and
extensions:
* optional explicit strong typing
* proper parameter lists
* active metadata on values, variables, subroutines, and types
* declarative classes with strong encapsulation
* full OO exception handling
* support for the concurrent use of multiple versions of a module
* extensive and powerful introspection facilities (including of POD)
* LL and LR grammars (including a built-in grammar for Perl 6 itself)
* subroutine overloading
* multiple dispatch (multimethods)
* named arguments
* a built-in switch statement
* hierarchical construction and destruction
* distributive method dispatch
* method delegation
* named regexes
* overlapping and exhaustive regex matches within a string
* named captures
* parse-tree pruning
* incremental regex matching against input streams
* macros (that are implemented in Perl itself)
* full Unicode processing support
* user-definable operators (from the full Unicode set)
* chained comparisons
* a universally accessible aliasing mechanism
* lexical exporting (via a cleaner, declarative syntax)
* multimorphic equality tests
* state variables
* hypothetical variables
* hyperoperators (i.e. vector processing)
* function currying
* junctions (i.e. superpositional values, subroutines, and types)
* coroutines
* better threading
* better garbage collection
* much better foreign function interface (cross-language support)
* invariant sigils, plus twigils (minimalist symbolic "Hungarian")
* many widely useful objects/types
* lazy evaluation (including virtual infinite lists)
Holy freeking cow! How can most mere-mortals contend with all this
stuff? Well, the good news is that *you* most likely *won't* ever need
to know (or use) much of this stuff. You can learn and use a moderate
and comfortable subset of Perl 6 that meets your typical needs.
However these features provide an extremely powerful toolkit for
experts to produce modules and other tools that you can use (without
you needing to know about their internal wiring and plumbing). Perhaps
counterintuitively, many of these features will make Perl 6
substantially easier and simpler than Perl 5 for more advanced
applications (once you get used to it). Many of these features will
also help "future-proof" Perl 6 by providing many means of
incorporating new extensions.
As you can see, Perl 6 thus takes the powerful evolutionary advantages
of "hybrid vigor" to new extremes. First there was "extreme
programming", now we have Perl 6, "the first extreme programming
language". If you think our many friends, including {Ruby, Python,
Smalltalk, Lisp, Haskell, and others}, are generally more {cool,
powerful, productive, and fun} than {C, C++, Java, C#}, then you'll
likely recognize Perl 6 as the new "top of the tool chain" for
practical high-powered fun.
OK, so given that semi-awesome tapestry of features, what's the "big
picture", executive-level overview from 35,000 feet look like?
First of all, think of Perl 6 as the heart of (what will be) the
vastly larger software super-system of C6PAN (which will subsume Perl
5’s CPAN, an already large and powerful collection of Perl 5 modules).
Likewise, think of Perl 6 as including the Parrot virtual machine
(which will also support other allied programming languages, and
mutually shared libraries between them), plus whatever other backends
are eventually supported (Javascript 2 aka ECMAScript Edition 4 is
intriguing).
For convenience, we'll use "Perl 6++" to mean this larger "Perl 6 +
C6PAN + Parrot" super-system (and whatever cohorts become affiliated
with it).
So what roles do these integrated capabilities ultimately position
Perl 6++ for? Here are some slightly speculative (but hopefully self-
fulfilling) prophecies (using an "odds-meter" likelihood threshold of
50%-50%):
* Perl 6++ is going to be the counterpart of world English (which
exceeds all other languages in importing new concepts).
* Perl 6++ is going to be the software world’s first counterpart of
the Great Library of Alexandra. (CPAN was a valuable first baby step
towards this development.)
* Perl 6++ is going to be the first *mainstream-strength*
super-morphic programming system. (Extremely important!)
* Perl 6++ will carry us to the age of kilo-core, mega-thread, 100
GHz, tera-byte microprocessors and the trillion+ node Internet.
* Perl 6++ is thus going to be the principal collaborative software
system of super-natural human intelligence. ("Real AI" is still a
long way off, but the spectacular human cognitive revolution is
still in its early infancy.)
In summary, Perl 6++ is going to be a major cornerstone and leading
catalyst of a "Software Renaissance", and as such, Perl 6++ will
become the "software launch pad" of the (so-called) "Singularity Age".
(By that time, however, Perl 6++ will have evolved into Perl 7++. Perl
6++ will make the development of its eventual inevitable successor
very much easier, and it will likewise help strongly accelerate the
advance of other existing and new languages as well.)
Whatever the next "world's greatest programming system" happens to be
(after Perl 6++, that is), it's very likely that Perl 6++ will play
predominant roles in prototyping it, launching it, and providing it
the competitive advantage of under-the-covers access to C6PAN.
Because of this, I suspect the winner of the next round of competitive
programming system evolution will probably be designated Perl 7++ by
acclimation, even if it's not a @Larry project.
Our overview of Perl 6 status begins with a release history sample for
the 2 most critical components, Pugs (compiler) and Parrot (VM). A lot
of foundation-building has been going on, and visible progress has
dramatically increased from 2005 onwards, so we have concentrated on
more recent data points (through early 2005).
See (http://www.nntp.perl.org/group/perl.perl6.announce) for the very
latest (major) release announcements.
The major/minor version numbers of Pugs converges to 2*pi. (That's 360
degrees (or the circumference of a unit-radius circle), expressed in
radians.) Each significant digit in the minor version represents a
milestone. The third digit is incremented for each release. The
current milestones are (with some interspersed releases):
* Pugs 6.0: Initial release.
* Pugs 6.0.0 "Day 6 of Pugs" Released 01/07/2005
* Pugs 6.2: Basic IO and control flow elements; mutable variables;
assignment.
* Pugs 6.2.0 Released 04/13/2005
* Pugs 6.2.10 Released 10/09/2005
* Pugs 6.2.11 Released 02/01/2006
* Pugs 6.28: Classes and traits.
* Pugs 6.28.0 Almost here....
* Pugs 6.283: Rules and Grammars.
* Pugs 6.2831: Type system and linking.
* Pugs 6.28318: Macros.
* Pugs 6.283185: Port Pugs to Perl 6, if needed.
Parrot follows a more conventional version number scheme:
* Parrot 0.0.1 Released 09/10/2001
* Parrot 0.0.10 Released 03/18/2003
* Parrot 0.1.0 Released 02/29/2004
* Parrot 0.2.0 "NLnet" Released 05/08/2005
* Parrot 0.3.1 "Wart" Released 10/06/2005
* Parrot 0.4.2 "GPW" Released 02/22/2006
* Parrot 0.4.3 "Cold Conure" Released 04/02/2006
* Parrot 0.4.4 "Feather" Released 05/14/2006
<<List is very sketchy and incomplete.>>
* Design:
* The major language domains are fairly complete, but many
{corner, borderline} cases are still {incompletely, tentatively}
specified.
* Documentation: (See later section for current doc links.)
* The on-line docs are undergoing tremendous improvement.
* No up-to-date Perl 6 books at the moment.
* Part of motivation for creating perl.perl6.users mailing list
and FAQ is to help with interim user documentation (including
generating useful archives for point-of-departure searching).
* Implementation:
* Front ends:
* Perl 6: Pugs
* Perl 5 to Perl 5 (to Perl 6) translator
* Middleware
* <<To be completed.>>
* Back ends
* Parrot (from Pugs)
* Javascript (from Pugs)
* Haskell runtime (from Pugs)
* Perl5 <<status?>>
* Bridgeware (Perl 5 <--> Perl 6)
* Ponie: This is an important missing piece to make Perl 5 and
CPAN run on Parrot. (Big corporate support for this project
would be great.)
* Perl5 modules for Perl 6 features.
* Performance:
* Very slow at present <<explain why>>, but it's getting better
and is already good enough for serious experimenting.
So when will Perl 6 be ready? The official answer is "When it's
done"; the official policy is that a formal schedule would be a
counterproductive diversion. Some *wild* milestone guesses are:
* "early alpha something" by Christmas 2006
* "first production beta" in summer 2007
* "first production release" by New Year's Eve 2007
Win32 binary builds of Pugs and Parrot (easiest way to get started):
* (http://www.jwcs.net/~jonathan/perl6/).
* (Pxperl.com appears to have stopped routinely updating their Win32
builds.)
Pugs: (http://www.pugscode.org/)
Parrot home page: (http://www.parrotcode.org/)
FYI: Perl development server: (http://feather.perl6.nl/).
Note on mirroring: Since this FAQ is oriented towards Perl 6 users, we
mostly use perl.org links instead of openfoundry.org links:
* (http://svn.openfoundry.org/pugs) # Live repository.
* (http://svn.perl.org/perl6/pugs/trunk) # Mirror.
How to get started running Perl 6.
* (If you’re on Win32, the easiest way to get started is to grab the
Win32 binaries mentioned in the previous section.)
* Here is a nice, brief, quick start guide to building on Debian Linux:
(http://dresden-pm.org/cgi-bin/twiki/view/PM/PugsFirstBloodEnglish),
(http://dresden-pm.org/cgi-bin/twiki/view/PM/PugsFirstBlood). # German
* Post about running on Ubuntu Linux:
(http://www.nntp.perl.org/group/perl.perl6.users/36).
* Hmm. This is where many of these FAQ links ought to go:
(http://svn.perl.org/perl6/pugs/trunk/docs/getting_started)
This is the latest official Perl 6 language specification. This is
what Pugs is always converging towards:
* HTML: (http://dev.perl.org/perl6/doc/synopsis.html)
* POD: (http://svn.perl.org/perl6/doc/trunk/design/syn/)
<<There may be some minor O(hour) delay due to mirroring and HTML
generation.>>
Perl 6 code examples:
* Best place to start (and later, to contribute):
(http://svn.perl.org/perl6/pugs/trunk/examples/)
* <<Add link to tests directory. Lots of code there.>>
* <<Add Perl 6 related projects on the web.>>
General Perl 6 documents and related info:
* A variety of Perl 6 docs are here, including intros and talks;
look at the other subdirectories too, not just .../docs/perl6:
(http://svn.perl.org/perl6/pugs/trunk/docs/)
* A variety of Perl 6 stuff: (http://dev.perl.org/perl6/).
* Perl 6 FAQ: (http://dev.perl.org/perl6/faq.html).
* Perl 6 Users FAQ: (http://www.AthenaLab.com/Perl_6_Users_FAQ.htm).
* Perl 6 Wiki: (http://perl.net.au/wiki/Perl_6).
General background articles on Perl 6:
* "What is Perl 6?":
(http://www.perl.com/pub/a/2006/01/12/what_is_perl_6.html).
* "Refuting Perl6 Myths":
(http://svn.perl.org/perl6/pugs/trunk/docs/talks/p6myths2.html)
* Larry Wall (Perl's father) Perl talk (transcribed) on "Present
Continuous, Future Perfect": (http://wiki.osdc.org.il/index.php/Larry_Wall_-_Present_Continuous%2C_Future_Perfect).
* <<There’s a German language tutorial somewhere, which will be
eventually translated to English. At German Perl Mongers?>>
"Planet Perl Six is an aggregator of select Perl 6 related blogs." It
includes weekly Perl6 summaries (currently lapsed) and weekly Perl 6
meeting minutes (<<what happened to them?>>):
IRC channels (and their archives) are a major source of useful
information. NOTE: Please don't unthinkingly interrupt and pester the
developers of Perl 6 with questions that you can just as well ask on
perl.perl6.users, which they and others can then later answer at their
convenience. (As always, it's good manners to check Google and to
check archival logs before posting questions.)
* The "#perl6" IRC channel is on (http://freenode.net/).
* The daily logs are here:
(http://colabti.de/irclogger//irclogger_logs/perl6).
* "TimToady" is Larry Wall's nickname on that channel.
* Need an IRC client on Windows? I use Chatzilla, a Firefox extension:
(http://www.mozilla.com/firefox/),
(http://www.mozilla.org/projects/rt-messaging/chatzilla/).
* Some handy "#perl6"-isms:
* ?eval <Perl 6 expression> # Replays with evaluated expression.
* perlbot nopaste # Use to paste blocks of text offline,
# it replies to IRC with URL to it.
Perl 6 mailing lists, at (http://www.nntp.perl.org/group/) and Google
Groups (http://groups.google.com/):
* perl.perl6.internals
* perl.perl6.language
* perl.perl6.compiler
* perl.perl6.announce
* perl.perl6.users # Any day now!
You can also get these by email; see
(http://lists.cpan.org/showlist.cgi?name=perl6-internals) for details
(and make appropriate substitutions on "-internals" for other groups).
Who's Who in Perl 6, Parrot, & Pugs:
(http://dev.perl.org/perl6/people.html)
The O'Reilly website sometimes has interesting articles about Perl 6
Some interesting background reading relating to Perl 6 design:
* "Perl Best Practices" by Damian Conway. Even though this currently
applies to Perl 5, most of the principles also apply to Perl 6. This
book is a semi-officially recommended guideline for people doing
develop core Perl 6 modules and tests.
* <<Get ref to "The 100 Year Language" (How we should view Perl 6++).
(http://www.paulgraham.com/), (http://www.paulgraham.com/avg.html).
>>
* "Confessions of a Used Programming Language Salesman;
Getting the Masses Hooked on Haskell" by Erik Meijer:
(http://research.microsoft.com/~emeijer/Papers/ICFP06.pdf).
* Traits are one of the "Big Ideas" that have had some influence on
#perl6 design discussions:
(http://www.iam.unibe.ch/~scg/Research/Traits/).
* <<Find ref. to multi-paradigm programming and capability-based
security programming book.>>
These links are about hacking on Perl 6 docs.
* Read this first:
(http://svn.perl.org/perl6/pugs/trunk/docs/README)
* This mentions many things you can do to help out with docs,
although it is a bit dated:
(http://svn.perl.org/perl6/pugs/trunk/docs/notes/docs_evil_plan.txt).
* This plan is still current AFAIK: "Perl 6 developers are refactoring
relevant introductions, tutorials, specifications into the Perl6::Doc
namespace; expect to see this module subsumed by it in the near
future.":
(http://www.annocpan.org/~AUTRIJUS/Perl6-Bible-0.30/lib/Perl6/Bible.pm),
(http://search.cpan.org/~autrijus/Perl6-Bible-0.30/lib/Perl6/Bible.pm).
These links are about hacking on (versus hacking with) Perl 6.
* Pugs Apocryphon 1, Overview of the Pugs project:
(http://svn.perl.org/perl6/pugs/trunk/docs/01Overview.html).
* Doing Pugs-related development:
(http://svn.openfoundry.org/pugs/docs/getting_started).
* "A Peek Into Pugs Internals"
(http://perlcabal.org/~gaal/peek/start.html).
* German language notes about compiling Pugs:
(http://dresden-pm.org/cgi-bin/twiki/view/PM/PugsFirstBlood).
* Pugs SVN repository (http://svn.openfoundry.org/pugs/).
* Parrot: (http://planet.parrotcode.org/).
* Parrot FAQ: (http://www.parrotcode.org/faq/).
<<AFAIK, these are mostly still in Pugs dev tree.>>
<<Moose, and so on.>>
<<To be completed.>>
<<To be completed.>>
In Perl 5.9 (development branch) and Perl 5.10 (production release),
"Feature.pm" provides some Perl 6 features that you will be able to
selectively turn on are in:
(http://search.cpan.org/~rgarcia/perl-5.9.3/lib/feature.pm).
<<Moose, and so on>>
There are many modules that *currently* implement parts of Perl 6 in
Perl 5. Go to (http://search.cpan.org) and do a module search on
"perl6": (http://search.cpan.org/search?query=perl6&mode=module).
(Note: (http://search.cpan.org/modlist/Perl6) is missing many entries.
Use the search above for the time being.)
<<To be completed.>>
<<Creative and practical ($work) applications of existing pieces Perl
6 pieces (Parrot, Perl5 transition modules).>>
There is lots of useful Perl 6 support work that doesn't require you
to be a lambda camel uber-hacker (or any other sort of wizard). There
is a growing body of evolving docs that can use periodic proof-reading
and cross-checking. There are lots more docs that need to be written.
There are a wide range of Perl 6 tests that need to be written to more
comprehensively check out interim versions of Perl 6, and thus help
speed up its evolution into a production quality system. Look in docs
section above for information on hacking Perl 6 docs.
Here's a specific suggestion. Watch the Perl 6 language mailing list
and "#perl6" Perl 6 IRC channel and make sure that answers to
questions about "How do I do <whatever> in Perl 6?" got turned into
entries in the Perl 6 Cookbook.
Here's some related suggestions: Make sure that every Cookbook entry
has an associated test (perhaps mutually cross-referenced). Mine Perl
6 feature tests for useful items to add to the Cookbook.
You could also help out with this FAQ.
There are lots of related projects that could be pursued. One
important area is programming support. Perl 6 editing and refactoring
support in OSS IDEs such as Eclipse and Netbeans would be very
valuable. A Perl 6 semi-clone of Netbeans' Matisse GUI designer based
on wxWidgets would be an awesome start for a Perl 6 IDE + RCP (rich
client platform). (Like Parrot, this should be designed to make its
advanced tools available to Ruby, Python, Tcl/Tk, Smalltalk, Lisp,
Java, C/C++, Mono, and so on.) It should also have the basic
foundation of a world-class programming editor + documentation word
processor that (somehow!) takes the best ideas from GVIM (vi/vim +
GUI), XEmacs (emacs + X11), Knuth's Tex and "Literary Programming",
and Mathematica's notebooks, yet also include the now-"semi-universal"
Windows editing control keys (^x, ^c, ^v, ^z, ^y, ^f, ^a, ^s, ^p, ^n),
plus drag-and-drop editing. It should also support remote pair
programming. And of course it should incorporate a {large, smart, and
fine-grained} encyclopedic Perl 6 cookbook for rapid prototyping.
<<Add links to locations of Perl 6 language tests and the Perl 6
Cookbook.>
CPAN is the "Comprehensive Perl Archive Network", which is a very
large web-accessible library, predominantly filled with Perl 5
modules.
C6PAN is the virtual Perl 6 version of CPAN, which you can think of as
the rapidly growing subset of CPAN consisting of Perl 6 language
modules. However Perl 6 to Perl 5 bridges will eventually make all of
CPAN look like C6PAN, and vice versa. C6PAN contains a growing
collection of Perl 6 docs as well.
"@Larry" is the small team of Perl 6 language design wizards headed up
by Larry Wall.
"-Ofun" is Audrey Tang's guiding "optimize for fun" policy philosophy
for Pugs.
Parrot is a register-based virtual machine, which is designed to be
good at hosting dynamic languages (Perl 6 in particular, but it also
aims to easily and efficiently accommodate Ruby, Python, and so on).
Parrot is intended to be a modern successor to the older stack-based
JVM (Java) and CLR (C#, etc.) virtual machines. Parrot also aims to
support cross-language module sharing.
"Perl 5" and "Perl 6" are names of programming language dialects,
whereas "perl5" and "perl6" are the corresponding (installed) names
of compilers used to run programs written in these languages.
"#perl6" is the Perl 6 IRC channel. Information for accessing the logs
and lurking is elsewhere in this FAQ.
PIL is "Pugs Intermediate Language".
PIR is "Parrot Intermediate Representation".
Pugs is a prototype Perl 6 compiler front end (among other things)
that is written in Haskell.
RT (as in references to an "rt ticket") is "Request Tracker", the
issue (including bug) tracking and reporting system used in Perl
development.
SVN is "Subversion", multi-user patch merging source control system.
YAML is "Yet Another Markup Language". According to (www.yaml.org),
"YAML(tm) (rhymes with "camel") is a straightforward machine parsable
data serialization format designed for human readability and
interaction with scripting languages such as Perl and Python. YAML is
optimized for data serialization, configuration settings, log files,
Internet messaging and filtering."
This FAQ copyrighted and licensed 2006 by Conrad Schneiker under the
most currently prevailing Perl 6 (Pugs) copyright and license. (If
other arrangements are needed, try Conrad.Schneiker [at] Gmail.com.)
Anti-OSS-FUD historical disclosure: The production and distribution of
open source software (and documentation) is (1) a fundamental
*capitalist* *right* of (mutually consenting) *voluntary* *exchange*
that is (2) also a noble and honorable civic virtue that (3)
constitutes a modern generalization of the various widespread {18th,
19th, and 20th} century networks of (the better) fraternal
organizations of business people who (4) generously donated their
time, effort, and money to (5) collaboratively further community
welfare, and (6) thereby (indirectly, and over the longer run) their
own mutual economic development.