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
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
"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
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
>
>
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
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
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
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
> 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
> -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
> 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
> "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
> -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
> "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
> "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
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;
> > }
>
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 [
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
: >
: >
: >
[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
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:
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
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
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"
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
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
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
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
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
> -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
[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;
[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
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
32 matches
Mail list logo