2006.07.30

Aside from a cameo appearance in my RHOX talk, Moose.pm saw a couple more interesting mentions in this year's OSCON.

The first is TimToday++'s State of the Onion talk. He explained the now-slightly-less-imaginary Perl 6 Timeline, as well as the v6.pm stack, then went on to say that Moose.pm is his favorite piece in the 6-on-5 puzzle.

The next day, Tim Bunce discussed the plan toward DBI 2.0 as a lightning talk. It's very exciting to hear that the new version of DBI will clearly be based on Moose, in particular using its Role support to offer a better interface. Yay for the lambdamoose! :-)

2006.07.26

Yay, merlyn++'s wonderful article is now available online! I attended his and bdfoy++'s "Learning Perl 6" course at YAPC::NA, and I'm really amazed of their ability to explain concepts so effectively.

Also, the instructor point-of-view is helpful to language design as well: For example, merlyn++ noted that the ==> and <== operators, known as the pipe operators, is likely to cause confusion with Unix pipes. Because they are shipping concrete objects instead of stream-of-characters, now they are renamed feed operators.

Another example: The implicitly-passed-with-each-calls variables were known as environmental variables, and declared with "env $x". However, merlyn++ noted that it can easily be confused with environment variables in %*ENV. So they are now contextual variables, and declared with "my $x is context".

I took the evening off from making slides, and went to see three great talks from Larry, Kathy and Damian. I very much did not regret going there, but that does mean I'm woefully behind on slides again:

2006.07.25

Some power of Mystery dragged Chia-Liang Kao, maker for our version control system svk, into hacking v6.pm over the weekend with fglock. See his use.perl journal post for a quick walkthrough into v6.pm hacking!

2006.07.24

When I was giving a talk at YAPC, someone asked me if a Haskell data type is like a blessed object in Perl. I said that they were profoundly different. Well, that was probably too offputting: a Haskell datatype can be represented as a Perl 6 Role, and its variants as different Classes.

To facilitate the Perl 6-on-Perl 6 efforts, Audrey asked me to write a general automatic DrIFT-based Hs->P6 converter. The first use is to put the new AST scheme in a language where data can be more readily manipulated. For example, here is a function parameter in both Haskell and Perl 6:

class MkParam does Param { has Ident $.p_variable; has Class @.p_types; has Code @.p_constraints; has Sig $.p_unpacking; has Exp $.p_default; has Ident $.p_label; has Table $.p_slots; has ParamAccess $.p_hasAccess; has Bool $.p_isRef; has Bool $.p_isLazy;};

Here is the latest AST translation (and where that came from). This is a step towards assuring that Pugs' Perl 6 AST can be shared by other implementations, and (for example) macros that manipulate parsed bits of Perl can work on more than one compiler.

So far this was much easier to do than our YAML class (that bridges why++'s libsyck with Haskell for any data). But the next step is figuring out how to dump actual arbitrary Perl 6 values...

gaal++ worked on getting the new AST to compile (as Haskell and emit as Perl6/Moose classes), cutting down hundreds of type errors to a couple of them.

TimToady++ hacked the spec to introducerepeat while loops, resolving an issue raised by a recent p6l thread. Then he hacked the test suite to reflect the new syntax so they fail. Then he hacked Pugs.Parser so it now supports the spec... and the tests pass again. Yay!

Now I'll go back to make slides for the "JiftyRHOXmy $Job" talk. (i.e., "How Jifty tamed the Relational/Hypertext/Object/XML mismatch for my day job.") See you at OSCON!

# This does not look like XML, so it's still shell globmy @files = <*.*>;

Of course, having it simply construct hashes via XML::Simple is not very interesting. More fun is to use it to construct XML patterns and composable, self-validating fragments -- more (ab)uses are left as exercise for the reader. :-)