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

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... represent

Re: purge: opposite of grep

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

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 lot

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 Cpart. I usually just lurk here, but I just had to pipe in. :) I'm not sure the meaning of the name Cpart would be obvious to someone who hadn't seen it before. I keep thinking Csift

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

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 Csift would be nice, or maybe Cdiscrim. Just a thought... Csift is quite good. Though I still like Cpart best. Ooh, I like Csift best. Cpart is too easy to interpret as other things (partition? part with?

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 Csift would be nice ... Csift is quite good. Though I still like Cpart best. Ooh, I like Csift best. I dislike Csift cos it's a small typo

Re: purge: opposite of grep

2002-12-08 Thread David Wheeler
On Sunday, December 8, 2002, at 10:20 AM, Smylers wrote: I dislike Csift cos it's a small typo away from Cshift. 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

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

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 consider