Re: Perl 6's for() signature

2003-08-01 Thread Brent Dax
John Siracusa: Did this ever get resolved to anyone's satisfaction? While reading EX6, I found myself wonder exactly what for() would look like in Perl 6 code... Well, the easiest signature to do is probably: sub for([EMAIL PROTECTED]) { PRE { @list.end =~ Code } ...

%_ - is it available for use?

2003-08-01 Thread Nick Ing-Simmons
We have been discussing how to pass data to Tk callbacks. In particular Entry widget validation routines. There are a number of items that they _might_ be interested in but a typical routine would only use a few. Currently it passes them all as positional parameters. One idea that occured to

Re: Perl 6's for() signature

2003-08-01 Thread Abhijit A. Mahabal
[EMAIL PROTECTED] (Rod Adams) wrote in message Proposed behavior of *?@ : All Arguement to Parameter mapping left of it are processed Left to Right. Once seen, the mapping starts over right to left. Everything remaining is slurpable. Yes, it's more expensive to use, just like the RE version,

E6 question

2003-08-01 Thread Mark J. Reed
Is it possible with the new parameter declaration syntax to declare a mandatory name-only parameter? -Mark

Re: E6 question

2003-08-01 Thread Luke Palmer
Is it possible with the new parameter declaration syntax to declare a mandatory name-only parameter? Not directly, no. However, some trickyness with macros would probably let you do it. I don't yet understand macros well enough to show you... Luke Mark

Re: Perl 6's for() signature

2003-08-01 Thread Luke Palmer
[EMAIL PROTECTED] (Rod Adams) wrote in message Proposed behavior of *?@ : All Arguement to Parameter mapping left of it are processed Left to Right. Once seen, the mapping starts over right to left. Everything remaining is slurpable. Yes, it's more expensive to use, just like the RE

Re: E6: Small Junctions

2003-08-01 Thread Mark J. Reed
On 2003-08-01 at 09:54:57, Dave Whipp wrote: A junction on one element is almost always redundant, and can be cast directly into the scalar that is its eigenstate. The only issue with doing that is that certain junction methods might not be available. However, in the case of a Cnone, an

Re: E6: Small Junctions

2003-08-01 Thread Dave Whipp
Mark J. Reed [EMAIL PROTECTED] Quick, dumb question: what is an abjunction? How does it differ from a junction? An abjuction requires that none of its members match. For example, ($a == none(1,2,3)) is true for any value of $a except 1, 2 or 3. Dave.

Re: E6: Small Junctions

2003-08-01 Thread Luke Palmer
In E6, Damian write: A junction is a single scalar value that can act like two or more values at once. Whenever I see a statement like this, I tend ask myself What happenned to zero and one?. Perhaps its intentional; perhaps its sloppy writing. What issues arise with junctions of 0 or 1

Re: E6: Small Junctions

2003-08-01 Thread Luke Palmer
Mark J. Reed [EMAIL PROTECTED] Quick, dumb question: what is an abjunction? How does it differ from a junction? An abjuction requires that none of its members match. For example, ($a == none(1,2,3)) is true for any value of $a except 1, 2 or 3. Actually, no :-) disjunction: any()

Re: Perl 6's for() signature

2003-08-01 Thread Damian Conway
FWIW, we're aware of the problem. I posed this very question to Larry a few months back, when I was writing E6. We're still mulling over the correct answer. The last thought on the problem that Larry's shared with me was that there may need to be a special case for allowing a single block

Re: E6: assume nothing

2003-08-01 Thread Damian Conway
Trey asked: To take the E6 example of currying part: List::Part::part.assuming(labels = sheep goats) One had to curry in Clabels to be the same as it was defined in Cpart originally, i.e. C sheep goats . What if one wanted to curry in whatever the default is, i.e., assuming nothing

Re: E6: assume nothing

2003-08-01 Thread Luke Palmer
Trey asked: To take the E6 example of currying part: List::Part::part.assuming(labels = sheep goats) One had to curry in Clabels to be the same as it was defined in Cpart originally, i.e. C sheep goats . What if one wanted to curry in whatever the default is, i.e.,

Re: E6: assume nothing

2003-08-01 Thread Luke Palmer
I wrote: Damian explains: Trey asked: To take the E6 example of currying part: List::Part::part.assuming(labels = sheep goats) One had to curry in Clabels to be the same as it was defined in Cpart originally, i.e. C sheep goats . What if one wanted to curry in

Re: E6 question

2003-08-01 Thread Damian Conway
Mark J. Reed wrote: Is it possible with the new parameter declaration syntax to declare a mandatory name-only parameter? Probably. I think that the '?', '*', and '+ prefixes are abbreviations for traits (Cis optional, Cis List, Cis optional is named). So a named, mandatory parameter would be:

Re: Perl 6's for() signature

2003-08-01 Thread Simon Cozens
[EMAIL PROTECTED] (Damian Conway) writes: The last thought on the problem that Larry's shared with me was that there may need to be a special case for allowing a single block parameter after the slurpy And the Rubyometer creeps up another few notches... (Gosh, you'd almost think that Matz had

Junctions Set Theory

2003-08-01 Thread Derek Ross
Hello, Do junctions have a direct representation as predicate logic statements? In particular, do the following logic statements correspond directly to the following perl6 junctions: LOGIC PERL6 JUNCTION (DESCRIP) = (forall x)(x

Re: Junctions Set Theory

2003-08-01 Thread Abhijit A. Mahabal
On Fri, 1 Aug 2003, Derek Ross wrote: Do junctions have a direct representation as predicate logic statements? In particular, do the following logic statements correspond directly to the following perl6 junctions: LOGIC PERL6 JUNCTION (DESCRIP) =

Re: Junctions Set Theory

2003-08-01 Thread Luke Palmer
Hello, Do junctions have a direct representation as predicate logic statements? Yes. Damian and I have already worked them out in a link I have already posted today: http://groups.google.com/groups?hl=enlr=ie=UTF-8oe=UTF-8safe=offselm=3DF2FE76.6050602%40conway.orgrnum=2 In particular,

Re: %_ - is it available for use?

2003-08-01 Thread Damian Conway
Nick Ing-Simmons wrote: We have been discussing how to pass data to Tk callbacks. In particular Entry widget validation routines. There are a number of items that they _might_ be interested in but a typical routine would only use a few. Currently it passes them all as positional parameters. One

Re: Perl 6's for() signature

2003-08-01 Thread Larry Wall
On Fri, Aug 01, 2003 at 11:01:15PM +0100, Simon Cozens wrote: : [EMAIL PROTECTED] (Damian Conway) writes: : The last thought on the problem that Larry's shared with me was that there : may need to be a special case for allowing a single block parameter after : the slurpy : : And the Rubyometer