Re: Loop controls

2002-04-26 Thread Andy Wardley
On Fri, Apr 26, 2002 at 08:49:23AM +1000, Damian Conway wrote: > for $results.get_next() { > FIRST { print "Results:"; } > NEXT { print ""; } > LAST { print "Done."; } > print $_; > } How about something like this: for $results.each() { print

Re: Loop controls

2002-04-26 Thread Tatsuhiko Miyagawa
At Fri, 26 Apr 2002 09:40:14 +0100, Andy Wardley wrote: > This is an approach I've used to great effect in the Template Toolkit. > In this case, the iterator controlling a 'FOREACH' loop is aliased to > the 'loop' variable > >[% FOREACH x = y %] > [% "\n" IF loop.first %] > >

Re: Subroutines...

2002-04-26 Thread Melvin Smith
I also vote for reserving some caller-save registers to make arg passing faster, however, reserving 16 is probably useless, except for symmetry. I think most texts agree that 5 or so are about all you need. -Melvin Smith IBM :: Atlanta Innovation Center [EMAIL PROTECTED] :: 770-835-6984

Re: Some tasks for the interested

2002-04-26 Thread Melvin Smith
I might take a look at 3&4 this weekend if I can finish moving. Concerning 1, what do you mean by 'closing out'? I assume you want ops to save and restore stack frames referenced by a PMC? -Melvin Smith IBM :: Atlanta Innovation Center [EMAIL PROTECTED] :: 770-835-6984

RE: [CONFIGURE] New make.pl coming soon...

2002-04-26 Thread Garrett Goebel
From: Jeff [mailto:[EMAIL PROTECTED]] > > I'm going to try to have the assembler done over the weekend, > with at the least hooks for a macro system so that people can > work on pieces of that. Are you working with Simon Cozens' unchecked-in assembler? Or yet-another-assembler? My understanding

Re: Loop controls

2002-04-26 Thread Aaron Sherman
On Thu, 2002-04-25 at 18:20, Damian Conway wrote: > Miko O'Sullivan wrote: > > before { ... } # run before first iteration, > > # only if there is at least one iteration > > Larry is still considering allowing a C block that would do this. [...] > This will be called a

Re: Loop controls

2002-04-26 Thread Tim Bunce
On Fri, Apr 26, 2002 at 10:29:58AM -0400, Aaron Sherman wrote: > On Thu, 2002-04-25 at 18:20, Damian Conway wrote: > > Miko O'Sullivan wrote: > > > > before { ... } # run before first iteration, > > > # only if there is at least one iteration > > > > Larry is still con

Re: Please rename 'but' to 'has'.

2002-04-26 Thread Dan Sugalski
At 2:26 PM +0100 4/26/02, Nicholas Clark wrote: >On Tue, Apr 23, 2002 at 01:25:15PM -0400, Dan Sugalski wrote: >> At 12:36 PM -0400 4/23/02, Buddha Buck wrote: >> >OK, but that limits you to the, um, 24 standard levels of >> >precedence. What do you do if you don't think that that's enough >>

Re: Please rename 'but' to 'has'.

2002-04-26 Thread Tim Bunce
On Fri, Apr 26, 2002 at 11:33:06AM -0400, Dan Sugalski wrote: > At 2:26 PM +0100 4/26/02, Nicholas Clark wrote: > >On Tue, Apr 23, 2002 at 01:25:15PM -0400, Dan Sugalski wrote: > >> At 12:36 PM -0400 4/23/02, Buddha Buck wrote: > >> >OK, but that limits you to the, um, 24 standard levels of > >>

COW Revisted?

2002-04-26 Thread Mike Lambert
Hey Peter, (Well, it's directed at Peter more than anyone else, but others are allowed to chime in. ;) Have you given any more thought to submitting your COW patch? Dan and I talked a bit about this on IRC, and came up with a few ideas. The data which needs to be stored along with the buffer dat

Re: Loop controls

2002-04-26 Thread Allison Randal
On Fri, Apr 26, 2002 at 08:49:23AM +1000, Damian Conway wrote: > Trey Harris wrote: > > > So: > > > > for $results.get_next() { > > FIRST { print "Results:"; } > > NEXT { print ""; } > > } else { > > print "No results."; > > } > > > > Do I have that right? > > Yes. Presuming Larry decide

Re: Please rename 'but' to 'has'.

2002-04-26 Thread Miko O'Sullivan
> This is now extensible to any number of precedence levels, and you can > now use simple string comparison to compare any two precedences. It even > short circuits the comparison as soon as it finds a character that > differs. > > Gee, maybe I should patent this. Too late. Amazon has already p

Re: Please rename 'but' to 'has'.

2002-04-26 Thread Dan Sugalski
At 5:05 PM +0100 4/26/02, Tim Bunce wrote: >On Fri, Apr 26, 2002 at 11:33:06AM -0400, Dan Sugalski wrote: >> At 2:26 PM +0100 4/26/02, Nicholas Clark wrote: >> >On Tue, Apr 23, 2002 at 01:25:15PM -0400, Dan Sugalski wrote: >> >> At 12:36 PM -0400 4/23/02, Buddha Buck wrote: >> >> >OK, but th

Re: Please rename 'but' to 'has'.

2002-04-26 Thread Larry Wall
Tim Bunce writes: : For perl at least I thought Larry has said that you'll be able to : create new ops but only give them the same precedence as any one : of the existing ops. Close, but not quite. What I think I said was that you can't specify a raw precedence--you can only specify a precedence

Re: Please rename 'but' to 'has'.

2002-04-26 Thread Buddha Buck
At 09:45 AM 04-26-2002 -0700, Larry Wall wrote: >Tim Bunce writes: >: For perl at least I thought Larry has said that you'll be able to >: create new ops but only give them the same precedence as any one >: of the existing ops. > >Close, but not quite. What I think I said was that you can't speci

Re: Please rename 'but' to 'has'.

2002-04-26 Thread Larry Wall
Buddha Buck writes: : So you'd have something like: : : sub operator:mult($a, $b) is looser('*') is inline {...} : sub operator:add($a, $b) is tighter("+") is inline {...} : sub operator:div($a,$b) is looser("/") is inline {...} : : assuming default Perl5 precedences for *, *, and / you would ha

Re: Please rename 'but' to 'has'.

2002-04-26 Thread Pixel
Larry Wall <[EMAIL PROTECTED]> writes: > : Why not use a 16 bit int and specify that languages should use > : default precedence levels spread through the range but keeping the > : bottom 8 bits all zero. That gives 255 levels between '3' and '4'. > : Seems like enough to me! > : > : Floating po

Re: Loop controls

2002-04-26 Thread Aaron Sherman
On Fri, 2002-04-26 at 14:11, Allison Randal wrote: > On Fri, Apr 26, 2002 at 08:49:23AM +1000, Damian Conway wrote: > Hmmm... how about: > > for $results.get_next() { > print $_; > LAST { print "Done."; } > ELSE { print "No results."; } > } > > The "else" of a loop construct isn't really

Re: Loop controls

2002-04-26 Thread Allison Randal
On Fri, Apr 26, 2002 at 05:24:13PM -0400, Aaron Sherman wrote: > On Fri, 2002-04-26 at 14:11, Allison Randal wrote: > > The "else" of a loop construct isn't really the same as the "else" of an > > C. You can't use an C for one thing. > > Why not? What would be wrong with: > > for @x { >

Re: Loop controls

2002-04-26 Thread Miko O'Sullivan
> Of course it brings other less wholesome things to mind like "elsfor" > and "elsloop" and "if ... elsfor" and "for ... elsif ... elsloop ... > else", but why not? Well, I agree with the concept, but boyoboy those names ain't gonna fly. We'll have to head down the road of unlessfor

Re: [CONFIGURE] New make.pl coming soon...

2002-04-26 Thread Jeff
Garrett Goebel wrote: > > From: Jeff [mailto:[EMAIL PROTECTED]] > > > > I'm going to try to have the assembler done over the weekend, > > with at the least hooks for a macro system so that people can > > work on pieces of that. > > Are you working with Simon Cozens' unchecked-in assembler? Or >

Re: [PATCH] Re: Arrays of PMCs

2002-04-26 Thread Jeff
Simon Cozens wrote: > > Steve Fink: > > EVENTUAL CURRENT > > set I0, P0[7] get_keyed I0, P0, 7 > > set P0[7], I0 set_keyed P0, 7, I0 > > set P0[0], P1[1]not possible > > set I0, P0[P1] not possible -- I'm not even sure what this will do > > set P1,

Re: Subroutines...

2002-04-26 Thread Andrew J Bromage
G'day all. On Fri, Apr 26, 2002 at 08:16:27AM -0400, Melvin Smith wrote: > I also vote for reserving some caller-save registers to make > arg passing faster, however, reserving 16 is probably useless, except > for symmetry. > > I think most texts agree that 5 or so are about all you need. Fair

[netlabs #541] Newsletter: Something for Everyone ! 53470

2002-04-26 Thread richard smitley
# New Ticket Created by "richard smitley" # Please include the string: [netlabs #541] # in the subject line of all future correspondence about this issue. # http://bugs6.perl.org/rt2/Ticket/Display.html?id=541 > The Hottest Sites on the Net - Something for Everyone ! Check this out: http://

RE: [netlabs #45~] Newsletter: Something for Everyone ! 53470

2002-04-26 Thread Brent Dax
richard smitley (via RT): # # New Ticket Created by "richard smitley" # # Please include the string: [netlabs #54~] # # in the subject line of all future correspondence about this issue. # # http://bugs6.perl.org/rt2/Ticket/Display.html?id=541 > (porn spam deleted) OK, it had to happen eventu

Re: [netlabs #541] Newsletter: Something for Everyone !

2002-04-26 Thread Robert Spier
Dear p6i members... Sadly, this piece of spam snuck through our perl.org spam filters and got into the bugtracker which dutifully passed it on to to the mailing list. Please do not report this to us, or pass it to spamcop. Because the full headers aren't in what you recieve

RE: [netlabs #45~] Newsletter: Something for Everyone ! 53470

2002-04-26 Thread Brent Dax
Brent Dax: # richard smitley (via RT): # # # New Ticket Created by "richard smitley" # # # Please include the string: [netlabs #54~] # # # in the subject line of all future correspondence about # this issue. # # # http://bugs6.perl.org/rt2/Ticket/Display.html?# id=541 > (porn # spam deleted)

Re: Please rename 'but' to 'has'.

2002-04-26 Thread Andrew J Bromage
G'day all. On Fri, Apr 26, 2002 at 09:45:24AM -0700, Larry Wall wrote: > Gee, maybe I should patent this. Actually, you're binary searching the Stern-Brocot tree representation of rational numbers. In fact, if you have arbitrary precision integers, you can convert these strings into rational n

Re: Loop controls

2002-04-26 Thread Luke Palmer
On Fri, 26 Apr 2002, Allison Randal wrote: > Besides, I would expect an C to actually be a loop of it's own, > on the principle of "elsif = else + if" so "elsfor = else + for". So, you're suggesting we add C then? Just because it's possible doesn't mean it's necessary. Luke

Re: Subroutines...

2002-04-26 Thread Piers Cawley
Andrew J Bromage <[EMAIL PROTECTED]> writes: > G'day all. > > On Fri, Apr 26, 2002 at 08:16:27AM -0400, Melvin Smith wrote: > >> I also vote for reserving some caller-save registers to make >> arg passing faster, however, reserving 16 is probably useless, except >> for symmetry. >> >> I think mo

Re: Loop controls

2002-04-26 Thread Allison Randal
On Fri, Apr 26, 2002 at 11:14:36PM -0600, Luke Palmer wrote: > On Fri, 26 Apr 2002, Allison Randal wrote: > > > Besides, I would expect an C to actually be a loop of it's own, > > on the principle of "elsif = else + if" so "elsfor = else + for". > > So, you're suggesting we add C then? Just bec