| perl6 The Perl 6 Summary |
In case you were wondering, Darwin ports didn't work it's magic and I still don't have a working Haskell compiler. Thank Juerd for feather, even if I did have to turn my laptop upside down to read the MOTD. Rot-180: oN hes +snf
12 messages in the compiler list this week. Either everyone has decamped to IRC or OSCON or the compiler's getting mature enough that most of the interesting discussion about is happening in perl6-language as Autrijus and others seek clarification.
Autrijus has been doing some thinking on the next version of PIL (The Pugs Intermediate Language) which will be a little less tightly coupled with PIR/Parrot. He outlined his thinking (which seems to be directed towards being able to do useful things and optimizations with Type information) in this thread.
http://groups.google.com/groups?threadm=20050728205921.GA61292@aut.dyndns.org
Autrijus announced that he'd checked in the first part of the new PIL run core. In case you were wondering, containers are the things that Perl variables have as values. They're where things like 'tie' magic happens.
http://groups.google.com/groups?threadm=20050730224910.GB5372@aut.dyndns.org
Hands up! How does the scoping of
{
$x = $x + my $x if $x;
#1 #2 #3 #4
}
work in Perl 6?
In Perl 5, all those $xs refer to the same thing. In Perl 6, #1 and #2 refer to $OUTER::x.
This behaviour (lexical scopes really are lexical) makes a compiler writer's head hurt. Autrijus outlined a plan for making it work.
http://groups.google.com/groups?threadm=20050731180628.GC15882@aut.dyndns.org
Curtis Rawls had posted a patch adding 'dominance frontiers' to IMCC. (I'm afraid I don't know what a dominance frontier is, but it sounds like it might be fun.) This week he wondered if it could be applied any time soon, because he had another patch that depended on it.
It turned out that the patch hadn't been applied because it broke a test or two, and Will Coleda, Andy Dougherty, Patrick and Leo set about helping to track it down. It looks like the issues have been found, and work continues to fix them.
http://groups.google.com/groups?threadm=rt-3.0.11-36597-118022.11.6916089811151@perl.org
Have you ever looked through the Parrot Makefiles and wondered what the deal is with '.dummy'? If so, all is explained in this thread.
http://groups.google.com/groups?threadm=rt-3.0.11-36647-118350.14.1074362091832@perl.org
Klaas-Jan Stol asked if there's any documentation about the complete syntax for .pmc files when writing PMCs. Apparently there isn't, apart from the source of pmc2c.pl, but Will Coleda and Leo helped Klaas-Jan out.
http://groups.google.com/groups?threadm=42E7E7EC.1040907@home.nl
Thilo Planz had some problems embedding ParTcl into a PIR application. It mostly worked, but he had a few questions. Will Coleda helped out again.
http://groups.google.com/groups?threadm=42E838DC.9080804@web.de
Klaas-Jan had more questions about compiling PMCs. Dynamic ones this time. It appears that the docs he was following didn't quite reflect reality. Leo solved the problem and Klaas-Jan sent in a doc patch. Hurrah!
http://groups.google.com/groups?threadm=42E8A3A2.5010100@home.nl
Michael Schwern pointed out that parrot won't start if you close either STDOUT or STDERR. Eschewing the standard joke response ("Doctor, it hurts when I do this." "Well don't do that then.") Jerry Gay wrote a test and Leo fixed it.
http://groups.google.com/groups?threadm=rt-3.0.11-36677-118403.17.3306028943918@perl.org
Apparently Klaas-Jan is working on writing a lua compiler to target Parrot. He's obviously working on it a good deal at the moment :)
He wanted to know how he could extend the standard Hash PMC to return 'None' if no key is found. As is traditional in these cases, Leo helped him out. It turns out that part of the problem is that pmc2c.pl isn't that strict in its syntax checking. If anyone reading this has the tuits...
http://groups.google.com/groups?threadm=42E9EAF7.1050509@home.nl
In a move guaranteed to gladden at least Dan Sugalski's heart, Amir Karger popped up to say that he's working getting the Z-machine interpreter working. He wondered if there was any way of dedicating a register to a particular constant in order to avoid copying a global every time he called a sub. Leo helped out.
http://groups.google.com/groups?threadm=20050729165847.70341.qmail@web51110.mail.yahoo.com
Leo announced that he'd added a new Super PMC which will make it easier to call superclass methods.
http://groups.google.com/groups?threadm=42ECDE37.2010308@toetsch.at
Klaas-Jan unveiled his project to get the Lua compiler targetting Parrot. It's apparently 'far from complete', but hey, it's good to welcome yet another language to the parrot cage.
http://members.home.nl/joeijoei/parrot
http://groups.google.com/groups?threadm=42EF7E8F.9010304@home.nl
Jeff Horwitz announced the release of mod_parrot 0.3, complete with support for all Apache hooks, autogeneration of request_rec methods and a mod_pugs proof of concept. Crumbs. And there's more. Check out the announcement, download the code and start making Apache do weird things. Go on, you know you want to.
http://www.smashing.org/mod_parrot
http://groups.google.com/groups?threadm=Pine.LNX.4.44.0508021908110.3368-100000@booger.sixgeeks.org
Damian and Luke's discussion of the right way to do MMD looks to be finally winding down. It seems Luke's convinced Damian of the righteousness of his cause (or at least, if he's wrong, he's wrong in a subtler way than Damian realised.) I don't think there's been a final decision as yet, but we're definitely moving forward.
http://groups.google.com/groups?threadm=42DB0A12.3060901@conway.org
Ingo Blechschmidt asked for some clarification of the behaviour of slurpy parameters. It's not often I hope that Luke is wrong, but I really hope the answer he gave Ingo isn't the true state of things.
http://groups.google.com/groups?threadm=dc67qq$fjb$1@sea.gmane.org
Bah! I propose a simple, slow, yet powerful feature which can be used to implement a whole bunch of other possible APIs for getting at stuff and people go and suggest making any one of various heavier APIs the One True API. It's enough to make a person despair.
Ah... apologies, I'm letting personal concerns get in the way of the summary, but what the hell, I'm leaving it.
http://groups.google.com/groups?threadm=42E7461D.5060801@orthogon.com
Luke had a few things to say about what happens when you monkey with the type hierarchy. So he said them. The usual suspects joined in, most of them addressing the particular instance that Luke had chosen to illustrate his point, rather than discussing the broader point, but hey, this is perl6-language, that's what happens.
Luke's broader question was "Should it be possible to write a class that isn't a leaf in the existing hierarchy?" The example that everyone addressed was the idea of writing a 'Complex' class that wedged in between 'Real' and 'Num' in the hierarchy (which, as several people pointed out, isn't necessarily the right way to think about it anyway, hence the discussion).
My gut feeling was that the answer to the general question should be "Yes, but be very, very careful and don't be surprise if it bites you later".
http://groups.google.com/groups?threadm=7ca3f016050727040066a1464d@mail.gmail.com
The discussion of appropriate default prototypes the like continued. Autrijus proposed a way of rejigging the type hierarchy to make default argument types a little clearer. I found things getting a little weird to be honest -- there's even talk of eliminating 'Object' as a type name, which seems a little strange.
http://groups.google.com/groups?threadm=20050727120125.GA52424@aut.dyndns.org
Randal proposed that, as the number of possible platforms that Perl 6 can run on proliferates, it'd be really handy if there was some useful global that held knowledge about the platform and its capabilities. He proposed $*OS as a decent place to put it. Larry thought we probably would have something like that, but thought that there might end up being two globals, $*OS and $*VM. The usual "Why don't we call it..." thread sprang up, but it seems that the most important upshot is that this particular bike shed will definitely be painted.
http://groups.google.com/groups?threadm=86sly0jq6y.fsf@blue.stonehenge.com
returnsThe continuing invasion by the rampaging hordes from p6c continued apace. This time Autrijus had a discussion on the implications of returns and its implications for type inferencing.
http://groups.google.com/groups?threadm=20050727210305.GA30215@aut.dyndns.org
Flavio S. Glock wondered how to go about creating a lazy list from an object. Apparently the magic he was missing was prefix:=, which is syntactic sugar for calling the .next method on anything that supports iteration. Which is nice.
http://groups.google.com/groups?threadm=aa47605d050727161748eb9a9d@mail.gmail.com
David Formosa had an idea about a possible pack API, he outlined it on the list. Yuval Kogman seemed to like it, but there's been nothing from anyone else on the list.
http://groups.google.com/groups?threadm=slrndeg0be.600.dformosa@dformosa.zeta.org.au
Autrijus again, this time thinking about the kind of type inferences that can be done with Perl aggregate types. Once I'd got my head in the right space, it made a great deal of sense, even if
(Array of Item).does(Array of Int); # false (Array of Int).does(Array of Item); # also false!
made my head hurt the first time I read it.
http://groups.google.com/groups?threadm=20050727231952.GB32639@aut.dyndns.org
Various additions to the proposed Garbage Collector API were proposed.
http://groups.google.com/groups?threadm=slrndegbgc.600.dformosa@dformosa.zeta.org.au
$value.confess()Brent Royal-Gordon had a cunning idea for debugging of having Perl 6 capture the call stack at their point of creation and stashing that in a property called confess, which could be examined in a debugging context to find out where a value came from. As he pointed out, this would be expensive, but useful. He's currently Warnocked, but I get the feeling it should be possible to write an extension to do what he wants without adding anything extra to Perl 6 itself. It might be a little tricky if he wants the call stack to change on mutation though.
http://groups.google.com/groups?threadm=b8b9a51105072813113f658a3f@mail.gmail.com
is rw arraysHaving got clarification of the behaviour of normal slurpy arrays, Ingo Blechschmidt asked for clarification of the behaviour of Slurp is rw arrays. Adriano Ferreira and Thomas Sandlaß seemed to talk sense in reply.
http://groups.google.com/groups?threadm=dccvvt$gei$1@sea.gmane.org
.assuming in S06Autrijus wondered if code like:
&textfrom := &substr.assuming(:str($text) :len(Inf))
found in Synopsis 6 was a mistake, or if the syntax was supposed to be like that. It turns out that the syntax is supposed to be like that. Apparently being able to do without the commas was one of the reasons for making colon pair syntax look like that.
http://groups.google.com/groups?threadm=20050729190650.GB83466@aut.dyndns.org
In a currently Warnocked post, David Formosa outlined a potential problem with lazy IO.
http://groups.google.com/groups?threadm=slrndekuuf.600.dformosa@dformosa.zeta.org.au
sub foo ($x) returns ref($x)In his continuing discussion of the Perl 6 type system and the inferences that can be drawn about it, Autrijus posted a discussion of how to declare that a function that returns a value with the same type as its argument. He suggested that the best way forward would be to declare something like:
sub identity ($x) returns ref($x) { ... }
and asked for better suggestions. Thomas Sandlaß had suggestions.
http://groups.google.com/groups?threadm=20050730082654.GA96554@aut.dyndns.org
&say's return valueGaal Yahas thought that &print, &say should fail on errors and return the printed string on success (but true). Larry thought not. So it looks like they'll end up returning a Boolean or throwing an exception.
http://groups.google.com/groups?threadm=20050730115601.GC1129@sike.forum2.org
$arrayref.refIngo continues his ongoing task of getting clarification of the semantics of a whole host of things. This time he wanted to know about the behaviour of references. Larry clarified.
http://groups.google.com/groups?threadm=dcfr09$qhv$1@sea.gmane.org
Next up in Ingo's clarification project was binding scalars to aggregates (or did he mean binding aggregates to scalars?). Again, Larry came through with answers. It turns out that there's more to this than meets the eye at first glance. Autrijus's post on Containers over in perl6-compiler addresses some of these issues as well.
http://groups.google.com/groups?threadm=dcfs2b$sk9$1@sea.gmane.org
Ingo asks "Is it legal to bind a hash to an array or vice versa?"
Larry answers "Not at the moment."
http://groups.google.com/groups?threadm=dcftim$vbt$1@sea.gmane.org
Gaal Yahas wondered what function in a module gets called when you 'use' or 'no' it.
Warnock applies.
http://groups.google.com/groups?threadm=20050730173929.GE1129@sike.forum2.org
&{} and *{}Autrijus wondered if we really need the & sigil. Warnock applies.
http://groups.google.com/groups?threadm=20050731153353.GA15882@aut.dyndns.org
For some reason Ingo's shortest question ("How do pairs stringify?") attracted the largest response. Well, at first blush it looks like it did. What actually happened was that it got Warnocked but the References: header in Andrew Shitov's posed discussed below was a little broken...
http://groups.google.com/groups?threadm=20050731153353.GA15882@aut.dyndns.org
zip with ()Andrew Shitov got caught out by some strange behaviour of zip. Ingo explained what the problem was. There was quite a bit of discussion of the various subtleties exposed.
Sometimes I pity the poor swine who's going to have to write Programming Perl 6. It's going to make the current camel look like a slim volume if we're not careful.
http://groups.google.com/groups?threadm=1846972468.20050731214453@shitov.ru
map and grepIngo Blechschmidt wondered if it was true that Perl 6's grep, map, etc, wouldn't allow mutating values in their source array. He wondered if it would be possible to use a pragma to get the old, Perl 5ish, behaviour back. Thomas Sandlaß wondered if simply explicitly declaring the given block's argument as rw wouldn't do the job. No word from @Larry yet.
http://groups.google.com/groups?threadm=loom.20050801T120430-161@post.gmane.org
Damn... couldn't think of a word beginning with 'a' that means 'conference'. To all you lucky people in Portland at OSCON, I wish I was there and am a seething mass of envy. Well, not that seething: I'm consoling myself by going to the WorldCon in Glasgow instead.
http://geeksunite.org/, tell all your friends, this cannot stand.
If you find these summaries useful or enjoyable, please consider contributing to the Perl Foundation to help support the development of Perl.
http://donate.perl-foundation.org/ -- The Perl Foundation
http://dev.perl.org/perl6/ -- Perl 6 Development site
Check out my website, now running on a different blog engine and adorned with even more new articles. And adverts and stuff. Buy books, click on Google links, help me cover my bandwidth costs. You know you want to.
Vaguely pretty photos by me can be found at:
http://www.flickr.com/photos/pdcawley
|
Perl.org sites
: bugs
| dev
| history
| jobs
| learn
| lists
| use
Site Information and Contacts |
|