Re: Control flow variables

2003-11-20 Thread Luke Palmer
Jonathan Scott Duff writes: > On Wed, Nov 19, 2003 at 12:49:21PM -0800, Larry Wall wrote: > > Sorry, I wasn't being very clear. It wouldn't be logically attached to > > the outside of the for, but to the inside of the "confer", or whatever: > > > > @foo = gather { > > for @a -> $x { pick

Re: s/// in string context should return the string

2003-11-20 Thread Luke Palmer
Smylers writes: > Piers Cawley writes: > > > Stèphane Payrard <[EMAIL PROTECTED]> writes: > > > > > s/// in string context should return the string after substituion. > > > > Surely it should return the string after substitution, but with an > > appropriate 'but true' or 'but false' property de

Re: Anonymous Multi's? [was Re: Control flow variables]

2003-11-20 Thread Dan Sugalski
On Thu, 20 Nov 2003, Dave Whipp wrote: > "Larry Wall" <[EMAIL PROTECTED]> wrote: > > Also, since multi is orthogonal to naming ... > > So I'm wondering what the correct syntax is to grab a reference to a group > of multi-somethings. While Larry will probably weigh in on this, I'd rather you not a

Anonymous Multi's? [was Re: Control flow variables]

2003-11-20 Thread Dave Whipp
"Larry Wall" <[EMAIL PROTECTED]> wrote: > Also, since multi is orthogonal to naming ... So I'm wondering what the correct syntax is to grab a reference to a group of multi-somethings. Example: multi sub foo(Int $a:) {...}; multi sub foo(String $a:) {...}; my $ref = multi &foo; $ref("hello"); #

Re: Control flow variables

2003-11-20 Thread Larry Wall
On Thu, Nov 20, 2003 at 11:23:34AM -0800, Michael Lazzaro wrote: : : On Tuesday, November 18, 2003, at 12:15 PM, Luke Palmer wrote: : >Oh, and if you really want to do that return thing without using a : >C, you can just: : > : >sub blah { : >return $a || goto CONT; : >CONT: : >

Re: Control flow variables

2003-11-20 Thread Michael Lazzaro
On Tuesday, November 18, 2003, at 12:15 PM, Luke Palmer wrote: Oh, and if you really want to do that return thing without using a C, you can just: sub blah { return $a || goto CONT; CONT: ... } I don't see what's wrong with that. :-p Umm... refresh my/our memory. Did we

Re: Control flow variables

2003-11-20 Thread Michael Lazzaro
On Wednesday, November 19, 2003, at 12:28 PM, Smylers wrote: Larry Wall writes: : Michael Lazzaro wrote: : : >return if $a { $a } No, it's a syntax error. You must write Excellent! I too was quietly hoping someone would say that. These hurt my admittedly ever-shrinking brain: retur

Re: Warning patrol

2003-11-20 Thread Leopold Toetsch
Juergen Boemmels <[EMAIL PROTECTED]> wrote: > I know IMCC is under heavy development right now so I will not comit > these fixes but only send them to the list as a suggestion. Nethertheless I'd suggest to apply such patches[1] immediately[2]. It could cause small rediffs[3] for people working on

Re: Control flow variables

2003-11-20 Thread Piers Cawley
Smylers <[EMAIL PROTECTED]> writes: > Larry Wall writes: > >> And nested modifiers are still quite illegal in Standard Perl 6. > > Right. > > Anybody else get the feeling we should write that down somewhere, so we > don't have to have this conversation again in a few months? It'll be in the summa

Warning patrol

2003-11-20 Thread Juergen Boemmels
Hi, from time to time i do a little warning patrol in parrot and configure with --ccwarn=-Werror. Only a few fixes in imcc are needed to compile warning-free, most of them are unused parameters and variables. I know IMCC is under heavy development right now so I will not comit these fixes but only

Re: s/// in string context should return the string

2003-11-20 Thread Jonathan Scott Duff
On Wed, Nov 19, 2003 at 08:23:30PM +, Smylers wrote: > This, however, is irritating: > > my @new = map { s:e/$pattern/$replacement/; $_ } @old; > > I forget the C<; $_> far more often than I like to admit and end up with > an array of integers instead of modified strings. That one gets m

Re: Freeze checkin

2003-11-20 Thread Leopold Toetsch
Jeff Clites <[EMAIL PROTECTED]> wrote: > On Nov 19, 2003, at 1:34 PM, Leopold Toetsch wrote: > ... What I'm really worried about here is the case > where something like an array may have a reference to some PMC which > its using as a cache, but which is not supposed to be archived along > with the

[CVS ci] pmc_freeze.pod (was: Freeze checkin)

2003-11-20 Thread Leopold Toetsch
Dan Sugalski <[EMAIL PROTECTED]> wrote: > Hey folks. > Just a quick heads-up--I checked in the preliminary patch for freeze/thaw > that Leo sent me for review. It'll change internally a fair amount ... I've put together a description of the current state. I'd like to thank all people for their co

Re: whats the 'right way' to test for output on STDERR

2003-11-20 Thread Kate L Pugh
On Thu 20 Nov 2003, Jim Cromie <[EMAIL PROTECTED]> wrote: > im patching a module that uses Test::More, and I want to include a test > to prove that a carp is being called when function args are wrong. > > I half-expected to find a stderr_like() that would do the trick. Test::Warn has warning_like

Re: whats the 'right way' to test for output on STDERR

2003-11-20 Thread Fergal Daly
It's so worthwhile that it's already there http://search.cpan.org/~bigj/Test-Warn/ F On Thu, Nov 20, 2003 at 02:27:48AM -0700, Jim Cromie wrote: > hi all, > > im patching a module that uses Test::More, and I want to include a test > to prove that a carp is being called when function args are wr

Re: Control flow variables

2003-11-20 Thread Jonathan Scott Duff
On Wed, Nov 19, 2003 at 12:49:21PM -0800, Larry Wall wrote: > Sorry, I wasn't being very clear. It wouldn't be logically attached to > the outside of the for, but to the inside of the "confer", or whatever: > > @foo = gather { > for @a -> $x { pick $x if mumble($x) } > DEFAULT { @

Re: Control flow variables

2003-11-20 Thread Smylers
Larry Wall writes: > On Wed, Nov 19, 2003 at 08:08:49AM +1100, Damian Conway wrote: > > : Michael Lazzaro wrote: > : > : >return if $a { $a } > : > : Means: > : > :if ($a) { return $a } else { return undef } > > No, it's a syntax error. You must write > > return do { if $a { $a

Re: s/// in string context should return the string

2003-11-20 Thread Smylers
Piers Cawley writes: > Stéphane Payrard <[EMAIL PROTECTED]> writes: > > > s/// in string context should return the string after substituion. > > Surely it should return the string after substitution, but with an > appropriate 'but true' or 'but false' property depending on whether > anything wa

Re: Control flow variables

2003-11-20 Thread Smylers
Larry Wall writes: > And nested modifiers are still quite illegal in Standard Perl 6. Right. Anybody else get the feeling we should write that down somewhere, so we don't have to have this conversation again in a few months? Smylers

whats the 'right way' to test for output on STDERR

2003-11-20 Thread Jim Cromie
hi all, im patching a module that uses Test::More, and I want to include a test to prove that a carp is being called when function args are wrong. I half-expected to find a stderr_like() that would do the trick. I ended up with this; { local $SIG{__WARN__} = sub { return if $_[0] =~ /follow

Re: Parsing macros (was: Control flow variables)

2003-11-20 Thread Luke Palmer
Jonathan Lang writes: > Larry Wall wrote: > > So far we've only allowed "is parsed" on the macro itself, not on > > individual arguments. Still, that's an interesting idea. > > Forgive me if this has already been addressed, but this could have some > useful applications: > > So far, everything I