Note: these documents may be out of date. Do not use as reference! |
To see what is currently happening visit http://www.perl6.org/
Another week, another Perl 6 Summary. This is becoming a habit.
Let's do perl6-internals first shall we?
Last week Jeff 'japhy' Pinyan announced that he'd be working on a Perl 6 rules parser once he'd finished his Perl 5 regex parser. This week saw a deal of discussion on how his parser worked. The answer seemed to be "It works the Right Way." Which is good. With any luck Steve Fink will be able to get this parser and the current (sketchy) Perl 6 compiler playing well together.
Last week Leo had pointed out that we'd need support for complex numbers in order to get the Piethon stuff running properly. This week there was some discussion of what was actually needed.
Later in the week Ion Alexandru Morega posted a patch implementing them. I think Leo spoke for us all when he said "Whee, great, thanks - applied."
There was some discussion of how perl6-internals should be broken up. It looks like we'll see new lists called parrot-internals, parrot-compilers and parrot-library (for internals hackers, compiler implementers and library builders respectively). The original perl6-internals will carry on, but will be focused on the actual internals of Perl 6.
Some, or all, of these lists will be covered in these summaries for as long as I can keep up.
In as impressive a delurk as I've seen in a while, Michael Pelletier announced that he'd been lurking for a while, playing with Parrot and had implemented a little stack language not entirely unrelated to Forth which he'd christened "Parakeet". He posted his implementation and got promptly Warnocked.
Scott Bronson announced that he'd taken a look at GMP's license and he didn't think it was incompatible with Parrot's licenses. Dan wasn't convinced. Scott's still trying to convince him though.
Robert Spier attempted to resolve the problem by pointing everyone at another possibly suitable library called IMath.
Discussion of the various ways of slicing and dicing strings in Perl 6
continued. The issue is that, especially in a Unicode world, there are
many ways of looking at a string, all of which are useful in different
contexts. However, because you can look at a string as a sequence of bytes,
codepoints, graphemes or whatever, then functions like substr
get a
little weird. If you were to say
$substring = $a_string, 5
then what does the '5' mean?
And that's just one example of where conceptual problems can arise.
I confess that, whenever Unicode comes up, my gut reaction is to keep my head down and trust that Larry's going to get it right. Certainly the current formulation seems decently sane; things only get problematic if you're trying to do something well out of the ordinary.
if
, loop
, and lexical scopeDiscussion of Perl 6's new scoping rules (things are generally more
consistent than they are in Perl 5; if a variable is declared inside a
block, or in that block's signature in the case of
-> $a, $b {...}
type blocks, then that block is its scope)
continued. Some people like the new rules, others don't.
Jonadab the Unsightly One had wondered about having objects inheriting behaviour from objects rather than classes in Perl 6. The gist of the answers he received was that it wouldn't be in the core of the language, but neither should it be too hard to implement something that worked how he wants.
Michele Dondi wondered if Perl 6 would have a built in undo
function for rolling back the history of a scalar (say). Rafael
Garcia-Suarez pointed out that the concept wasn't a simple as it first
appeared, especially in the context of threads, closures, side
effects. He suggested that a better approach would be to implement a
suitable transaction/rollback library that handled such things in an
application appropriate fashion rather than using a 'half-baked kludge
built into the base language'. Mark Biggar pointed out that the
language already had hypothetical values, which did pretty much the
right thing.
Elsewhere in the thread, Luke Palmer attempted to explain continuations again. A sandwich was involved.
groups.google.com -- Luke makes a continuation sandwich
,
then whatAlexey Trofimenko triggered your Summarizer's sense of deja vu when he
asked what was happening to the C-style comma (we're keeping it, more
or less) and proposing a then
keyword for use in the contexts where
Perl 6's new ,
didn't quite work the same way as in Perl 5. Which is
pretty much the same as the proposal Luke Palmer made some months ago
and which Larry rejected.
Jonathan Lang pointed out how you'd implement then
if you needed it
though.
The thread got slightly silly after this (sideways semicolons! I ask
you!). I'm not sure what chromatic was driving at when he suggested a
meh
operator though.
map
, grep
and lazinessThat man Alexey also had some questions about lazy evaluation. Luke Palmer attempted to allay his fears by saying that Perl 6 would be essentially lazy unless you told it otherwise.
Woohoo! Another weekly summary.
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