Re: Meditations on a Loop

2009-05-26 Thread Patrick R. Michaud
On Tue, May 26, 2009 at 04:10:45PM -0700, yary wrote:
> On Tue, May 26, 2009 at 1:57 PM, Patrick R. Michaud  
> wrote:
> > On Mon, May 25, 2009 at 12:37:34PM -0700, yary wrote:
> > How about...?
> >
> >    sub odd { ^$a % 2 }
> typo. "sub odd {$^a % 2}" works (caret goes between "$" and "a")

Correct, that's a typo.

> >    say grep &odd, 0..6;
> nice. I need to learn the differences between calling a sub as "odd"
> vs "&odd" in p6. Haven't gotten that far in the synopses yet.

In p6, one always uses the sigil to refer to the sub itself; the bare
identifier form invokes it.

> I was wondering why the perl5 example didn't work in p6- $_ is a
> contextual variable, so why doesn't the body of "odd" get its $_ value
> from grep in something like this:
> sub odd_a { $_ % 2}

This is really equivalent to

sub odd_a(*...@_, *%_) { $_ % 2 }

Every Routine gets its own $_ that isn't inherited from the outer 
lexical context (and is initialized to undef).  

Beyond that, what is really happening with

say grep &odd_a, 0..6

is that grep is performing a smart-match of each value of 0..6 
with &odd_a, and smart-matching a value to a Code object invokes
the Code object with the value as an argument.

Pm


Re: Meditations on a Loop

2009-05-26 Thread John M. Dlugosz

yary not.com-at-gmail.com |Perl 6| wrote:

I was wondering why the perl5 example didn't work in p6- $_ is a
contextual variable,



 so why doesn't the body of "odd" get its $_ value
from grep in something like this:
sub odd_a { $_ % 2}
  
If you make it a formally declared "sub", then you have to set up your 
local $_ yourself.  If you wrote it as a bare block, then using $_ in 
that block would be enough to make it your parameter.


If you don't declare it, I'm not sure if you get a local one implicitly 
or if it makes a closure from the lexical scope containing the sub.  
Either way, it's not the dynamic scope.




sub odd_b { $*_ % 2}
  
Sayith S02, "Note that |$*_| will always see the |$_| in the current 
scope, not the caller's scope"

That implies that it is declared for you whether you use or not.


sub odd_c { $CONTEXT::_ % 2 }
  


I'd prefer CALLER to CONTEXT, but in this case they should be the same. 




say grep &odd_a, 0..6
(calls "say" 7 times with an uninitialized value. Same with &odd_b, &odd_c)

  

So the answer to "

why the perl5 example didn't work" is "more use of lexical scoping rules."

--John



Re: Meditations on a Loop

2009-05-26 Thread yary
On Tue, May 26, 2009 at 1:57 PM, Patrick R. Michaud  wrote:
> On Mon, May 25, 2009 at 12:37:34PM -0700, yary wrote:
> How about...?
>
>    sub odd { ^$a % 2 }
typo. "sub odd {$^a % 2}" works (caret goes between "$" and "a")

>    say grep &odd, 0..6;
nice. I need to learn the differences between calling a sub as "odd"
vs "&odd" in p6. Haven't gotten that far in the synopses yet.

> This gets us to within one character of the p5 version.  I think
> we also have the possibility of
>
>    subset odd where { $_ % 2 }
>    say grep odd, 0..6;
>
> which is the same length as the p5 version, but afaict this
> last one doesn't seem to be working in Rakudo yet.

Nope, doesn't seem to.

I was wondering why the perl5 example didn't work in p6- $_ is a
contextual variable, so why doesn't the body of "odd" get its $_ value
from grep in something like this:
sub odd_a { $_ % 2}
sub odd_b { $*_ % 2}
sub odd_c { $CONTEXT::_ % 2 }

say grep &odd_a, 0..6
(calls "say" 7 times with an uninitialized value. Same with &odd_b, &odd_c)


