Tonight at the Toronto Perlmongers monthly meeting we heard from Richard Dice about the current state of Perl6, as seen through the lens of Pugs. Just thought I'd post my notes of the evening, in case anyone has any further comments or clarifications.

Pugs is an implementation of Perl6, initiated by Audrey Tang, with Perl6 language ideas that come from Larry Wall and Damian Conway. It's a way of testing out the language before it's written, or even while it's being developed, which I think is simultaneously a huge challenge and a very cool piece of code.

Pugs is available via Subversion and is written in Haskell .. just check out a copy of the source from the Pugs web site, do the usual ./configure, make, make test and make install as root, as you're ready to go. (Oh, and don't worry about any tests that fail -- Richard says Audrey has encouraged folks to write tests that test Pugs, and she'll get to implementing the missing bits as time permits.

We only touched on a few parts of perl6 (or rather, Pugs -- well, OK, Perl6) in the meeting, but we did spend some time going over a concept called captures. It seems that these contructs are used as a collection of scalars, arrays and hashes, and one use is to 'partially construct' the parameters to an object. Later on, this construct can be re-used to fully specify the object. This construct was also referred to as 'currying', something that I hear about every now and then, but -- having an Engineering degree and not a Computer Science Degree -- I don't usually remember what 'currying' is all about (no food jokes please).

This strikes me as odd, but I will admit that I'm coming into this knowing almost nothing about Perl6, so I don't know what problem this is trying to solve, whether it's a work in progress, or whether I just Don't Understand It All Yet.

Anyway, I will install svn and Haskell on my FC6 machine, get Pugs, build it and try a few things out .. you just never know when Perl6 will be just around the corner ..

Alex / talexb / Toronto

"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

Update: For FC6 users, yum install subversion to get Subversion, and yum install ghc for the Haskell compiler (all 32M of it).

Replies are listed 'Best First'.
Re: Perl6, Pugs and captures
by lidden (Curate) on Mar 30, 2007 at 10:19 UTC
    Currying is when you take one function and make a new function by giving defaults to the first one. Here is an example in Perl 6 (please correct me if i got it wrong).
    sub add(Num $x, Num $y){ $x + $y } &add_two := &add.assuming(y => 2); say add_two(1); # prints 3
    Currying is in S06 and S03.
Re: Perl6, Pugs and captures
by philcrow (Priest) on Mar 30, 2007 at 13:27 UTC
    <shameless_self_promotion>My favorite example of currying is in an article of mine which recently appeared on perl.com. Until I wrote that example (near the end of the article), I couldn't imagine the purpose of currying. </shameless_self_promotion>

    Phil