declaring if and while (was: rule, rx and sub)

2002-08-30 Thread Thomas A. Boyer
Larry Wall wrote: > > : In summary: assuming Perl 6 allows user-defined while-ish structures, how > : would it be done? > > I think the secret is to allow easy attachment of regex rules to sub > and parameter declarations. There's little point in re-inventing > regex syntax using declarations.

[perl #16874] [BUG] Concatenation failing

2002-08-30 Thread via RT
# New Ticket Created by Leon Brocard # Please include the string: [perl #16874] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt2/Ticket/Display.html?id=16874 > Hi. I have a weird bug where concatenation is sometimes failing, and I have no idea wh

Re: rule, rx and sub

2002-08-30 Thread Trey Harris
In a message dated Thu, 29 Aug 2002, Damian Conway writes: > And, of course, the C property would smart-match its value > against the corrresponding argument, so one could also code optimized > variants like: > > sub repeat is multi ($desc is valued(1), &body) { > body(1); >

Re: [perl #16874] [BUG] Concatenation failing

2002-08-30 Thread Markus Laire
> I have a weird bug where concatenation is sometimes failing, and I > have no idea why. See the attached pasm. I fully expect both works and > weird to output "foo", "bar", "quux" with various levels of spacing, > but weird doesn't output quux. > ... If I add just one print-command to that code,

Re: [perl #16852] [PATCH] Eliminate empty extension

2002-08-30 Thread Leopold Toetsch
Steve Fink wrote: > On Thu, Aug 29, 2002 at 11:56:42PM +0200, Leopold Toetsch wrote: > The script you're referring to sounds like it actually does something > meaningful, like run ops2c.pl on all the tests and execute them that > way. s/ops2c.pl/pbc2c.pl/perl6/ ;-) > ... Which is utterly un

prebinding questions

2002-08-30 Thread HellyerP
[apologies to anyone who received this twice... the bonehead at the keyboard left the subject blank. ] > This week I was fortunate enough to hear Damian speak twice, once on > everything and once on Perl6. Damian, it was tremendous of you to come > and speak to us in London - thank-you very muc

Re: [perl #16874] [BUG] Concatenation failing

2002-08-30 Thread Peter Sinnott
On Fri, Aug 30, 2002 at 08:35:43AM +, [EMAIL PROTECTED] wrote: > # New Ticket Created by Leon Brocard > # Please include the string: [perl #16874] > # in the subject line of all future correspondence about this issue. > # http://rt.perl.org/rt2/Ticket/Display.html?id=16874 > > > > Hi. >

Re: backtracking into { code }

2002-08-30 Thread Ken Fox
Damian Conway wrote: > rule expr1 { > { m:cont/@operators/ or fail } > } > > Backtracking would just step back over the rule as if it were atomic > (or followed by a colon). Ok, thanks. (The "followed by a colon" is just to explain the behavior, right? It's illegal to follow a

Re: backtracking into { code }

2002-08-30 Thread Aaron Sherman
[NOTE: BCCing off-list to protect private email addresses] On Fri, 2002-08-30 at 09:07, Ken Fox wrote: > Does the following example backtrack into ? > >rule foo { b+ } >rule bar { a b } This was the bit that got me on-board. I did not see the need for backtracking into rules until he

Re: [perl #16874] [BUG] Concatenation failing

2002-08-30 Thread Markus Laire
> I have a weird bug where concatenation is sometimes failing, and I > have no idea why. > ... While trying to find shortest code which reproduces this, I found probably related bug where string is overwritten by a constant in memory. set S0, "" set S1, "ABCDEFGHIJK" set S2, "123456789012" co

Re: [perl #16874] [BUG] Concatenation failing

2002-08-30 Thread Peter Gibbs
Leon Brocard (via RT) wrote: > I have a weird bug where concatenation is sometimes failing, and I > have no idea why. See the attached pasm. I fully expect both works and > weird to output "foo", "bar", "quux" with various levels of spacing, > but weird doesn't output quux. Patch below should fi

Re: backtracking into { code }

2002-08-30 Thread Larry Wall
On Fri, 30 Aug 2002, Ken Fox wrote: : Ok, thanks. (The "followed by a colon" is just to explain the behavior, : right? It's illegal to follow a code block with a colon, isn't it?) I don't see why it should be illegal--it could be useful if the closure has played continuation games of some sort to

Re: backtracking into { code }

2002-08-30 Thread Ken Fox
Larry Wall wrote: > On Fri, 30 Aug 2002, Ken Fox wrote: > : Ok, thanks. (The "followed by a colon" is just to explain the behavior, > : right? It's illegal to follow a code block with a colon, isn't it?) > > I don't see why it should be illegal--it could be useful if the closure > has played cont

Re: backtracking into { code }

2002-08-30 Thread Larry Wall
On Fri, 30 Aug 2002, Ken Fox wrote: : Apoc 5 has "It is an error to use : on any atom that does no : backtracking." Code blocks don't backtrack (at least that's what : I understood Damian to say). Code blocks don't backtrack *by default*. But you can do anything in a closure. : Are zero width a

[perl #16884] [PATCH] Scheme makefile tweak

2002-08-30 Thread via RT
# New Ticket Created by Andy Dougherty # Please include the string: [perl #16884] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt2/Ticket/Display.html?id=16884 > This one seems to have fallen through the cracks. Here's a re-send. --- parrot-orig

Conditional makefile generation (Was Re: [perl #16856] [PATCH]variouschanges to imcc)

2002-08-30 Thread Andy Dougherty
On Thu, 29 Aug 2002, Melvin Smith wrote: > I can live with the warning, as long as it compiles under traditional > lex and flex. Don't waste too much effort polishing imcc since it will be > getting a new interface eventually and might even be rewritten to self-host > on Parrot at some point. (He

Re: backtracking into { code }

2002-08-30 Thread Ken Fox
Larry Wall wrote: > There's a famous book called "Golf is Not a Game of Perfect". Well now I'm *totally* confused. I looked that up on Amazon and it has something to do with clubs and grass and stuff. That's completely different than what I thought golfing was. ;) Seriously, though. I have a pos

subroutine parameters with the same name

2002-08-30 Thread Nicholas Clark
Exegesis 4 says When the subroutine dispatch mechanism detects one or more pairs as arguments to a subroutine with named parameters, it examines the keys of the pairs and binds their values to the correspondingly named parameters -- no matter what order the paired arguments originally app

@array = %hash

2002-08-30 Thread Nicholas Clark
In Damian's excellent perl6 talk, I think he said that by default a hash in list context will return a list of pairs. Hence this @array = %hash for %hash with n keys would give an array of n elements, all pairs. If you want the perl5 tradition of a list alternating key,value,key,value... you'

Re: [perl #16853] [PATCH] avoid touching files

2002-08-30 Thread Nicholas Clark
On Thu, Aug 29, 2002 at 07:35:46PM +, Steve Fink wrote: > This patch makes re-running Configure.pl avoid updating the timestamps > on the generated .h (and many other) files iff the files did not > actually change. This is really only helpful to people who are working > on the Configure system

Re: Conditional makefile generation (Was Re: [perl #16856] [PATCH]various changes to imcc)

2002-08-30 Thread Leopold Toetsch
Andy Dougherty wrote: > ... make the barrier to running languages/perl6 as low as possible, My concerns too. (Some history) - I sent all the patches to get P6C running with 5.005_03 - I'm currently 95% maintaining/pushing the per6 driver (perl6) - last ~50 Kb imcc patches originated from my

Re: [BUG] GC collects argv aka P0

2002-08-30 Thread Peter Gibbs
Leopold Toetsch wrote: > $ perl6 -k examples/life-ar.p6 5 > Running generations This problem is due to the fact that the argument strings are created with the external flag set, which is not properly supported by the string and GC modules. Steve posted some patches recently that might well fix

Re: @array = %hash

2002-08-30 Thread Steffen Mueller
Nicholas Clark wrote: [...] > And what happens if I write > > %hash4 = ("Something", "mixing", pairs => and, "scalars"); 1 23 4 5 Perl5 says "Odd number of elements in hash assignment at -e line 1." And Perl6 should, too. IMHO, your example isn't

Re: @array = %hash

2002-08-30 Thread Simon Cozens
[EMAIL PROTECTED] (Steffen Mueller) writes: > > %hash4 = ("Something", "mixing", pairs => and, "scalars"); >1 23 4 5 > Perl5 says "Odd number of elements in hash assignment at -e line 1." > And Perl6 should, too. Except that a pair is a single th

RE: @array = %hash

2002-08-30 Thread David Whipp
Steffen Mueller > > %hash4 = ("Something", "mixing", pairs => and, "scalars"); >1 23 4 5 > Perl5 says "Odd number of elements in hash assignment at -e line 1." > And Perl6 should, too. Hmm, I rather like the idea of thinking of a %foo variable as

RE: @array = %hash

2002-08-30 Thread David Whipp
Piers Cawley wrote: > Maybe we should just say 'sod it' and implement the entire Smalltalk > Collection hierarchy and have done with it? Sets, bags, hashes > (dictionaries for the Smalltalker), whatever, all have their uses... I'm not sure if you were being facetious, but I do think all the funct

[PATCH] in makefile, move libparrot.a from "test" to "all"

2002-08-30 Thread Mr. Nobody
libparrot.a is not really related to testing, it should belong in "all". This patch does so, and as a side effect, t/src/basic will now work with "make testj". __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com -

Re: Conditional makefile generation (Was Re: [perl #16856] [PATCH]variouschanges to imcc)

2002-08-30 Thread Andy Dougherty
On Sat, 31 Aug 2002, Leopold Toetsch wrote: > > ... make the barrier to running languages/perl6 as low as possible, > > > By default, traditional yacc puts its output files in y.tab.[ch]. Thus > > my imcc/Makefile currently has > > > > $(YACC) -d -v imcc.y > > mv y.tab.c imcparser.c >

atomicness and \n

2002-08-30 Thread Aaron Sherman
Is C<\n> going to be a rule (e.g. C<< >>) or is it implicitly translated to: <[\x0a\x0d...]>+ If it's the latter, then what does this do? \n? Do I get [<[\x0a\x0d...]>+]? Or do I get <[\x0a\x0d...]>+? If the former (which I assume is the case), how do I get

Re: Conditional makefile generation (Was Re: [perl #16856] [PATCH]various changes to imcc)

2002-08-30 Thread Steve Fink
On Fri, Aug 30, 2002 at 03:49:07PM -0400, Andy Dougherty wrote: > By default, traditional yacc puts its output files in y.tab.[ch]. Thus > my imcc/Makefile currently has > > $(YACC) -d -v imcc.y > mv y.tab.c imcparser.c > mv y.tab.h imcparser.h > > That's no problem, and works