Re: Meditations on a Loop

2009-05-26 Thread Patrick R. Michaud
On Mon, May 25, 2009 at 12:37:34PM -0700, yary wrote:
> That's an enjoyable and educational read, thanks!
> 
> There's one form under TMTOWTDI that I'd like to see, but can't figure
> out myself. It's the version analogous to this perl5 snippet-
> 
>   sub odd {$_ % 2}
>   say grep odd,0..6;
>
> -where the line that filters the list mentions no variables at all,
> and "$_" does its work behind the curtains.

How about...?

sub odd { ^$a % 2 }
say grep &odd, 0..6;

This gets us to within one character of the p5 version.  I think 
we also have the possibility of

subset odd where { $_ % 2 }
say grep odd, 0..6;

which is the same length as the p5 version, but afaict this 
last one doesn't seem to be working in Rakudo yet.

Pm


Re: Meditations on a Loop

2009-05-25 Thread yary
That's an enjoyable and educational read, thanks!

There's one form under TMTOWTDI that I'd like to see, but can't figure
out myself. It's the version analogous to this perl5 snippet-

  sub odd {$_ % 2}
  say grep odd,0..6;

-where the line that filters the list mentions no variables at all,
and "$_" does its work behind the curtains.

perl6 golfers, what can you formulate- using anything you like in the
"odd" sub, not adding to the Int class, not using anything with a
sigil in the filter expression? I haven't figured out how to match
p5's brevity yet.


Re: Meditations on a Loop

2009-05-22 Thread John M. Dlugosz

Sartak sartak-at-gmail.com |Perl 6| wrote:

On Fri, May 22, 2009 at 7:52 PM, John M. Dlugosz
<2nb81l...@sneakemail.com> wrote:
  

That sounds like a circular reference problem.  If the dot is a simple multi
sub and is expected to dispatch based on type (different types may have
different dispatchers), what "type" are you keying off of to pick the
standard dispatcher?  And how do you determine that without method calls?



I haven't been following Perl 6 design terribly closely, but I'll take
a shot at these two questions from what I know about OO design.

The standard dispatcher is associated with Perl 6's equivalent of Perl
5's UNIVERSAL (or CLOS's "t", Java's "java.lang.Object" or whatever,
etc.). The superest superclass. A class would be able to say "no no,
use this dispatcher instead", which would take effect for all of its
descendents (unless they too override dispatching).

  
The dispatcher isn't associated with an ultimate base class.  I think 
the bases are in fact independant from the dispatcher chosen for a 
concrete class.  Your wierdo class will still inherit from Object or 
whatever it's called. 


The metaobject is pointed to by the HOW.




There would be several behind-the-scenes method calls involved in
calling $object.foo. The first would be $object.HOW to get the
metaclass of $object. The metaclass would then perform many method
calls on itself and its associated behind-the-scenes objects in order
to dispatch the original method call of "foo" on $object.

The metaclass's own method calls would not be affected, since the
metaclass is (presumably) using the standard dispatch logic. Of
course, metaclasses would be able to define their own dispatch logic.
That would mean changing the metaclass's metaclass. Due to the layered
and recursive nature of metaobject protocols, it should all just work.
That's why MOPs are so nice.
  
I see.  Except for accessing the method accessor HOW.  But I think you 
are agreeing with my point.  I've thought about the details, but the 
Moose folks have it all figured out, they tell me.


IAC, Installing the dispatcher is done by setting up the object that 
lives at $object.HOW.  That process gets kicked off when the parser 
determines a method call is needed, and differing dispatchers don't 
bother that process at all.  It has nothing to do with changing what the 
dot performs when it is found by the parser.






Again, I must stress that I don't actually know how Perl 6 chose to do
this, but this is how it works in the MOP-empowered languages I've
looked at closely. :) I'd be more than happy to be corrected by
someone who knows how it does work.

