Re: Functional-style pattern matching

2010-03-10 Thread Mark J. Reed
Oh, wow. I was just asking about the spec; didn't know this stuff already worked. Rakudos to the team! :) On Wed, Mar 10, 2010 at 9:18 AM, Carl Mäsak wrote: > Mark (>): >> Does the unpacking participate in dispatch?  If a Hash comes in as $t >> with no 'left' key, will it fail to match? > > Yes

Re: Functional-style pattern matching

2010-03-10 Thread Carl Mäsak
Mark (>): > Does the unpacking participate in dispatch?  If a Hash comes in as $t > with no 'left' key, will it fail to match? Yes. $ perl6 -e 'sub foo(%h($left)) { say $left }; foo({ left => "OH HAI" })' OH HAI $ perl6 -e 'sub foo(%h($left)) {}; foo({ no => "left key" })' Not enough positional

Re: Functional-style pattern matching

2010-03-10 Thread Mark J. Reed
Does the unpacking participate in dispatch? If a Hash comes in as $t with no 'left' key, will it fail to match? On Tuesday, March 9, 2010, Little Walker wrote: >> Which is pretty powerful, really. > > Absolutely - I think you're referring to the 'type subset' stuff which > is great. > >> This i

Re: Functional-style pattern matching

2010-03-10 Thread Little Walker
> Which is pretty powerful, really. Absolutely - I think you're referring to the 'type subset' stuff which is great. > This is where Perl 6 is not the same as functional > languages, since it's got an imperative OO element as well. True, there can be friction between the functional style and OO,

[perl #73460] [BUG] You can sneak a Block into a variable typed as a Whatever in Rakudo

2010-03-10 Thread Carl Mäsak
# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #73460] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=73460 > rakudo: my $x = *; say $x.WHAT rakudo de996e: OUTPUT«Block()␤» now that's... confusin

Re: Functional-style pattern matching

2010-03-10 Thread Little Walker
> That's almost exactly the example from: > >    http://perlcabal.org/syn/S06.html#Unpacking_tree_node_parameters 1. I feel incredibly embarrassed to have missed this 2. This is awesome!

Re: [perl #65784] [BUG] Can't build rakudo on a mac unibody 13''

2010-03-10 Thread Stéphane Payrard
On Tue, Mar 9, 2010 at 8:55 PM, Moritz Lenz via RT wrote: > Does this problem still persist with a current Rakudo? > nope -- cognominal stef

[perl #73462] [BUG] The object coming back from a regex match is not of type Match in Rakudo

2010-03-10 Thread Carl Mäsak
# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #73462] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=73462 > rakudo: say ('a' ~~ /a/).WHAT rakudo 16efb6: OUTPUT«Regex::Match()␤» rakudo: say ('a'

Re: Symbol '$x' not predeclared in

2010-03-10 Thread John Harrison
Each line is executed independently. Local variables from 1 line of code will not persist between returns. Some things do persist though, classes for instance will persist, roles will persist, grammars will persist, but sub routines will not, neither will variables. I believe there are plans for s

Re: ^[[A^[[A

2010-03-10 Thread Moritz Lenz
Hi, Kiffin Gish wrote: > How can recall previous commands (history) using ./perl6 without getting > ^[[A^[[A instead? You need to have readline development files installed when configuring and building Rakudo, then it just works[tm]. In the configure steps it should say auto::readline - Do

Re: Functional-style pattern matching

2010-03-10 Thread Moritz Lenz
Hi, Little Walker wrote: > I've been looking around to see if there's been any discussion of > introducing functional programming-style pattern matching for method/ > function dispatch. Could someone point me to any such discussions? It's done multi dispatch in Perl 6, and you can find an introd

Re: [perl #69052] Build error on Mac OS X

2010-03-10 Thread Alexander Temerev
Well, almost half a year have passed since this bugreport. :) Now everything works fine indeed, you can close it. Cheers, Alexander Temerev On Tue, Mar 9, 2010 at 3:58 AM, Will Coleda via RT wrote: > On Tue Sep 08 04:32:07 2009, sor...@gmail.com wrote: >> I tried to build today's Git vers