This week on Perl 6 (9/1 - 9/8, 2002)
by Piers Cawley
|
Pages: 1, 2, 3
Perl 6 parser, built in rules, etc.
Erik Steven Harrison wondered about backward compatibility issues with changing Perl 6's grammar when the grammar rules are so exposed to the user. Sean O'Rourke didn't think it was an issue yet. Dan told us that the eventual Perl 6 grammar would be maintained in a backward compatible way, with documented places for adding changes, and that this would be maintained for as long as Larry said so.
regex args and interpolation
David Whipp confused the heck out of me when he asked about 'regex args and interpolation'. I confess I can't for the life of me see what the issue is that he's trying to get at. Ken Fox seemed to understand him though, but wanted to know what the rule was that he was using in his example code, and proposed a couple of implementations of it. Nicholas Clark wondered about a section of Ken's post:
{ use grammar Perl::AbstractSyntax;
$0 := (expr (invoke 'new (class 'Date) $1 $2 $3))) }
Specifically, what was that S-expression doing there? Piers Cawley
pointed out that S-expressions were a concise way of writing out an
AST's structure. Nick agreed, but pointed out that it was still in the
middle of a stream of Perl, but worked out that the use grammar
Perl::AbstractSyntax part of Ken's code meant that all bets were
off. At this point Nick's head threatened to explode at the
wonderfulness of it all.
Defaulting params (reprise)
Miko O'Sullivan doesn't like sub foo ( $arg //= 1 )
{...} for specifying default values for function arguments. He would
rather have sub foo ( $arg is default(1) ) {...}. Damian
pointed out that is default(...) would be a compiletime only
thing, which didn't necessarily make sense.
Hypotheticals again
Jonathan Scott Duff wondered some more about hypotheticals and
let. He wanted to know whether hypothetically binding to a
lexically scoped variable would also introduce that name into the
match object. A strict reading of Apocalypse 5 suggests that that
isn't the case, which, Jonathan points out, causes the programmer a
few headaches. Damian agreed that he'd like to see $0 contain keys
for all the hypotheticals used in a match, whether they came from the
lexical scope or not. Damian would also like them to turn up in
$o{'$name_with_dollar' as well. So, it seems that everyone's
assumptions are aligned and we can carry on.
First crack at Builtins.p6m
Aaron Sherman decided that what the world needs now is, at least, a set of function signatures for everything that's in perl5's perlfunc listing. He's even had a crack at implementing those functions where possible. Aaron points out that he thinks of this file as documentation, not code. People were impressed, and there's talk of using it to compile down to the IMCC input as a base for hand optimizing. Aaron also released a second version with more functions implemented and a slightly different organization.
More A5/E5 questions
Jonathan Scott Duff asked a bunch of questions about the pattern engine, and got a bunch of answers.
In brief
Leon Brocard wondered if the concatenation bug was fixed yet...
Leon also offered a patch implementing chr, reckoning that if we
have ord, then symmetry demands chr. Dan applied it, and Jerome
Quelin found a bug in his Befunge-93 interpreter which he thought was
a bug in the chr implmentation, but turned out not to be.
The Perl 6 compiler now does interpolated strings. Kudos to Joseph Ryan.
Josef Höök had a problem with key_next not behaving as
expected within multiarray.pmc. Tom Hughes pointed where expectation
and reality differed, and harmony was restored.
Kevin Falcone patched the glossary to include a definition of ICU.
Mike Lambert is having problems with the Perl 6 compiler under Windows. Sean O'Rourke can't duplicate the problem. Anyone else tried this? More information is welcome.
Ken Fox and Damian continued their discussion of how one would munge the current Perl 6 grammar.
John Williams wondered about doing reduce with ^+=. Damian can't
remember what side he argued when it came up last October, but is now
of the opinion that John's suggestion is a good idea.
Mr Nobody suggested some changes to the Apocalypse 5 pattern syntax for reasons of length. Consensus seems to be that these changes aren't a good idea.
Who's who in Perl 6
- Who are you?
- I'm Dan and ... I design virtual machines.
- What do you do for/with Perl 6?
- I'm designing the virtual machine to compile and run it.
- Where are you coming from?
- A place about 70 miles east of here.
-
I started fiddling with computers with an Atari 800 (fully decked out with a massive *48*K of RAM!) a long, long time ago. That lead me to Atari BASIC, then to 6502 assembly, then to Forth. Then (briefly) to college and Pascal and PL/I running under VM/CMS on an OS/370 system.
-
From there I bounced to COBOL (on both RSTS/E and OS/370) and OS/370 assembly, and then to C under RSTS/E. I disliked C on first sight (so of course that's what I spend most of my life writing now), and it didn't get any better on my Amiga, though AREXX there was rather nice. Wrote an article on AREXX for one of the now-dead Amiga magazines, too.
-
My first real job in the industry was maintaining a horrid app written in BASIC on RSTS/E (with the new bits written in BASIC/PLUS 2.6, which was a nice dialect of BASIC, and something I still like better than C) and helping write a new system in Progress on Unix boxen. (DG AViiON systems with the 88K series processor. Now there was a sweet, and alas, now dead, RISC processor)
-
That lead to writing C and SQL code on a VMS system, at which point my fate was sealed, and I've been doing VMS admin and programming ever since.
-
I first encountered Perl when looking for a guestbook for a webserver we were running on one of the VMS boxes. It was, of course, written in Perl, which meant grabbing a copy of perl. It was one of the 5.003_9x releases, and since Dec C was significantly pickier than any other C compiler at the time, I started shooting patches for it to Chip.
-
That lead to my first XS module, and then to the second, and third (and eighth, and tenth, and...). Oddly enough, I wrote my first piece of Perl code about six months after my first patch to the perl core (Charles Bailey wrote the Perl pieces for the first module I did, and chunks of the XS) I ended up with the VMS maintenance hat for a while, which has since been passed on, and I got snared by the fun that was the first threading attempt for 5.005.
-
I ended up volunteering to coordinate the Perl 6 development at TPC 4, since everyone more competent had the good sense to run screaming away from the job, and I've had it ever since.
- When do you think Perl 6 will be released?
- When it's done.
- Why are you doing this?
- Beats the heck out of me. Someone's got to.
- You have 5 words. Describe yourself.
- Tall enough, under the circumstances.
- Do you have anything to declare?
- Yes, absolutely.
Acknowledgments
This summary is dedicated to the memory of Gizmo, a cat of great character, who we had to have put down on Saturday at the age of 17.
Chris Ball, Mark Fowler and Pete Sergeant helped with proofreading this week. Thanks chaps.
Once again, if you like the summary, please consider giving money to the Perl Foundation at http://donate.perl-foundation.org/ -- your money will go to help fund the ongoing development of Perl 6.
This week's summary was, once again sponsored by the O'Reilly Network who are paying the publication fee for the article directly to the Perl Foundation.

