Re: == vs. eq

2003-04-03 Thread mlazzaro
John Williams wrote: >On Tue, 1 Apr 2003, Michael Lazzaro wrote: >> So I *really* don't think comparing the equality of references will be >> a good idea, in P6. > The main point is that the > reference is a unique identifier for an object. At least, I haven't been > able to think why it wouldn'

Re: Ruminating RFC 93- alphabet-blind pattern matching

2003-04-03 Thread Piers Cawley
Luke Palmer <[EMAIL PROTECTED]> writes: >> On Thu, Apr 03, 2003 at 07:29:37AM -0800, Austin Hastings wrote: >> >This has been alluded to before. >> > >> >What would /A*B*/ produce? >> > >> >Because if you were just processing the rex, I think you'd have to >> >finish generating all possibilities o

Re: Short-circuiting user-defined operators

2003-04-03 Thread Dave Whipp
Joe Gottman wrote: There are two reasonable semantics for deferred parameters: 1) lazy evaluation with caching, where the evaluation of the actual expression in the call is deferred until the sub actauly makes use of it and the result is then cached and reused as necessary. Any side effects happ

Re: Short-circuiting user-defined operators

2003-04-03 Thread Joe Gottman
- Original Message - From: "Luke Palmer" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, April 03, 2003 6:39 PM Subject: Re: Short-circuiting user-defined operators > > Paul wrote: > > > --- Austin Hastings <[EMAIL PROTECTED]> wrote: > > > > > >>Dave W

Re: Ruminating RFC 93- alphabet-blind pattern matching

2003-04-03 Thread Yary Hluchan
>making *productions* of strings/sounds/whatever that could possibly >match the regular expression? > >>Correct me if I am wrong, but isn't this the :any switch of apoc 5? >>http://www.perl.com/pub/a/2002/06/26/synopsis5.html Not really, unless the input string is infinite! :any returns all subst

Re: Ruminating RFC 93- alphabet-blind pattern matching

2003-04-03 Thread Joseph F. Ryan
Edward Peschko wrote: What I think you're looking for is the fact that they're not regexes any more. They are > "rexen", but in horrifying-secret-reality, what has happened is that Larry's decided to move Fortran out of core, and replace it with yacc. just an aside, and a bit off-topic, but h

Re: Short-circuiting user-defined operators

2003-04-03 Thread Austin Hastings
--- Luke Palmer <[EMAIL PROTECTED]> wrote: > > Paul wrote: > > > --- Austin Hastings <[EMAIL PROTECTED]> wrote: > > > > > >>Dave Whipp wrote: > > >> > > >>>Joe Gottman wrote: > > > > > > > > > Getting deep -- sorry. :) > > > > > > > > Alternatively, there might be a new parameter type tha

Re: Ruminating RFC 93- alphabet-blind pattern matching

2003-04-03 Thread Austin Hastings
This is a big long post containing essentially me scratching my head at Luke's code. Since Uri asked yesterday for a tutorial-type explanation of some of the syntax, and since I wanted to scream and ask the same thing of Luke today when I first read his "5 unobfuscated friggin lines", I'm putting i

Re: Short-circuiting user-defined operators

2003-04-03 Thread Luke Palmer
> Paul wrote: > > --- Austin Hastings <[EMAIL PROTECTED]> wrote: > > > >>Dave Whipp wrote: > >> > >>>Joe Gottman wrote: > > > > > > Getting deep -- sorry. :) > > > > > Alternatively, there might be a new parameter type that indicates > that the parameter is not evaluated immediately: >

Re: Short-circuiting user-defined operators