Shawn

  




Re: Meditations on a Loop

2009-05-22 Thread Sartak
On Fri, May 22, 2009 at 7:52 PM, John M. Dlugosz
<2nb81l...@sneakemail.com> wrote:
> That sounds like a circular reference problem.  If the dot is a simple multi
> sub and is expected to dispatch based on type (different types may have
> different dispatchers), what "type" are you keying off of to pick the
> standard dispatcher?  And how do you determine that without method calls?

I haven't been following Perl 6 design terribly closely, but I'll take
a shot at these two questions from what I know about OO design.

The standard dispatcher is associated with Perl 6's equivalent of Perl
5's UNIVERSAL (or CLOS's "t", Java's "java.lang.Object" or whatever,
etc.). The superest superclass. A class would be able to say "no no,
use this dispatcher instead", which would take effect for all of its
descendents (unless they too override dispatching).

There would be several behind-the-scenes method calls involved in
calling $object.foo. The first would be $object.HOW to get the
metaclass of $object. The metaclass would then perform many method
calls on itself and its associated behind-the-scenes objects in order
to dispatch the original method call of "foo" on $object.

The metaclass's own method calls would not be affected, since the
metaclass is (presumably) using the standard dispatch logic. Of
course, metaclasses would be able to define their own dispatch logic.
That would mean changing the metaclass's metaclass. Due to the layered
and recursive nature of metaobject protocols, it should all just work.
That's why MOPs are so nice.

Again, I must stress that I don't actually know how Perl 6 chose to do
this, but this is how it works in the MOP-empowered languages I've
looked at closely. :) I'd be more than happy to be corrected by
someone who knows how it does work.

Shawn


Re: Meditations on a Loop

2009-05-22 Thread John M. Dlugosz

Daniel Ruoso daniel-at-ruoso.com |Perl 6| wrote:

Em Sex, 2009-05-22 às 18:27 -0500, John M. Dlugosz escreveu:
  

Daniel Ruoso wrote:


That's because dot is an operator as well and might be subject to be
overriden... but don't tell anyone that...
  
You mean by installing a different dispatcher for the object?  By 
hooking the grammar at a lower level?  Or will it be as simple as 
defining a multi sub for that?



Last time I heard about it, it was a simple multi sub...

daniel


  
That sounds like a circular reference problem.  If the dot is a simple 
multi sub and is expected to dispatch based on type (different types may 
have different dispatchers), what "type" are you keying off of to pick 
the standard dispatcher?  And how do you determine that without method 
calls?  And what type is the right-hand-side?


Re: Meditations on a Loop

2009-05-22 Thread Daniel Ruoso
Em Sex, 2009-05-22 às 18:27 -0500, John M. Dlugosz escreveu:
> Daniel Ruoso wrote:
> > That's because dot is an operator as well and might be subject to be
> > overriden... but don't tell anyone that...
> You mean by installing a different dispatcher for the object?  By 
> hooking the grammar at a lower level?  Or will it be as simple as 
> defining a multi sub for that?

Last time I heard about it, it was a simple multi sub...

daniel



Re: Meditations on a Loop

2009-05-22 Thread John M. Dlugosz

Daniel Ruoso wrote:

Em Qui, 2009-05-21 às 20:21 -0500, John M. Dlugosz escreveu:
  
but it was crudly inserted, so just before it the text still reads, "The 
"dot" form and the indirect object form DEFAULT to method calls.  All 
other prefix calls DEFAULT to subroutine calls." (emphasis mine),



That's because dot is an operator as well and might be subject to be
overriden... but don't tell anyone that...

daniel

  
You mean by installing a different dispatcher for the object?  By 
hooking the grammar at a lower level?  Or will it be as simple as 
defining a multi sub for that?


--John



Re: Meditations on a Loop

