This week on Perl 6, week ending 2004-01-11
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.
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.
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.
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://groups.google.com – 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.
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.
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.
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://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 Continuations patch.
Congratulations Dan
Melvin Smith offered his congratulations to Dan for the first commercial use of Parrot. I think I can safely say we all echo those congratulations.
http://www.sidhe.org/~dan/blog/archives/000288.html
Meanwhile in perl6-language
Roles and Mix-ins
Discussion of roles as mix-ins kicked off again after the Christmas break. The canonical Dog::bark
vs. Tree::bark
problem was discussed.
The European Union Constitution
For reasons that still escape me various Americans paraded their ignorance about the putative constitution of a loose union of sovereign states.
Perl 6 Story Cards
In last week’s summary I mentioned the Perl 6 Stories Kwiki that Allison and chromatic set up some months ago and suggested that people wanting to write tests and stories for the new language take a look at it. It seems they did, and the Wiki’s seen a good deal of activity. Check it out if you’re interested in helping with the project.
A modest question
Austin Hastings asked the design team why they were fascinated with Traits (which will be called Roles in Perl 6). He’d read the original paper and was unimpressed with the gains that were made by using them.
The awkwardly cased chromatic opened the case for Roles by pointing out that Roles allow for finer grained naming of chunks of functionality and code reuse. I must say I agree; I’m always keen on opportunities to name something.
Announcement
Iain “Spoon” Truskett was not a prolific contributor to the Perl 6 mailing lists. He was, however, an important contributor to these summaries every week; he was the maintainer of WWW::Shorten, the module that I use to shorten the URLs on the version of the summary that goes out to perl6-announce.
He died from a sudden cardiac arrest on the 29th of December. He was 24. He will be missed. This summary is dedicated to his memory.
http://iain.truskett.id.au/ – Iain’s website
Tags
Feedback
Something wrong with this article? Help us out by opening an issue or pull request on GitHub