Sign In/My Account | View Cart  
advertisement


Listen Print

This week on Perl 6 (week ending 2002-08-04)
by Piers Cawley | Pages: 1, 2

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.

http://groups.google.com/groups

resize_array (PerlArray)

Aldo Calpini discovered that the parrot equivalent of @foo = (1,2); print @foo[9999]; would magically extend @foo to contain 10,000 elements -- which isn't exactly ideal. This spun off into a discussion of autovivification, especially with nested arrays. Dan pointed out that Perl 5's current behavior when you, for example, print $a[10000][0] is an artifact of the way multidimensional 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.)

http://groups.google.com/groups

sub/continuation/dlsym/coroutine cleanup

Sean O'Rourke offered a patch that "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 whether this meant that loop variables would only have to be allocated once; which looked nice.

http://groups.google.com/groups

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 much 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.

http://groups.google.com/groups

http://groups.google.com/groups

http://groups.google.com/groups

Use of Regular Expressions on Nonstrings.

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.

http://rt.perl.org/rt2/Ticket/Display.html -- Stephen Rawls offers patches for genclass.pl and introduces an addclass.pl script, intended to make the business of setting up a new PMC type that much easier.

http://groups.google.com/groups 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 assemble.pl to allow it to accept code on STDIN. Applied.

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

Josef Höök offered a matrix implementation. Warnock's dilemma applies. You can find the patch at http://rt.perl.org/rt2/Ticket/Display.html if you're interested.

Sean O'Rourke pointed to http://lambda.weblogs.com/discuss/msgReader$3850.

Aldo Calpini offered docs for the parrot debugger. http://groups.google.com/groups

"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. http://groups.google.com/groups

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 five 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, then don't read it. If you did, then consider donating some of your hard-earned money (or your employer's hard-earned money) to the Perl Foundation at http://donate.perl-foundation.org/ and help support the ongoing development of Perl 6. If you're going to donate $100 or more in response to this summary, then 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 TiBook, 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?