Re: returning one or several values from a routine

2009-01-05 Thread Jon Lang
Daniel Ruoso wrote: > > Hi, > > As smop and mildew now support ControlExceptionReturn (see > v6/mildew/t/return_function.t), an important question raised: > > sub plural { return 1,2 } > sub singular { return 1 } > my @a = plural(); > my $b = plural(); > my @c = singular(); > my $d = singular

Re: rfc: The values of a junction

2009-01-05 Thread Dave Whipp
Daniel Ruoso wrote: my $concrete_value = max $junc_value.grep: { $^score < 21 }; In the general case, both the junction and the domain may be infinite: my @domain = -Inf .. 3; my $junc = any -4 .. Inf; my @values = @domain |==| $junc; say @values.perl "[-4..3]" Handling all the variation

Re: rfc: The values of a junction

2009-01-05 Thread Dave Whipp
That doesn't solve the general problem: my $junc = any -4 .. Inf; my @domain = -Inf .. 4; my @values = @domain |==| $junc; say @values.perl >>> [ -4 .. 4 ] How do you code that using "grep"? From: Daniel Ruoso To: Dave Whipp Cc: perl6-language@perl

Re: returning one or several values from a routine

2009-01-05 Thread Moritz Lenz
Daniel Ruoso wrote: > Hi, > > As smop and mildew now support ControlExceptionReturn (see > v6/mildew/t/return_function.t), an important question raised: > > sub plural { return 1,2 } > sub singular { return 1 } > my @a = plural(); > my $b = plural(); > my @c = singular(); > my $d = singular

Re: r24769 - docs/Perl6/Spec

2009-01-05 Thread Tim Bunce
On Mon, Jan 05, 2009 at 05:54:50PM +0100, pugs-comm...@feather.perl6.nl wrote: > Author: moritz > Date: 2009-01-05 17:54:50 +0100 (Mon, 05 Jan 2009) > New Revision: 24769 > +=item can > + > + our Bool multi method can ($self:, Str $method) > + > +If there is a multi method of name C<$method> that

r24779 - docs/Perl6/Spec

2009-01-05 Thread pugs-commits
Author: particle Date: 2009-01-05 21:29:32 +0100 (Mon, 05 Jan 2009) New Revision: 24779 Modified: docs/Perl6/Spec/S06-routines.pod Log: [S06] add another command-line short name example; modify comment to line up visually with others Modified: docs/Perl6/Spec/S06-routines.pod

r24774 - docs/Perl6/Spec

2009-01-05 Thread pugs-commits
Author: particle Date: 2009-01-05 20:29:06 +0100 (Mon, 05 Jan 2009) New Revision: 24774 Modified: docs/Perl6/Spec/S19-commandline.pod Log: [S19] note behavior of clustered options with required values Modified: docs/Perl6/Spec/S19-commandline.pod ===

Re: rfc: The values of a junction

2009-01-05 Thread Daniel Ruoso
Em Seg, 2009-01-05 às 07:57 -0800, Dave Whipp escreveu: >my $ace = 1 | 11; >my $seven = 7; >my @hand = $ace xx 3, $seven; >my $junc_value = [+] @hand; ## any( 10, 20, 30, 40 ) > There are a bunch of possible values in the junction. The one we care > about is the largest that is no

Re: r24769 - docs/Perl6/Spec

2009-01-05 Thread Brandon S. Allbery KF8NH
On 2009 Jan 5, at 11:54, pugs-comm...@feather.perl6.nl wrote: + our Str multi method perl (Object $o) + +Returns a perlish representation of the object, so that calling C +on the returned string reproduces the object as good as possible. My inner English teacher cringes in pain. It should b

rfc: The values of a junction

2009-01-05 Thread Dave Whipp
I spent a fair amount of time with Rakudo over the holiday break (see http://dave.whipp.name/sw/perl6 for the writeup). I was generally impressed with both the language and its implementation. There were, unsurprisingly, a bunch of things missing. Some of these were things that are in the spec

Re: Which brackets should @a.perl use?

2009-01-05 Thread moritz
>> "m" == moritz writes: > > m> S02 says: > > m> "To get a Perlish representation of any object, use the .perl method. > Like > m> the Data::Dumper module in Perl 5, the .perl method will put quotes > around > m> strings, square brackets around list values," > > m> So according to t

Re: Which brackets should @a.perl use?

2009-01-05 Thread Markus Laker
Uri, On Sun, 04 Jan 2009 22:37:43 -0500, Uri Guttman wrote: > that fails with nested arrays. we don't want them to flatten. > > my $c = eval '(1, (4, 5), 3)'; > > will that work as you envision? No, but it's not what I'm proposing. A reference must Perlify as a reference, just as it does toda

r24769 - docs/Perl6/Spec

2009-01-05 Thread pugs-commits
Author: moritz Date: 2009-01-05 17:54:50 +0100 (Mon, 05 Jan 2009) New Revision: 24769 Modified: docs/Perl6/Spec/S29-functions.pod Log: [S29] document isa, can, does, perl and clone Modified: docs/Perl6/Spec/S29-functions.pod ===

r24768 - docs/Perl6/Spec

2009-01-05 Thread pugs-commits
Author: particle Date: 2009-01-05 17:53:12 +0100 (Mon, 05 Jan 2009) New Revision: 24768 Modified: docs/Perl6/Spec/S19-commandline.pod Log: [S19] provide rules for negated single-character options; rearrange list items for clarity Modified: docs/Perl6/Spec/S19-commandline.pod =