Re: Auto My?

2004-12-20 Thread James Mastros
Luke Palmer wrote: James Mastros writes: Does this imply that it's now possible to type Cmy @foo[23] = 42;, and declare @foo? In the current perl, this doesn't work -- it's a syntax error. It'd certainly make many constructs easier. That looks weird to me. But as Rod points out, it can be

Re: Auto My?

2004-12-20 Thread Luke Palmer
James Mastros writes: Luke Palmer wrote: James Mastros writes: Does this imply that it's now possible to type Cmy @foo[23] = 42;, and declare @foo? In the current perl, this doesn't work -- it's a syntax error. It'd certainly make many constructs easier. That looks weird to me. But as

Re: Auto My?

2004-12-20 Thread Mark J. Reed
On 2004-12-19 at 21:35:46, Luke Palmer wrote: In Perl 5 you can do the hackish: (\my @foo)-[23] = 42; Hm. My reaction to the above is, and I think I speak for the entire assemblage when I say this, Yuckbo. :) Now, (my @foo)[23] would be somewhat better, but of course, that's

Re: Auto My?

2004-12-20 Thread Juerd
James Mastros skribis 2004-12-19 23:00 (+0100): Juerd wrote: Just typing my before the first use of a variable isn't hard, and it makes things much clearer for both the programmer and the machine. Does this imply that it's now possible to type Cmy @foo[23] = 42;, and declare @foo? In the

spaces for alignement

2004-12-20 Thread Stéphane Payrard
On Sun, Dec 19, 2004 at 06:44:33PM -0800, chromatic wrote: On Sun, 2004-12-19 at 20:25 -0600, Rod Adams wrote: [snipped] $x = 4; $y = 7; $z = 12; $r = 4543; $q = 121; With a fixed width font, like all code editors use, all the =' like up, and I can quickly scan the var

Re: MMD and VTABLE_find_method

2004-12-20 Thread Leopold Toetsch
Sam Ruby wrote: Leopold Toetsch wrote: The caller sets: mmd_flag := NULL ... no MMD, plain method lookup mmd_flag := depth ... return the next matching method starting at the given parent search depth In the general case, how does the caller know that MMD is

Re: Auto My?

2004-12-20 Thread Larry Wall
On Sun, Dec 19, 2004 at 08:25:58PM -0600, Rod Adams wrote: : Another facet of this discussion comes into account when also specifying : type. : : from S9: : my bit @bits; : my int @ints; : my num @nums; : my int4 @nybbles; : my str @buffers; : my ref[Array] @ragged2d; : my complex128

Re: auxiliary variables

2004-12-20 Thread Dan Sugalski
At 12:00 AM +0100 12/20/04, [EMAIL PROTECTED] wrote: Please Lets have two scalars variables in Perl and some operation under them like an adding. x = a + b I would like know, witch auxiliary variables are creating on the in-line code like a Parrot somethink like T = a + b x = T

Re: 700 tests for PGE