2009-05-22 Thread Daniel Ruoso
Em Qui, 2009-05-21 às 20:21 -0500, John M. Dlugosz escreveu:
> but it was crudly inserted, so just before it the text still reads, "The 
> "dot" form and the indirect object form DEFAULT to method calls.  All 
> other prefix calls DEFAULT to subroutine calls." (emphasis mine),

That's because dot is an operator as well and might be subject to be
overriden... but don't tell anyone that...

daniel



Re: Meditations on a Loop

2009-05-22 Thread John M. Dlugosz

Patrick R. Michaud pmichaud-at-pobox.com |Perl 6| wrote:

The page currently says:

"The reason this [.prime] works is because the method-call 
syntax will call an ordinary non-member sub also."


I think this is no longer the case (and hasn't been for some time).

Pm

  


Wow, that's news to me.

I found the paragraph that has been inserted in S12 to that effect,
   larry  8/21/2008 2:58:24 PM  remove failover from methods to 
subs




but it was crudly inserted, so just before it the text still reads, "The 
"dot" form and the indirect object form DEFAULT to method calls.  All 
other prefix calls DEFAULT to subroutine calls." (emphasis mine),


and in S06,

   set_name $obj: "Sam";   # try $obj.set_name("Sam") first, then
   # fall-back to set_name($obj, "Sam")
   $obj.set_name("Sam");   # same as the above



So, I'll make some edits this weekend.

--John


Re: Meditations on a Loop

2009-05-22 Thread Jon Lang
On Fri, May 22, 2009 at 5:34 AM, Timothy S. Nelson
 wrote:
> On Fri, 22 May 2009, Jonathan Worthington wrote:
>
>> Daniel Ruoso wrote:
>>>
>>> Em Sex, 2009-05-22 às 01:25 -0500, John M. Dlugosz escreveu:
>>>
   �...@primes = do $_ if prime($_) for 1..100;
 becomes
   �...@primes = $_ when prime($_) for 1..100;

>>>
>>>
>>> you gained one stroke, it's certainly better... I think it's time to
>>> play golf with Perl 6 already ;)
>>>
>>> jokes aside, "$_ when prime($_)" looks more natural than "do $_ if
>>> prime($_)"
>>>
>>>
>> Yes and:
>>
>> @primes = 1..100.grep: { prime($^n) };
>>
>> Is actually vaguely, like, readable AND two characters shorter than the
>> best you've managed so far.
>
>        Oh, if we're looking for readability, I'd look for:
>
> 1..100.grep: { prime($^n) } ==> @primes;
>
>        It's longer, though :).

These are only readable if you know geek-speak (i.e., "what does
'grep' mean?").  The alternatives being proposed are using words like
"do", "if", "when", and "for".  I think that it's rather impressive
that they're coming within a handful of characters of a grep-based
version.

-- 
Jonathan "Dataweaver" Lang


Re: Meditations on a Loop

2009-05-22 Thread Timothy S. Nelson

On Fri, 22 May 2009, Jonathan Worthington wrote:


Daniel Ruoso wrote:

Em Sex, 2009-05-22 às 01:25 -0500, John M. Dlugosz escreveu:


@primes = do $_ if prime($_) for 1..100;
becomes
@primes = $_ when prime($_) for 1..100;




you gained one stroke, it's certainly better... I think it's time to
play golf with Perl 6 already ;)

jokes aside, "$_ when prime($_)" looks more natural than "do $_ if
prime($_)"



Yes and:

@primes = 1..100.grep: { prime($^n) };

Is actually vaguely, like, readable AND two characters shorter than the best 
you've managed so far.


Oh, if we're looking for readability, I'd look for:

1..100.grep: { prime($^n) } ==> @primes;

It's longer, though :).


-
| Name: Tim Nelson | Because the Creator is,|
| E-mail: wayl...@wayland.id.au| I am   |
-

BEGIN GEEK CODE BLOCK
Version 3.12
GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- 
PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI D G+ e++> h! y-

