Re: Perl 6 and Set Theory

2002-12-08 Thread Damian Conway
Luke Palmer wrote about: =head1 Perl 6 and Set Theory This document will introduce a new way of thinking about some Perl 6 constructs. In addition, it proposes some minor changes that would help this way of thinking be more consistent. These changes may make Perl 6 a better language in general

Re: Perl 6 and Set Theory

2002-12-08 Thread Luke Palmer
> Date: Sun, 08 Dec 2002 19:10:30 +1100 > From: Damian Conway <[EMAIL PROTECTED]> > > There are actually four types of junction: > > conjunction: all(@elements) > disjunction: any(@elements) > abjunction:one(@elements) > injunction: none(@elements) Oh yeah... >

Re: purge: opposite of grep

2002-12-08 Thread Simon Cozens
[EMAIL PROTECTED] (Damian Conway) writes: > Of course, as long as you can call C without explicitly loading > a module, it's merely a philosophical distinction as to whether > C is core or not. Well, no; it's an implementation distinction too. Non-core methods 1) don't mean anything special to

Re: In defense of zero-indexed arrays.

2002-12-08 Thread chromatic
On Fri, 06 Dec 2002 14:16:43 +, Brad Hughes wrote: > In any case, the choice of default base index is less important for Perl than > for other languages given how seldom arrays in Perl are accessed by index as > opposed to manipulated by push, pop, for $x (@array) loops and such. I slice a lo

Re: purge: opposite of grep

2002-12-08 Thread Ian Remmler
On Sun, Dec 08, 2002 at 11:28:24AM +1100, Damian Conway wrote: > We could certainly do that. But let's call it C. I usually just lurk here, but I just had to pipe in. :) I'm not sure the meaning of the name C would be obvious to someone who hadn't seen it before. I keep thinking C would be nice,

Re: purge: opposite of grep

2002-12-08 Thread Ken Fox
Damian Conway wrote: sub part ($classifier, *@list) { return @parts; } Given the original example (@foo,@bar,@zap) := part [ /foo/, /bar/, /zap/ ] @source; this binds the contents of @parts to (@foo,@bar,@zap)? The array refs in @parts are not flattened though. Is it c

Re: purge: opposite of grep

2002-12-08 Thread David Wheeler
On Saturday, December 7, 2002, at 10:47 PM, Damian Conway wrote: I keep thinking C would be nice, or maybe C. Just a thought... C is quite good. Though I still like C best. Ooh, I like C best. C is too easy to interpret as other things (partition? part with? part from? part of? partner? et

Re: purge: opposite of grep

2002-12-08 Thread Smylers
David Wheeler wrote: > On Saturday, December 7, 2002, at 10:47 PM, Damian Conway wrote: > > > Ian Remmler decloaked and wrote: > > > > > I keep thinking C would be nice ... > > > > C is quite good. Though I still like C best. > > Ooh, I like C best. I dislike C cos it's a small typo away from

Re: purge: opposite of grep

2002-12-08 Thread David Wheeler
On Sunday, December 8, 2002, at 10:20 AM, Smylers wrote: I dislike C cos it's a small typo away from C. Yes, but I would expect to be a compile-time error, since the signatures are different. The same can't be said for r?index. David -- David Wheeler AIM:

Re: purge: opposite of grep

2002-12-08 Thread Damian Conway
Ken Fox asked: sub part ($classifier, *@list) { return @parts; } Given the original example (@foo,@bar,@zap) := part [ /foo/, /bar/, /zap/ ] @source; this binds the contents of @parts to (@foo,@bar,@zap)? Yes. The array refs in @parts are not flattened though

Re: purge: opposite of grep

2002-12-08 Thread Damian Conway
David Wheeler wrote: Ooh, I like C best. C is too easy to interpret as other things (partition? part with? part from? part of? partner? etc.). You know, that's *exactly* why I like C better. ;-) Damian

Re: purge: opposite of grep

2002-12-08 Thread Ken Fox
Damian Conway wrote: Ken Fox asked: Is it correct to think of flattening context as a lexical flattening? i.e. only terms written with @ are flattened and the types of the terms can be ignored? I'm not sure I understand this question. Sometimes array references behave as arrays, e.g. push

right-to-left pipelines

2002-12-08 Thread Stéphane Payrard
[snipped] > so it's easy to build up more complex right-to-left pipelines, like: > > (@foo, @bar) := > part [/foo/, /bar/], > sort { $^b <=> $^a } > grep { $_ > 0 } > @data; > > I wo

Re: right-to-left pipelines

2002-12-08 Thread Luke Palmer
> Date: Mon, 9 Dec 2002 06:00:40 +0100 > From: =?iso-8859-1?Q?St=E9phane?= Payrard <[EMAIL PROTECTED]> > Damian: > > so it's easy to build up more complex right-to-left pipelines, like: > > > > (@foo, @bar) := > > part [/foo/, /bar/], > > sort { $^b <=> $^a }

Re: Fw: right-to-left pipelines

2002-12-08 Thread Luke Palmer
Note: this is back on-list. > From: "Me" <[EMAIL PROTECTED]> > Date: Mon, 9 Dec 2002 01:27:55 -0600 > > [regarding -> as a left-to-right pipe-like operator] > > Please do. As in, please point out on list that > '->' is already established as a left-to-right > flow/assignment operator so why not