Hi,
I would like to propose adding the "last" statement
to the "grep", which currently doesn't work:
maas34: perl -e 'grep { print and $_ == 3 and last } (1,2,3,4,5)'
123
Can't "last" outside a loop block at -e line 1.
This way it would be possible to use such constructs:
print_header
On Wed, May 02, 2001 at 11:13:13AM +0200, Alexander Farber (EED) wrote:
> I would like to propose adding the "last" statement
> to the "grep", which currently doesn't work:
For the record, I have no problem with this. :)
> maas34: perl -e 'grep { print and $_ == 3 and last } (1,2,3,4,5)'
>
On Wed, May 02, 2001 at 11:10:22AM +0100, Michael G Schwern wrote:
> On Wed, May 02, 2001 at 11:13:13AM +0200, Alexander Farber (EED) wrote:
> > I would like to propose adding the "last" statement
> > to the "grep", which currently doesn't work:
>
> For the record, I have no problem with this. :)
David Grove wrote:
> am seeing some similarities between some of the proposed goals of
> Perl 6 and the .NET platform.
> . . . many things in .NET have been discussed similarly here.
That's because .NET attempts to address real-world issues.
The goals of .NET are not evil in and of themselves, y
I've been recently looking over the specification for C# and the .NET
platform (and falling for very little of the verbage: almost every line of
the first chapter of book I'm reading contains at least one oxymoron), and
am seeing some similarities between some of the proposed goals of Perl 6 and
t
Michael G Schwern wrote:
> And I'm quite sure there's an RFC for doing something like this alread
> up for Perl 6.
At least RFC 199, and several related threads
such as "$a in @b".
--
John Porter
It's so mysterious, the land of tears.
Michael G Schwern writes:
: (grep {...} @stuff)[0] will work, but its inelegant.
It's inelegant only because the slice doesn't know how to tell the
iterator it only needs one value. If it did know, you'd call it
elegant. :-)
Larry
On Wed, May 02, 2001 at 04:30:07PM +0100, Michael G Schwern wrote:
> On Wed, May 02, 2001 at 08:05:29AM -0700, Larry Wall wrote:
> > Michael G Schwern writes:
> > : (grep {...} @stuff)[0] will work, but its inelegant.
> >
> > It's inelegant only because the slice doesn't know how to tell the
> >
At 12:54 PM 5/2/2001 -0400, John Porter wrote:
>David Grove wrote:
> > distributed objects,
>
>I don't recall discussion of this wrt perl6, frankly.
I've mumbled about it on and off. I'd like to be able to do:
$foo = new Bar;
print SOCKET serialze($foo);
and on the other end do:
$foo
At 09:58 AM 5/2/2001 -0700, Larry Wall wrote:
>Dan Sugalski writes:
>: I'd really like to get into the details of what is and isn't valid for the
>: optimizer to do, though I expect it's still a little early in the
>: Apocalypse season for that.
>
>Doubtless we'll do as other compilers do, and hav
On Wed, 2 May 2001 11:41:32 -0500, Jarkko Hietaniemi wrote:
>but I suspect in this case want('LIST') would
>> return that magical "0 but true" or something similar.
>
>Hopefully the "something similar", I hope in Perl 6 we will able to
>bury the "0 but true" workaround to the backyard on a moonle
> "DS" == Dan Sugalski <[EMAIL PROTECTED]> writes:
DS> I've mumbled about it on and off. I'd like to be able to do:
DS>$foo = new Bar;
DS>print SOCKET serialze($foo);
DS> and on the other end do:
DS>$foo = unserialize();
DS>$foo->bar();
DS> I don't know that
Dan Sugalski wrote:
> I'd like to be able to do:
>$foo = new Bar;
>print SOCKET serialze($foo);
> and on the other end do:
>$foo = unserialize();
>$foo->bar();
I personally am a big fan of Obliq semantics.
It's something I'd really like to see in perl.
--
John Porter
It's so my
> > Because you might have a wantarray situation that expects no values?
> >
> > () = whateveryouwant();
>
> I am sure that situation is handled by the 'want' RFC.
Yep. The most recent version is at:
http://www.yetanother.org/damian/Perl5+i/want.html
> I have not re
Michael G Schwern wrote:
> If we could determine if the block has no side effects... oh wait,
> everything in Perl has a side effect. ;)
:pure (again!)
--
John Porter
Bart Lateur writes:
: Because you might have a wantarray situation that expects no values?
:
: () =3D whateveryouwant();
:
: You can always expect one more than is on the LHS.
:
: How is this currently handled with split()?
It fakes up a third argument that is one more than the length of
Dan Sugalski writes:
: I'd really like to get into the details of what is and isn't valid for the
: optimizer to do, though I expect it's still a little early in the
: Apocalypse season for that.
Doubtless we'll do as other compilers do, and have a little knob you
just keep turning up until som
> "GB" == Graham Barr <[EMAIL PROTECTED]> writes:
GB> On Wed, May 02, 2001 at 04:30:07PM +0100, Michael G Schwern wrote:
>> On Wed, May 02, 2001 at 08:05:29AM -0700, Larry Wall wrote:
>> > Michael G Schwern writes:
>> > : (grep {...} @stuff)[0] will work, but its inelegant.
>> >
Taking a page from JavaScript, it would be nice in the same vein to be
able to access the "context" (stack frame type context, not scalar/list
type context) of a method, either running or not.
The idea is that if the information was available, a module could start
multiple threads, spawn them acr
DS> At 12:54 PM 5/2/2001 -0400, John Porter wrote:
>> David Grove wrote:
>> > distributed objects,
>>
>> I don't recall discussion of this wrt perl6, frankly.
DS> I've mumbled about it on and off. I'd like to be able to do:
DS>$foo = new Bar;
DS>print SOCKET serialze($foo);
DS> and on
On Wed, May 02, 2001 at 12:01:24PM -0400, Uri Guttman wrote:
> > "GB" == Graham Barr <[EMAIL PROTECTED]> writes:
>
> GB> On Wed, May 02, 2001 at 04:30:07PM +0100, Michael G Schwern wrote:
> >> On Wed, May 02, 2001 at 08:05:29AM -0700, Larry Wall wrote:
> >> > Michael G Schwern writes:
>
At 09:30 PM 5/2/2001 +0400, Ilya Martynov wrote:
>DS> At 12:54 PM 5/2/2001 -0400, John Porter wrote:
> >> David Grove wrote:
> >> > distributed objects,
> >>
> >> I don't recall discussion of this wrt perl6, frankly.
>
>DS> I've mumbled about it on and off. I'd like to be able to do:
>
>DS>$f
David Grove writes:
: Larry, et. al.: Is this similarity on purpose?
Yes, but only becase .NET is a VM, not because it's from MicroSoft.
The basic goal is to have a Perl VM that can sit easily on other VMs,
whether .NET's or Java's or our own. Another example of competing
by cooperating, which
On Wed, 2 May 2001 08:05:29 -0700 (PDT), Larry Wall <[EMAIL PROTECTED]> wrote:
> Michael G Schwern writes:
> : (grep {...} @stuff)[0] will work, but its inelegant.
>
> It's inelegant only because the slice doesn't know how to tell the
> iterator it only needs one value. If it did know, you'd cal
On Wed, May 02, 2001 at 06:05:54PM +0200, H. Merijn Brand wrote:
> IIRC, that optimization is not even considered for reasons of many people
> wanting the side effects of grep/map finishing over all elements (which could
> of course be from a tied array or database connection)
If we could determi
On Wed, May 02, 2001 at 08:05:29AM -0700, Larry Wall wrote:
> Michael G Schwern writes:
> : (grep {...} @stuff)[0] will work, but its inelegant.
>
> It's inelegant only because the slice doesn't know how to tell the
> iterator it only needs one value. If it did know, you'd call it
> elegant. :-
On Wed, 2 May 2001 17:05:31 +0100, Graham Barr wrote:
>wantarray-ness is already passed along the call stack today. Thats
>the whole point of it. So what is the difference in passing a number
>instead of a boolean ?
Because you might have a wantarray situation that expects no values?
()
H.Merijn Brand writes:
: On Wed, 2 May 2001 08:05:29 -0700 (PDT), Larry Wall <[EMAIL PROTECTED]> wrote:
: > Michael G Schwern writes:
: > : (grep {...} @stuff)[0] will work, but its inelegant.
: >
: > It's inelegant only because the slice doesn't know how to tell the
: > iterator it only needs on
> > am seeing some similarities between some of the proposed goals of
> > Perl 6 and the .NET platform.
> > . . . many things in .NET have been discussed similarly here.
>
> That's because .NET attempts to address real-world issues.
> The goals of .NET are not evil in and of themselves, you know.
On Wed, May 02, 2001 at 05:22:26PM -0400, David Grove wrote:
> > > am seeing some similarities between some of the proposed goals of
> > > Perl 6 and the .NET platform.
> > > . . . many things in .NET have been discussed similarly here.
> >
> > That's because .NET attempts to address real-world is
> >Hopefully the "something similar", I hope in Perl 6 we will able to
> >bury the "0 but true" workaround to the backyard on a moonless night :-)
>
> Especially since you don't need it. "0E0" and "0.", to name just two,
> work just as well. ;-)
http://yetanother.org/damian/Perl
At 06:06 AM 5/3/2001 +1000, Damian Conway wrote:
>> >Hopefully the "something similar", I hope in Perl 6 we will able to
>> >bury the "0 but true" workaround to the backyard on a moonless
> night :-)
>>
>> Especially since you don't need it. "0E0" and "0.", to name just two,
>
On Wed, May 02, 2001 at 06:29:51PM +0200, Bart Lateur wrote:
> On Wed, 2 May 2001 17:05:31 +0100, Graham Barr wrote:
>
> >wantarray-ness is already passed along the call stack today. Thats
> >the whole point of it. So what is the difference in passing a number
> >instead of a boolean ?
>
> Becau
On Wed, May 02, 2001 at 05:36:11PM +0100, Graham Barr wrote:
> On Wed, May 02, 2001 at 06:29:51PM +0200, Bart Lateur wrote:
> > On Wed, 2 May 2001 17:05:31 +0100, Graham Barr wrote:
> >
> > >wantarray-ness is already passed along the call stack today. Thats
> > >the whole point of it. So what is
At 09:29 AM 5/2/2001 -0700, Larry Wall wrote:
>H.Merijn Brand writes:
>: wanting the side effects of grep/map finishing over all elements (which
>could
>: of course be from a tied array or database connection)
>
>If we do that kind of optimization, then we would certainly provide
>some kind of ea
Graham Barr wrote:
> How this cooperates with lazy is a different matter entirely.
>
> Graham.
http://dev.perl.org/rfc/123.html#Assigning_from_lazy_lists
suggests that assigning to a sized busy array from a lazy array will
fill it and stop.
--
David Nicol 816.235.1187 [
On Tue, 1 May 2001, Dan Sugalski wrote:
> Right. What I'm thinking would be a good place to get to is a list of the
> functionality that the debugger needs to provide or have available to it
> from the interpreter, rather than the actual interface to the user. (Which
> is important, but a se
Damien Neil wrote:
>
> sub foo {
> my Dog $spot = shift;
> my $fh = IO::File->new("file");
> $spot->eat_homework($fh);
> }
>
> Even with the object type declared, the compiler can make no
> assumptions about whether a reference to $fh will be held or not.
> Perhaps the Poodle sub
"David L. Nicol" wrote:
i'm swearing off sort-by-subject. Sorry.
[EMAIL PROTECTED] writes:
:> >Hopefully the "something similar", I hope in Perl 6 we will able to
:> >bury the "0 but true" workaround to the backyard on a moonless night :-)
:>
:> Especially since you don't need it. "0E0" and "0.", to name just two,
:> work just as well. ;-
> "Don't Let Architecture Astronauts Scare You"
>
> http://joel.editthispage.com/stories/storyReader$320
This is a really good article. The quotes from MS and Sun whitepapers are
living proof that rarely are superior technical means being espoused.
Superior sales are the more likely culprit, esp
> -Original Message-
> From: Jarkko Hietaniemi [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 02, 2001 5:26 PM
> To: David Grove
> Cc: Perl 6 Language Mailing List
> Subject: Re: .NET
>
>
> (still waiting
> > for "something original for a change").
>
> You are saying that the Clippy
Actually, Clippy is definitely worth stealing. In fact, the whole
notion of Generalized Robotic Open-source Animated Cartoon Images
(GROACI) is imperative to the future of perl.
Forget many-languages-one-engine, Larry, and focus on winning the
Groaci race...
=Austin
--- David Grove <[EMAIL PR
It's certainly a mistake to say "the goals of .NET", as if
they were a monolithic whole.
But the point is, some of the (technical) goals of .NET are
worthy, if not the slightest bit original; and so it should
not be a shame if some of Perl6's goals were collinear
with them. And I hope that ends
Dave Storrs schrieb am 2001-04-27, 12:07:
> On Wed, 25 Apr 2001, Johan Vromans wrote:
>
> > Andy Dougherty <[EMAIL PROTECTED]> writes:
> >
> > > Starting with 'P' is useful so we can keep our acronyms such as PMC and
> >
> > PERIL (hi Tom!).
> >
> > -- Johan
>
> < ACCENT=ENGLISH>
>
On Wed, May 02, 2001 at 03:19:44PM -0700, Austin Hastings wrote:
> Actually, Clippy is definitely worth stealing. In fact, the whole
> notion of Generalized Robotic Open-source Animated Cartoon Images
> (GROACI) is imperative to the future of perl.
See http://www.cepstral.com -- and there will be
> What about leaving the flora aund fauna and using a name
> like they call ships?
> They always got names of females or towns...
>
> I suggest:
>
> PISA
>
Um... that sounds perilously close to "Piece Of". Am I alone on this one?
__
Matt Youell
47 matches
Mail list logo