Re: How to write this properly in Perl 6?

2009-05-28 Thread Cosimo Streppone
In data 28 mai 2009 alle ore 00:13:19, Mark J. Reed markjr...@gmail.com ha scritto: You can write a sub to return the next step: sub bondigi { state $n=1; return (Bon Digi Bon Digi, Bon xx $n, Digi xx $n++); } Nahh. That's too easy... It's not fun :-) but I think an idiomatic Perl 6

Re: Amazing Perl 6

2009-05-28 Thread Daniel Carrera
Hi Damian, This is a really good list. Mind if I copy it / modify it and post it somewhere like my blog? One question: * Compactness of expression + semi-infinite data structures: @fib = 1,1...[+]# The entire Fibonacci sequence Very impressive. That's even shorter than

Re: How to write this properly in Perl 6?

2009-05-28 Thread Carl Mäsak
Mark (): but I think an idiomatic Perl 6 solution would have a proper lazy Iterator.  How do we write one of those? Like this, I think: $ perl6 -e '.say for gather { my $n = 1; loop { take bon digi bon digi; take bon for ^$n; take digi for ^$n; ++$n } }' That currently parses in Rakudo, but

Re: How to write this properly in Perl 6?

2009-05-28 Thread Cosimo Streppone
In data 27 mai 2009 alle ore 23:46:40, John M. Dlugosz 2nb81l...@sneakemail.com ha scritto: Anything in the existing implementation that's hostile to Perl 6? Just port it over by lightly editing the text or using a p5 module importer. Yes, right, but that wouldn't use Perl 6 features. To

Re: Amazing Perl 6

2009-05-28 Thread Damian Conway
Daniel Carrera wrote: This is a really good list. Mind if I copy it / modify it and post it somewhere like my blog? That's fine. One question:    * Compactness of expression + semi-infinite data structures:       �...@fib = 1,1...[+]        # The entire Fibonacci sequence Very

Re: Amazing Perl 6

2009-05-28 Thread Jon Lang
On Thu, May 28, 2009 at 1:37 AM, Daniel Carrera daniel.carr...@theingots.org wrote: Hi Damian, This is a really good list. Mind if I copy it / modify it and post it somewhere like my blog? One question:    * Compactness of expression + semi-infinite data structures:       �...@fib =

Re: Amazing Perl 6

2009-05-28 Thread Damian Conway
Jon Lang suggested: Start with the addition operator, '1 + 1'.  Apply the reducing metaoperator to it so that it works syntactically like a function: '[+] 1, 1'.  Instead of calling it, pass a code reference to it: '[+]'. No. [+] isn't the Code object for [+]; it's the Code object for

Re: Amazing Perl 6

2009-05-28 Thread Mark J. Reed
So how is this: Any infix operator (except for non-associating operators) can be surrounded by square brackets in term position to create a list operator that reduces using that operation: reconciled with this: Any ordinary infix operator may be enclosed in square brackets with the same

Re: Amazing Perl 6

2009-05-28 Thread Damian Conway
Mark J. Reed asked: So how is this: Any infix operator (except for non-associating operators) can be surrounded by square brackets in term position to create a list operator  that reduces using that operation: reconciled with this: Any ordinary infix operator may be enclosed in square

Re: Illustration of stuff we've been discussing

2009-05-28 Thread Daniel Ruoso
Em Qui, 2009-05-28 às 00:24 -0500, John M. Dlugosz escreveu: Please see http://www.dlugosz.com/Perl6/web/info-model-1.html and talk to me about it. The illustratino is cool, but it doesn't take into account the possibility of: @a[0] := $x; which means that an array is, theoretically, an

Re: Amazing Perl 6

2009-05-28 Thread Daniel Ruoso
Em Qui, 2009-05-28 às 21:36 +1000, Damian Conway escreveu: Mark J. Reed asked: ? And if [+] means infix:+, how do I refer to the Code of the list operator [+]? prefix:[+] Is that really? I mean... [ ] is a meta-operator, so [+] 1, 1, 2, 3 isn't a prefix, but a [ ] meta with + inside and

Re: Amazing Perl 6

