This file is part of the Perl 6 Archive

Note: these documents may be out of date. Do not use as reference!

To see what is currently happening visit

Perl6 Summary for the week ending 20020804

Back on the regular schedule complete with new and improved article links via those lovely people at Google groups. Hopefully we'll be staying on this schedule for the foreseeable future.

As usual, we'll kick off with perl6-internals, which was, once again, the busiest group this week.

We need more ops

This thread rumbled on (slowly) with a mixture of serious and humorous messages. Melvin Smith worried that parrot would turn into "a Linux kernel and forever accumulates custom ops, PMCs.".

The appropriately named Eric Kidder proposed ':-) the Positivity operator. Nobody threw peanuts.

of Mops, JIT and perl6

This thread kicked off the week before, but carried on into this week. Leopold Toetsch had got some MOPS numbers for various bits of parrot, including the perl6 mini language. Dan wondered if the perl6 numbers included the time to generate the assembly and assemble it, because the assembler is 'rather slow'. Sean reckoned that, compared to the parser, the assembler was quick and that he suspects that even without that the perl6 numbers "would suck, since the compiler does some pretty heavy pessimization." Melvin Smith reckoned that imcc may have had something to do with the slowness as well, because it didn't do the right thing with loop invariants, but that "Things can only get better".

Leopold then told us that the numbers were pure runtime and that the compilation phase added 2.3 seconds to the whole process. Ick. However, following a bugfix to perlarray.pmc he posted new numbers that were "not that abysmal", and that we already have the same MOPS as perl5...

Dan Sugalski is back

And it's like he never went away. At the top of his list is catching up with his mail, sorting out keys, defining the extension mechanism, the exception infrastructure, ruthless efficiency and a fanatical devotion to the Pope.

He also suggested that if someone were to implement the cmpi and cmps ops for integer and string comparison, then that would be a good thing. Sean O'Rourke asked a bunch of questions about that, and the semantics of 2 < $i++ < 23 were discussed[] -- Start here.

Regex speedup

Angel Faus has been working on the regex engine and provided a patch for it, "designed with the single goal of seriously cheating for speed.". Dan applauded and claimed to be feeling "decidedly superfluous", but wondered if Angel could use the -u or -c switches to diff next time.

Also on the regex front, Stephen Rawls offered some better documentation of the regex subsystem.


Nicholas Clark released a "very minimal" ARM JIT framework. The initial version only JITed a small number of trivial ops, but it's the framework that was important. Daniel Grunblatt sent Nicholas a copy of the work he'd done in that area and we ended up with a new, unified patch that handled a whole lot more ops, and which wondered where the PPC JIT had got to. It turns out that Daniel is working on that too. Go Daniel.

On the subject of JITs, Jarkko Hietaniemi, fresh from his trials as the perl 5.8 pumpking popped up with a survey of the state of the JIT art in parrot. Apparently we're still missing PPC and POWER, MIPS, HPPA and IA64. Jarkko intends to "do nothing on these except raise gui^H^H^Hawareness :-)". Which is nice of him.

Nicholas also wondered if he was "allowed to write ancillary functions I want the JIT to call in assembler?" Dan reckoned that, in a JIT, "evil things for speed reasons are almost obligatory."

lexical scope ops, test and example

Jonathan Sillito offered a patch which implements lexical pads and some ops to manipulate them. Stephen Rawls pointed out a bug in the implementation, and Dan agreed that it was a bug but that once that was fixed the patch should go in because "it gets a good chunk of the semantics we need." (Speaking as someone who keeps making noises about implementing Scheme in parrot, having parrot native lexicals will be a *huge* win.). So, Jonathan fixed it, and Melvin applied it.

This led Jerome Vouillon to wonder if we actually needed explicit lexicals and scratchpads. The thread is rather tricky to summarise so I'll just point you at it. However Dan chimed in to say that, for now at least, he'd rather keep the separate interface to lexicals and globals because it would make changing the implementation possible without breaking existing bytecode.

Unifying PMCs and Buffers for GC.

Dan has accepted that we need to unify PMCs and strings/buffers for GC purposes, and asked for volunteers. Mike Lambert stepped forward (or maybe everyone else took one pace back). Again, this thread is hard to summarise because it's so information dense. If you're interested you should read the whole thread.[]

Negative indices in arrays.

Stephen Rawls wondered about what happened when someone did @foo = (1,2); @foo[-3]. This is an error in Perl5. As Dan put it, so elegantly, "Larry? Semantic call for you on the white telephone." Larry has, so far, not responded.

resize_array (PerlArray)

Aldo Calpini discovered that the parrot equivalent of @foo = (1,2); print @foo[9999]; would magically extend @foo to contain 10000 elements. Which isn't exactly ideal. This span off into a discussion of autovivification, especially with nested arrays. Dan pointed out that Perl 5's current behaviour when you do, say, print $a[10000][0] is an artifact of the way multi dimensional arrays work in Perl 5, and that most people would be happy if it went away in Perl 6. (Personally, I'd be happy if it went away in perl 5.9, but that's another mailing list.)

sub/continuation/dlsym/coroutine cleanup

