This Week on Perl 6, Week Ending 2004-05-02

So, May Day didn’t quite knock me for six this year (but being up at 4am on Newcastle Town Moor on Saturday morning to welcome in the summer with a bunch of rapper dancers is guaranteed to leave a chap feeling rather tired) so here’s the summary.

We’ll kick off with perl6-internals. Again.

GCC for Parrot

Vishal Vatsa announced that he was working on getting GCC to compile to Parrot as his masters research project. I’m sure we’re all wishing him the best of luck.

Parrot strings

Various discussions of the Right Way to do string handling continued. Dan clarified his Strings design docs and Jeff Clites posted a ‘Strings Manifesto’.

It seems, to this observer at least, that a big problem with dealing with strings is that there’s rather more than one Right Way to do things, depending on how you’re looking at the problem and what you’re trying to do. Dan’s problem is that he has to find some way of accommodating all the various contradictory things that people want to do to strings without making any of them unduly painful. (Not assisted by the fact that, in one last week’s documents he managed to graphemes, characters and glyphs slightly mixed up.)

Me? I’m punting on summarizing this properly. My theory is that if you know enough about this stuff to be of assistance then anything I say will almost certainly be an annoying simplification too far. And if you both know enough about strings and care enough about Parrot, you’re already involved in the thread. Hopefully there’ll come a point in the future when everything’s settled and this section of the summary will say “Strings got sorted at last, look at this URL for details”. – Strings Manifesto

Win32 and cygwin issues

There’s been a good deal of work this week on getting things building properly in the Win32 and cygwin environments. Ron Blaschke, ‘Limbic Region’, George R and Leo Tötsch all worked on things.$

NCI and ‘Out’ parameters

Mr ParrotSDL (aka chromatic) showed an SDL function signature that he wanted to use via NCI (Parrot’s Native Call Interface), but which didn’t work because it had two pointer arguments that were used by the function as out parameters. He proposed changing the NCI PDD (PDD16) to support this sort of thing cleanly. Leo, Dan, Tim Bunce and chromatic discussed the changes needed.

A little later in the week, chromatic posted a patch implementing something to solve the problem.

Joys of assignment

There’s been some discussion recently about what happens with assignment and/or binding, and the difference between value and reference types. Dan decided that the time was right to post a clarification of the issues as they related to Parrot.

Fun with md5sum

Nick Glencross’s idea of fun is, apparently, implementing md5sum in IMCC. He posted his first cut at an implementation. I think Leo’s response holds for all of us: “Wow”. Maybe I’m looking in all the wrong places, but so far it doesn’t appear to be in the repository, but it can only be a matter of time.

Return continuation register

Dan’s working through outstanding issues and tidying up loose ends. One result of this is that he’s been thinking about how the return continuation is handled. The new design (and calling conventions?) makes use of a return register in the interpreter structure, which gets saved as part of the environment that a continuation captures.

Library loading

Clearing up another loose end, Dan did some design of how we’re going to cope with loading libraries.

Keyed vtables and MMD

If you’ve been following the mailing list for any length of time (especially if you’ve been following it directly rather than summarized), you’ll be aware that there’s been a long running… discussion between Leo and Dan about the keyed variants of all the binary vtable entries: Leo worries that there’s a heck of a lot of ‘em; Dan worries that it means creating temporary PMCs in what should be simple circumstances.

It turns out that having *all* the keyed variants does rather get in the way of multi-method dispatch. So Dan’s mandated that get rid of the keyed variants for everything but get and set and move all the operator functions out of the vtable and into the Multi method dispatch system. He asked for comments…

It turns out that moving to MMD everywhere doesn’t seem to have any deleterious effect on performance, which is nice. In fact, in some cases it’s faster.

File stat info

Tying up another loose end, Dan specced out how stat is going to work. It was modified (slimmed down rather a lot) after discussion.

One more thing

Dan noted that, by going MMD all the way, it means we can skip the bytecode->C->bytecode transition for MMD functions that are written in Parrot bytecode and just dispatch to them as if they were any other sub.

MMD table setup semantics

Dan opened a discussion of what should happen when we add things to a Multimethod dispatch table. Discussion followed.

Double-checking compiler function parameters

Dan thought allowed about what a compiler module should look like and asked for comments. Leo and Stefan Lidman came through with some.

Pointer stores and DOD

Dan reckons the time has come to make sure that all stores of pointers to DOD-able structures into DOD-able places are done with a mediating function (or macro). The idea is that doing this will allow us to experiment with other Garbage Collection techniques without having to change vast amounts of code.

TODO: Forth as a compiler module

Dan laid down a TODO challenge: Your mission, should you choose to accept it, is to take languages/forth/forth.pasm into a loadable compiler module that you can compile workable forth code with. Go to it!

Outstanding parrot issues

Roll up! Roll up! Come and see the Ponie trainer and the Patchmonster engage in a free and frank exchange of views!

Well, maybe not quite that extreme. Nicholas Clark, Arthur Bergman and Leo Tötsch have had a long standing disagreement about how Parrot’s embedding works.

Because of the weekend falling when it did, you’ll get the resolution next week.

Meanwhile, in perl6-language

A12 Versioning

Richard Proctor isn’t happy with the A12 versioning proposal, and he said as much, outlining what he didn’t like about it. Aldo Calpini had some further comments. Larry came through with answers.

Compatibility with Perl 5

The discussion of how to write identify Perl 6 and Perl 5 scripts continued. Larry suggested moving to using : as the command line switch in Perl 6, so a minimal Perl 6 marker would be something like:

    #!/usr/bin/perl :
    #!/usr/bin/perl ::
    #!/usr/bin/perl :6

Jonathan Scott Duff doesn’t like using shifted characters to for commandline switches, so he suggested using = instead. Other options were suggested…

On inheriting wrappers

Aldo Calpini had some questions about using wrappers with methods, and whether wrappers got inherited. I must confess I didn’t quite follow the discussion, but Larry seemed to.

Hey look everyone, p6stories!

Now that we have Apocalypses 1-6 and 12, that could be seen as having most of the language done. So chromatic pointed everyone at the P6 stories Wiki and suggested that they join the effort of breaking the apocalypses up into stories and (hopefully) test cases, to help make the job of writing Perl 6 itself much easier.

How to parameterize roles

Austin Hastings wondered how/if he could implement a parameterized role. Luke Palmer had some answers, and some unsolicited (but rather useful) design advice. Aaron Sherman also had some design advice.

Announcements, Acknowledgements, Apologies

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 – The Perl Foundation – Perl 6 Development site



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