On 8/30/06, Jonathan Lang <[EMAIL PROTECTED]> wrote:
Joe Gottman wrote:
> Since a FIRST block gets called at loop initialization time, it seems to
me
> that it would be useful to have a block closure trait, RESUME, that gets
> called at the beginning of every loop iteration except the first. Thu
Damian (>), Ruud (>>), Damian (>>>), Carl ():
> >> But it can hardly be blamed for clarity.
> >
> > That's a little unfair.
>
> "can hardly be blamed" -> "can easily be praised"
Apologies to Carl if I misinterpreted. I read it as:
"can hardly be blamed for (having) clarity"
;-)
No,
Joe Gottman wrote:
Since a FIRST block gets called at loop initialization time, it seems to me
that it would be useful to have a block closure trait, RESUME, that gets
called at the beginning of every loop iteration except the first. Thus, at
the beginning of each loop iteration either FIRST or R
Hi, there~
I think S04 says too little about statement modifiers. Please comment
on the following code samples. Are they valid Perl 6?
do { say } for 1..3;
{ say } for 1..3;
-> $i { say $i } for 1..3;
And how about similar variations for other statement modifiers, such
as while, giv
On 8/30/06, Mark Stosberg <[EMAIL PROTECTED]> wrote:
Sometimes I use 'given' blocks to set a value. To save repeating myself
on the right hand side of the given block, I found I kept want to do this:
my $foo = given { }
According to S04, given {} is at statement level, so you can't use it
di
Mark Stosberg wrote:
Sometimes I use 'given' blocks to set a value. To save repeating myself
on the right hand side of the given block, I found I kept want to do this:
my $foo = given { }
...and have whatever value that was returned from when {} or default {}
populate $foo.
Isn't it still th
for @array -> $index, $value
{
say "Element $_ is called $value"
}
But I don't understand how the "$index, $value" pair gets its values; is
@array somehow turned into a hash with the index as the key?
With @array -> $index, $value {}, is $_ an alias of $index?
No. There's no
"Damian Conway" schreef:
> Ruud:
>> Damian:
>>> Carl:
But it can hardly be blamed for clarity.
>>>
>>> That's a little unfair.
>>
>> "can hardly be blamed" -> "can easily be praised"
>
> Apologies to Carl if I misinterpreted. I read it as:
> "can hardly be blamed for (having) clarity"
>
Sometimes I use 'given' blocks to set a value. To save repeating myself
on the right hand side of the given block, I found I kept want to do this:
my $foo = given { }
...and have whatever value that was returned from when {} or default {}
populate $foo.
It turns out pugs already allow this, thr
It's been said that writing PMCs sucks. This is your chance to tell
the world why. Because for things to get better, we have to know what
sucks.
I'll get things started:
1) pmc2c.pl is very fragile - when it gets input it doesn't like, it
just ignores it (see RT#39313)
2) You can't use :slurpy
Joshua Juran <[EMAIL PROTECTED]> wrote:
On Aug 28, 2006, at 12:18 PM, Matt Diephouse wrote:
> I would like to add some sort methods as well: quicksort(),
> mergesort(), etc. But as methods, there is potential for these to end
> up in a user-visible space.
>
> Say for example, that I add a merges
>> But it can hardly be blamed for clarity.
>
> That's a little unfair.
"can hardly be blamed" -> "can easily be praised"
Apologies to Carl if I misinterpreted. I read it as:
"can hardly be blamed for (having) clarity"
;-)
Damian
# New Ticket Created by Will Coleda
# Please include the string: [perl #40253]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt3/Ticket/Display.html?id=40253 >
The attached patch casts all the printfs arguments corresponding to "%
p" to be (void *)
Damian Conway schreef:
> [attribution repaired] Carl:
>> But it can hardly be blamed for clarity.
>
> That's a little unfair.
"can hardly be blamed" -> "can easily be praised"
--
Affijn, Ruud
"Gewoon is een tijger."
Trey Harris wrote:
>
>
> Slurpy parameters follow any required or optional parameters. They are
> marked by a C<*> before the parameter:
>
> sub duplicate($n, *%flag, [EMAIL PROTECTED]) {...}
>
> Named arguments are bound to the slurpy hash (C<*%flag>
> in the above example). Such
Since a FIRST block gets called at loop initialization time, it seems to me
that it would be useful to have a block closure trait, RESUME, that gets
called at the beginning of every loop iteration except the first. Thus, at
the beginning of each loop iteration either FIRST or RESUME but not both
wo
On 8/30/06, Mark Stosberg <[EMAIL PROTECTED]> wrote:
Regarding The S06 description of named arguments:
http://feather.perl6.nl/syn/S06.html#Named_arguments
What I find missing here is documentation of the signature to use
if you want to declare "I accept an arbitrary number of named
arguments".
In a message dated Tue, 29 Aug 2006, Mark Stosberg writes:
Regarding The S06 description of named arguments:
http://feather.perl6.nl/syn/S06.html#Named_arguments
What I find missing here is documentation of the signature to use
if you want to declare "I accept an arbitrary number of named
argu
Regarding The S06 description of named arguments:
http://feather.perl6.nl/syn/S06.html#Named_arguments
What I find missing here is documentation of the signature to use
if you want to declare "I accept an arbitrary number of named
arguments". (Like the param() methods common in Perl5 do).
Maybe
On 8/30/06, Damian Conway <[EMAIL PROTECTED]> wrote:
That's a little unfair. Choose good names and it's perfectly clear:
map { "Element $^array_index is called $^array_value" } <== @array.kv;
As an aside, though, doesn't that particular solution now implicitly
rely on the fact that ('inde
I'm interested in helping to write some tests for "return types", but
I'd like some clarifications about them first. Are they just
"declarations" that help Perl optimize stuff, or they actually contracts?
As this little script shows, both "inner" and "of" are valid syntax now
with pugs, but neithe
pugs> map { "Element $^a is called $^b" }: @array.kv;
("Element 0 is called london",
"Element 1 is called bridge",
"Element 2 is called is",
"Element 3 is called falling",
"Element 4 is called down")
But it can hardly be blamed for clarity.
That's a little unfair. Choose good names and it's per
* Jeff Stampes <[EMAIL PROTECTED]> [2006-08-29 17:00]:
> Since I came to programming after the days of Forth and Lisp
> being prominent languages, I can't dispute nor concur with her
> statement. How would you respond?
By telling her that the comparison is flawed? Neither Lisp nor
Forth have anyt
I accidently sent this directly to Richard. Sorry about that, folks...
-- Forwarded message --
From: Jonathan Lang <[EMAIL PROTECTED]>
Date: Aug 29, 2006 1:24 PM
Subject: Re: Classes / roles as sets / subsets
To: Richard Hainsworth <[EMAIL PROTECTED]>
Richard Hainsworth wrote:
Ah, it's scanning the content and finding the control characters. There are
a bunch of control-C's in that transcript. Cleaning those up would be
helpful, although I consider this bad behavior on Firefox's part -
especially since "just display the [EMAIL PROTECTED] thing in the browser"
isn't a
d Firefox/Mac... and it's
not just me...
On 8/29/06, Will Coleda <[EMAIL PROTECTED]> wrote:
Transcript now available at:
http://www.parrotcode.org/misc/parrotsketch-logs/
irclog.parrotsketch-200608/irclog.parrotsketch.20060829
--
Will "Coke" Coleda
[EMAIL PROTECTED]
--
Mark J. Reed <[EMAIL PROTECTED]>
On Aug 28, 2006, at 12:18 PM, Matt Diephouse wrote:
I would like to add some sort methods as well: quicksort(),
mergesort(), etc. But as methods, there is potential for these to end
up in a user-visible space.
Say for example, that I add a mergesort method to AbstractPMCArray.
Ruby's array clas
Transcript now available at:
http://www.parrotcode.org/misc/parrotsketch-logs/
irclog.parrotsketch-200608/irclog.parrotsketch.20060829
--
Will "Coke" Coleda
[EMAIL PROTECTED]
Since I came to programming after the days of Forth and Lisp being
prominent languages, I can't dispute nor concur with her statement. How
would you respond?
First, a bit of advice that convinced me to go with Perl 6 not only
philosophically, but practically too.
Go here:
http://www.artlebedev
Having read this thread, I tend to think you're insane for bringing it
up again :-)
That said, I'll entertain the discussion for a bit ...
On Tue, Aug 29, 2006 at 08:33:20AM +0200, Carl Mäsak wrote:
> Questions:
>
> - Is the itch big enough for this? The more I look at the first piece
> of cod
On Tue, Aug 29, 2006 at 08:57:55AM -0600, Jeff Stampes wrote:
> I have one coworker known for her stubbornness. I've been hit with the
> following several times, and honestly don't have a good reply:
>
> "My bigger concern with the Perl6 syntax is that they expect humans to
> write it. This is a si
On Mon, Aug 28, 2006 at 08:30:33AM -0700, Michael Snoyman wrote:
> I wanted to start working on a module (mainly to learn Perl 6, I doubt
> anyone would ever want to use it). I want to do this "properly," whatever
> that means. I was wondering if someone could explain to me:
>
> 1) How to constr
Jeff,
Greetings all. I've followed perl6 development since the beginning,
and have tried to stay at least somewhat informed along the way. I'll
confess to being puzzled at some of the design decisions, but knowing
my own limitations have had faith in @Larry to do the right thing.
This topi
On 8/29/06, Daniel Hulme <[EMAIL PROTECTED]> wrote:
Perl up to 5 may be executable line
noise, but I can see Perl 6 being the closest thing yet to executable
maths, and I love it.
Funny, I could have sworn APL was the closest thing yet to executable maths.
( Hey, wait a minute, I'm American;
Carl Mäsak schreef:
> I suppose doing a map or a grep over @array.kv is possible:
>
> pugs> my @array =
> ("london", "bridge", "is", "falling", "down")
>
> pugs> map { "Element $^a is called $^b" }: @array.kv;
> ("Element 0 is called london",
> "Element 1 is called bridge",
> "Element 2 is call
> See diagram case 2 (Class A and Class B intersect):
> & B are built from a role that represents their intersection ( Class
> A U Class B), and then code is added in the definitions of the
It may be just me being confused, but the symbol that looks like a U
(U+222a) is usually union; intersect
Greetings all. I've followed perl6 development since the beginning, and
have tried to stay at least somewhat informed along the way. I'll
confess to being puzzled at some of the design decisions, but knowing my
own limitations have had faith in @Larry to do the right thing.
This topic woul
Mark (>), Carl (>>):
> Hey do you know what would be cool in perl 6
> A special variable for when you do a for (@array) style loop
> it would always have the index of the array
>
> Discussed on #perl6: it's already quite easy in Perl 6 to loop with an
> explicit index:
>
> my @array = ;
> for
"Carl Mäsak" schreef:
> Ruud:
>> Carl:
>>> But maybe a variable that implicitly carries along the loop index
>>> would be even snazzier?
>>>
>>> for @array -> $val {
>>> say "$.\t$val";
>>> }
>>
>> Or give the block a name (label), and have an index (or several
>> indexes, like some that are res
Originally this posting was written in response to the 'ref' spec
thread. I included char diagrams that got screwed up, so I made a png
diagram instead (attached) and I re-edited the posting to refer to
attached diagram, and then added some more comments. Hope everyone can
'see' the png.
I fi
Carl Mäsak wrote:
Hey do you know what would be cool in perl 6
A special variable for when you do a for (@array) style loop
it would always have the index of the array
Discussed on #perl6: it's already quite easy in Perl 6 to loop with an
explicit index:
my @array = ;
for @array.kv -> $i, $v
Ruud (>), Carl (>>):
> But maybe a variable that implicitly carries along the loop index
> would be even snazzier?
>
> for @array -> $val {
> say "$.\t$val";
> }
Or give the block a name (label), and have an index (or several indexes, like
some that are reset by redo an some that are not) avai
Carl Mäsak wrote:
> But maybe a variable that implicitly carries along the loop index
> would be even snazzier?
>
> for @array -> $val {
> say "$.\t$val";
> }
Or give the block a name (label), and have an index (or several indexes, like
some that are reset by redo an some that are not) availabl
43 matches
Mail list logo