Re: Incorporting "WhatIf"

2003-04-04 Thread Luke Palmer
> I recently discovered a CPAN module called WhatIf > (http://search.cpan.org/author/SIMONW/Whatif-1.01/). This module has > the ability to provide rollback functionality for arbitrary code. Crazy... I was just thinking about this for an experimental language called "Snapshot" I'm about to imple

Re: Patterns and junctions

2003-04-04 Thread Paul
--- Luke Palmer <[EMAIL PROTECTED]> wrote: [extremely large *SNIP*] > Maybe the "|"/"||" distinction isn't needed, and we just need a > declarator on rules that says they are side-effect-free, and can thus > be optimized. [snip] > I like this solution better than making a new operator. In Perl >

Re: Ruminating RFC 93- alphabet-blind pattern matching

2003-04-04 Thread Joseph F. Ryan
Yary Hluchan wrote: 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! Well, t

Re: Patterns and junctions

2003-04-04 Thread Luke Palmer
> --- "Adam D. Lopresto" <[EMAIL PROTECTED]> wrote: > > I propose that since the empty pattern is no longer legal (and > > about time), we use "|" in patterns to indicate alternation without > > preference, and "||" to indicate "try the first, then the second, > > etc". > > Hmm > A neat idea,

Re: Ruminating RFC 93- alphabet-blind pattern matching

2003-04-04 Thread Joseph F. Ryan
Joseph F. Ryan wrote: Luke Palmer wrote: 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: Ruminating RFC 93- alphabet-blind pattern matching

2003-04-04 Thread Joseph F. Ryan
Luke Palmer wrote: 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: How shall threads work in P6? [OT :o]

2003-04-04 Thread Paul
--- Larry Wall <[EMAIL PROTECTED]> wrote: > For anything other than existential issues, I believe that > most arguments about the future containing the words "either", > "or", "both", or "neither" are likely to be wrong. In > particular, human psychology is rarely about the extremes > of binary lo

Re: How shall threads work in P6?

2003-04-04 Thread Larry Wall
On Thu, Apr 03, 2003 at 08:37:46PM +0100, Dave Mitchell wrote: : On Tue, Apr 01, 2003 at 08:44:25AM -0500, Dan Sugalski wrote: : > There isn't any, particularly. We're doing preemptive threads. It : > isn't up for negotiation. This is one of the few things where I truly : > don't care what people

Re: A6: Named vs. Variadic Parameters

2003-04-04 Thread David Storrs
On Fri, Apr 04, 2003 at 10:40:49AM -0800, Larry Wall wrote: > Yes, though it's usually been mentioned with respect to things like: > > my ($a,$b,$c) is constant = abc(); > > However, I would personally go with the prefix zone macros before using > distributed traits, just to get the zone inf

Re: A6: Named vs. Variadic Parameters

2003-04-04 Thread Larry Wall
On Fri, Apr 04, 2003 at 07:09:55AM -0800, David Storrs wrote: : On Wed, Apr 02, 2003 at 12:18:47PM -0800, Paul wrote: : : > I think Larry's accomodating everybody, here. : > Those of us who want to play with the tinkertoys will probably enjoy : > the whole box, even the little widgets that take us

Re: == vs. eq

2003-04-04 Thread John Williams
On Thu, 3 Apr 2003, mlazzaro wrote: > Yes. I expect that internally, that's how it will work. (And agreed, > C<.ref> is probably a good name.) > > My concern with explicitly comparing refs in order to compare identity > is a philosophical one. It may be perfectly acceptable to do it via > >

Re: == vs. eq

2003-04-04 Thread Paul
--- mlazzaro <[EMAIL PROTECTED]> wrote: > Austin Hastings wrote: > > It has been pointed out once already that we already talked about > > this, and I for one am in favor of the general version of it. > > The original discussion posited an "adverbial comparison", viz: > > C<$a eq:ref $b>. Which, l

Re: A6: Named vs. Variadic Parameters

2003-04-04 Thread David Storrs
On Wed, Apr 02, 2003 at 12:18:47PM -0800, Paul wrote: > I think Larry's accomodating everybody, here. > Those of us who want to play with the tinkertoys will probably enjoy > the whole box, even the little widgets that take us a while to > identify. Agreed. But I'd like to keep the identificati

Re: Patterns and junctions

2003-04-04 Thread Paul
--- "Adam D. Lopresto" <[EMAIL PROTECTED]> wrote: > I propose that since the empty pattern is no longer legal (and > about time), we use "|" in patterns to indicate alternation without > preference, and "||" to indicate "try the first, then the second, > etc". Hmm A neat idea, but can you el

Re: Ruminating RFC 93- alphabet-blind pattern matching

2003-04-04 Thread arcadi shehter
Yary Hluchan writes: > 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 $

Incorporting "WhatIf"

2003-04-04 Thread David Storrs
I recently discovered a CPAN module called WhatIf (http://search.cpan.org/author/SIMONW/Whatif-1.01/). This module has the ability to provide rollback functionality for arbitrary code. I don't really understand continuations yet (although I'm reading up on them), so perhaps they would allow this

Re: Ruminating RFC 93- alphabet-blind pattern matching

2003-04-04 Thread Luke Palmer
> 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 a

Re: Ruminating RFC 93- alphabet-blind pattern matching

2003-04-04 Thread Edward Peschko
On Thu, Apr 03, 2003 at 07:30:10AM -0700, Luke Palmer wrote: > > 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 m

Re: How shall threads work in P6?

2003-04-04 Thread Dave Mitchell
On Tue, Apr 01, 2003 at 08:44:25AM -0500, Dan Sugalski wrote: > There isn't any, particularly. We're doing preemptive threads. It > isn't up for negotiation. This is one of the few things where I truly > don't care what people's opinions on the matter are. Sorry, I haven't been following this to

Patterns and junctions

2003-04-04 Thread Adam D. Lopresto
I've had an idea brewing for a while, and since talk seems to have turned to reg^H^H^Hpatterns and rules again, I figured this might be the time to mention it. A while ago someone asked about whether backtracking semantics are mandatory in any implementation, or whether it would be legal to build

Re: Ruminating RFC 93- alphabet-blind pattern matching

2003-04-04 Thread Luke Palmer
> > use Permutations <>; > > > > # Generate all strings of length $n > > method Rule::Group::generate(Int $n) { # Type sprinkles :) > > compositions($n, [EMAIL PROTECTED]) ==> map { > > my @rets = map { > > $^atom.generate($^n) > > } zi

Re: == vs. eq

2003-04-04 Thread mlazzaro
Austin Hastings wrote: > It has been pointed out once already that we already talked about this, > and I for one am in favor of the general version of it. > > The original discussion posited an "adverbial comparison", viz: > C<$a eq:ref $b>. Which, looking at your proposal, is very close to > C<$a