This Week in Perl 6, July 20-26, 2005


Welcome to another Perl 6 summary, brought to you by microwaved Chinese food and air conditioning. I love the modern era. Without further ado, I bring you:

Perl 6 Compilers


Grégoire Péan announced the release of PxPerl 5.8.7-3, allowing easy access for people who want to play with Pugs and Parrot on Windows.

Test Report for Windows

Ronald Hill reported some failing tests for Pugs on Windows. Fortunately, given Pugs’ development, there is a reasonable chance of having these problems fixed. Unfortunately, given Pugs’ development, no such information made it to the list.

Parsing Perl 6 Rules

Nathan Gray wondered how Jeff Pinyan’s parsing-Perl-6-rules project was going. Jeff said that it did not get very far, but he posted what he did have to his feather site.

Pugs Problems

Vadim Konovalov found two problems while playing with slurp. Adriano Ferreira showed him how to work around slurp not accepting a :raw option. Nobody commented on the peculiar $*ARGS[0] value when the argument is -foobarfluffy.

Official Perl 6 Rules Grammar

Patrick announced an “official Perl 6 grammar,” which he will maintain closely with PGE in Parrot. It is incomplete at this point, but patches are most welcome.

PIL Nodes Descriptions

Allison Randal posted a request for a clue batting, listing various types of nodes in PIL and explaining her guesses at their descriptions. Stuart Cook and Patrick both provided a little help, although they did not address everything on her list.

Perl 6 FAQ Patch

Autrijus provided a patch for the Perl 6 FAQ to remove an outdated question. Robert Spier applied the patch (modulo some confusion about staged versus live copies).


Opcode Optimizability

Curtis Rawls noted that it is often simpler from an optimizer writer’s standpoint to do constant folding and optimization on a smaller set of opcodes (just one variant of add instead of five (seven, if you count inc and dec)). Leo explained that removing these opcodes isn’t an option, but suggest to add to the FAQ the recommendation for compiler writers to emit only the more verbose codes.

Refcounting Hash

Nicholas Clark wants to use a hash to hold reference counts for Ponie (something like dod_register_pmc in pmc.c), but he doesn’t want to duplicate code. Leo suggested that he move some of the code into a PMC and then switch the real registry to use that PMC.

New PGE Test

Mitchell N. Charity submitted a test for a “large” Pugs grammar. It currently fails. Patrick noted that the test likely came from in the Pugs distribution. This probably led to his above addition of an “Official Perl 6 Rules Grammar.”

JIT Emit Help

Adam Preble decided that he would play with an x86_64 code generator. Unfortunately, he hit some stumbling blocks. Leo offered to help him and provided pointers from #parrot.

Call Opcode Cleanup

Leo wants to clean up some of the various invoke opcodes. He posted a request for comment, but Warnock applies. It seems that Leo’s requests for comments like this get Warnocked a lot.

spawnw Return Value

Prompted by Jonathan Worthington submitting a patch to make the spawnw tests pass on Windows (applied), Jerry Gay opened a TODO ticket for switching spawnw to return something object-like to wrap platform-specific oddities.

Bugs in

Amir Karger noticed a bug in and suggested a fix. Jerry Gay fixed it.

Leo’s Ctx Branch Tests

Jerry Gay and Leo worked together to get his branch passing a few more tests on Windows. Nick Glencross wondered if the Python dynclasses tests were running, too. Jonathan Worthington explained that they were being skipped for the moment.

Raised by the Aliens

Matt Diephouse was surprised to discover that you cannot use addparent with a PMC for either argument. He suggested that either should work or should have official documentation.

Patches Accumulating

Leo requested that people with commit bits pick up some of the patches that were building up, as he was running a little low on tuits.

Dump CFG

Curtis Rawls moved the dump_cfg call from reg_alloc.c to cfg.c. Leo applied the patch.

string_to_cstring Leaks

Jonathan Worthington plugged a few leaks caused by string_to_cstring. Leo applied the patch.

Deleting Globals/Lexicals

Matt Diephouse noted that there was no way to delete globals or lexicals. Leo posted one (untested) way to do it.

Generating Win32 Executables

Jonathan Worthington laid some groundwork for generating executables on Windows. Leo applied the patch.

Library Loading on Win32

Jonathan Worthington beefed up the library searching logic in Parrot to be a little more Windowsy. Leo applied the patch.

PBC Merge Utility

Leo posted a request for a utility that could merge several PBC files into one.

Calling Super Methods

Matt Diephouse noticed that there was no way to call the method from a super class. Leo pointed out a way to do it by accessing the slots of the parent directly.

cmd Buffer Reallocation

