Re: Junction Values

2005-02-20 Thread Nigel Sandever
On Sat, 19 Feb 2005 18:42:36 +1100, [EMAIL PROTECTED] (Damian Conway) wrote: > the Awesome Power of Junctions: As I tried to express elsehwere, this what I'm looking for. Instinctively, and for a long time since I first came across Q::S, I thought that the "killer app" of Junctions is there so

Re: Junction Values

2005-02-20 Thread Damian Conway
Rod Adams asked: > This sound reasonable enough? Frankly, no. ;-) Sorry, but your latest proposal sounds complex, multiply special-cased, and way too much of an imposition on the programmer (which is specifically what junctions are supposed to avoid). I'm going to continue to strongly recommend

Re: Junction Values

2005-02-20 Thread Rod Adams
Nigel Sandever wrote: On Sat, 19 Feb 2005 18:42:36 +1100, [EMAIL PROTECTED] (Damian Conway) wrote: The Awesome Power of Junctions: As I tried to express elsehwere, this what I'm looking for. Instinctively, and for a long time since I first came across Q::S, I thought that the "killer app" o

Re: Junction Values

2005-02-20 Thread Rod Adams
Damian Conway wrote: Rod Adams asked: > This sound reasonable enough? Frankly, no. ;-) Sorry, but your latest proposal sounds complex, multiply special-cased, and way too much of an imposition on the programmer (which is specifically what junctions are supposed to avoid). Funny. I thought it was

Re: Set sigils (was: Re: Junction Values)

2005-02-20 Thread Patrick R. Michaud
On Sat, Feb 19, 2005 at 01:43:57PM -0800, Ashley Winters wrote: > Instead of primary sigils, what about secondary sigils on an array to > mark it as an unordered set? > > @|foo = any > @&foo = all > @^foo = one # can arrays be curried arguments? hmm > @!foo = none > > After all, why should scal

Re: Junction Values

2005-02-20 Thread Nigel Sandever
On Sun, 20 Feb 2005 03:17:19 -0600, [EMAIL PROTECTED] (Rod Adams) wrote: > --020209010404060902000407 > Content-Type: text/plain; charset=windows-1252; format=flowed > Content-Transfer-Encoding: 7bit > > Nigel Sandever wrote: > > >On Sat, 19 Feb 2005 18:42:36 +1100, [EMAIL PROTECTED]

Re: Junction Values

2005-02-20 Thread Eirik Berg Hanssen
Rod Adams <[EMAIL PROTECTED]> writes: > $re1 = /^ <-[x]>* x <-[x]>* $/; # match a string with exactly one > 'x' in it. > $re2 = /^ <-[y]>* y <-[y]>* $/; # ditto 'y' > $re3 = /^ <-[z]>* z <-[z]>* $/; # ditto 'z' > $re7 = none($re1, $re2, $re3); # matches if there are 0 or 2+ of

Re: Junction Values

2005-02-20 Thread Rod Adams
Eirik Berg Hanssen wrote: Rod Adams <[EMAIL PROTECTED]> writes: $re1 = /^ <-[x]>* x <-[x]>* $/; # match a string with exactly one 'x' in it. $re2 = /^ <-[y]>* y <-[y]>* $/; # ditto 'y' $re3 = /^ <-[z]>* z <-[z]>* $/; # ditto 'z' $re7 = none($re1, $re2, $re3); # matches if ther

Re: Junction Values

2005-02-20 Thread Nicholas Clark
On Sun, Feb 20, 2005 at 07:41:16PM +1100, Damian Conway wrote: Given this: > my $x = set(1..3); > my $y = set(1,3,5,7,9); > my $n = 2; > > $x | $y # set(1,2,3,5,7,9) > $x & $y # set(1,3) > $x - $y # set(2) > !$x

Re: Junction Values

2005-02-20 Thread Eirik Berg Hanssen
Rod Adams <[EMAIL PROTECTED]> writes: > Eirik Berg Hanssen wrote: > >>Rod Adams <[EMAIL PROTECTED]> writes: >> >> >> >>>$re1 = /^ <-[x]>* x <-[x]>* $/; # match a string with exactly one >>>'x' in it. >>>$re2 = /^ <-[y]>* y <-[y]>* $/; # ditto 'y' >>>$re3 = /^ <-[z]>* z <-[z]>* $/; #

Re: Junction Values

2005-02-20 Thread Uri Guttman
> "NC" == Nicholas Clark <[EMAIL PROTECTED]> writes: NC> On Sun, Feb 20, 2005 at 07:41:16PM +1100, Damian Conway wrote: NC> Given this: >> my $x = set(1..3); >> my $y = set(1,3,5,7,9); >> my $n = 2; >> >> $x | $y # set(1,2,3,5,7,9) >> $x & $y # set(1,3) >> $x - $y

Re: Junction Values

2005-02-20 Thread Damian Conway
Nicholas Clark wrote: On Sun, Feb 20, 2005 at 07:41:16PM +1100, Damian Conway wrote: Given this: my $x = set(1..3); my $y = set(1,3,5,7,9); my $n = 2; $x | $y # set(1,2,3,5,7,9) $x & $y # set(1,3) $x - $y # set(2) !$x

Re: Junction Values

2005-02-20 Thread Eirik Berg Hanssen
Eirik Berg Hanssen <[EMAIL PROTECTED]> writes: > Rod Adams <[EMAIL PROTECTED]> writes: > >> Eirik Berg Hanssen wrote: >> >>>Rod Adams <[EMAIL PROTECTED]> writes: $re1 = /^ <-[x]>* x <-[x]>* $/; # match a string with exactly one 'x' in it. $re2 = /^ <-[y]>* y <-[y]>* $/; # dit

Re: Junction Values

2005-02-20 Thread Patrick R. Michaud
On Sun, Feb 20, 2005 at 10:46:15PM +0100, Eirik Berg Hanssen wrote: > Eirik Berg Hanssen <[EMAIL PROTECTED]> writes: > > Rod Adams <[EMAIL PROTECTED]> writes: > >>$re1 = /^ <-[x]>* x <-[x]>* $/; # match a string with exactly one 'x' > >>$re2 = /^ <-[y]>* y <-[y]>* $/; # ditto 'y' > >>$

Re: Junction Values

2005-02-20 Thread Matt Fowles
Damian~ On Mon, 21 Feb 2005 08:29:40 +1100, Damian Conway <[EMAIL PROTECTED]> wrote: > Nicholas Clark wrote: > > > On Sun, Feb 20, 2005 at 07:41:16PM +1100, Damian Conway wrote: > > > > Given this: > > > > > >> my $x = set(1..3); > >> my $y = set(1,3,5,7,9); > >> my $n =