This Fortnight in Perl 6, November 16-30 2004


Welcome to yet another summary. Although Aliya is present for this summary, I think the unnamed gecko with its tongue out will be the one who is helping to bring it to you, aided of course by Nicola Conte and Massive Attack. Rather than try to do something witty about the strange music I am listening to, or the stuffed animals who are assisting me, I will start this summary off with an entirely self-serving request. <abuse>A while ago I saw the quote, “Computer Science is merely the post-Turing Decline of Formal Systems Theory,” without an attribution. I have tried to find an attribution for it, but have been unable to find one. If any of you know it, that information would be appreciated.</abuse>

Without too much further ado, I give you Perl 6 Language.

Perl 6 Language

Return Values from a Substitution

Nicholas Clark wondered what kind of return value the s/// operator would return. Larry provided the answer: a match object that does wicked, smart things based on context (Boston is getting to me).

Deep Operators

Matthew Walton wondered about deep operators and return types. No answer yet, but it is still a little early to call in the awesome forces of Warnock.

Perl 6 Compiler

The race between Google and the compiler is over and Google loses. Badly. While, alas, I do not have a pretty interface, you all have links from, plus a nifty infant grammar engine to torture.

Parrot Grammar Engine

Patrick R. Michaud (forever after known as Patrick) released a first version of the Perl 6 Grammar Engine (P6GE). Sometime later, he renamed it the Parrot Grammar Engine, as it will be standard in Parrot and PGE sounds better. He asked for people to poke and prod it. Many people did, with quite some glee. Some work has been done adding it to the Parrot build and making it use Parrot’s Configure/make system, as well as some cross-platform cleanups. Patrick also put out a request for tests and explained the basic framework already in place. He also explained his short term plans.

Synopses and Apocalypses

Larry has managed to persuade to host the latest and most up-to-date versions of the Synopses. Consider the former link deprecated. Larry also mentioned that this should probably wait a little while before it hits Slashdot. Dan put a desperate plea not to also, as “I feel obligated to actually *read* the comments on Parrot and Perl 6 stories on Slashdot, at 0.”

Parrot Internals

Having fought my way through the lack of Google, I can now return to its calm, warm tones and convenient threading.

RT Data Extraction

Will Coleda pointed out that he has the mystical power to extract and summarize data from RT automatically. Then he asked for suggestions about how to use this power for good or for awesome.

Locating Shared Libraries

Adam Warner has some trouble locating shared libraries on Debian. Leo pointed out that Debian apparently names these libraries funny things. The he added support for symlinks and asked Adam to provide the appropriate symlinks.

Double v. Float

Adam Warner played around with the Leibniz summation for pi example, but could not get it to be more precise than 3.1431591. It turns out that the print opcode was at fault and that sprintf worked better. In fact, it allows you to print more precision than you actually have. Ain’t life in the floating point world a pain? We should all use integers, where pi is exactly 3.


The ongoing thread of three-letter acronyms finally seems to have run its course, ending in a climactic upgrade to Perl 5.8.5.

New Calling Scheme Proposal

Leo posted a new, calling scheme proposal. Dan stomped on it hard, then posted an updated version of PPD03 (calling conventions). People spent some time fleshing out every little corner of the new doc.

Parrot BASIC and Blacklists

Joshua Gatcomb kindly acted as a intermediary between the list and Clinton A. Pierce. Apparently has blacklisted Clinton’s domain and ISP. He would be willing to resume work on it, but he would like help, and/or to be un-blacklisted. There was no real answer to Clinton’s troubles. On a side note, my old email provider,, also occasionally gets blacklisted by (it seemed to go in fits and starts).

CVS Access for Parakeet

Michel Pelletier was wondering if he could have CVS access to the Parakeet language directory now that he has a username (michel). Dan said that he had forgotten to mention that he had put in a request, and he would likely forget to mention when the request went through.

Return with Return Continuation

In the confusion of what not to change and what to change, the op to return to the caller by invoking the current return continuation disappeared in the shuffle. After sorting out the fact that Dan wanted it to go in, Leo added it, naming it returncc for lack of anything better.

Parakeet Broken

Jeff Horwitz noted that Parakeet did not quite work. Leo pointed out that Parrot had outflown Parakeet and it needed to catch up with the new eval changes.

