The Perl 6 Summary for the week ending 20040111
It's Monday. People have been talking about Perl 6, Parrot and the
European Union Constitution. Let's find out what they've been saying
about Parrot first shall we?
Threads
Threads were discussed some more. Dan's deadline is coming up soon,
hopefully soon after that discussion will move from Holy Skirmishes
about architecture and on to meaningful discussions of a real
implementation.
Hmm... that came out rather more dismissive than I intended.
Continuation problems
Luke Palmer found a problem with Parrot's continuations. A continuation
is supposed to encapsulate the interpreter's control state, in other
words the position of the program counter and the state of the register
stacks, and a pointer to the previous continuation. However, it turns
out that a Parrot continuation just contains the program counter and a
pointer to the previous continuation. There was some discussion of why
this was so (Melvin Smith seemed to claim that it was both his fault and
not his fault).
Everyone agreed that this needed to be fixed pretty promptly and it
wasn't long before Luke posted a patch.
http://tinyurl.com/2jzv2
http://tinyurl.com/3for3
A problem with threads
In a change from the discussions of thread philosophy, Jeff Clites
posted about a problem he was having with Parrot's current threads
implementation which was causing problems when trying to join multiple
threads. Between them, Jeff and Leo Tötsch tracked down a possible cause
of the problem and Jeff offered up a patch which Leo applied.
http://tinyurl.com/yssjs
The PPC JIT gets fixed
Jeff Clites also posted a patch which cleans up the last problems with
the JIT on PPC. Leo applied it. Us Apple users cheered.
http://tinyurl.com/2pyft
Luke Palmer gets his act together
Luke Palmer decided to get his act together (given the level of his
contribution to the Perl 6 lists so far, I'm almost scared to find out
what he's going to be like now...) and finish up his 'Priority DOD'
rethink of the Garbage Collector. I confess I'm not really qualified to
discuss what's different about it, beyond the claim of a 10,000% speed
up when there were no 'eager' PMCs about (things that need immediate
cleanup on scope exit; the canonical example being a Perlish file
handle) and only a 5% slowdown when there were.
Luke and Leo discussed the patch a bit before Leo applied it.
http://tinyurl.com/2afyc
http://tinyurl.com/235ak -- Luke explains the patch
IMCC speed issues
Dan posted some timings he'd made of IMCC compiling some large subs,
which were not the most wonderful timings I've ever seen. A 41 minute
compile isn't generally what one wishes to see. Melvin Smith had a few
ideas about what was causing it, as did Leo (it seems that IMCC's
register allocation is very slow in the presence of spilling and Live
analysis increases with the product of the number of lines and variables
in a segment. Leo recommended redoing the sub to reduce the number of
(and avoid long lived) PIR variables (ie. registers) by using lexicals
or globals instead.
http://tinyurl.com/2wb6l
References to hash elements
Arthur Ponie Bergman had some questions about how references to hash
elements would be done. Consider the following Perl code:
my %hash;
$foo = \$hash{key};
$$foo = bar;
print $hash{key}; # Prints bar
Arthur wondered how this could be made to work with the current vtable
setup, specifically in the presence of tying. Simon Cozens thought that
there should be a special HashElement PMC which would handle fetching
the actual value from the hash (or writing it back to the hash) as
appropriate. Dan agreed with him, so it looks like this might be the way
forward.
http://tinyurl.com/2hop4
Instantiation?
Michal Wallace asked how to instantiate objects from Parrot. Luke Palmer
supplied the answer, but pointed out that, at present, classes can only
have integer attributes. It turns out that, for Michal's purposes, he
can probably get by with using properties instead, so that's all right.
Stéphane Payrard did the decent thing and implemented the other
attribute types. He even wrote tests.
http://tinyurl.com/3dul5
http://tinyurl.com/ywgvo
Creating 'proper' interpreters in Parrot
Simon Cozens wondered what was left to do to allow parrot to be embedded
in an interpreter and have PIR fed directly to it. Leo pointed him at
his own YAL.
http://tinyurl.com/2smrp
http://toetsch.at/yal/ -- Yet Another Language
yield op?
Michal Wallace was uncomfortable with the workings of Parrot Coroutines
and posted a sample of parrot code which demonstrated why. Leo promised
to fix it once he'd applied Luke's