On 2008-Dec-16, at 6:21 pm, Timothy S. Nelson wrote:
Or, instead of having a new block, just add the iterator indicator
to the NEXT block, and get rid of ENTER and LEAVE. That way, you'd
have this sequence:
- FIRST {}
- NEXT 0 {} # Replaces ENTER
- NEXT 1..* {} # Does NOTF
On Tue, 16 Dec 2008, Brandon S. Allbery KF8NH wrote:
On 2008 Dec 16, at 23:00, Timothy S. Nelson wrote:
One thing I've been working on recently is a (Perl 5) object that
models package metadata. In theory, it should be able to model the
metadata from a .rpm, a .deb, a CPAN package, or whatev
On 2008 Dec 16, at 23:00, Timothy S. Nelson wrote:
One thing I've been working on recently is a (Perl 5) object that
models package metadata. In theory, it should be able to model the
metadata from a .rpm, a .deb, a CPAN package, or whatever. Then you
read the data using a "metadata input
On Mon, Dec 15, 2008 at 11:18:54PM -0500, Mark J. Reed wrote:
> On Mon, Dec 15, 2008 at 5:41 PM, Moritz Lenz wrote:
> > I know at least of infix:(Num $a, Num $b) (which does the same as
> > Perl 5's <=>) and infix:(Pair $a, Pair $b) (which does $a.key cmp
> > $a.key || $a.value cmp $b.value), so n
Hi all. I've been working on some stuff that's vaguely, tangentially
CPAN-related.
My basic assumption is that there's going to be some kind of packaging
system written around 6PAN.
One thing I've been working on recently is a (Perl 5) object that
models package metadata. In theory, it
On Tue, Dec 16, 2008 at 7:04 AM, jason switzer wrote:
> I hadn't seen a Nameable role mentioned yet, so I wasn't able to understand
> any such concept.
The list was not meant to be exhaustive. There are a lot more roles
that have something to do with IO but were missing: Asynchronous IO,
Datagram
On Tue, 16 Dec 2008, Jon Lang wrote:
How do you compute '*'? That is, how do you know how many more
iterations you have to go before you're done?
In some cases, it won't have to be computed, in some cases it won't be
computeable (which should be an error). I'd say it'd be fair enough to sa
How do you compute '*'? That is, how do you know how many more
iterations you have to go before you're done?
Should you really be handling this sort of thing through an "iteration
count" mechanism? How do you keep track of which iteration you're on?
Is it another detail that needs to be handled
On Tue, 16 Dec 2008, David Green wrote:
On 2008-Dec-6, at 7:37 am, Aristotle Pagaltzis wrote:
Funnily enough, I think you?re onto something here that you didn?t even
notice: [...]
if we had a NOTFIRST (which would run before ENTER just as FIRST does, but
on *every* iteration *except* the first
Jon Lang wrote:
> That's a good point. Is there an easy way to distinguish between
> passing a pair into a positional parameter vs. passing a value into a
> named parameter?
Off the top of my head, see S06 for the gory details:
my $pair = a => 'b';
named(a => 'b');
named(:a);
named(|$pair);
TSa wrote:
> HaloO,
>
> Daniel Ruoso wrote:
>> That being said, we should note that this example looks simple because
>> we have almost no lazyness implied (since there's an assignment in the
>> first line), every list access requires the evaluation of the flatenning
>> of the list.
>>
>> my @@
I think I'm fine with making them separate. Recursive lazy flattening
seems too evil; slice and list contexts should not try to do the work of
captures. Thanks.
Larry
On Mon, Dec 15, 2008 at 03:06:44PM -0700, Stephen Weeks wrote:
: do {
: die 'some text';
: say 'after the exception';
: CATCH {
: say 'caught the exception';
: ...; # what goes here?
: }
: }
:
: My proposal is to call .resume() on the exception object.
It could jus
On Mon, Dec 08, 2008 at 02:32:14PM -0600, Patrick R. Michaud wrote:
: A very interesting question came up on #perl today, so I'm
: forwarding it to p6l for discussion/decision.
:
: Given the following code:
:
: sub foo() { return 1; }
: sub bar() { warn "oops"; }
:
: {
:
Em Ter, 2008-12-16 às 18:47 +0100, TSa escreveu:
> > # the following will require a flatenning to get the actual index
> > say @a[3];
> Could we not shift the problem into a more complicated form
> of the size of the array? Here it has size 0+3+0 but each of the
> summands could be lazy and hen
Moritz Lenz wrote:
> Off the top of my head, see S06 for the gory details:
>
> my $pair = a => 'b';
>
> named(a => 'b');
> named(:a);
> named(|$pair);
>
> positional((a => 'b'));
> positional((:a));
> positional($pair);
As you say: the gory details, emphasis on gory. But if that's the way
of thin
TSa wrote:
> I see no problem as long as say gets a pair as argument. Then it can
> print the key and value separated with a tab. More problematic are
> string concatenations of the form
>
> say "the pair is: " ~ (foo => $bar);
>
> which need to be written so that say sees the pair
>
> say "the
HaloO,
Daniel Ruoso wrote:
That being said, we should note that this example looks simple because
we have almost no lazyness implied (since there's an assignment in the
first line), every list access requires the evaluation of the flatenning
of the list.
my @@a = ((),(1,2,3),());
Mustn't th
On 2008-Dec-6, at 7:37 am, Aristotle Pagaltzis wrote:
Funnily enough, I think you’re onto something here that you didn’t
even notice: [...]
if we had a NOTFIRST (which would run before ENTER just as FIRST
does, but on *every* iteration *except* the first), then we could
trivially attain the
HaloO,
Moritz Lenz wrote:
The counter example is if you want to print a pair:
.say for %hash.pairs.sort: { .value };
In that case it would be nice to have the key appear in the stringification.
I see no problem as long as say gets a pair as argument. Then it can
print the key and value separ
On Mon, Dec 15, 2008 at 10:26 PM, Larry Wall wrote:
> On Mon, Dec 15, 2008 at 04:43:51PM -0700, David Green wrote:
>> I can't really think of a great example where you'd want to numify a
>> pair, but I would expect printing one to produce something like "a =>
>> 23" (especially since that's what a
Hi,
One of the hardest features in Perl 6 is the slice context. It is
undoubtfully usefull, since it provides semantics to acces each
iteration of a map, for instance.
But there's one thing in the spec that makes not only slices, but the
lists themselves considerably harder to implement, and that
On Tue, 16 Dec 2008, jason switzer wrote:
You can already easily mix it in using 'does':
$fstab = open('/etc/fstab', :r);
$fstab does WhitespaceTrim;
I don't think it's really necessary to include that into open(),
though it might be useful syntactic sugar.
I haven't spent the time to unders
On Mon, Dec 15, 2008 at 04:43:51PM -0700, David Green wrote:
> I can't really think of a great example where you'd want to numify a
> pair, but I would expect printing one to produce something like "a =>
> 23" (especially since that's what a one-element hash would print,
> right?).
Nope, wou
On Fri, Dec 12, 2008 at 11:49:37PM -0500, Uri Guttman wrote:
: so you have not discovered something new in perl or perl6 regarding
: sorting. it has been covered and in depth but never properly integrated
: into the p6 docs.
It will be more useful if you comment relative to the existing design fou
25 matches
Mail list logo