Deprecation of P0, P1, P2

Leo sent a warning to the list that, as per PDD03, access to the current continuation and sub should only come from the interpinfo ops. Usage of P0 and P1 for these things is officially deprecated and soon to be discontinued. Also, P2 current object came along for the ride later, which caused troubles with imcc’s self macro. Later, he removed the deprecated things.

Main Is Just a Sub

Leo has coerced main into looking and acting exactly like any other sub. Consistency is nice like that.

Continuations, Basic Blocks, and Register Allocation

The thread of the week last week continued strong into early this week, slowly but steadily clearing up misconceptions of certain summarizers who would like to remain anonymous. Also, later in the week, Bill Coffman provided a summary of the problems and ideas thus far. We all eagerly await the resolution.

m4 0.0.10

To keep up with the aforementioned eval changes, Bernhard Schmalhofer provided some m4 improvements.

Lightweight Calling Conventions

Dan, Leo, and Patrick had an interesting discussion about the speed of various calling conventions. While BSR/RET beats continuations, continuations with tail-call optimization beat BSR/RET; however, BSR/RET with tail-call optimization edges out continuations. In the end, the PGE will be agnostic to calling conventions so as to provide a real-world test for benchmarking. Either way, fear the Big Sweaty Russian (ask Mike Z if you want to know ;-).

NCI Signature Correction

Last week I incorrectly claimed that the d signature allowed access to a raw buffer. I was wrong, it was b. Thanks for the catch, Bernhard.

Void Functions Don’t Return Things

Andy Dougherty noticed that matchrange.pmc attempted to return something from a void function. He supplied a patch, but there seems to be no response….

Perl6 --tree

Gerd Pokorra submitted a patch to fix a problem with perl6 --tree. Warnock applies.

ResizableIntegerArray Needs Soda

Patrick requested that someone provide the wonderfully amazing ResizableIntegerArray pop. Once that is done, PGE should switch from using a PerlArray to a ResizableIntegerArray. Patches welcome.

No perldoc => WARNING

James deBoer provided the previously requested patch for doing the right thing when there is no perldoc present. Leo applied it.

Broken Benchmarks

The great thing about breaking benchmarks is that if you do it right, your execution time goes from a big number to nearly nothing. It provides one hell of a speed up. Unfortunately, it also means they don’t work. Alas, such is life. Fortunately Leo provided an explanation, if not a fix.

MMD with Native Types

Leo voiced his confusion about MMD_ADD_INT. When Leo is confused, I worry.

Polymorphic Inline Caches (PICs)

Leo posted some interesting stuff about PICs and provided some preliminary benchmarks. He also provided a link to the article from which he drew the idea.

Mac OS X.2 Failures

Klaas-Jan Stol noticed that failed on his 10.2 installation. He asked for help, but no one has responded yet.

Inconsistent opcode Names

William Coleda noticed that we did not consistently use_underscores or pushwordstogether. Everyone agrees this is a problem, so we are probably just waiting on a brave soul who can make the necessary sweeping change. I think that underscores_won_out.

Tcl Supports Lists

Will Coleda added basic list support to Tcl. Then he threatened to do more with it. I, for one, welcome our new list overlords.

Build Problems on PPC Linux

chromatic (whose name Google rudely capitalizes) had some trouble building Parrot on PPC Linux. No resolution yet.

New TODO Items

Will Coleda added some new TODO items.

Intellectual Property

Tim Brunce asked how Parrot was handling IP concerns. Dan told him that we have lawyers working up “Real Paperwork” even as we speak. In the meantime, it is mostly an honor system.

1 - 2 == BOOM

Will Coleda found a bug in MMD. Leo took responsibility and submitted a fix.

Escaping Strings

Patrick wondered if some code sitting around would properly escape a string into a nice, clean form. The answer is yes, use Data::Escape.

Bug in Method Calling with nonconst Keys

Luke Palmer found this bug. Leo fixed it.

Underscores on Subs

Luke Palmer wondered if subs still had to have _ before their names. Leo provided the answer: no, and the docs are out of date.

Silent Effect of opcodes

