Parsing macros (was: Control flow variables)

2003-11-19 Thread Jonathan Lang
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've read about macro parsing concentra

Re: Using environment variables to control long running tests (again)

2003-11-19 Thread Michael G Schwern
On Wed, Nov 19, 2003 at 07:17:46AM -0800, Randal L. Schwartz wrote: > Michael> For that reason I'd agree with Curtis and say that > Michael> everything is always run by default and users can then elect > Michael> what to turn off. PERL_SKIP_LONG_TESTS seems like a clear > Michael> name. > > As

Re: [perl] RE: s/// in string context should return the string

2003-11-19 Thread Simon Cozens
[EMAIL PROTECTED] (Allison Randal) writes: > We talked about this today. Our current thought is to retroactively > write the Synopses and keep those up-to-date (with notes in the outdated > parts of the A's and E's pointing to the relevant section of the > S's). To be honest, I don't care how it's

Re: Control flow variables

2003-11-19 Thread Sean O'Rourke
[EMAIL PROTECTED] (Austin Hastings) writes: > What does C do? That's the operator that's used to assign values to C<$^x> and friends in closures. In all its glory, you give it a set of values, and it assigns them to a block's undefined variables, quieting those annoying warnings: @x = 1..10;

RE: Control flow variables

2003-11-19 Thread Austin Hastings
> -Original Message- > From: Larry Wall [mailto:[EMAIL PROTECTED] > On the other hand, putting the default up front is clearer if the > block is long. Could even be something like: > > @foo = gather is default(@results) { > for @a -> $x { pick $x if mumble($x) } > } And C

Re: Freeze checkin

2003-11-19 Thread Jeff Clites
On Nov 19, 2003, at 1:34 PM, Leopold Toetsch wrote: Jeff Clites <[EMAIL PROTECTED]> wrote: On Nov 19, 2003, at 9:04 AM, Dan Sugalski wrote: Two initial concerns: 1) I have a patch which I've been assembling to do ordered destruction. That needs to use the next_for_GC pointer (and I think any al

Re: [perl] RE: s/// in string context should return the string

2003-11-19 Thread Allison Randal
Simon wrote: > > How should we go about bringing A3 up to match current reality? It is, after > all, over two years old now. We talked about this today. Our current thought is to retroactively write the Synopses and keep those up-to-date (with notes in the outdated parts of the A's and E's pointi

Re: Freeze checkin

2003-11-19 Thread Leopold Toetsch
Jeff Clites <[EMAIL PROTECTED]> wrote: > On Nov 19, 2003, at 9:04 AM, Dan Sugalski wrote: > Two initial concerns: > 1) I have a patch which I've been assembling to do ordered destruction. > That needs to use the next_for_GC pointer (and I think any alternate > implementation would need to as well

Re: configure on windows

2003-11-19 Thread Pete Lomax
On 19 Nov 2003 16:00:00 +0100, Juergen Boemmels <[EMAIL PROTECTED]> wrote: >Are there any people out there building parrot on MinGW? >config/init/hints/mswin32.pl is far from complete. I'm quite happy to be the first/only testing this > >Could you try out the attached patch. Sorry, no can do thi

Re: Control flow variables

2003-11-19 Thread Larry Wall
On Wed, Nov 19, 2003 at 09:12:01AM -0600, Jonathan Scott Duff wrote: : On Tue, Nov 18, 2003 at 09:36:31PM -0800, Larry Wall wrote: : > As for the original question that started this whole silly thread, : > control structures that return values should probably be considered : > some kind of generato

Re: Freeze checkin

2003-11-19 Thread Jeff Clites
On Nov 19, 2003, at 9:04 AM, Dan Sugalski wrote: 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, and the vtable/low-level API is going to change, but the op-level interface will be stable. I wanted it in

Re: Control flow variables

2003-11-19 Thread Luke Palmer
Gordon Henriksen writes: > Larry Wall wrote: > > > On Tue, Nov 18, 2003 at 06:28:59PM -0500, Gordon Henriksen wrote: > > > > > my @b = for @a -> $_ { > > > ... > > > } > > > > That will be a syntax error. Generators are too mind-stretching to > > inflict on novices [...] > > I m

RE: Control flow variables

2003-11-19 Thread Gordon Henriksen
Larry Wall wrote: > On Tue, Nov 18, 2003 at 06:28:59PM -0500, Gordon Henriksen wrote: > > > my @b = for @a -> $_ { > > ... > > } > > That will be a syntax error. Generators are too mind-stretching to > inflict on novices [...] I making the point that within the context of this w

Re: [perl] RE: s/// in string context should return the string

2003-11-19 Thread Jonathan Scott Duff
On Wed, Nov 19, 2003 at 06:17:33PM +, Simon Cozens wrote: > [EMAIL PROTECTED] (Larry Wall) writes: > > Sigh. There's no =~ operator in Perl 6. > > How should we go about bringing A3 up to match current reality? It is, after > all, over two years old now. Isn't Allison the maintainer? Just p

Re: Control flow variables

2003-11-19 Thread Jonathan Scott Duff
On Tue, Nov 18, 2003 at 09:36:31PM -0800, Larry Wall wrote: > As for the original question that started this whole silly thread, > control structures that return values should probably be considered > some kind of generator, and have an explicit "yield"-like statement > that is orthogonal to "last"

Re: Control flow variables

2003-11-19 Thread Larry Wall
On Wed, Nov 19, 2003 at 09:30:15AM -0700, Luke Palmer wrote: : Piers Cawley writes: : > All of which means you can wrap it up in a macro and prove Simon's : > point about what's syntax and what's CP6AN: : > : >macro unless_all( Block &test is parsed //, : > Block &conseque

Re: Control flow variables

2003-11-19 Thread Larry Wall
On Tue, Nov 18, 2003 at 06:28:59PM -0500, Gordon Henriksen wrote: : Whuh? Tangential at best... The result would be the same as in a : non-vectorized version, just repeated automatically for you. : : my @b = for @a -> $_ { : ... : } That will be a syntax error. Generators are too

Re: Control flow variables

2003-11-19 Thread Larry Wall
On Wed, Nov 19, 2003 at 08:08:49AM +1100, Damian Conway wrote: : Michael Lazzaro wrote: : : >So, just to make sure, these two lines are both valid, but do completely : >different things: : > : >return if $a; : : Means: : : if ($a) { return } : : : >return if $a { $a } : : Means:

Re: [perl] RE: s/// in string context should return the string

2003-11-19 Thread Simon Cozens
[EMAIL PROTECTED] (Larry Wall) writes: > Sigh. There's no =~ operator in Perl 6. How should we go about bringing A3 up to match current reality? It is, after all, over two years old now. -- End July 2001 - Alpha release for demonstration at TPC

Freeze checkin

2003-11-19 Thread Dan Sugalski
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, and the vtable/low-level API is going to change, but the op-level interface will be stable. I wanted it in before things driged any further, thou

Re: [perl] RE: s/// in string context should return the string

2003-11-19 Thread Larry Wall
On Wed, Nov 19, 2003 at 09:03:38AM -0500, Austin Hastings wrote: : : : > -Original Message- : > From: Joe Gottman [mailto:[EMAIL PROTECTED] : > Sent: Tuesday, November 18, 2003 9:58 PM : > To: Perl6 : > Subject: Re: [perl] RE: s/// in string context should return the string : > : > : >

Re: Control flow variables

2003-11-19 Thread Luke Palmer
Piers Cawley writes: > All of which means you can wrap it up in a macro and prove Simon's > point about what's syntax and what's CP6AN: > >macro unless_all( Block &test is parsed //, > Block &consequence, [EMAIL PROTECTED] ) > { my $guard = Object.new; >for [

Re: Control flow variables

2003-11-19 Thread Luke Palmer
Jonathan Scott Duff writes: > On Tue, Nov 18, 2003 at 11:37:22PM +0100, Seiler Thomas wrote: > > So... lets call a function instead: > > > > my $is_ok = 1; > > for 0..6 -> $t { > > if abs(@new[$t] - @new[$t+1]) > 3 { > > $is_ok = 0; > > last; > > } >

Re: Control flow variables

2003-11-19 Thread Randal L. Schwartz
> "Randal" == Randal L Schwartz <[EMAIL PROTECTED]> writes: Randal> I actually consider that an annoying statement. I have to back up Randal> three times to figure out what it means. And before someone whips out the Schwartzian Transform to undermine my statement... please note that in Perl6

Re: Control flow variables

2003-11-19 Thread Randal L. Schwartz
> "Austin" == Austin Hastings <[EMAIL PROTECTED]> writes: Austin> This is surprising. Perl has never failed to provide me with Austin> an adequacy of rope in other places. Why get squeamish in this Austin> instance? The rope in other places provides overwhelming positive benefits as well, I g

RE: Control flow variables

2003-11-19 Thread Austin Hastings
> -Original Message- > From: Randal L. Schwartz [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 19, 2003 9:46 AM > To: [EMAIL PROTECTED] > Subject: Re: Control flow variables > > > > "Smylers" == Smylers <[EMAIL PROTECTED]> writes: > > Smylers> I also was under the strong impre

Re: [COMMIT] IMCC bug fixes and changes

2003-11-19 Thread Melvin Smith
At 10:52 AM 11/19/2003 +0100, Leopold Toetsch wrote: Melvin Smith <[EMAIL PROTECTED]> wrote: > 2) IMCC labels can no longer start with #, although they may > contain embedded # Suboptimal. Label starting with an underscore are global labels and get an entry in the fixup-table. Then we'll have t

Re: Using environment variables to control long running tests (again)

2003-11-19 Thread Randal L. Schwartz
> "Michael" == Michael G Schwern <[EMAIL PROTECTED]> writes: Michael> Disabling tests for subjective reasons (they take "too long", Michael> they don't test critical functionality, etc...) is a slippery Michael> slope. But there are clearly tests that are "tip of the iceberg" as a safety chec

Re: configure on windows

2003-11-19 Thread Juergen Boemmels
? $_ ? languages/befunge/befunge.pbc ? t/src/headers.t Index: config/init/hints/mswin32.pl === RCS file: /cvs/public/parrot/config/init/hints/mswin32.pl,v retrieving revision 1.16 diff -u -r1.16 mswin32.pl --- config/init/hints/mswin32

Re: configure on windows

2003-11-19 Thread Juergen Boemmels
Pete Lomax <[EMAIL PROTECTED]> writes: > On 18 Nov 2003 18:37:57 +0100, Juergen Boemmels > <[EMAIL PROTECTED]> wrote: > > >I assume he runs it with perl Configure.pl --ask > Yes > > >The problem is that --ask option of has not the knowledge to change > >the options according to the compiler. I d

Re: Control flow variables

2003-11-19 Thread Randal L. Schwartz
> "Smylers" == Smylers <[EMAIL PROTECTED]> writes: Smylers> I also was under the strong impression that Larry had decreed Smylers> that we wouldn't have chained statement modifiers ... but I Smylers> thought it was because Larry had decided they would be a bad Smylers> thing to have rather th

RE: Control flow variables

2003-11-19 Thread Austin Hastings
> Austin Hastings wrote: > > > I'm way not sure about how the vector context result of iteration > structures > > will work. Specifically, what happens when a loop forks a thread, or > passes > > to a parallelized coroutine? There may not actually BE a result. (Of > course, > > in a right-thinking

Re: Using environment variables to control long running tests (again)

2003-11-19 Thread Fergal Daly
On Wed, Nov 19, 2003 at 01:45:31PM +1100, Andrew Savige wrote: > I think the two environment variables can happily coexist as > shown in the table below: > > PERL_SMOKE PERL_SKIP_LONG_TESTS > Naive User0 0 > Contrary User 1

RE: [perl] RE: s/// in string context should return the string

2003-11-19 Thread Austin Hastings
> -Original Message- > From: Joe Gottman [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 18, 2003 9:58 PM > To: Perl6 > Subject: Re: [perl] RE: s/// in string context should return the string > > > - Original Message - > From: "Austin Hastings" <[EMAIL PROTECTED]> > To: <[E

IMCC Bug? comments after setline

2003-11-19 Thread David Chan
Hi, IMCC appears to choke on comments after "setline", especially if they contain digits. Is the lexer expecting /setline +[0-9]+\s*$/ ? Should this be fixed? It appears to break pirate, which puts comments on every line. === $ cat test.

RE: thinking about variable context for like()

2003-11-19 Thread Potozniak, Andrew
> -Original Message- > From: Michael G Schwern [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 18, 2003 8:03 PM > To: Potozniak, Andrew > Cc: 'chromatic'; [EMAIL PROTECTED] > Subject: Re: thinking about variable context for like() > > > On Tue, Nov 18, 2003 at 12:23:19PM -0500, Potoz

RE: Control flow variables

2003-11-19 Thread Gordon Henriksen
> Damian Conway wrote: > > > push @moves, [$i, $j]; > > for 0..6 -> $t { > > if abs(@new[$t] - @new[$t+1]) > 3 { > > pop @moves; > > last; > > } > > } Thomas Seiler writes: > my $is_ok = 1; > for 0..6 -> $t { > if abs(@new[$t] - @new[$t+1]) > 3 { > $is_ok = 0

RE: Control flow variables

2003-11-19 Thread Gordon Henriksen
Austin Hastings wrote: > I'm way not sure about how the vector context result of iteration structures > will work. Specifically, what happens when a loop forks a thread, or passes > to a parallelized coroutine? There may not actually BE a result. (Of course, > in a right-thinking system this will

Re: Control flow variables

2003-11-19 Thread Jonathan Scott Duff
On Tue, Nov 18, 2003 at 11:37:22PM +0100, Seiler Thomas wrote: > So... lets call a function instead: > > my $is_ok = 1; > for 0..6 -> $t { > if abs(@new[$t] - @new[$t+1]) > 3 { > $is_ok = 0; > last; > } > } > if $is_ok { > yada() # h

Re: Control flow variables

2003-11-19 Thread Smylers
Michael Lazzaro writes: > [EMAIL PROTECTED] (Dan Sugalski) writes: > > > Luke Palmer: > > > > > That's illegal anyway. Can't chain statement modifiers :-) > > > > Will be able to. > > I was under the strong impression that Larry had decided that > syntactic ambiguities prevented this from hap

Re: Control flow variables

2003-11-19 Thread Jonathan Scott Duff
On Tue, Nov 18, 2003 at 11:05:57AM -0800, Michael Lazzaro wrote: > > On Tuesday, November 18, 2003, at 06:38 AM, Simon Cozens wrote: > >Given that we've introduced the concept of "if" having a return status: > > > > my $result = if ($a) { $a } else { $b }; > > > > Would that then imply that > >

RE: Control flow variables

2003-11-19 Thread Gordon Henriksen
No, because the if $a from "return if $a;" doesn't match the production if [else ] I so don't want to be anywhere near the Perl6 parser... -- Gordon Henriksen IT Manager ICLUBcentral Inc. [EMAIL PROTECTED] > -Original Message- > From: Michael Lazzaro [mailto:[EMAIL PROTEC

Re: IMCC problems with library loading

2003-11-19 Thread Leopold Toetsch
Jeff Clites <[EMAIL PROTECTED]> wrote: > On Nov 17, 2003, at 11:07 AM, Leopold Toetsch wrote: >> *But*, when writing that stuff, one prelim was, that the compiler sees >> all libs in the same sequence as runtime does. So above code (or your >> second example) is illegal. > Okay for now then. But

Re: New Example

2003-11-19 Thread Leopold Toetsch
Jonathan Worthington wrote: Hi, I've attached an example of calling a Win32 API using NCI. Could you please rework it to use the .pcc_begin/.nci_call interface (s. library/libpcre.imc for an example) Jonathan Thanks, leo

Re: [perl #24514] [PATCH] examples/pni is out of date

2003-11-19 Thread Leopold Toetsch
Ilya Martynov <[EMAIL PROTECTED]> wrote: > 1. There are incorrect instructions on running the example > 2. .so extension should be omited in loadlib Thanks, applied. leo

Re: [COMMIT] IMCC bug fixes and changes

2003-11-19 Thread Leopold Toetsch
Melvin Smith <[EMAIL PROTECTED]> wrote: > 2) IMCC labels can no longer start with #, although they may > contain embedded # Suboptimal. Label starting with an underscore are global labels and get an entry in the fixup-table. > Reasoning: Its a bit ambiguous to the eye, which isn't too bad

Re: [perl] RE: s/// in string context should return the string

2003-11-19 Thread Piers Cawley
"Joe Gottman" <[EMAIL PROTECTED]> writes: > - Original Message - > From: "Austin Hastings" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Tuesday, November 18, 2003 3:04 PM > Subject: [perl] RE: s/// in string context should return the string > > >> As a "Bvalu

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

2003-11-19 Thread Piers Cawley
Stéphane Payrard <[EMAIL PROTECTED]> writes: > s/// in string context should return the string after substituion. > It seems obvious to me but I mention it because I can't find it > in the apocalypses. Surely it should return the string after substitution, but with an appropriate 'but true' or

Re: Control flow variables

2003-11-19 Thread Piers Cawley
Damian Conway <[EMAIL PROTECTED]> writes: > David Wheeler wrote: > >> Isn't that just: >> for @array_of_random_values_and_types, 'ok' -> $t { >> when 'ok' { yada(); last } >> last unless some_sort_of_test($t); >> } >> IOW, the topic is only 'ok' when all of the items in the

[COMMIT] IMCC bug fixes and changes

2003-11-19 Thread Melvin Smith
1) Fixed a couple of bugs in flow analysis code in basic block tracking. 2) IMCC labels can no longer start with #, although they may contain embedded # Reasoning: Its a bit ambiguous to the eye, which isn't too bad, but IMCC should be able to spit out PASM and turn around and compile

Re: Proposal: parrot-compilers list

2003-11-19 Thread Piers Cawley
Melvin Smith <[EMAIL PROTECTED]> writes: > In the past couple of years we've seen several sub-projects pop-up > and subsequently fizzle out (maybe due to Parrot slow > progress or maybe due to lack of critical mass). > > I propose creating 'parrot-compilers' as a general > purpose list for any and