Re: Regex query

2002-09-23 Thread Aaron Sherman
On Sun, 2002-09-22 at 08:07, Simon Cozens wrote: > [EMAIL PROTECTED] (Jonathan Scott Duff) writes: > > Why can't perl be smart enough to figure out what we mean? > > We're talking about lists, the second most fundamental data structure > in the language. > > If we have to resort to much magic to

Re: [perl #17549] [PATCH] direct accesss for intlist 10 times faster

2002-09-23 Thread Leopold Toetsch
Sean O'Rourke (via RT) wrote: > What happens if you presize the PerlArray to its final size Then it is of course faster, but this is not a real world proposal IMHO, you don't know in advance the usage pattern, so you can't do this. Of course, the memory management of array/PerlArray could be sm

Re: Paren madness (was Re: Regex query)

2002-09-23 Thread John Williams
On Mon, 23 Sep 2002, Trey Harris wrote: > > So then, I think if there's just some clarification about how one-tuples > are formed, I think everything I wrote in my earlier mail can DWIM > correctly. There seems to be no magic here, quotations from LoTR to the > contrary. :-) Your post was very h

Re: Of variables, values, and vtables

2002-09-23 Thread Leopold Toetsch
Dan Sugalski wrote: > *) Spec the vtable changes Starting from my proposal ... Subject: [RFC] 2. Proposal for _keyed opcodes I have some more implementation details, WRT _keyed. - An aggregate should provide these vtable methods: * entry_type ... get info about the aggregates storage

Re: Regex query

2002-09-23 Thread Trey Harris
In a message dated 24 Sep 2002, Aaron Sherman writes: > This is because push is > almost certainly defined as: > > sub push(@target, *@list) { ... } That should be sub push(@target is rw, *@list); but otherwise I think that's right. Now, implementation in Perl 6 (though I assume it's

Re: Regex query

2002-09-23 Thread Aaron Sherman
On Sat, 2002-09-21 at 06:18, Smylers wrote: > $num = @massive; > > C<$num> becomes a reference to C<@massive>, but in a numeric context it > will evaluate to the number of elements in that array. > But in most cases, you would never do this. You would do something like my int $num =

Re: Regex query

2002-09-23 Thread Trey Harris
In a message dated 24 Sep 2002, Aaron Sherman writes: > Grrr... I want that to work, really I do, but since, as Larry has > pointed out, there's no functional difference between an array ref and > an array in Perl 6, they would be the same. This is because push is > almost certainly defined as: >

Re: Paren madness (was Re: Regex query)

2002-09-23 Thread Trey Harris
Replying to myself to clear a few things up... In a message dated Mon, 23 Sep 2002, Trey Harris writes: > 2. Scalar assignment. > > my $a;# 1. > $a = X; > > my $a;# 2. > $a = X; > > my $a;# 3. > ($a) = X; > > my($a) = X; # 4. > > my($a)

