Re: My first functional perl6 program

2006-08-25 Thread John Macdonald
On Wed, Aug 23, 2006 at 04:10:32PM -0700, Larry Wall wrote: > Yes, that should work eventually, given that hypers are supposed to stop > after the longest *finite* sequence. In theory you could even say > > my %trans = ('a'..*) »=>« ('?' xx *); > > but we haven't tried to define what the sem

Re: My first functional perl6 program

2006-08-24 Thread Larry Wall
On Thu, Aug 24, 2006 at 12:09:44AM -0600, Luke Palmer wrote: : The way i would define hyper would be to stop after the shortest list : (also with zip). I know there are reasons not to do that, however, it : is easy to say: : :(@a, 0 xx *) >>+<< @b : : or : :@a >>+<< @[EMAIL PROTECTED]

Re: My first functional perl6 program

2006-08-24 Thread Luke Palmer
On 8/24/06, Mark J. Reed <[EMAIL PROTECTED]> wrote: I found your rant a bit long on vehemence and short on coherence, Luke, but if I understand you correctly, your complaint is that this is finite: @finite_list >>=><< @infinite_list while, according to S03, this is long: @short_list >>=><< @lo

Re: My first functional perl6 program

2006-08-24 Thread Mark J. Reed
On 8/24/06, Mark J. Reed <[EMAIL PROTECTED]> wrote: e.g. q(a b) >>=><< (1,2,3,4) would return (a=>1, b=>2, undef=>3, undef=>4). or rather, it would if I'd typed qw(a b) as I intended. One other point: while I agree that we should shield the programmer as much as possible from having to care wh

Re: My first functional perl6 program

2006-08-24 Thread Mark J. Reed
I found your rant a bit long on vehemence and short on coherence, Luke, but if I understand you correctly, your complaint is that this is finite: @finite_list >>=><< @infinite_list while, according to S03, this is long: @short_list >>=><< @long_list e.g. q(a b) >>=><< (1,2,3,4) would return (a

Re: My first functional perl6 program

2006-08-23 Thread Luke Palmer
On 8/23/06, Larry Wall <[EMAIL PROTECTED]> wrote: Yes, that should work eventually, given that hypers are supposed to stop after the longest *finite* sequence. Shudder xx * What the hell does that mean!? Let me posit this: @a = 0..42; @b = list_of_twin_primes(); (@a >>=><< @b).lengt

Re: My first functional perl6 program

2006-08-23 Thread Mark J. Reed
On 8/23/06, Larry Wall <[EMAIL PROTECTED]> wrote: Strange, this works for me: $_ = "foo"; say .uc FOO Maybe that was fixed in 6.2.12, then. I'm still running 6.2.11, and at least on Cygwin, I get this: $ pugs -e '$_ = "foo"; say .uc' $ No output. And if I try .trans: $ pugs -e '$_

Re: My first functional perl6 program

2006-08-23 Thread Larry Wall
On Wed, Aug 23, 2006 at 06:39:52PM -0400, Mark J. Reed wrote: : It does sadden me somewhat that the say() requires the parens (or an : explicit $_ etc). But I'll live. :) Strange, this works for me: $_ = "foo"; say .uc FOO Seems to work with .uc() as well. Larry

Re: My first functional perl6 program

2006-08-23 Thread Larry Wall
On Wed, Aug 23, 2006 at 06:49:06PM -0400, Mark J. Reed wrote: : On 8/23/06, Mark J. Reed <[EMAIL PROTECTED]> wrote: : >my %trans = ('a'..'z') »=>« ('?' xx 26); : : Also, correct me if I'm wrong, but I should theoretically be able to : use xx * there, thus creating a lazily-evaluated infinitely-lon

Re: My first functional perl6 program

2006-08-23 Thread Mark J. Reed
On 8/23/06, Mark J. Reed <[EMAIL PROTECTED]> wrote: my %trans = ('a'..'z') »=>« ('?' xx 26); Also, correct me if I'm wrong, but I should theoretically be able to use xx * there, thus creating a lazily-evaluated infinitely-long list of question marks? -- Mark J. Reed <[EMAIL PROTECTED]>