Hi, I'm new to Perl6. And just ran the first example in the perl6 book.
But, it refused to work. It complains as follows:
Too many positional parameters passed; got 2 but expected between 0 and 1
I find out that the problem is in the line:
my @sorted = @names.sort({ %sets{$_} }).sort({ %games{$_
The original test file may introduced a typo for "wins2". Hope the
attached patch can be useful.
I wonder if the patches for test files should go here.
Best regards!
Hongwen Qiu
Index: type-based.t
===
--- ty
Hi!
Attached are code and tests for my trying of implementing the :samecase
for .subst.
diff --git a/src/core/Cool-str.pm b/src/core/Cool-str.pm
index 918ec68..42a2321 100644
--- a/src/core/Cool-str.pm
+++ b/src/core/Cool-str.pm
@@ -22,7 +22,7 @@ augment class Cool {
}
}
-multi
$ perl6
> my $a = 0;say "$a [-"
Unable to parse infixish, couldn't find final ']' at line 1
> my $a = 0; say "$a [-]"
0 [-]
> my $a = 0; say "$a [--]"
Unable to parse infixish, couldn't find final ']' at line 1
> my $a = 0;say "$a ["
0 [
> my $a = 0;say "$a "
0
> say "["
[
> say "[-"
[-
Is the par
于 2010年06月18日 13:25, Xi Yang 写道:
> I'm using rakudo 2010_05, with parrot 2.4.0. I found the $str.reverse just
> don't work at all:
> $ perl6 -e 'my $str="abcde"; say $str; say $str.reverse;'abcdeabcde
Use say $str.flip;
于 2010年06月18日 13:32, Xi Yang 写道:
> Thanks!So the API has changed permanently?
I think so. The "reverse" is for arrays, and "flip" is for Strings.
于 2010年06月18日 13:50, Richard Hainsworth 写道:
'flip' has more uses than just for strings. For example, it flips the
key/value in a pair. Hence,
my %h = Z 1,2,3,4; # a neat way of specifying a hash in
terms of two lists
say (map { .flip }, %h).perl; # the .perl gives you more information
about
diff --git a/src/subs-n-sigs.pod b/src/subs-n-sigs.pod
index b6a91cb..128f1ae 100644
--- a/src/subs-n-sigs.pod
+++ b/src/subs-n-sigs.pod
@@ -141,7 +141,7 @@ variables in your signature are read-only references to the
passed arguments.
You cannot modify them passed-in values within the subroutine
This is my trying to implement $*ARGFILES for Rakudo for this week's
contribution to Perl 6.
class IO::ArgFiles {
has $!filehandle;
has $!filename;
has @!filenames;
method new(@filenames) {
self.bless(*, filenames => @filenames || '-');
}
method get() {
ret
于 2010年09月08日 13:41, Jason Switzer 写道:
On Tue, Sep 7, 2010 at 11:29 AM, Moritz Lenz wrote:
Brandon S Allbery KF8NH wrote:
On 9/7/10 08:17 , nore...@github.com wrote:
Commit: 7611788411e5aff5f3ae150e2da9929ee546d6d8
http://github.com/perl6/specs/commit/7611788411e5aff5f3ae150e2da9929ee546d
于 2010年09月09日 03:44, Joe Rahmeh (via RT) 写道:
# New Ticket Created by Joe Rahmeh
# Please include the string: [perl #77738]
# in the subject line of all future correspondence about this issue.
#http://rt.perl.org/rt3/Ticket/Display.html?id=77738>
1. Rakudo version:
This is Rakudo Perl 6
>From 110a2564bc622c3b5ed659d049f99baf2e1a7dbf Mon Sep 17 00:00:00 2001
From: Hongwen Qiu
Date: Mon, 22 Nov 2010 15:32:47 +0800
Subject: [PATCH] [S05] typo fix.
---
S05-regex.pod |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/S05-regex.pod b/S05-regex.pod
in
I suppose DeclaratorTest1.parse('c3') should be OK, so change it to
DeclaratorTest1.parse('c4').
>From 1dc270aa5a7927b21c2076c8d20e10d5027b044e Mon Sep 17 00:00:00 2001
From: Hongwen Qiu
Date: Mon, 22 Nov 2010 15:42:34 +0800
Subject: [PATCH] [S05] change one test for :s
On 11/22/2010 04:01 PM, Moritz Lenz wrote:
Although it looks like a typo, "to vary" is indeed the correct verb here
I'm not a native English speaker, so sorry for the noise.
在 2010-08-26 17:54:57 星期四 时,jk...@verizon.net 写到:
> Of note: (a) the perl6 executable gets built in the top-level
> directory; (b) I have a full Parrot checkout and build under
> parrot-2.7.0; (c) I have *another* perl6 executable under rakudo/ ...
> ... and (d) a lot more under install/.
>
15 matches
Mail list logo