2009-05-28 Thread Mark J. Reed
On Thu, May 28, 2009 at 8:43 AM, Daniel Ruoso dan...@ruoso.com wrote: Em Qui, 2009-05-28 às 21:36 +1000, Damian Conway escreveu: prefix:[+] Is that really? I mean... [ ] is a meta-operator, so  [+] 1, 1, 2, 3 isn't a prefix, but a [ ] meta with + inside and the list as argument... The

New CPAN

2009-05-28 Thread Daniel Carrera
Hello all, There was some talk on IRC about a new version of CPAN to match the new version of Perl. Recap: wayland76 wants to integrate CPAN with the local package manager (RPM, DEB). He proposed using Software::Package for that (which is incomplete). Now some ideas of my own: A) Can we

Re: Illustration of stuff we've been discussing

2009-05-28 Thread John M. Dlugosz
Daniel Ruoso daniel-at-ruoso.com |Perl 6| wrote: Em Qui, 2009-05-28 às 00:24 -0500, John M. Dlugosz escreveu: Please see http://www.dlugosz.com/Perl6/web/info-model-1.html and talk to me about it. The illustratino is cool, but it doesn't take into account the possibility of: @a[0]

Re: Amazing Perl 6

2009-05-28 Thread John Macdonald
On Wed, May 27, 2009 at 05:42:58PM -0500, John M. Dlugosz wrote: Mark J. Reed markjreed-at-gmail.com |Perl 6| wrote: On Wed, May 27, 2009 at 6:05 PM, John M. Dlugosz 2nb81l...@sneakemail.com wrote: And APL calls it |¨ (two little dots high up) Mr. MacDonald just said upthread that

Re: Amazing Perl 6