Leo noted that opcodes with silent effects need a little more special treatment. This morphed into a conversation about the continuation troubles that have been haunting us all and exceptions, too.

IMCC Tracing, Leaving Subs

Will Coleda asked if it would be possible to indicate what route Parrot would return to after a returncc opcode. Leo liked the idea and put in a quick hack for it, which needs cleanup.

Threads, Events, and Win32 (Oh My!)

Gabe Schaffer continued to explore the problems and approaches to portable threading with Leo’s help. Best of luck, guys.

IMCC Register Mapping

Will Coleda noticed a possible optimization with register mapping. Leo said that it was not that simple, but it would be implemented at some point in the new register allocator.


Exceptions hurt my head, especially Dan’s description of them. Thus I will just leave you to read it for yourself, so your head can hurt, too.

Missing Makefile Dependencies

Leo noticed that the Makefile is not quite right about its dependencies. This frequently recurs.

JITted vtables for Sparc

Stéphane Peiry provided some more JIT support for the Sparc. Leo applied the patch.

PGE Namespaces and Names

Will Coleda, Luke Palmer, Jerome Quelin, and Patrick all worked to clean up PGE to have its own namespace and consistent naming.

Parrot_compreg Signature

Bernhard Schmalhofer noticed that Parrot_compreg had a different signature than documented, so he submitted a patch to fix it. Leo applied it.

opcode Numbering

Leo added a TODO ticker for opcode numbering.

Tests Pass, but Create Core Files

I reported that on my machine all of the tests claim to pass, but core files appear in the parrot directory. Dan confirmed my suspicion that this was a real problem. I tried to supply helpful information like back trace, but Warnock applies.

pcc Cleanup

Leo removed the recently deprecated P0, P1, P2 usage. Relatively few tests break as a result.

Namespace-Sub Invocation

Luke Palmer wanted to know if there is syntax for calling subs from a particular namespace. Leo provided the answer: call it as a method on the namespace PMC.

Reserved Words Annoy

Luke Palmer wondered if he could define a .sub "new" to get around reserved word problems. Leo added the support, but warned him not to use “spaces or such.”

Lexicals, Continuations, Register Allocation, and ASCII Art

This thread (and the ones that preceded it) have made me wish that Gmail and Google Groups had a fixed-width font option. Sadly, this summary will probably not get me it, as it did not get me p6c either. Ah well. The problems associated with lexicals and continuations churned. There was a plea for guidance from Dan. Hopefully he will guide us shortly.

Old Parrot Question

Bloves had a question about in the Parrot 0.0.1 source. Warnock applies.

Parrot on Linux PPC Build

chromatic managed to track down some of the PPC build issues for Linux. Leo wondered where all of the config hackers went. I think Leo wants someone to fix it.

Preprocessor Problems

Flavio S. Glock noted that the preprocessor did undesirable things. Leo suddenly realized that it was woefully out-of-date and need major fixing/disabling. Flavio submitted a small patch for it, but Leo pointed out that this was not enough to actually fix the preprocessor.

New push_eh opcode

Leo added a new push_eh opcode and deprecated the old set_eh.

TODO and RT Wrangling

Will Coleda continued his stellar work managing the RT queues. Brent “Dax” Royal-Gordon patched the first one.

PMC Does “hash|array|monkey”

Will Coleda added a ticket for the does functionality. He promptly closed it when Leo pointed out that it already existed in the form of the does op. So Will up and started using it.

Strings Are In

Dan announced that the last of his string stuff was checked in and he would like brave souls to help him merge it back into the tree.

Language TODO Tests

Will Coleda thanked Josh Wilmes for fixing the Language TODO tests. Apparently one of Tcl’s has mysteriously started working.

Minesweeper Broke

Jens Rieks noticed that somewhere in the shuffle minesweeper broke. As a professional minesweeper-er, this shocks and offends me. Leo offered a pointer as to where to start looking to fix it.

@ANON Subs

Leo added some support for anonymous subroutines. People liked them and began to use them. Luke Palmer promptly tried combining it with @IMMEDIATE and began to wonder if it were immediate enough.

Parrot Grammar Engine Issues

