develooper Front page | perl.perl6.users | Postings from May 2006

Perl 6 Users FAQ (perl.perl6.users) -- Version: 2006-05-18 (s/newsgroup/mailing list/)

From:
Conrad Schneiker
Date:
May 18, 2006 08:24
Subject:
Perl 6 Users FAQ (perl.perl6.users) -- Version: 2006-05-18 (s/newsgroup/mailing list/)
Message ID:
!&!AAAAAAAAAAAYAAAAAAAAALPiZukRAp1LqhcE29DOvC/CgAAAEAAAAHMSQs9WHVRPuFMQ6A0KySsBAAAAAA==@Gmail.com
(Thanks to Ask Bjørn Hansen for pointing out error.)

===== Perl 6 Users FAQ (perl.perl6.users) ======

      Version: 2006-05-18 (s/newsgroup/mailing list)

TABLE OF CONTENTS

* Latest Perl 6 developments (including FAQ changes)

* 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!
* Perl 6 info and docs      # For the few that will RTFM first. :-)
* Where to get Perl 6       # <----- "I want it now!!" <-----
* Useful Perl 6 modules
* Perl 6 features in the latest Perl 5
* Perl 5 modules implementing Perl 6 features
* Incremental migration from Perl 5 to Perl 6
* Other useful resources
* How you can help out with Perl 6
* Glossary                  # <----- Note!
* Copyright, license, and disclosure

=== Latest Perl 6 developments (including FAQ changes) ===

* Parrot 0.4.4 "Feather" Released!
  (http://www.nntp.perl.org/group/perl.perl6.language/25366)

<<Recent language changes.>>

<<Recent prototype advances.>>

<<Temporary gotchas>>

=== About perl.perl6.users (and this FAQ) ===

(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:
  (http://groups.google.com/).
* 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.>>

=== About Perl 6 ===

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).

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.

=== General Perl 6 status ===

<<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

=== Where to get Perl 6 ===

Pugs: (http://www.pugscode.org/)

Parrot home page: (http://www.parrotcode.org/)
Parrot SVN source: (http://www.parrotcode.org/source.html)

Win32 binary builds of Pugs and Parrot:

* (http://www.jwcs.net/~jonathan/perl6/).
* (Pxperl.com appears to have stopped routinely updating their Win32
   builds.)

=== Perl 6 info and docs ===

Links to design documents and lots of other info:

* Misc.: (http://dev.perl.org/perl6/).
* Synopsis: (http://dev.perl.org/perl6/doc/synopsis.html).
* Perl 6 FAQ: (http://dev.perl.org/perl6/faq.html).

<<Find link to Perl 6 FUD FAQ.>>

"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?>>):
(http://planetsix.perl.org/).

(http://planet.parrotcode.org/)

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,
                                #   replies 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
(http://www.perl.com).

=== Useful Perl 6 modules ===

<<To be completed.>>

<<Moose, and so on.>>

=== Perl 6 features in the latest Perl 5 ===

<<To be completed.>>

=== Perl 5 modules implementing Perl 6 features ===

<<Moose, and so on>>

There are many modules that 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.)

=== Incremental migration from Perl 5 to Perl 6 ===

<<To be completed.>>

=== Other useful resources ===

Perl development server: (http://feather.perl6.nl/).

Some interesting background reading:

* "Best Perl Practices" by Damian Conway. Even though this currently
  applies to Perl 5, most of the principles also apply to Perl 6. This
  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.>>

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?>>

<<Creative and practical ($work) applications of existing pieces Perl
6 pieces (Parrot, Perl5 transition modules).>>

Perl 6 Internals:

* "A Peek Into Pugs Internals"
  (http://perlcabal.org/~gaal/peek/start.html).

=== How you can help out with Perl 6 ===

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.

Here's a specific suggestion. Watch the Perl 6 language mailing list
and "#per6" 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.>

=== Glossary ===

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."

=== Copyright, license, and disclosure ===

This FAQ copyrighted/licensed 2006 by Conrad [dot] Schneiker [at]
GMail [dot] com under the most currently prevailing Perl 6 (Pugs)
copyright/license.

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 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.




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About