2009-05-28 Thread Uri Guttman
DC == Damian Conway dam...@conway.org writes: DC * Grammars built into the language: DC grammar Expr::Arithetic { DC rule Expression { Mult ** $OP= + -} DC rule Mult { Pow ** $OP= * / % } DC rule Pow{ Term ** $OP= ^

Re: New CPAN

2009-05-28 Thread Mark Overmeer
* Daniel Carrera (daniel.carr...@theingots.org) [090528 14:18]: There was some talk on IRC about a new version of CPAN to match the new version of Perl. In March 2006, Sam Vilain and I started to think about a new CPAN what we named CPAN6. There is a lot of information about the project on

RFC: How does using CPAN with Perl 6 would look like (Was: Re: New CPAN)

2009-05-28 Thread Daniel Ruoso
Em Qui, 2009-05-28 às 16:18 +0200, Daniel Carrera escreveu: Hello all, There was some talk on IRC about a new version of CPAN to match the new version of Perl. I just wanted to point out some previous conclusion on this issue. What currently we generically name CPAN is actually composed of:

Re: Illustration of stuff we've been discussing

2009-05-28 Thread Daniel Ruoso
Em Qui, 2009-05-28 às 09:27 -0500, John M. Dlugosz escreveu: Daniel Ruoso daniel-at-ruoso.com |Perl 6| wrote: Em Qui, 2009-05-28 às 00:24 -0500, John M. Dlugosz escreveu: Please see http://www.dlugosz.com/Perl6/web/info-model-1.html and talk to me about it. The illustratino is cool, but

Re: New CPAN

2009-05-28 Thread Daniel Carrera
Mark Overmeer wrote: In March 2006, Sam Vilain and I started to think about a new CPAN what we named CPAN6. There is a lot of information about the project on http://cpan6.org I know about CPAN6, thanks. It's come up a couple of times on IRC. Perhaps you could hang out on the IRC channel so

Re: Amazing Perl 6

2009-05-28 Thread Larry Wall
On Thu, May 28, 2009 at 10:51:33AM -0400, John Macdonald wrote: : Yes. The full expression in raw APL for n! is: : : */in : : (where i is the Greek letter iota - iotan is Perl's 1..$n). Only if the origin is 1. This breaks under )ORIGIN 0. cough $[ /cough By the way, the assumption here is

Re: Amazing Perl 6

2009-05-28 Thread Larry Wall
On Thu, May 28, 2009 at 09:43:58AM -0400, Mark J. Reed wrote: : So that much makes sense. But I still think the two different : meanings of square brackets in operators are going to confuse people. You're welcome to introduce more bracketing characters into ASCII. :P But seriously, this is one

r26953 - docs/Perl6/Spec

2009-05-28 Thread pugs-commits
Author: lwall Date: 2009-05-28 18:55:52 +0200 (Thu, 28 May 2009) New Revision: 26953 Modified: docs/Perl6/Spec/S05-regex.pod Log: [S05] document use of #= tags in {*} actions Modified: docs/Perl6/Spec/S05-regex.pod === ---

r26954 - docs/Perl6/Spec

2009-05-28 Thread pugs-commits
Author: lwall Date: 2009-05-28 19:37:18 +0200 (Thu, 28 May 2009) New Revision: 26954 Modified: docs/Perl6/Spec/S05-regex.pod Log: [S05] clarify #= tags as suggested by [particle]++ Modified: docs/Perl6/Spec/S05-regex.pod === ---

r26955 - docs/Perl6/Spec

2009-05-28 Thread pugs-commits
Author: lwall Date: 2009-05-28 19:54:45 +0200 (Thu, 28 May 2009) New Revision: 26955 Modified: docs/Perl6/Spec/S05-regex.pod Log: typo Modified: docs/Perl6/Spec/S05-regex.pod === --- docs/Perl6/Spec/S05-regex.pod

Re: Amazing Perl 6

2009-05-28 Thread John Macdonald
On Thu, May 28, 2009 at 09:30:25AM -0700, Larry Wall wrote: On Thu, May 28, 2009 at 10:51:33AM -0400, John Macdonald wrote: : Yes. The full expression in raw APL for n! is: : : */in : : (where i is the Greek letter iota - iotan is Perl's 1..$n). Only if the origin is 1. This breaks

Re: Amazing Perl 6

2009-05-28 Thread Mark J. Reed
Since when are we limited to ASCII again? :) If this is just a question of prefix vs infix telling you what [+] is shorthand for, OK. But it seems there's still scope for conflict between the two meanings of the square brackets. I mean, prefix ops can be used in reduce, too, right? Tagentially

Re: Amazing Perl 6

2009-05-28 Thread Larry Wall
On Thu, May 28, 2009 at 02:55:10PM -0400, Mark J. Reed wrote: : Since when are we limited to ASCII again? :) Well, we used some of Latin-1's bracket offerings, and people already carp about that. :) : If this is just a question of prefix vs infix telling you what [+] is : shorthand for, OK. But

Re: Amazing Perl 6

2009-05-28 Thread Larry Wall
On Thu, May 28, 2009 at 02:55:10PM -0400, Mark J. Reed wrote: : Tagentially related: why doesn't simple + or + work for what we're : currently spelling [+] (and which is more specifically spelled : infix:+)? Oh, and why not +? Mainly because we have lots of infix operators containing and , but

Re: Amazing Perl 6

2009-05-28 Thread Mark J. Reed
On Thu, May 28, 2009 at 3:13 PM, Larry Wall la...@wall.org wrote: :  I mean, prefix ops can be used in reduce, too, right? I will let you ponder the meaning of reduce a bit more, and the relationship of that to the respective arity of infixes vs prefixes. Well, infixes are necessarily binary,

Re: Amazing Perl 6

2009-05-28 Thread Larry Wall
On Thu, May 28, 2009 at 03:33:34PM -0400, Mark J. Reed wrote: : On Thu, May 28, 2009 at 3:13 PM, Larry Wall la...@wall.org wrote: : :  I mean, prefix ops can be used in reduce, too, right? : : I will let you ponder the meaning of reduce a bit more, and the : relationship of that to the

Re: New CPAN

2009-05-28 Thread Daniel Carrera
Jonathan Scott Duff wrote: See http://perlcabal.org/syn/S11.html#Versioning Yeah, I reached that part earlier today (but after I sent my email). Thanks. Daniel.

Re: Amazing Perl 6

2009-05-28 Thread Damian Conway
Daniel Ruoso asked: prefix:[+] Is that really? I mean... [ ] is a meta-operator, Sure. But once you []-meta an infix operator, you get a prefix operator. See http://perlcabal.org/syn/S03.html#Reduction_operators, which states: Any infix operator (except for non-associating operators) can

Re: The game of life

2009-05-28 Thread yary
If anyone wants to try tackling this, a longer APL one-liner is referenced on the APL wikipedia page and discussed in length here: http://catpad.net/michael/apl/ As an aside, APL was the first computer language I was exposed to. When I was around 7 years old my aunt (who lived in Boston near

Re: The game of life

2009-05-28 Thread yary
And a link explaining the shorter one-liner: http://aplwiki.com/GameOfLife

Re: New CPAN

2009-05-28 Thread Darren Duncan
Daniel Carrera wrote: Mark Overmeer wrote: The problem is more serious. Perl6 installation needs to have multiple versions of the same module installed in parallel (and even run within the same program!). Why? Because we need things to work effectively in the general case where what was

Re: New CPAN

2009-05-28 Thread Daniel Carrera
Darren Duncan wrote: Because we need things to work effectively in the general case where what was originally a single module Foo with one name becomes forked with each creator (authority) going off in their own direction, or alternately the creator makes incompatible changes, and then later

Re: The game of life

2009-05-28 Thread Uri Guttman
y == yary not@gmail.com writes: y If anyone wants to try tackling this, a longer APL one-liner is y referenced on the APL wikipedia page and discussed in length here: y http://catpad.net/michael/apl/ y As an aside, APL was the first computer language I was exposed to. y When I

[RFC] CPAN6 requirements analysis

2009-05-28 Thread Alex Elsayed
While lurking in IRC, I've seen several discussions of what CPAN 6 should look like. Honestly, wayland76++'s idea for packaging seems the best to me. Most of the suggestions so far, especially those based on alien, apt, yum, or other existing package managers have a few major problems: * Alien

Re: [RFC] CPAN6 requirements analysis

2009-05-28 Thread Daniel Carrera
Hi Alex, I hve comments. Alex Elsayed wrote: While lurking in IRC, I've seen several discussions of what CPAN 6 should look like. Honestly, wayland76++'s idea for packaging seems the best to me. Most of the suggestions so far, especially those based on alien, apt, yum, or other existing

Re: [RFC] CPAN6 requirements analysis

2009-05-28 Thread Larry Wall
On Fri, May 29, 2009 at 01:04:28AM +0200, Daniel Carrera wrote: Hi Alex, I hve comments. Alex Elsayed wrote: While lurking in IRC, I've seen several discussions of what CPAN 6 should look like. Honestly, wayland76++'s idea for packaging seems the best to me. Most of the suggestions so

Re: [RFC] CPAN6 requirements analysis

2009-05-28 Thread Alex Elsayed
On Thursday 28 May 2009 4:04:28 pm Daniel Carrera wrote: * We were mainly looking at Alien as a source of Perl code we could borrow. Ah, I was lumping it in with the previous proposals to actually use .deb as the official P6 package format. My mistake. * The point of wayland76's proposal was

Re: Illustration of stuff we've been discussing

2009-05-28 Thread Larry Wall
On Thu, May 28, 2009 at 01:06:18PM -0300, Daniel Ruoso wrote: : Em Qui, 2009-05-28 às 09:27 -0500, John M. Dlugosz escreveu: : Daniel Ruoso daniel-at-ruoso.com |Perl 6| wrote: : Em Qui, 2009-05-28 às 00:24 -0500, John M. Dlugosz escreveu: : Please see

Re: [RFC] CPAN6 requirements analysis

2009-05-28 Thread Alex Elsayed
On Thursday 28 May 2009 4:22:00 pm Larry Wall wrote: I support the notion of distributing binaries because nobody's gonna want to chew up their phone's battery doing unnecessary compiles. The ecology of computing devices is different from ten years ago. I agree. My ideal situation would be

Re: [RFC] CPAN6 requirements analysis

2009-05-28 Thread Daniel Carrera
Larry Wall wrote: I support the notion of distributing binaries because nobody's gonna want to chew up their phone's battery doing unnecessary compiles. The ecology of computing devices is different from ten years ago. By binaries, I assume you mean native binaries, as opposed to Parrot

Re: The game of life

2009-05-28 Thread John M. Dlugosz
yary not.com-at-gmail.com |Perl 6| wrote: If anyone wants to try tackling this, a longer APL one-liner is referenced on the APL wikipedia page and discussed in length here: http://catpad.net/michael/apl/ As an aside, APL was the first computer language I was exposed to. When I was around 7

Re: [RFC] CPAN6 requirements analysis

2009-05-28 Thread Alex Elsayed
On Thursday 28 May 2009 4:54:50 pm Daniel Carrera wrote: On the other hand, distributing Parrot bytecode (or PIR, or PASM) seems fine. But I don't know what to suggest for modules that require a C compiler. The problem with that is that Rakudo isn't the Official impelentation, and never will

Re: Illustration of stuff we've been discussing

2009-05-28 Thread John M. Dlugosz
Larry Wall larry-at-wall.org |Perl 6| wrote: Basically, (ignoring STD's definition of name) I view @a[0] as a name, in the sense of identifying a unique object. It just happens to contain navigational elements like a URL. OK, that that might be what was meant in the synopses when it was

Re: Illustration of stuff we've been discussing

2009-05-28 Thread John M. Dlugosz
Daniel Ruoso daniel-at-ruoso.com |Perl 6| wrote: Em Qui, 2009-05-28 às 00:24 -0500, John M. Dlugosz escreveu: Please see http://www.dlugosz.com/Perl6/web/info-model-1.html and talk to me about it. The illustratino is cool, but it doesn't take into account the possibility of: @a[0]

Re: Amazing Perl 6

2009-05-28 Thread John M. Dlugosz
Mark J. Reed markjreed-at-gmail.com |Perl 6| wrote: So that much makes sense. But I still think the two different meanings of square brackets in operators are going to confuse people. I agree. The previously quoted passages in the synopses are confusing, too, since it doesn't make the

Re: Amazing Perl 6

2009-05-28 Thread John M. Dlugosz
John Macdonald john-at-perlwolf.com |Perl 6| wrote: However, the assumption fails if process is supposed to mean that everyone is capable of generating Unicode in the messages that they are writing. I don't create non-English text often enough to have it yet be useful to learn how. (I'd just

Re: Illustration of stuff we've been discussing

2009-05-28 Thread John M. Dlugosz
Daniel Ruoso daniel-at-ruoso.com |Perl 6| wrote: Em Qui, 2009-05-28 às 09:27 -0500, John M. Dlugosz escreveu: Daniel Ruoso daniel-at-ruoso.com |Perl 6| wrote: Em Qui, 2009-05-28 às 00:24 -0500, John M. Dlugosz escreveu: Please see

Re: [RFC] CPAN6 requirements analysis

2009-05-28 Thread Timothy S. Nelson
On Thu, 28 May 2009, Alex Elsayed wrote: On Thursday 28 May 2009 4:04:28 pm Daniel Carrera wrote: At first I liked wayland76's proposal, but now I have a new concern: Most package managers are not designed to hold multiple versions of the same package. As indicated in S11, it is important

r26957 - docs/Perl6/Spec

2009-05-28 Thread pugs-commits
Author: wayland Date: 2009-05-29 04:53:24 +0200 (Fri, 29 May 2009) New Revision: 26957 Modified: docs/Perl6/Spec/S22-package-format.pod Log: Actually named the components Modified: docs/Perl6/Spec/S22-package-format.pod === ---

Re: Amazing Perl 6

2009-05-28 Thread Timothy S. Nelson
On Thu, 28 May 2009, John M. Dlugosz wrote: John Macdonald john-at-perlwolf.com |Perl 6| wrote: However, the assumption fails if process is supposed to mean that everyone is capable of generating Unicode in the messages that they are writing. I don't create non-English text often enough to

Re: Amazing Perl 6

2009-05-28 Thread Larry Wall
On Thu, May 28, 2009 at 08:06:14PM -0500, John M. Dlugosz wrote: Mark J. Reed markjreed-at-gmail.com |Perl 6| wrote: So that much makes sense. But I still think the two different meanings of square brackets in operators are going to confuse people. I agree. The previously quoted