Re: Junctive puzzles.

2005-02-07 Thread Larry Wall
On Tue, Feb 08, 2005 at 11:12:40AM +0800, Autrijus Tang wrote: : This way, both associativity and junctive dimensionality holds, so : I think it's the way to go. Please correct me if you see serious : flaws with this approach. Feels right to me. Larry

Re: Junctive puzzles.

2005-02-07 Thread Ashley Winters
On Tue, 8 Feb 2005 11:12:40 +0800, Autrijus Tang <[EMAIL PROTECTED]> wrote: > On Mon, Feb 07, 2005 at 05:33:06PM +0100, Miroslav Silovic wrote: > > my $a = (0 | 6); > > say 4 < $a and $a < 2; > > Yup. My mathematic intuition cannot suffer that: > > 4 < X < 2 > > to be true in any circumstan

Re: Junctive puzzles.

2005-02-07 Thread Autrijus Tang
On Mon, Feb 07, 2005 at 05:33:06PM +0100, Miroslav Silovic wrote: > my $a = (0 | 6); > say 4 < $a and $a < 2; Yup. My mathematic intuition cannot suffer that: 4 < X < 2 to be true in any circumstances -- as it violates associativity. If one wants to violate associativity, one should presuma

Re: Reality check

2005-02-07 Thread Larry Wall
On Fri, Feb 04, 2005 at 10:39:30PM +0100, Juerd wrote: : Does this make sense? : : my @words = gather { : for =(open '/usr/share/dict/words' err die) { : .=chomp; : next if /<-[a-z]>/; : /$re/ and take { word => $_, score => %scores{ .letters }.sum }

Re: Junctive puzzles.

2005-02-07 Thread Miroslav Silovic
[EMAIL PROTECTED] wrote: pugs> ? 4 < (0 | 6) < 2 (#t|#f) Here's my take on it. Compare my $a = (0 | 6); say 4 < $a and $a < 2; vs say 4 < (0 | 6) and (0 | 6) < 2; The difference is that in the first case the junction refers to the same object, and the result should probably be expanded on

Re: Common error with | and ^$ in regexps

2005-02-07 Thread Patrick R. Michaud
On Mon, Feb 07, 2005 at 01:21:00PM +0100, Juerd wrote: > Nicholas Clark skribis 2005-02-07 12:10 (+): > > Will the relative precedence of grouping versus anchors for beginning and > > end of line remain the same in Perl6 rules? > > There currently is no such thing as precedence in regexes. Cha

Re: Common error with | and ^$ in regexps

2005-02-07 Thread Juerd
Nicholas Clark skribis 2005-02-07 12:10 (+): > Will the relative precedence of grouping versus anchors for beginning and > end of line remain the same in Perl6 rules? There currently is no such thing as precedence in regexes. Changing this would make understanding regexes a lot harder, I think

Re: Reality check

2005-02-07 Thread Juerd
Michele Dondi skribis 2005-02-07 11:45 (+0100): > With some effort I managed to understand _which_ sense it should make up > to this: > > } ==> sort { . } is descending, { ..length }, { . }; > I mean: everything of what is gather()ed gets 'piped' into sort() which > sorts according to C<< { . }

Common error with | and ^$ in regexps

2005-02-07 Thread Nicholas Clark
Will the relative precedence of grouping versus anchors for beginning and end of line remain the same in Perl6 rules? The error of writing /^(?:free|net|open)bsd|bsdos|interix$/ when you mean /^(?:(?:free|net|open)bsd|bsdos|interix)$/ is rather too easy to make. This is not the first time

Re: Reality check

2005-02-07 Thread Michele Dondi
On Fri, 4 Feb 2005, Juerd wrote: Does this make sense? my @words = gather { for =(open '/usr/share/dict/words' err die) { .=chomp; next if /<-[a-z]>/; /$re/ and take { word => $_, score => %scores{ .letters }.sum }; } } ==> sort { . } is descendi