-END GEEK CODE BLOCK-


Re: Meditations on a Loop

2009-05-22 Thread Jonathan Worthington

Daniel Ruoso wrote:

Em Sex, 2009-05-22 às 01:25 -0500, John M. Dlugosz escreveu:
  

@primes = do $_ if prime($_) for 1..100;
becomes
@primes = $_ when prime($_) for 1..100;




you gained one stroke, it's certainly better... I think it's time to
play golf with Perl 6 already ;)

jokes aside, "$_ when prime($_)" looks more natural than "do $_ if
prime($_)"

  

Yes and:

@primes = 1..100.grep: { prime($^n) };

Is actually vaguely, like, readable AND two characters shorter than the 
best you've managed so far.


Jonathan


Re: Meditations on a Loop

2009-05-22 Thread Daniel Ruoso
Em Sex, 2009-05-22 às 01:25 -0500, John M. Dlugosz escreveu:
> @primes = do $_ if prime($_) for 1..100;
> becomes
> @primes = $_ when prime($_) for 1..100;


you gained one stroke, it's certainly better... I think it's time to
play golf with Perl 6 already ;)

jokes aside, "$_ when prime($_)" looks more natural than "do $_ if
prime($_)"

daniel



Re: Meditations on a Loop

2009-05-21 Thread Jon Lang
On Thu, May 21, 2009 at 11:25 PM, John M. Dlugosz
<2nb81l...@sneakemail.com> wrote:
> Larry Wall larry-at-wall.org |Perl 6| wrote:
>>
>> And since the "when" modifier counts as a conditional, you can rewrite
>>
>>    grep Dog, @mammals
>>
>> as
>>
>>    $_ when Dog for @mammals;
>>
>> So perhaps will see a lot of subtypes used this way:
>>    subset Odd if Int where { $_ % 2 };
>>   �...@evens = ($_ * 2 when Odd for 0..*);
>>
>>
>
>
>   @primes = do $_ if prime($_) for 1..100;
>
> becomes
>
>   @primes = $_ when prime($_) for 1..100;
>
> ?
>
> Not sure that is any better.

subset Prime of Int where { prime($_) }
@primes = do $_ when Prime for 1..100;

But yes, something does get lost when you have to explicitly pass $_
into a function; its topical nature gets degraded.  Back when ".prime"
was shorthand for "prime $_", this wasn't a big deal; now, with the
fact that you'd somehow have to add a prime method to Int before you
could reliably say ".prime", it's a bit more of a problem.

-- 
Jonathan "Dataweaver" Lang


Re: Meditations on a Loop

2009-05-21 Thread John M. Dlugosz

Larry Wall larry-at-wall.org |Perl 6| wrote:


And since the "when" modifier counts as a conditional, you can rewrite

grep Dog, @mammals

as

$_ when Dog for @mammals;

So perhaps will see a lot of subtypes used this way: 


subset Odd if Int where { $_ % 2 };
@evens = ($_ * 2 when Odd for 0..*);

  



   @primes = do $_ if prime($_) for 1..100;

becomes

   @primes = $_ when prime($_) for 1..100;

?

Not sure that is any better.




Re: Meditations on a Loop

2009-05-21 Thread Carl Mäsak
John (>):
> What is "Userdocs for Christmas"?  Someone have a link?

So, "Userdocs for Christmas", also known as U4X, is an effort to
create both comprehensive, consistent user documentation, and the
means to access this documentation efficiently and easily.

You asked about U4X the other day, which makes me suspect that the
abbreviation may have been ill-chosen. :-) But I'll take the chance to
re-paste the two URLs that summarize the project.

Pretending that Envy is one of the Perl virtues
 
u4x/README
 

// Carl


Re: Meditations on a Loop

2009-05-21 Thread John M. Dlugosz

What is "Userdocs for Christmas"?  Someone have a link?


