series operator issues

2010-07-22 Thread Jon Lang
When I last reviewed the writeup for the series operators, I noticed two issues: First, why is the RHS argument a list? You only ever use the first element of it; so why don't you just reference a single value? Second, I'm trying to think of a simple and intuitive way to write up a series expres

Re: series operator issues

2010-07-22 Thread Moritz Lenz
Hi, Am 22.07.2010 17:18, schrieb Jon Lang: When I last reviewed the writeup for the series operators, I noticed two issues: First, why is the RHS argument a list? You only ever use the first element of it; so why don't you just reference a single value? The idea is that you can continue seri

Re: series operator issues

2010-07-22 Thread Aaron Sherman
On Thu, Jul 22, 2010 at 11:41 AM, Moritz Lenz wrote: > > The difficulty you're running into is that you're trying to use the wrong > tool for the job. Just don't use the series operator when it's not easy to > use. Perl 6 has other mechanism too, which are better suited for these > particular pro

Re: series operator issues

2010-07-22 Thread Jon Lang
On Thu, Jul 22, 2010 at 9:25 AM, Aaron Sherman wrote: > On Thu, Jul 22, 2010 at 11:41 AM, Moritz Lenz wrote: >> The difficulty you're running into is that you're trying to use the wrong >> tool for the job. Just don't use the series operator when it's not easy to >> use. Perl 6 has other mechanis

Re: series operator issues

2010-07-22 Thread Aaron Sherman
On Thu, Jul 22, 2010 at 1:13 PM, Jon Lang wrote: > > I also think it's doable without a special tool: > > > > 0, { state $i = 1; $^a + $i++ } ... * > > Kludgey; but possibly doable. > Well, it's kind of what state is there for. > > But what I'd really like to see would be for the index to be

Re: series operator issues

2010-07-22 Thread Jon Lang
On Thu, Jul 22, 2010 at 11:35 AM, Aaron Sherman wrote: > On Thu, Jul 22, 2010 at 1:13 PM, Jon Lang wrote: >>  Yes, it would be a >> special tool; but it would be much more in keeping with the "keep >> simple things easy" philosophy that Perl 6 tends to promote: >> >>    0, { $^a + $:i } ... * # s

Re: series operator issues

2010-07-22 Thread Aaron Sherman
On Thu, Jul 22, 2010 at 4:52 PM, Jon Lang wrote: > I do have to admit that that's awfully clean-looking, but the > implementation > > would force a closure in a series to behave differently from a closure > > anywhere else. > > How so? > Unlike some of you, I haven't managed to memorize all of t

r31789 -[S32] DateTime immutable, leap seconds validation

2010-07-22 Thread pugs-commits
Author: masak Date: 2010-07-22 23:54:10 +0200 (Thu, 22 Jul 2010) New Revision: 31789 Modified: docs/Perl6/Spec/S32-setting-library/Temporal.pod Log: [S32] DateTime immutable, leap seconds validation The rest of this message is from Kodi++, who prepared the combined spec/Rakudo patch: There ar

Re: series operator issues

2010-07-22 Thread Damian Conway
On 23 July 2010 01:41, Moritz Lenz wrote: > Use the right tool for the right job: > >>    square numbers: 0, 1, 4, 9, 16, 25, 36, etc. > > (1..10).map(* ** 2) Or even just: (1..10) »**» 2 Note that you can also get most of the effects you want by using @_ in the series' generator block.

Announce: Rakudo Perl 6 compiler development release #31 ("Atlanta")

2010-07-22 Thread Will Coleda
On behalf of the Rakudo development team, I'm happy to announce the July 2010 development release of Rakudo Perl #31 "Atlanta". Rakudo is an implementation of Perl 6 on the Parrot Virtual Machine (see ). The tarball for the July 2010 release is available from

Re: series operator issues

2010-07-22 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 7/22/10 11:18 , Jon Lang wrote: > Second, I'm trying to think of a simple and intuitive way to write up > a series expression for: > >triangle numbers: 0, 1, 3, 6, 10, 15, 21, etc. >square numbers: 0, 1, 4, 9, 16, 25, 36, etc. >factoria