I think that I shall continue to spell out PGE for a little while, but I may decide to use only the acronym in some later summary without warning, so be prepared. Oh right, the whole reason I mentioned it in the first place … Will Coleda pointed out a few issues, including (1) doesn’t compile by default and (2) doesn’t compile at all. Nicholas Clark fixed (2), and Patrick figured that (1) could wait until it was a little more mature. Personally, I feel that maturity is overrated, poo-poo head.

(Java|ECMA)Script on Parrot

David “liorean” Andersson wondered if there were any projects to run JavaScript on Parrot. While there does not appear to be, many people think it would be a good idea and offered useful pointers.

Rules Engines

Cindi Jenkins posted a link to an interesting blog entry on rules engines. Unfortunately, I think she posted it to Google Groups as it did not find its way onto the list. Also, unfortunately, it is a post about logic rules engines a la Prolog and not grammar rules. Who knows, though, there might be some overlap….

PIR Examples on the Website

Herbert Snorrason noted that there were no PIR examples on the website and opened a ticket for it. Will took a first pass at it.

testj string_102 Issues

Luke Palmer found a subtle-looking problem in string_102.pasm. Leo couldn’t reproduce it and suggested that it might be a Red Hat thing. Peter Sinnott chimed in with a possibly unrelated failure, also on Red Hat.

Tuning and Monitoring

Matt S. posted a question about how much internal tuning and monitoring Parrot will allow. Unfortunately, I think he posted it to Google Groups, as it didn’t show up in my inbox. I am honestly not sure how much is available or in the works.

Missing directory in MANIFEST

Andy Dougherty submitted a patch fixing a missing directory in the manifest by allowing to add it.

Objects, Classes, Metaclasses, and Tall People’s Heads

Dan posted a refresher on the current state of the object system. He then went on to explain where it was headed and conjectured that this would be enough. Just reading his description of it hurts my head enough that I do not wish to guess if he is right or not.

eof opcodes

Brian Wheeler wondered why there was no “eof” opcode. Leo told him that it was a method on a PIO object. Apparently most of the IO opcodes should actually be PIO methods. Go figure.

Ops to Deprecate or Not

Leo attempted to trim down the core by removing some opcode variants. Dan did not appreciate the change and told Leo to roll it back. Fortunately, Dan went on to explain the longer-term goal (which should satisfy Leo).

Perl 6 Language

Deep Operators

Last week, Matthew Walton wondered about Deep Operators and if they would work as he expected. As I tentatively predicted, the answer came back and was “yes.” Then the thread got sidetracked with context and Perl vs. perl vs. PERL concerns.

Gather to Separate Bins

Dave Whipp wanted to know if he could use gather/take with multiple bins. Michele Dondi suggested using adverbs for it. Rod Adams pointed out that as gather is inherently lazy, the two-binned approach could cause strange results (like churning for a while, filling one bin, and trying to get an element for the other). Of course, not being able to do it would mean possibly having to compute an expensive generator function. This is more than necessary, unless it is memorized….

<< In Here-Docs

Thomas Seiler has decided to test my copy-paste-fu by starting a discussion on characters that don’t appear on my keyboard. His question was if <<END could start a here-doc. The answer appears to be “no.”

« != <<

The above thread led to a discussion of the various quoting operators, and the differences between «»and <<>>. This led to much discussion on the finer points of qw, qx, and qq (among others). Juerd suggested scrapping qx and qw in favor of qq:x and qq:w, which Larry liked. Rod Adams suggested scrapping <<END in favor of qq:h/END/, which I like.

Unifying Namespaces

Alexey Trofimenko wondered about unifying the $, @, and % namespaces. Larry told him that this ship sailed long ago and that it was not changing.

Lexing/Parsing Perl6 Without Executing Code

Adam Kennedy wants to be able to syntax color (and possible perform basic programmatic manipulations of Perl 6 code). Anyone who has used a good IDE like Visual Studio, Eclipse, or IntelliJ probably understands where he is coming from. He does not, however, want to execute arbitrary code in the process of doing this. Much discussion ensued, but it does not look like he will be able to do this. Quite the tragedy, but Perl is simply too dynamic for the docile lexing of static languages.

Perl6 Compiler

Nice Work

Nick Glencross has the honor of the only message on p6c this week, but his sentiment is shared by all. Nice work, Patrick.

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