Carl Mäsak cmasak-at-gmail.com |Perl 6| wrote:

Timothy (>), John (>>):
  

If you would be so kind, please take a look at
.  I spent a couple days on
this, and besides needing it checked for correctness, found a few issues as
well as more food for thought.
  

   John, I very much enjoyed your article.  I'm hoping that at some
point, it would be possible to merge it into U4X, which is the "Userdocs for
Christmas" project (I think Carl Masak is the appropriate contact person for
this).



Not yet having read the article, I just wanted to pop by saying that
there's a good chance something like this can end up in the
'tutorials' section of u4x. The best way to ascertain this is to put a
mention in u4x/TODO, so I just did this.

// Carl

  




Re: Meditations on a Loop

2009-05-21 Thread Daniel Ruoso
Em Qui, 2009-05-21 às 21:33 -0300, Daniel Ruoso escreveu:
>  my @x = map { $_ * 2 for 1,2,3 }, 1,2,3;
>  say @x[0]; # 1;
>  say @x[0;0]; # ERROR
>  say @x[1]; # 1;
>  say @x[1;0]; # ERROR

er... there should be a 2 as output of the fourth line there...

daniel



Re: Meditations on a Loop

2009-05-21 Thread Daniel Ruoso
Em Qua, 2009-05-20 às 19:55 -0500, John M. Dlugosz escreveu:
> If you would be so kind, please take a look at 
> .  I spent a couple days 
> on this, and besides needing it checked for correctness, found a few 
> issues as well as more food for thought.

Some issues...

* The way to get an iterator is to ask for .Iterator() (this is in S07)
* It's not the capture itself that presents two different versions of
being a list, but rather the assignment in itself that traverses the
capture while flattening it.

i.e.:

 my $x := map { $_ * 2 for 1,2,3 }, 1,2,3;
 say $x[0]; # (1,2,3)
 say $x[0;0]; # 1
 say $x[1]; # (2,4,6)
 say $x[1;0]; # 2

as a contrast to

 my @x = map { $_ * 2 for 1,2,3 }, 1,2,3;
 say @x[0]; # 1;
 say @x[0;0]; # ERROR
 say @x[1]; # 1;
 say @x[1;0]; # ERROR

So, the list assignment really looks like

 my $iterator = (map { $_ * 2 for 1,2,3 }, 1,2,3).Iterator();
 my @x := Array.new;
 while ((my $it = $iterator.get) !=== Nil) { @x.push($it) }
 
Where the map is consumes an iterator by itself, so you could expand it
as...

 # this happens inside the &map function installed in CORE
 my $map_input = (1,2,3).Iterator();
 my $map_output = $MapIteratorInternalType.new(
   :input($map_input),
   :code({ $_ * 2 for 1,2,3 })
 );
 # this happens in the assignment
 my $iterator = $map_output.Iterator();
 my @x := Array.new;
 while ((my $it = $iterator.get) !=== Nil) { @x.push($it) }
 

The text is fantastic... it's really awesome how you got into the guts
of Perl 6 while still preserving brevity and clarity...

daniel



Re: Meditations on a Loop

2009-05-21 Thread Daniel Ruoso
Em Qua, 2009-05-20 às 20:58 -0500, Patrick R. Michaud escreveu:
> On Wed, May 20, 2009 at 07:55:55PM -0500, John M. Dlugosz wrote:
> > If you would be so kind, please take a look at  
> > .  
> "The reason this [.prime] works is because the method-call 
> syntax will call an ordinary non-member sub also."
> I think this is no longer the case (and hasn't been for some time).

It is no longer the case. I was about to send a mail about this... so
I'll just make sure that is noticed ;)

daniel



Re: Meditations on a Loop

2009-05-21 Thread Carl Mäsak
Timothy (>), John (>>):
>> If you would be so kind, please take a look at
>> .  I spent a couple days on
>> this, and besides needing it checked for correctness, found a few issues as
>> well as more food for thought.
>
>        John, I very much enjoyed your article.  I'm hoping that at some
> point, it would be possible to merge it into U4X, which is the "Userdocs for
> Christmas" project (I think Carl Masak is the appropriate contact person for
> this).