2003-04-03 Thread Paul
--- Austin Hastings <[EMAIL PROTECTED]> wrote: > --- Paul <[EMAIL PROTECTED]> wrote: > > > But what to do about matrix arithmetic and other simple > > > threadable tasks? > > > sub m_add(@a, @b) { my @result; my $i, $j; @result = @a; > > > for @result -> $i {:is threaded # Thread this block

Re: Short-circuiting user-defined operators

2003-04-03 Thread Austin Hastings
--- Paul <[EMAIL PROTECTED]> wrote: > > But what to do about matrix arithmetic and other simple threadable > > tasks? > > > > sub m_add(@a, @b) { > > my @result; > > my $i, $j; > > @result = @a; > > for @result -> $i {:is threaded # Thread this block? > > for @result[$i]; @b -> $j;

Re: Short-circuiting user-defined operators

2003-04-03 Thread Mark Biggar
Paul wrote: --- Austin Hastings <[EMAIL PROTECTED]> wrote: Dave Whipp wrote: Joe Gottman wrote: Getting deep -- sorry. :) Alternatively, there might be a new parameter type that indicates that the parameter is not evaluated immediately: sub infix:!! ($lsh, $rhs is deferred) {...} If the sta

Re: Ruminating RFC 93- alphabet-blind pattern matching

2003-04-03 Thread Yary Hluchan
a = arcadi shehter <[EMAIL PROTECTED]> a>I think this was already discussed once and then it was proposed to a>attach a property to characters of the string a> a> sub peek_at_sky { a> a> my Color @numbers = peek_with_some_hardware; a> a> my $say_it = join map { "1" but color($_) } @number

Properties & Methods

2003-04-03 Thread Luke Palmer
Another one of my little annonyances in the current state of P6 is how run-time properties are accessed. Accessing properties as methods is pretty, but I see it as potentially dangerous. Adding a new method to a class that happens to be the same as somebody's property would be lucky to get some k

Re: Ruminating RFC 93- alphabet-blind pattern matching

2003-04-03 Thread arcadi shehter
Austin Hastings writes: > > On the other hand, let's suppose that you've got a vast array of > floating point data: > > my float @seti = {...evidence of intelligence, somewhere...}; > > It's a fair question to ask how to retarget the rexengine to use @seti > as the input stream. (I hereb

Re: Short-circuiting user-defined operators

2003-04-03 Thread Paul
--- Austin Hastings <[EMAIL PROTECTED]> wrote: > Dave Whipp wrote: > > Joe Gottman wrote: Getting deep -- sorry. :) > > > Alternatively, there might be a new parameter type that indicates > > > that the parameter is not evaluated immediately: > > > > > > sub infix:!! ($lsh, $rhs is deferred) {.

Re: Ruminating RFC 93- alphabet-blind pattern matching

2003-04-03 Thread Luke Palmer
> On Thu, Apr 03, 2003 at 07:29:37AM -0800, Austin Hastings wrote: > >This has been alluded to before. > > > >What would /A*B*/ produce? > > > >Because if you were just processing the rex, I think you'd have to > >finish generating all possibilities of A* before you began iterating > >over B*... >

Re: Short-circuiting user-defined operators

2003-04-03 Thread Austin Hastings
Dave Whipp wrote: > Joe Gottman wrote: > > > Alternatively, there might be a new parameter type that indicates > > that the parameter is not evaluated immediately: > > > > sub infix:!! ($lsh, $rhs is deferred) {...} > A nice concept! So nice, in fact, that it would be a shame to limit > it to

Re: Ruminating RFC 93- alphabet-blind pattern matching

2003-04-03 Thread Matthijs van Duin
On Thu, Apr 03, 2003 at 07:29:37AM -0800, Austin Hastings wrote: This has been alluded to before. What would /A*B*/ produce? Because if you were just processing the rex, I think you'd have to finish generating all possibilities of A* before you began iterating over B*... The "proper" way would be

Re: Ruminating RFC 93- alphabet-blind pattern matching

2003-04-03 Thread Austin Hastings
--- Edward Peschko <[EMAIL PROTECTED]> wrote: > > What I think you're looking for is the fact that they're not > regexes any more. They are > "rexen", but in > horrifying-secret-reality, what has happened is that Larry's decided > > to move Fortran out of core, and replace it with yacc. > > just a

Re: is static? -- Question

2003-04-03 Thread Paul
--- arcadi shehter <[EMAIL PROTECTED]> wrote: > Larry Wall writes: > > > > Er, how would LEAVE detect that this was the *last* time you're > > ever going to call this routine? > > > > On the other hand, if we renamed FIRST and LAST to ENTER and > > LEAVE, then FIRST would become available

Re: Ruminating RFC 93- alphabet-blind pattern matching

2003-04-03 Thread Luke Palmer
> just an aside, and a bit off-topic, but has anybody considered > hijacking the regular expression engine in perl6 and turning it into > its opposite, namely making *productions* of strings/sounds/whatever > that could possibly match the regular expression? ie: > > a* > > producing > > '' > a >

Re: Ruminating RFC 93- alphabet-blind pattern matching

2003-04-03 Thread Edward Peschko
> What I think you're looking for is the fact that they're not regexes any more. They > are > "rexen", but in horrifying-secret-reality, what has happened is that Larry's > decided > to move Fortran out of core, and replace it with yacc. just an aside, and a bit off-topic, but has anybody consid

Re: is static? -- Question

2003-04-03 Thread arcadi shehter
Larry Wall writes: > > Er, how would LEAVE detect that this was the *last* time you're ever > going to call this routine? > > On the other hand, if we renamed FIRST and LAST to ENTER and LEAVE, > then FIRST would become available to mean "my very first time"... > and LAST will mean "just