Sean O'Rourke offered a patch which "implements native extensions and continuations as PMCs. It also cleans up the existing Sub and Coroutine types", and removes a load of now obsolete ops that are now handled through invoke. For some bizarre reason, SpamAssassin thought his message was infected with Klez. Which isn't good.

The patch doesn't handle lexicals automatically yet. This may be good or bad, we haven't reached consensus yet, and Dan hasn't settled on a position either. Jerome Vouillon suggested a couple of changes, and Sean O'Rourke agreed. Nicholas Clark wondered if this meant that loop variables would only have to be allocated once; which looked nice.

Meanwhile, over in perl6-language

Phew. I always like it when I get to switch lists. It generally means the finish line is in sight because perl6-language is usually a lot quieter than p6i. (My how times have changed; I'm really glad I wasn't writing the summaries back in the RFC days...)

"A light and refreshing summer fruit salad"

That's how Miko O'Sullivan described his collection of ideas for the Perl6 language. At least one of his proposals is already implemented in perl5, but it still sparked a lively and generally interesting thread. Especially when Damian started doing tricks with operator definitions and grammar munging. Trey Harris proposed the rather wonderful no strict 'physics', which made me smile. Damian also points out in this thread that the new, Perl6 word for `regex' will be `rule' because, well, they're no longer regular, and they'll often live in grammars.

Damian also mentioned that there was some thought of making composite objects the topic within their subscript brackets, which would enable some powerful slicing operations: @public = %hash{ /^(<-[_]+>.*)/ }; anyone? There's some debate as to whether this would violate the principle of least surprise though.

Use of regular expressions on non strings.

David Whipp wondered about using regular expressions (that's `rules' now, of course...) on none strings, and wondered about using them to query databases. (It would appear to me that, if you tied a database to a hash, then Damian's proposed slicing syntax above would be a start down that road, implementation could be tricky though...)

In Brief...

Sean O'Rourke told us that the his perl6 parser/compiler/all round groovy thing, now works with perl 5.005_03 and with 5.6.1, but that it didn't play well with 5.6.0.

Remember RECALL, and how it got renamed to AVOID? Well, actually, it didn't. It got renamed to AGAIN, but Tanton Gibbs had a brain fade when he typed the subject line of the submitted patch. -- Stephen Rawls offers patches for and introduces an script, intended to make the business of setting up a new PMC type that much easier. Michel Lambert offered a 'Getting Started' FAQ

Simon Glover posted some code that makes GC segfault. Richard Cameron fixed it. Mike Lambert applied it.

Angel Faus offered a patch to make imcc take into account the data-flow info it gathered. Melvin Smith applied it.

Jarkko has been doing sterling work on getting parrot to compile on SGIs, and generally tidying up code.

Brian Ingerson patched to allow it to accept code on STDIN. Applied.

Jason Gloudon offered a patch which revised the JIT docs, and added some stuff to the SPARC JIT overview. He also changed the way the x86 JIT invoked functions. Applied

Josef Höök offered a matrix implementation. Warnock's dilemma applies. You can find the patch at if you're interested.

Sean O'Rourke pointed to

Aldo Calpini offered docs for the parrot debugger.

"Mr. Nobody" has patched things to allow Configure to run on Windows 9x. Applied.

Nicholas Clark wondered what to do about right shifting signed integers. Nicholas reckoned that sign extending signed types when doing right shifts was the Right Thing.

Daniel Grunblatt has committed a register allocator for the JIT. Not optimal yet, but it's a start. Nicholas Clark was impressed. So were the rest of us, probably.

Simon Glover has added some more tests of the GC ops. Applied.

Mark J. Reed gave the language crowd and update on Unicode, UTF-16 and Java.

Leon Brocard, who I thought I wasn't going to be able to mention this week, announced the publication of his targeting parrot slides to the list. But I told you about those last week, so maybe I shouldn't have mentioned Leon this week after all. Hmm...

Who's who in Perl6

  • Who are you?
  • Josef Höök

  • What do you do for/with Perl 6?
  • Working with matrix and multidimensional array implementation in parrot.

  • Where are you coming from?
  • Sweden

  • When do you think Perl 6 will be released?
  • 1 year

  • Why are you doing this?
  • It's fun and i learn a lot.

  • You have 5 words. Describe yourself.
  • icant, that was only 2words

  • Do you have anything to declare?
  • nope

Acknowledgements, threats and funding drives.

This summary was once again prepared with the aid of GNER tea, and with the unwitting assistance of the fine folks at Google, who provided me with a way of generating links to articles that don't require me to surf the fine web in order to work out what the URLs should be.

Once again, if you didn't like this, don't read it. If you did, consider donating some of your hard earned money (or your employer's hard earned money) to the Perl Foundation at and help support the ongoing development of Perl 6. If you're going to donate $100 or more in response to this summary, please let me know and I'll give you a mention in the acknowledgements. If you're going to donate $250 or more, again, let me know and you'll get a "This week's summary was sponsored by Joe Bloggs" (for appropriate values of "Joe Bloggs") at the top of the summary.

Sadly, nobody has yet sent me a T?iBook, which is probably a good thing; I'd only want a pony next.

Google is almost certainly a trademark. I should probably mention that shouldn't I?