2004-12-20 Thread Markus Laire
Patrick R. Michaud wrote: I'm getting errors from the test script itself, there are lines such as # 65: ^ abc y $ p6rule_like('abc', '^', qr/0: \Q\E @/, 're_tests 35/$0 (#35)'); # 66: $ abc y $ p6rule_like('abc', '$', qr/0: \Q\E @/, 're_tests 36/$0 (#36)'); which cause my test

When converting tests...

2004-12-20 Thread Markus Laire
How should I convert dot, $, ... Some examples: 1# p5: abc =~ /a.c/; (match) 2# p5: a\nc =~ /a.c/; (no match) Equivalent code for '.' would now be '\N'. Still there are tests where I could just leave the dot alone (e.g. all tests where there is no \n in target-string.) In test-1 I could

Re: 700 tests for PGE

2004-12-20 Thread Patrick R. Michaud
On Mon, Dec 20, 2004 at 01:59:57PM +0200, Markus Laire wrote: I was wondering if it would make sense to add the original 're_tests' file to parrot distribution, with a script which autogenerates 're_tests.t' from it. This way it would be possible to update the script if testing-format is

Re: When converting tests...

2004-12-20 Thread Patrick R. Michaud
On Mon, Dec 20, 2004 at 05:27:37PM +0200, Markus Laire wrote: How should I convert dot, $, ... 1# p5: abc =~ /a.c/; (match) 2# p5: a\nc =~ /a.c/; (no match) Equivalent code for '.' would now be '\N'. Still there are tests where I could just leave the dot alone (e.g. all tests where

Re: Let the hacking commence!

2004-12-20 Thread Patrick R. Michaud
A few initial questions/comments on some small things -- I'll get to the bigger constructs a bit later. I'm an outside-in designer, so I tend to work on the macro and micro levels until I meet in the middle. rule identifier() { alpha \w* } Does Perl 6 allow leading underscores in identifiers?

Re: MMD and VTABLE_find_method

2004-12-20 Thread Sam Ruby
Leopold Toetsch wrote: Sam Ruby wrote: Leopold Toetsch wrote: The caller sets: mmd_flag := NULL ... no MMD, plain method lookup mmd_flag := depth ... return the next matching method starting at the given parent search depth In the general case, how does the

[perl #33129] N registers get whacked in odd circumstances

2004-12-20 Thread via RT
# New Ticket Created by Dan Sugalski # Please include the string: [perl #33129] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=33129 I'm finding that the N registers are getting messed up with some function

Perl 6 Summary for 2004-12-06 through 2004-12-20

2004-12-20 Thread Matt Fowles
Perl 6 Summary for 2004-12-06 through 2004-12-20 All~ The observant among you might notice that I missed last week's summary. With the hubbub and confusion of the holidays, I blame ninjas, in particular Ryu Hyabusa. Given that Christmas is next weekend and New Years is the

Test::Builder versus Unicode

2004-12-20 Thread Ovid
Hi all, The following code: use utf8; use diagnostics; BEGIN {binmode STDOUT, ':utf8';} use Test::More tests = 1; # those are smart quotes diag This is a \x{201c}test\x{201d}; ok 1; Produces the following error message: 1..1 Wide character in print at

Help redo the Phalanx 100

2004-12-20 Thread Andy Lester
=head1 Announcing the Do-It-Yourself Phalanx 100! The Phalanx 100 is a list of the top 100 modules on CPAN, and by extension, those that should have the most attention paid to them by the Phalanx project. The first time I generated the P100 was over a year ago, and things are old and stale.

Help update the Phalanx 100

2004-12-20 Thread Andy Lester
=head1 Announcing the Do-It-Yourself Phalanx 100! The Phalanx 100 is a list of the top 100 modules on CPAN, and by extension, those that should have the most attention paid to them by the Phalanx project. The first time I generated the P100 was over a year ago, and things are old and stale.

Re: Test::Builder versus Unicode

2004-12-20 Thread Michael G Schwern
On Mon, Dec 20, 2004 at 04:50:57PM -0800, Ovid wrote: And looking at line 1005: sub _print_diag { my $self = shift; local($\, $, $,) = (undef, ' ', ''); my $fh = $self-todo ? $self-todo_output : $self-failure_output; print $fh @_; # here there be smart quotes }

Re: Test::Builder versus Unicode

2004-12-20 Thread Michael G Schwern
On Mon, Dec 20, 2004 at 06:13:54PM -0800, David Wheeler wrote: Test::Builder should do something like this internally, its not like anyone's going to drive binary data through a TB filehandle. The question is how does one do it without breaking older perls? If there was a way to tell what

Re: Test::Builder versus Unicode

2004-12-20 Thread David Wheeler
On Dec 20, 2004, at 6:13 PM, David Wheeler wrote: If there was a way to tell what mode was on STDERR before you duped it, you could just set it to the same. Something like: my $mode = what_binmode(STDERR); my $fh = $builder-failure_output; binmode $fh, $mode; Is there a module or function

Re: Test::Builder versus Unicode

2004-12-20 Thread chromatic
On Mon, 2004-12-20 at 18:20 -0800, David Wheeler wrote: If not, another option is to add a binmode option to Test::Builder (and the modules that depend on it). So you could do something like this: use Test::More tests = 6, binmode = ':utf8'; Thoughts? I'd rather override

Re: Test::Builder versus Unicode

2004-12-20 Thread Michael G Schwern
On Mon, Dec 20, 2004 at 06:20:41PM -0800, David Wheeler wrote: If not, another option is to add a binmode option to Test::Builder (and the modules that depend on it). So you could do something like this: use Test::More tests = 6, binmode = ':utf8'; Thoughts? Again, this is not

Re: Test::Builder versus Unicode

2004-12-20 Thread David Wheeler
On Dec 20, 2004, at 6:19 PM, Michael G Schwern wrote: Is there a module or function in Perl that can provide this information? Why does it matter what it was set to before? I'm always going to be shoving text out through this filehandle. It matters because if I'm using Big5 in my module, I

Re: Test::Builder versus Unicode

2004-12-20 Thread Michael G Schwern
My Official Policy on this is now to let people who actually understand character encodings to work it out and just wait for a patch. PS Somebody should drag autrijus into this. -- Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern/ We don't know. But if we did, we

Test::Legacy warnock'd

2004-12-20 Thread Michael G Schwern
I've gotten absolutely no response about Test::Legacy. Is anybody using it? Anybody tried migrating old Test.pm based tests with it? -- Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern/ I'm crazy but I get the job done.