Hi, folks. As has probably been obvious to most of you, I've been
really busy with my O'Reilly day job and haven't had time to attend to
Perl 6 and Parrot business. With no prompting, Allison Randal stepped
forward and has been taking on more and more of the day-to-day running
of the show. I
Nathan Torkington <[EMAIL PROTECTED]> writes:
> Hi, folks. As has probably been obvious to most of you, I've been
> really busy with my O'Reilly day job and haven't had time to attend to
> Perl 6 and Parrot business. With no prompting, Allison Randal stepped
> forward and has been taking on more
On Mon, Feb 16, 2004 at 01:04:01AM -0700, Luke Palmer wrote:
: This is pattern matching more than it is type comparison. And Perl's
: all about pattern matching. I'm just wondering whether it needs I
: pattern archetectures.
I suspect it does, at least from the viewpoint of mere mortals. The
reg
The design team discussed "The Sort Problem" during yesterday's
teleconference. Here is Larry's decision: final, definitive, and unalterable
(well...for this week at least ;-)
-cut-cut-cut-cut-cut-cut
C in Perl6 is a global multisub:
multi su
On Thu, Feb 12, 2004 at 09:38:47AM -0800, Larry Wall wrote:
> Yes, that's a very good paper, which is why Perl 6 now has something
> called Roles, which are intended to degenerate either to Traits or
> Interfaces. My take on it is that Roles' most important, er, role
> will be to abstract out the
"Damian Conway" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> type KeyExtractor ::= Code(Any) returns Any;
> # Modtimewise numerically ascending...
> @sorted = sort {-M} @unsorted;
One thing I've been trying to figure out reading this: what is the signature
of pref
Dave Whipp writes:
> "Damian Conway" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > type KeyExtractor ::= Code(Any) returns Any;
>
> > # Modtimewise numerically ascending...
> > @sorted = sort {-M} @unsorted;
>
>
> One thing I've been trying to figure out readin
> "DC" == Damian Conway <[EMAIL PROTECTED]> writes:
DC> "Once again the Iron Designer rises to the supreme challenge of
DC> the Mailinglist Stadium and expresses the true spirit of Perl
DC> 6!!!"
and the challenge for next week is slicing squid with noodles!
(or cutting down the mightie
Dave Whipp wondered:
@sorted = sort {-M} @unsorted;
One thing I've been trying to figure out reading this: what is the signature
of prefix:-M ? i.e. how does it tell the outer block that it (the
outer-block) needs a parameter?
It doesn't. As A6 explained:
http://dev.perl.org/perl6/apocalypse
> "DC" == Damian Conway <[EMAIL PROTECTED]> writes:
DC> # Stringifically ascending...
DC> @sorted = sort @unsorted;
DC> or with a single two-argument block/closure (to sort by whatever the
DC> specified comparator is):
DC> # Numerically ascending...
DC> @sorte
Uri Guttman writes:
> > "DC" == Damian Conway <[EMAIL PROTECTED]> writes:
> DC> # Modtimewise numerically ascending...
> DC> @sorted = sort {-M $^a <=> -M $^b} @unsorted;
>
> DC> # Fuzz-ifically...
> DC> sub fuzzy_cmp($x, $y) returns Int;
> DC> @sorted = sort
Luke Palmer writes:
> Yes. Commas may be ommitted on either side of a block when used as an
> argument. I would argue that they only be omitted on the right side, so
> that this is unambiguous:
>
> if some_function { ... }
> { ... }
>
> Which might be parsed as either:
>
> if (so
- Original Message -
From: "Damian Conway" <[EMAIL PROTECTED]>
To: "Perl 6 Language" <[EMAIL PROTECTED]>
Sent: Thursday, February 19, 2004 8:29 PM
Subject: [perl] The Sort Problem: a definitive ruling
> C in Perl6 is a global multisub:
>
> multi sub *sort(Criterion @by: [EMAIL PROT
Uri checked:
DC> @sorted = sort {$^a <=> $^b} @unsorted;
so because that has 2 placeholders, it is will match this signature:
type Comparator ::= Code(Any, Any) returns Int;
Correct.
i have to remember that placeholders are really implied args to a code
block and not just in the
> "DC" == Damian Conway <[EMAIL PROTECTED]> writes:
DC> No. But this will work:
DC> sort &infix:<=> @unsorted
my brane hertz!!
so that declares (creates?) an infix op as a code block? and since <=>
is known to take 2 args it is parsed (or multidispatched) as a
comparator block for sor
> "LP" == Luke Palmer <[EMAIL PROTECTED]> writes:
LP> Uri Guttman writes:
>> > "DC" == Damian Conway <[EMAIL PROTECTED]> writes:
DC> # Modtimewise numerically ascending...
DC> @sorted = sort {-M $^a <=> -M $^b} @unsorted;
>>
DC> # Fuzz-ifically...
DC> sub fuzzy_cmp($x, $y) r
> "JG" == Joe Gottman <[EMAIL PROTECTED]> writes:
JG>How do you decide whether a key-extractor block returns number? Do you
JG> look at the signature, or do you simply evaluate the result of the
JG> key-extractor for each element in the unsorted list? For example, what is
JG> t
Uri bemoaned:
DC> sort &infix:<=> @unsorted
my brane hertz!!
so that declares (creates?) an infix op as a code block?
No. C<< &infix:<=> >> is the name of the binary C<< <=> >> operator.
amazing how you and luke both came up with the exact same answer.
"Great minds..." etc. ;-)
> p6 synt
On Fri, Feb 20, 2004 at 02:47:55PM +1100, Damian Conway wrote:
: Yep. Inside the body of C you'd access them as:
:
: $by.trait{descending}
: $by.trait{insensitive}
:
: (unless Larry's changed the trait accessor syntax since last I looked).
Well, if traits are just compile-time proper
> "DC" == Damian Conway <[EMAIL PROTECTED]> writes:
DC> Uri bemoaned:
cause you agonize me head!
DC> sort &infix:<=> @unsorted
>> my brane hertz!!
>> so that declares (creates?) an infix op as a code block?
DC> No. C<< &infix:<=> >> is the name of the binary C<< <=> >> operator.
20 matches
Mail list logo