Not yet having read the article, I just wanted to pop by saying that
there's a good chance something like this can end up in the
'tutorials' section of u4x. The best way to ascertain this is to put a
mention in u4x/TODO, so I just did this.

// Carl


Re: Meditations on a Loop

2009-05-21 Thread Larry Wall
On Wed, May 20, 2009 at 07:55:55PM -0500, John M. Dlugosz wrote:
> If you would be so kind, please take a look at  
> .  I spent a couple days  
> on this, and besides needing it checked for correctness, found a few  
> issues as well as more food for thought.

It's been legal (for more than two years) to nest a condtional inside
a loop modifier without extra parens:

@array = ($_ if .prime for 1..10);

In fact, the first example in S04 "Loop statements" is:

@evens = ($_ * 2 if .odd for 0..100);

And since the "when" modifier counts as a conditional, you can rewrite

grep Dog, @mammals

as

$_ when Dog for @mammals;

So perhaps will see a lot of subtypes used this way: 

subset Odd if Int where { $_ % 2 };
@evens = ($_ * 2 when Odd for 0..*);

Well, those examples are pretty silly.  Anyone with better
examples should feel free to edit the specs.

Larry


Re: Meditations on a Loop

2009-05-20 Thread Timothy S. Nelson

On Wed, 20 May 2009, John M. Dlugosz wrote:

If you would be so kind, please take a look at 
.  I spent a couple days on 
this, and besides needing it checked for correctness, found a few issues as 
well as more food for thought.


John, I very much enjoyed your article.  I'm hoping that at some
point, it would be possible to merge it into U4X, which is the "Userdocs for
Christmas" project (I think Carl Masak is the appropriate contact person for
this).

	And I think Daniel Ruoso is probably the appropriate person to be able 
to talk intelligently about iterators.


HTH,


-
| Name: Tim Nelson | Because the Creator is,|
| E-mail: wayl...@wayland.id.au| I am   |
-

BEGIN GEEK CODE BLOCK
Version 3.12
GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- 
PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI D G+ e++> h! y-

-END GEEK CODE BLOCK-



Re: Meditations on a Loop

2009-05-20 Thread Patrick R. Michaud
On Wed, May 20, 2009 at 07:55:55PM -0500, John M. Dlugosz wrote:
> If you would be so kind, please take a look at  
> .  

The page currently says:

"The reason this [.prime] works is because the method-call 
syntax will call an ordinary non-member sub also."

I think this is no longer the case (and hasn't been for some time).

Pm


Re: Meditations on a Loop

2009-05-20 Thread Austin Hastings

You write:

> I’m not sure what the heart of Perl 6 would be, but I think we’ve 
identified the spleen
> with the |Capture|. In the human body, most people have no idea what 
the spleen does.
> It sits there out of the way doing its thing, and we can’t live 
without it.


I, along with a host of others, am living without a spleen. I have been 
for 20+ years. I'm reading perl6-language, instead of drinking beer and 
chasing strippers, so you might argue that I have no life. But I don't 
think the "can't live without it" claim holds. :-)


Also, you've got a little green "Update this paragraph" that probably 
isn't needed any more.


=Austin




John M. Dlugosz wrote:
If you would be so kind, please take a look at 
.  I spent a couple 
days on this, and besides needing it checked for correctness, found a 
few issues as well as more food for thought.


--John

P.S.  contains some humor.



Meditations on a Loop

2009-05-20 Thread John M. Dlugosz
If you would be so kind, please take a look at 
.  I spent a couple days 
on this, and besides needing it checked for correctness, found a few 
issues as well as more food for thought.


--John

P.S.  contains some humor.