Greg Bacon fixed a bug in the reallocation of the cmd buffer on Win32. Jonathan Worthington applied the patch.

Data::Dump (PGE)

Will Coleda added a TODO for making PGE’s match objects compatible with Data::Dumper.

does Hash

Will Coleda wants Data::Dumper to check if an object does Hash or Array and dump it thusly if it has no default dump.

rx.ops’s Future

Will Coleda wondered about the future of the rx ops. Brent “Dax” Royal-Gordon, who wrote them, recons they are not long for this world. He mentioned though that the intstacks and the bitmap handling code might be worth saving.

Debugger-List Breakpoints

Will Coleda noticed that the debugger was not quite compatible with Perl’s. Leo replied that the debugger’s whole command loop was a mess that required a turn of the crank.

\u Escape Issues

Will Coleda brought up an old ticket for some Unicode escape issues. Leo asked for a test case.

string -> int Conversions

Matt Diephouse noticed that there are no opcode octal and hex conversions. Leo suggested adding one of the form set Ix, Sy, Ibase # Ibase = 2..36.

Make make languages Failures Non-Fatal

Bernhard Schmalhofer suggested that make languages should not give up after the first failure, but should instead build the remaining languages.

Dynclasses on Windows

Nick Glencross and Jonathan Worthington discussed how to make dynclasses build on Windows.

Resizable*Array Allocation

Matt Fowles submitted a patch making all the various Resizeable*Array PMCs share their allocation strategy. Bernhard Schmalhofer applied the patch.

MMD Roundup: Take 2

Nicholas Clark attempted to de-Warnock a suggested change by Leo. Unfortunately, his thoughts on the matter were, “This is really a call for the designer to make, isn’t it?” Leo suggested starting a WARNOCKED file for these things. Will countered that adding it to the DESIGN section in docs/ROADMAP, would mean that Chip needs only look in one place.

Parrot Failures on Mac OS X

Nicholas Clark forwarded some failures on Mac OS X to the Parrot list (from the Ponie one).

Parrot Needs STDERR

Nicholas Clark noticed that running Parrot with a closed STDERR makes Parrot unhappy.


Alexandre Buisse and many others have been talking about his Generation Mark and Compact Garbage Collector. Plans are rapidly taking shape.

Perl 6 Language

User-Defined Context Behavior

Ingo Blechschmidt wanted to know how to make his own custom class that would act specially in list context. Thomas Sandlaß suggested overloading &infix:<=>. Sadly, his answer doesn’t seem to have made it to Google Groups.

Hash Creation with Duplicate Keys

Ingo Blechschmidt noticed that in Perl 5 hash definitions, the rightmost duplicate wins, whereas the leftmost wins in Perl 6. He wondered if this was a bug or not. Luke explained that it was that way for named variable bindings. Larry figured it should be that way only for named variable binding. If Pugs has not done it yet, some brave soul could probably add tests and find it implemented before they had finished committing.

Tail Calls, Methods, and Currying

Brent “Dax” Royal-Gordon wondered about tail calls, noting that the current method ($obj.can('meth').goto($obj, *@args);) is kinda ugly. Larry mused that return g() should go ahead and tail call. If the code does not want a tailcall there, then it should avoid it manually.

Pairs and Binding Play Poorly Together

Autrijus noted that pairs and bindings (such as in a for loop) play badly together. Larry supposed that the Bare code object could have parameters of type Pair|Item (note no Junction) by default to solve this problem. Damian supported the exclusion of Junction.

Method Introspection and Meta meta.classes

Chromatic wondered about subroutine and method introspection. Sam Vilain thought he might want to look at Stevan Little’s Perl 6 MetaModel. He also talked about closing the loop on meta-meta-meta headaches. Apparently Smalltalk has done this somewhere.

Big Object Rethink

Larry posted a fairly major rethink of member variables and methods. Honestly I did not quite follow what he described, and there is a lot to summarize–Hey! Look over there! ::PUNT:: Nothing to see here, move along.

Garbage Collection API

David Formosa (after being lightly chastized by an unknown summarizer) started a new thread expanding on his desire for a GC API. I thought there were replies to this, but they don’t seem to have made it to Google.

Exposing the GC

Piers Cawley thought that it might be useful to expose the GC to get an array of all objects of a particular class. Brent “Dax” Royal-Gordon thought that the ability to get such an array would be useful, but that it should merely be an implementation detail of whether an array of weak refs or the GC or Harry Potter was invoked.

To post to any of these mailing lists, please subscribe by sending email to,, or 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 feedback to



Something wrong with this article? Help us out by opening an issue or pull request on GitHub