This week on Perl 6 (9/30 - 10/6, 2002)

This is yet another Perl 6 summary, documenting what has happened over on the perl6-internals (where Parrot, the virtual machine that will run Perl 6, is discussed) and perl6-language (where Perl 6 language design is discussed) mailing lists. Piers is off on holiday (snowboarding and parachuting, no doubt), so I will be your host for the next two weeks. A particularly average week, so let's start off with the perl6-internals list as usual.

Getting started guide

Erik Lechak offered to help write a getting started guide to Parrot - he thought (correctly) that there may be "a pressing need for a document helping newbie developers figure out how to get started".

Unfortunately, Erik isn't a big fan of POD and attempted to code up a better replacement. While POD may not be perfect, an awful lot of Parrot developers are also Perl developers and POD is simple and good enough for Parrot for now.

http://groups.google.com/groups

Debugger debugged

Juergen Boemmels noticed that hitting the Enter key in the Parrot debugger (pdb) caused a segfault and that this wasn't quite ideal behaviour. He provided a patch which ignored empty lines, and after a nudge from Aldo Calpini provided another patch which followed the suggested behaviour in docs/debugger.pod, instead repeating the last command entered.

http://groups.google.com/groups

Patch Master

The main patcher these recent weeks has been Leopold Toetsch, and he kept it up this week as well. He provided patches to stop Parrot permanently allocating increasing amounts of memory, fix a parser error in imcc, add stats to life.p6 and more. In fact, so many patches that I have a feeling he'll get CVS write access soon ;-)

New allocator

Leopold had a play with plugging in the Doug Lea memory allocator, providing a patch to configure in support for the current Parrot malloc, the Doug Lea malloc, or ptmalloc in libc. He also attempted to plug in Perl 5's malloc and found similar speed results. Later on, he created a document to explain memory internals, continuing the recent trend for more docs.

http://gee.cs.oswego.edu/dl/html/malloc.html

http://rt.perl.org/rt2/Ticket/Display.html

http://rt.perl.org/rt2/Ticket/Display.html

Patches, patches everywhere

There have been a lot of pending patches recently, and Robert Spier prodded us about them and hopes to have an automated weekly email nudge too.

http://www.parrotcode.org/openpatches

Library name collisions

Steve Fink reported a problem with library name collisions. For example, having intlist.c as well as classes/intlist.c and key.c as well as classes/key.c. Dan proposed a naming convention where classes start with a CL_prefix, encodings with an EN_ prefix and character set stuff with a CS_prefix, although it looks like a simpler solution may be taken.

http://groups.google.com/groups

core.ops ate my (miniscule) RAM

David Chan is using an itty bitty box (Cyrix with 32 MB of RAM) and found that compiling Parrot failed due to lack of memory. Nicholas Clark reminded us that you can disable the (faster, but needs more memory to compile) computed goto core at configure time using ./Configure.pl --cgoto=0.

http://groups.google.com/groups

Parrot file list

There are a great number of source files in the Parrot distribution and Mark Sparshatt gathered ideas for how to have a file list which explained what each actually does.

http://groups.google.com/groups

Interfaces

Over in perl6-language, Michael Schwern was asked at a recent Java conference whether Perl 6 will support interfaces. He tried to describe a likely interface and raised some problems with interfaces. This spawned a huge thread about OO, interfaces, and some of the weirder OO languages. Do we enforce strict interfaces? Are some methods allowed to be optional?

One of the more interesting ideas would be to move from just using prototypes to using Design-By-Contract features: pre- and post-conditions and invariants. Dave Whipp seemed a big fan of the Eiffel model, where it is possible to rename methods in a derived class. There was lots of scary Perl 6 pseudocode including cars, MP3 players, birds, and wings.

A little later, Schwern came back and worried about enforcing interfaces on subclasses. One interesting approach is to follow Eiffel and only allow subclasses to weaken the preconditions or strengthen the postconditions of the parent. Weakening involves adding ORs, strengthening ANDs. (More Foo and Bar pseudocode. Oh, and apparently Schwern only has 2 toes).

There was a short sidetrack on having multiple versions of modules running at the same time, and Allison Randal informed us that it looks like the full name of classes will include their version number, ie Acme::N-1.1.

In fact, a lot of the discussion is a bit in the air: as Dan Sugalski pointed out, things like object attributes aren't until Apocalypse 12 and it may be a little early to worry about such things.

http://groups.google.com/groups

http://groups.google.com/groups

Subject-Oriented Programming

Schwern also asked about subject-oriented programming, which looked interesting but which he couldn't quite understand. Andy Wardley explained that all these "advanced" programming techniques are all attempting a clear separation of concerns, and went on to describe and give pointers to more info.

http://groups.google.com/groups

Matching

Someone mysteriously known only as "Ed" [ Ed Pescho - Ed.] asked what the favoured syntax would be to match negative multi-byte strings in Perl 6. It wasn't entirely clear what the question was, but one thing is sure: the Perl 6 pattern matching engine will have a lot of scope for optimisation.

http://groups.google.com/groups

In brief

Tim Bunce asked if there were any good tools for static code analysis around. None, apparently.

Brent Dax reminded Andy Dougherty and others about /Parrot_v?sn?printf(_[sc])?/ in misc.c - a reimplementation of the printf functions for portability reasons.

Simon Glover added tests for the assign opcode.

It looks like Michael Lazzaro will be writing a list of issues with OO as well as a tutorial so that everyone is clear what exactly we are talking about.

Larry cringes every time someone says "Parens construct lists in Perl 6".

Who's Who in Perl6

Once more we get to meet people involved in the development of Perl 6.

Who are you?
Simon Cozens
What do you do for/with Perl 6?
I was the Parrot pumpking up until 0.0.4, and wrote much of the PMC and string infrastructure. I then escaped to get a life, play more Go and be a nicer person.

As perl.com editor and occasional author, I pop in from time to time just to check on the correctness of things I'm writing about and make sure Parrot compiles on at least one platform I possess so I can test code for articles. Rumours of my return to development have been greatly exaggerated. :)

Where are you coming from?
I'm not, I'm already here!
When do you think Perl 6 will be released?
I don't think Perl 6 - as we understand it - ever will be released. How's that for a Delphic pronouncement?
Why are you doing this?
Because I like food.
You have 5 words. Describe yourself.
Less vehemently obnoxious than before.
Do you have anything to declare?
Watch out for some surprises in the near future.

Acknowledgements

This summary was brought to you with much distraction indeed from Super Mario Sunshine. Thanks to Kate Pugh and #london.pm for proofreading.

As Piers says: One more, if you think this summary has value send money to the Perl Foundation http://donate.perl-foundation.org and feed back and/or T?iBooks to me, mailto:pdcawley@bofh.org.uk. As usual, the fee paid for publication of this summary on perl.com has been donated directly to the Perl Foundation.

Visit the home of the Perl programming language: Perl.org

Sponsored by

Monthly Archives

Powered by Movable Type 5.13-en