Sign In/My Account | View Cart  
advertisement


Listen Print

This week on Perl 6 (9/16 - 9/22, 2002)
by Piers Cawley | Pages: 1, 2

Meanwhile, in perl6-language...

Last week's discussion of argument passing continued on its merry way. As well as a certain amount of debate as to the meaning of `topicalize', Larry clarified a few points. For instance, current thinking seems to be that if you want to capture the caller's topic in a named variable you'd do:


   sub (...) is given ($x) { ... }

which would set the sub's $x variable to the same value as its caller's $_. He also offered some comments on good style when using $_ and made Angel Faus's day when he told us that it's looking like parameter defaults will be specified by = rather than //=. Sean O'Rourke wasn't entirely sure about the is given syntax, but Larry pointed out that Sean's proposed syntax wouldn't allow for prototyping `CORE::print, among other things.' It also looks like we're going to be using exists to see whether a parameter got passed or not.

http://groups.google.com/groups

http://groups.google.com/groups

http://groups.google.com/groups

http://groups.google.com/groups

Hotplug regexes, other misc regex questions

Steve Fink asked a few questions, mostly relating to pattern closures having side effects, supplying a few pathological (psychotic?) patterns as examples. My particular `favourite' was


   my $x = "the letter x";
   print "yes" if $x =~ /the { $x _= "!" } .* !/;

Damian reckoned that if the above were allowed at all, then the match should succeed, and offered answers (opinions) on the rest of Steve's menagerie. One of his suggestions involved a superposition, but I think he might have been joking. Larry also gave his somewhat more authoritative answers.

http://groups.google.com/groups

http://groups.google.com/groups

http://groups.google.com/groups

Hyperoperators and dimensional extension

Brent Dax wondered about how hyperoperators would work with multiple dimensions. Dan's answer can be summarized as `properly', which wasn't quite specific enough for Brent, but Dan stuck to his guns. Dan also demonstrated that whilst he may be an American, he knows how to spell `behaviour'.

http://groups.google.com/groups

Regex query

Simon Cozens had a few questions about grammars and rules. He's trying to write a grammar to parse a Linux /etc/raidtab file, and has a few questions about `drilling down' into the match object. The thread is tricky to summarize. However, in one post Larry said that `any list forced into scalar context will make a ref in Perl 6' and gave $arrayref = (1,2,3) as an example. This caused a thread explosion, which has boiled over into the current week as people followed the implications of that through (some even going so far as to wonder if that meant we wouldn't need [...] any more). Frankly, things got ugly (at least syntactically). I'm tempted to draw a veil over some of the ugliness; if you want to, read the thread. I'm waiting for Larry to get back home and make everything better with another of his shockingly wise postings. No pressure Larry.

http://groups.google.com/groups

http://groups.google.com/groups -- Pigeons, meet a cat.

Backtracking syntax

'Ralph' doesn't like the backtracking syntax, and proposed replacing :, ::, :::, <commit> and <cut> with :, :], :>, :/ and :// respectively. Simon Cozens and Markus Laire spoke up against the proposal.

http://groups.google.com/groups

In Brief

Leopold Toetsch has sent Dan a patch to implement a proposed hierarchy of PMC classes. Leo was this week's official patchmonster, submitting patches to make core_ops*.c more readable, improve predereferencing in interpreter.c, add a test case for restarting the interpreter and squeezing out a 10% increase in life performance. (This last one brought some questions from Mike Lambert.)

Simon `Unix Guru' Cozens popped in with some bug spots. First, he pointed out that the magic number in a .pbc file wasn't being taken into account in time. Then he found that queens.pasm was solving the somewhat trivial `one queen problem', rather than the more impressive `8 queens' problem. Finally, he pointed out that the hanoi program seemed to be slightly broken too. And then the week ran out.

Garret Goebbel pointed us all at a survey of native interfaces for several languages, which can be found at: http://xarch.tu-graz.ac.at/autocad/lisp/ffis.html

Who's Who in Perl 6

Who are you?
Leon Brocard, acme@astray.com
What do you do for/with Perl 6?
I'm currently more interested in the Parrot side of Perl 6. I mostly tinker with Parrot assembly (PASM), and try to keep the http://parrotcode.org/examples/ page up to date with current Parrot thinking. Sometimes I convert C code to PASM by hand. Sometimes I think evil things about converting other bytecode formats (say, Java's .class files) to Parrot. I presented a talk at the O'Reilly Open Source Conference called "Targeting Parrot", which is something that we should make terribly easy to actually do.
Where are you coming from?
680x0 programming, mostly. Programming Parrot is like how you remember programming assembly was, only higher level and more fun.
When do you think Perl 6 will be released?
Sooner than most people think.
Why are you doing this?
For fun, of course. And because it's interesting to see the development process behind a fast, portable virtual machine. Actually implementing Perl 6 on top of Parrot is just a simple matter of programming...
You have 5 words. Describe yourself.
Orange Perl/Parrot Euro-hacker
Do you have anything to declare?
I enjoy optimising computer-generated SQL statements.

Acknowledgements

It looks like Wednesday is becoming summary mail out day now. Surprisingly time consuming so it is...

Thanks to Leon Brocard for answering the questionnaire, making it embarrassingly easy for me to mention his name this week. I'm now running really low on sets of answers. Come on people, mail your answers to 5Ws@bofh.org.uk and fame and... well fame anyway will be yours.

Once more, thanks to the crack proof readers on rhizomatic.net and elsewhere. This week's primary proof readers were: Kate Pugh, Paul Makepeace and Simon Bisson. Thanks people.

If you think this summary has value, then please send your money to the Perl Foundation http://donate.perl-foundation.org and help support the ongoing development of Perl 6. As usual, the fee paid by the O'Reilly Network for their publication of this summary has been donated directly to the Perl Foundation.