Re: [perl #17549] [PATCH] direct accesss for intlist 10 times faster

2002-09-23 Thread Sean O'Rourke
On Tue, 24 Sep 2002, Leopold Toetsch wrote: > intlist_3.pbc is with 1) already 10 times faster then the same test with > PerlArray (ok, that's not fair, .PerlArray has to new_pmc, which > accounts for ~40% difference). What happens if you presize the PerlArray to its final size before the loop?

[perl #17549] [PATCH] direct accesss for intlist 10 times faster

2002-09-23 Thread via RT
# New Ticket Created by Leopold Toetsch # Please include the string: [perl #17549] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt2/Ticket/Display.html?id=17549 > Attached patch - corrects a bug in int_list_assign 1) - makes direct access fly int

Re: Regex query

2002-09-23 Thread Aaron Sherman
On Mon, 2002-09-23 at 15:48, Luke Palmer wrote: > On 23 Sep 2002, Simon Cozens wrote: > > > [EMAIL PROTECTED] (Luke Palmer) writes: > > > Since we now have an explicit flattening operator (unary *), there's no > > > need to differentiate between a "real" list and a reference to one. > > > > Wha

Re: Paren madness (was Re: Regex query)

2002-09-23 Thread Aaron Sherman
On Mon, 2002-09-23 at 16:58, Trey Harris wrote: > 4. Numeric value. > > The progression spoken about at great length previously: > > +()# == 0 > +(0) # == WHAT? 0? 1? > +(0,1) # == 2 > +(0,1,2) # == 3 > +(0,1,2,3) # == 4 > +(0,...,n) # == n + 1 > >

Re: s/// in list context

2002-09-23 Thread John Williams
Two weeks ago, Nicholas Clark wrote: > So would it be possible for s/// to have the same return values as m// > in perl6? Since no one authoritative has responded to this, I will just add my support that it seems like a reasonable request. s/// currently "returns the number of substitutions mad

Re: Paren madness (was Re: Regex query)

2002-09-23 Thread Trey Harris
In a message dated Mon, 23 Sep 2002, Luke Palmer writes: > Y'all have it backwards. > > [1,*[2,[3,4,5]],6] # [1,2,[3,4,5],6] > [1,*[2,*[3,4,5]],6] # [1,2,3,4,5,6] > > Flat flattens outwards, not inwards. Ah. *slaps head* of course. That makes much more sense

Re: Regex query

2002-09-23 Thread Luke Palmer
On 24 Sep 2002, Simon Cozens wrote: > [EMAIL PROTECTED] (Luke Palmer) writes: > > push @a: [1,2,3,4]; > > > > pushes an array ref onto @a. > > > > push @a: *[1,2,3,4]; > > > > pushes 1, 2, 3, and 4 onto @a (as it would without the * and []). > > Remind me which language this is suppos

Re: Paren madness (was Re: Regex query)

2002-09-23 Thread Luke Palmer
On Mon, 23 Sep 2002, Jonathan Scott Duff wrote: > On Mon, Sep 23, 2002 at 04:58:55PM -0400, Trey Harris wrote: > > for (1,("a","b","c"),3 { ... } > > > > and > > > > for 1,("a","b","c"),3 { ... } > > > > Now that I've ventured away from DWIMs and more into WIHDTEMs (What In > > Hell Does T

Re: Paren madness (was Re: Regex query)

2002-09-23 Thread Jonathan Scott Duff
On Mon, Sep 23, 2002 at 04:58:55PM -0400, Trey Harris wrote: > for (1,("a","b","c"),3 { ... } > > and > > for 1,("a","b","c"),3 { ... } > > Now that I've ventured away from DWIMs and more into WIHDTEMs (What In > Hell Does This Expression Mean), is the above equivalent to > > for 1,qw(a

Re: Paren madness (was Re: Regex query)

2002-09-23 Thread Simon Cozens
[EMAIL PROTECTED] (Trey Harris) writes: > May I suggest that we start with some DWIMmy examples Sam sat on the ground and put his head in his hands. 'I wish I had never come here, and I don't want to see no more magic,' he said, and fell silent. -- I hooked up my accelerator pedal in my car to

Re: Regex query

2002-09-23 Thread Simon Cozens
[EMAIL PROTECTED] (Luke Palmer) writes: > push @a: [1,2,3,4]; > > pushes an array ref onto @a. > > push @a: *[1,2,3,4]; > > pushes 1, 2, 3, and 4 onto @a (as it would without the * and []). Remind me which language this is supposed to be, again? -- "Life sucks, but it's better th

Paren madness (was Re: Regex query)

2002-09-23 Thread Trey Harris
I think this discussion has gotten out of hand, and I hope that Larry, Damian or Allison will grace us with a resolution soon. :-) May I suggest that we start with some DWIMmy examples and try to arrive at a mechanism that will make them all DWIM? Here are my opinions, feel free to shoot them do

Re: Regex query

2002-09-23 Thread Luke Palmer
On 23 Sep 2002, Simon Cozens wrote: > [EMAIL PROTECTED] (Luke Palmer) writes: > > Since we now have an explicit flattening operator (unary *), there's no > > need to differentiate between a "real" list and a reference to one. > > What context does "push" impute on its operands? > > If > p

[perl #17537] [PATCH imcc 0.0.9.2 containing #17533

2002-09-23 Thread via RT
# New Ticket Created by Leopold Toetsch # Please include the string: [perl #17537] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt2/Ticket/Display.html?id=17537 > Attached patch fixes all currently known problems WRT imcc/perl6. imcc 0.0.9 is rat

Re: Tinderbox "TD-ParkAvenue" not working (fwd)

2002-09-23 Thread Andy Dougherty
Here's a message I got from a nice admin at HP. -- Andy Dougherty [EMAIL PROTECTED] -- Forwarded message -- Date: Mon, 23 Sep 2002 14:53:34 -0400 From: James Chamberlain <[EMAIL PROTECTED]> To: Andy Dougherty <[EMAIL PROTECTED]> Subject: Re: Tinderbox "TD-ParkAv

Of variables, values, and vtables

2002-09-23 Thread Dan Sugalski
Okay, folks, I'm back from travel, at least for a little while. My short term goals are: *) Finish up the calling convention changes *) Spec the PMC changes *) Spec the vtable changes *) Get exceptions fully defined and a preliminary implementation The variable/vtable stuff should be done in th

Re: how to use MultiArray?

2002-09-23 Thread Jerome Quelin
On Lundi 23 Septembre 2002 10:33, Josef Hook wrote : > I would really apreciate if someone would like to work on multiarrays. Okay, I volunteer for this, 'cause it's one of the things I really really need for my Befunge-98 interpreter. And everyone knows (or should know) that supporting Befunge

RE: pre-PATCH: lexicals

2002-09-23 Thread Jonathan Sillito
> -Original Message- > From: Piers Cawley [mailto:[EMAIL PROTECTED]] > "Jonathan Sillito" <[EMAIL PROTECTED]> writes: > > get_counter: > > new_pad 1 > > Doesn't this violate the 'caller saves' principle, making it hard to > do tail call optimization? Would it make sense to move the cre

[perl #17533] [PATCH] Re: Goal call for 0.0.9

2002-09-23 Thread via RT
# New Ticket Created by Andy Dougherty # Please include the string: [perl #17533] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt2/Ticket/Display.html?id=17533 > On Mon, 23 Sep 2002, H.Merijn Brand wrote: > > > > cd languages/perl6 > > >

Re: Goal call for 0.0.9

2002-09-23 Thread H.Merijn Brand
On Mon 09 Sep 2002 22:22, Andy Dougherty <[EMAIL PROTECTED]> wrote: > On Mon, 9 Sep 2002, H.Merijn Brand wrote: > > [HP-UX 11.00, GNU gcc-3.2] > > > > cd languages/perl6 > > > make > > > > For gcc (which was the last I used) I got :( > > > > /usr/bin/ld -o imcc imcparser.o imclexer.o imc.

Re: Regex query

2002-09-23 Thread Aaron Sherman
On Sat, 2002-09-21 at 06:38, Smylers wrote: > So if the difference between lists with parens and anon arrays with > square brackets is going away, it may make sense to standardize on the > latter rather than the former. In other words, lists now use square > brackets. > > That frees up parens f

Re: <( .... )> vs <{ .... }>

2002-09-23 Thread Michael G Schwern
On Sun, Sep 22, 2002 at 10:37:59AM -0500, Me wrote: > In several forms of courier, and some other text fonts > I view code in, I find it hard to visually distinguish the > pattern element: I'd suggest a clearer fixed-width font than Courier. Perhaps Monaco, Neep or, if you can find them, Mishaw

[perl #17524] [PATCH] use key functions in packfile

2002-09-23 Thread via RT
# New Ticket Created by Leopold Toetsch # Please include the string: [perl #17524] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt2/Ticket/Display.html?id=17524 > This patch hides some internals of keys by using the appropriate key functions in p

Re: hotplug regexes, other misc regex questions

2002-09-23 Thread Andrew Pimlott
On Wed, Sep 18, 2002 at 05:01:35PM +0200, Damian Conway wrote: > Steve Fink wrote: > > print "yes" if "helo" =~ /hel { .pos-- } lo/; > > This definitely has to work. But remember the call to C is on > the "match object" (i.e. $0), not the string. > > Actually, I would expect that *any* pattern

Re: [perl #17495] [PATCH] for a faster life

2002-09-23 Thread Leopold Toetsch
Mike Lambert (via RT) wrote: >> Now, trace_system_stack walks a ~1300 entries deeper stack in CGoto >>run mode, because of the jump table in cg_core. Don't ask me about this >>difference to 900 ops, gdb says so. > Ahh, good observation. (I'm more of a non-cgoto person myself ;). My favorit

intlist vs array

2002-09-23 Thread Leopold Toetsch
I did "cp t/pmc/intlist.t t/pmc/intlista.t" and s/\.IntList/\.PerlArray/g in the latter. After implementing the missing pop-methods[1] in array.pmc I ran both: $ time parrot t/pmc/intlist_2.pbc I need a shower. real0m0.097s user0m0.090s sys 0m0.000s $ time parrot t/pmc/intlista_2.p

Re: pre-PATCH: lexicals

2002-09-23 Thread Piers Cawley
"Jonathan Sillito" <[EMAIL PROTECTED]> writes: >> -Original Message- >> From: Sean O'Rourke [mailto:[EMAIL PROTECTED]] >> >> I think I didn't look through the patch queue carefully enough ;). I >> gather that it's accepted practice (or something like that) to use an >> array of pointers i

Re: [perl #17346] [PATCH] return undef for negative indices

2002-09-23 Thread Jerome Quelin
On Dimanche 22 Septembre 2002 12:08, Nicholas Clark wrote : > (except by golfers and obfuscators. And several that I met at YAPC::EU are > excited by the golfing and obfuscating possibilities of perl6. Be afraid) As a golfer, I'm a bit disappointed by perl6's golfing possibilities. For several r

Re: Regex query

2002-09-23 Thread Simon Cozens
[EMAIL PROTECTED] (Luke Palmer) writes: > Since we now have an explicit flattening operator (unary *), there's no > need to differentiate between a "real" list and a reference to one. What context does "push" impute on its operands? If push @a, [1,2,3,4]; and push @a, 1,2,3,4; are goi

Re: <( .... )> vs <{ .... }>

2002-09-23 Thread Me
> If you can't distinguish braces and parentheses (or quotes and > backquotes in some other fonts), you are in deep trouble in many > languages including perl5 BTW. I've seldom found myself mistaking a brace for a paren or a quote for a backquote when using Perl 5. So maybe you are right. But ma

Re: Regex query

2002-09-23 Thread Andrew Rodland
On Sat, 21 Sep 2002 16:33:31 -0600 (MDT), Luke Palmer said: > You know, the idea that square brackets are the only things that can > make lists is starting to really appeal to me. Similar for squiggles > and hashes. I don't know how many times in my early Perl5 days I did > this: > Since we no

Re: Perl 6 Summary for week ending 2002-09-15

2002-09-23 Thread Josef Hook
On Fri, 20 Sep 2002, Piers Cawley wrote: > Leopold Toetsch <[EMAIL PROTECTED]> writes: > > > Piers Cawley wrote: > > > >> Happy birthday to me! > > > > > > Congratulations. > > > >> ... by my turning 35 on the 15th > > > > > > 44 on 16th - yes Sept. > > Congrats to you too. So, should I s

[perl #17517] [PATCH] build system

2002-09-23 Thread via RT
# New Ticket Created by Leopold Toetsch # Please include the string: [perl #17517] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt2/Ticket/Display.html?id=17517 > Attached patch - removes the annoying and wrong rerun of Configure.pl - adds a comme

Re: how to use MultiArray?

2002-09-23 Thread Josef Hook
On Wed, 18 Sep 2002, Aldo Calpini wrote: > > I couldn't find any example of using a MultiArray PMC. > I tried on my own, but failed miserably. > > from what I've seen, it seems that is impossible to > properly initialize a multidimensional MultiArray. > > I've tried this: > > new P1

Re: <( .... )> vs <{ .... }>

2002-09-23 Thread Stéphane Payrard
On (22/09/02 10:37), Me wrote: > From: "Me" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Subject: <( )> vs <{ }> > Date: Sun, 22 Sep 2002 10:37:59 -0500 > > In several forms of courier, and some other text fonts > I view code in, I find it hard to visually distinguish the > pattern e