The Hackathon is a huge continuous flow of ideas, chatters, pizzas, keystrokes, etc...
All Pug's uncatchable value cast errors are eliminated by theorbtwo's sweeping AST.Internals change, which uncovered various bad assumptions in the evaluator core -- I spent most of time today chasing them down. So, the planned release has (yet again) delayed. :-)
During my flight to Toronto, I jotted down many questions to ask Larry; I'd glad that Larry resolved most of the show-stopping ambiguities, with help from luqui and other hackathoners.
Yesterday, Test.pm finally works correctly with PIR compilation, so I ran
make pirsmoke
for the first time, which passed 2.5% of all
subtests. As I'm writing this, luqui is close to get eval
working
on Pugs-generated PIR code -- this should improve our percentage by a significant amount.
stevan brought a new paper that describes a concise, dynamically extensible, polymorphic typed metamodel based on kind/class/objects. He is implementing it in Perl 5 right now; once that works we can port it to Haskell and use it in both the evaluator and the codegen.
lwall is hacking on PPD, the Perl5 optree dumper that defeats optimisations. The Perl 5 to Perl 6 translator may then work by compiling PPD to PIL, and then pretty-print PIL back to Perl 6.
Aside from cooking delicious and inflammable pizza, nothingmuch managed to get a Perl 5 implementation of Forth going, as a prototype of the Harrorth work. We didn't get around to generate PIR from that, though.
ingy showcased his Test::Base superior technology, where you can get specification-based testing done automatically for your projects just by writing two lines of harness. He is porting it to Perl 6 as I write this, which would be very cool indeed.
theorbtwo is tracing out the remaining failing tests, so we can have a reasonable chance of cutting a Pugs release tomorrow. Patrick arrives tomorrow; I hope to get PGE repaired against the trunk parrot, and get closures in Rules working.
There's much, much, much more activity going on than I can describe here -- I covered maybe about 3% of it. Below is a glimpse of a few Perl 6 design glitches we've been ironing out so far -- there more to come...
Any / \ Item Junction
while foo() -> $_ {...} # binds $_ while foo() -> ?$_ {...} # does not bind $_
role Hash[?::returns=Any, ?::shape=Str] { ... }
sub foo ($x) { ... } sub bar returns Pair () { (x => 3) } my $y = (x => 3); foo({ x => 3 }.()); # This assigns (x=>3) to $x foo(bar()); # This assigns 3 to $x foo($y); # This assigns 3 to $x, too sub foo (?$x, ?$Inf) {} my $y = (x => 3); foo($y); # binds $x my $z = (+Inf => 3); foo($z); # binds $Inf
Re:Unary splat
autrijus on 2005-06-25T17:25:31
The unary splat * takes an aggregate, or reference to an aggregate, and flatten them out on the invocation list. Unary splat on hash arguments flattens it out as pairs for named bindings; splat on scalars deref it to find an array/hash reference; for code and non-reference-to-aggreate scalars it's a no-op.Re:Unary splat
roie_m on 2005-06-26T01:28:42
Which is why I don't understand why it's not required in foo($y). It seems to me foo(*$y) should assign 3 to $x, and foo($y) should assign $y to $x no matter what $y is.Re:Unary splat
autrijus on 2005-06-28T01:27:05
Pair is not an aggregate. I thought the same way you did, too, but Larry ruled that Pair, like Junction, is not Item (which is the default for parameter types). To accept Pair, declare it as such, or Object, or Any.