Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

autrijus (1505)

  (email not shown publicly)

Journal of autrijus (1505)

Tuesday May 17, 2005
06:41 PM

Day 106: Apache::RequestRec for Pugs!

[ #24746 ]
Thanks to the jhorwitz's hard work, this now works with mod_parrot:

module PugsHandler;

sub _handler($r) {
    $r.puts("Hello world!");
    return 0;

Here $r is a Apache::RequestRec object; the entire handler is compiled to Parrot bytecode, loaded and executed in memory by mod_parrot, exactly like what mod_perl does. This means we will see something like this very soon:

SetHandler parrot-code
ParrotLanguage Pugs
ParrotResponseHandler ModPugs::Registry
Options +ExecCGI

clkao added tests for symbolic operators, and I implemented them within 24 hours. To wit:

sub prefix:<Σ> (@x) { [+] *@x }
sub postfix:<!> ($x) { [*] 1..$x }
say Σ [1..5!] # 7260

Note the use of the reduce metaoperator [...] above: [+] means sum, and [*] means product.

I finally finished reading Why's poignant guide to Ruby today. I'm grateful to Why's kind words in his Autrijus Raising Perl6 as a Real Puppy Should blog entry; I posted a comment there to look for a champion for the Cardinal (Ruby on Parrot) project, as I'd love to see it joining the ongoing collaboration among Pyrate(Python), ParTcl(Tcl), Pugs(Perl6), Ponie(Perl5) and other Parrot languages -- lately #parrot has become a quite happening place!

The quickref project is building up steam from Juerd, kolibre and iblech: we have quickref/data, quickref/oo, quickref/op and quickref/var now.

With adehohum's helpful debugging, named subrule capturing now works correctly in Pugs/PGE:

rule fishy { (.*)shark };
"whaleshark" ~~ m/<fishy>/;
say $<fishy>[0];    # "whale"

Stevan has been reading a lot about Smalltalk and metaclass theories; he applied them to Perl::MetaModel, delivering many magical results with small amounts of code. After all, what's a magician but a practicing theorist? :-)

Darren added full tests for Locale::KeyedText, but noted that the lack of class methods, compile-time import with use lib '/path', $obj.meta and is constant is holding the tests from passing. I'll see what I can do for them in the 6.2.4 release...

luqui pointed out that we should use Manhattan distance (sum of inheritance deltas), instead of leftmost tiebreaking, to dispatch MMD; it's now implemented. However, I'm very surprised to learn that there can be multiple levels of invocants: multi sub foo ($x: $y: $z: $w) {}; now a nontrivial amount of Pugs internals needs to change for this underdocumented specification. This issue is raised on p6l, along with some type coercion issues.

scook0 changed Haddock to use the more manageable {- ... -} block inline style, then added more function signature declarations.

Corion, iblech, putter, mugwump and masak performed more helpful gnoming on various unit tests and documentations.

luqui hacked Makefile.PL a bit to allow user-specified hsc2hs executable via $ENV{'HSC2HS'}.

nothingmuch checked in his helpful util/ script, a complete smoke test loop to automatically build parrot, p6bible, haddock and pugs itself. He also updated the smoke graph to use inline CSS, which requires the latest version of Test::TAP::HTMLMatrix.

iblech added a splash screen to the Pugs/Parrot live CD, hacked in »~« support, and added a test for the bug that prevents bare blocks from containing $_.

See you tomorrow!

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.