Note: these documents may be out of date. Do not use as reference! |
To see what is currently happening visit http://www.perl6.org/
Following last week's bizarrely dated summary (I misplaced a day) we're back with the correct week ending date, but I'm ashamed to admit that I've slipped to writing on a Tuesday again. My head hangs in shame and I am filled with the direst remorse.
It will probably happen again though; life's like that.
Anyone would think that the possibility of not even being able to run the Piethon benchmark (let alone getting a pie in the face for running it too slowly) weighs heavily on Dan.
The bulk of the week's traffic related to getting to the point where we can at least run all the tests.
Python::Bytecode, the module that parses, well, python bytecode, shot up in version numbers; I think it reached 2.7 by the end of the week.
Dan released a Piethon translator, a tool that uses Python::Bytecode translate python to parrot. So has Leo. Dan's is on his website (see the link below, you'll find Leo's in languages/python/pie-thon.pl).
groups.google.com -- Parrot runs a python lambda
groups.google.com[10.0.1.3] -- Notes on pie-thon.pl
groups.google.com[10.0.1.3] -- Namespaces for builtins
www.sidhe.org -- Dan's translator
In a quest for speed when emulating python's stack manipulation ops, Dan outlined a plan for manipulating a pseudo stack using some of Parrot's PMC register (18-29, with P31 used for overflow). Leo wasn't convinced it was needed.
groups.google.com[10.0.1.3]
string_to_num
precisionLeo's got some problems with the precision of the string_to_num
function found in string.c. He doctored things to use atof
, but
Dan's not so keen on that idea because atof
doesn't have standard
behaviour across platforms. He recommended grabbing Perl 5's string to
num code (which he thought we'd already done). Nicholas Clark wasn't
convinced that this was a good idea; he reckoned that Perl 5's code
wasn't good enough. I think Nicholas convinced Dan that atof
is
actually the right thing to use (with a little preprocessing to deal
with C99's atof
being incompatible with C89's -- Parrot expects
C89 behaviour).
Armin Obersteiner reported his investigations into the licensing requirements of the GMP maths library. It appears that the FSF's 'GPL Compliance Engineer' reckons we won't need to include the GMP's source code with binary distributions. We just have to make it available from the same source as the distribution. Which is handy.
Leo asked for volunteers to fix up Configure.pl in order to make it less dependent on the host Perl's configuration. Brent Royal-Gordon provided a teeny-tiny patch that's actually shorter than Leo's description of the problem.
Remember Guatam Gopalakrishnan's question about subscripting scalars?
Discussion continued. One Piers Cawley (who he?) suggested that it
should be possible to specify a postcircumfix:[] is rw
method in the
String class to make string subscripting behave in a helpful
fashion. He also suggested pulling this (and other similar behaviours)
out into a Sequence trait. Juerd thought the proposed method name was a
little verbose compared to Ruby's syntax for doing the same thing and
showed off some rather pretty Ruby metaphors.
Another subthread discussed interpolation in strings. Larry's changed
his mind so that "$file.ext"
is now interpreted as
"$object.method"
. You need to do "${file}.ext"
or "$( $file
).ext"
. Or maybe "$\xABfile\xBB.ext"
by analogy with %foo\xABbar\xBB
. James
Mastros pointed out that .
is rather ambiguous in a literal string;
sometimes a full stop is just a full stop.
This thread continues to resemble the lists it is nominally discussing: Infinitely long and possibly endless.
Leo pointed us at an O'Reilly press release announcing that the second edition of Perl 6 and Parrot Essentials is available. Huzzah! Let joy be unconfined.
Hans Ginzel wondered wondered about adding something to the rules system to easily match specified abbreviations of a string. Luke Palmer came up with a (pretty ugly) solution which he then wrapped very neatly in a rule.
open
There's a good deal of mileage to be had talking about how to improve
the open
function it seems.
Larry continues to come up with new and interesting ways of designing
the language in such a way that almost every decision about how to do
something can be deferred. Speaking as someone who wishes he could just
write Application.new.run
and then debug his way to working code,
I'm all for this kind of late binding.
It's also amazing how much use Larry's getting out of his colon. (The character, obviously).
Michele Dondi wondered whether Perl 6 will support Cartesian products
between lists. Short answer: "Yes". It's probably called outer
.
Dave Whipp thought the unthinkable (but in a good way) and wondered if we actually need user visible filehandles give the tools we have for slicing and dicing strings, manipulating lazy data structures, etc. He proposed being able to write:
my $text is TextFile("/tmp/foo.txt"); for $text.lines -> { ... }
Which is rather neat isn't it? Personally I'm not sure we can get rid
of filehandles, but I do like the idea of a library that implements
something like this. Alex Shitov pointed out that there would still be
a need for methods like $text.flush()
or $text.close()
.
Okay, so the interview was on Tuesday 13th of July. It went well; I'm going to be a maths teacher.
If you find these summaries useful or enjoyable, please consider contributing to the Perl Foundation to help support the development of Perl. You might also like to send me feedback at mailto:[email protected]
donate.perl-foundation.org -- The Perl Foundation
dev.perl.org -- Perl 6 Development site