Re: Parrot regex engine

2003-04-03 Thread Benjamin Goldberg
Steve Fink wrote: On Apr-03, Benjamin Goldberg wrote: I've been looking over the rx.ops, and am amazed at how cool it is :) I'm wondering, however -- was this based on something else? I believe Brent cooked it up more or less from scratch. It also served as the inspiration for a

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 function

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*... The proper

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) {...} If the

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 hereby

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

Re: Ruminating RFC 93- alphabet-blind pattern matching

2003-04-03 Thread Yary Hluchan
a = arcadi shehter [EMAIL PROTECTED] aI think this was already discussed once and then it was proposed to aattach 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($_) } @numbers ; a

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

Re: [PATCH] typos in rx.ops

2003-04-03 Thread Simon Glover
On Thu, 3 Apr 2003, Cal Henderson wrote: patch to correct typos in rx.ops patch follows sig Thanks, applied. Simon

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; $b { $j +=

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? for

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 has

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 substrings

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 Whipp wrote: Joe

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

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 aa aaa

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 to mean my

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 an aside, and

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 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 of A* before you began

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. snip 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't