On Sun, Jan 11, 2009 at 07:18:53PM -0800, Patrick R. Michaud via RT wrote:
> On Wed Jan 07 17:54:26 2009, larry wrote:
> Bare "say" and "print" are now illegal in Rakudo as of r35431. This
> currently catches only the truly bare say/print -- the parenthesized
> forms are still allowed:
>
> sa
On Wed Jan 07 17:54:26 2009, larry wrote:
> [...] So my inclination is to outlaw
> bare "say" as well, as an aid to catching a common p5thinko that
> some folks might otherwise find difficult to debug.
Bare "say" and "print" are now illegal in Rakudo as of r35431. This
currently catches only the
On Sun, Jan 11, 2009 at 04:24:08PM +0300, Richard Hainsworth wrote:
> my ($name,@list) = .split /\,/;
That shouldn't parse, because .split should not be looking for an
argument list. (And, in fact, STD rejects it.) You need one of:
my ($name,@list) = .split: /\,/;
my ($name,@list) = .
On Tue, Jan 06, 2009 at 04:41:30PM +0300, Richard Hainsworth wrote:
> Supposed I define
>
> regex digit { [0..9] }
>
> what is the negative?
You need to be careful about what you mean here by "negative". If you mean
"match
a single character that is not in the list", then it is as Patrick said.
Alan Rocker (via RT) wrote:
auto::gmp - Does your platform support GMP...Can't spawn
".\test_616.exe": Bad file descriptor at lib/Parrot/Configure/Utils.pm
line 86.
Thanks, this is a known issue with the libgmp.dll built with strawberry
perl. (It was built with SSE2 instructions tha
On Sat, Jan 10, 2009 at 11:26:50PM +0300, Richard Hainsworth wrote:
> More precisely, I dont understand the meaning of the ':' after '.sort'
It is turning the method call into a list operator, essentially.
It's not the so-called indirect object syntax, or it would be written:
my @ranking = so
2009/1/11 via RT Alan Rocker :
> # New Ticket Created by Alan Rocker
> # Please include the string: [perl #62206]
> # in the subject line of all future correspondence about this issue.
> # http://rt.perl.org/rt3/Ticket/Display.html?id=62206 >
>
> Under Windows (XP Home) Strawberry Perl
> Attached
2009/1/11 via RT Alan Rocker :
> # New Ticket Created by Alan Rocker
> # Please include the string: [perl #62204]
> # in the subject line of all future correspondence about this issue.
> # http://rt.perl.org/rt3/Ticket/Display.html?id=62204 >
>
>
> (On Windows XP Home) after mingw32-make realclea
On Sun, Jan 11, 2009 at 04:41:12PM -0800, Ovid wrote:
: I really don't think this is a bug, but it did confuse the heck out of me at
first. This *is* expected behavior due to how {} is interpolated in strings,
yes?
:
: $ perl6 -e 'my $foo = "foo";say "<" ~ $foo ~ ">"'
:
: $ perl6 -e 'my
- Original Message
> This patch implements the .trim() method for strings.
Now that I'm reading S29, I see there is no .trim() method there. I got that
because it was referenced in pugs in the cookbook (not in tests, though) and I
was trying to get the examples to run. Bummer :(
C
I really don't think this is a bug, but it did confuse the heck out of me at
first. This *is* expected behavior due to how {} is interpolated in strings,
yes?
$ perl6 -e 'my $foo = "foo";say "<" ~ $foo ~ ">"'
$ perl6 -e 'my $foo = "foo";say "{" ~ $foo ~ "}"'
~ foo ~
Cheers,
Ovid
-
This patch implements the .trim() method for strings.
Two problems:
1. I don't like the double-negative, but I was unsure how to get rid of it.
unless not_whitespace goto done
2. I don't like the magic number '32
not_whitespace = is_cclass 32, s, start
$I0 = is_cclass .CCLASS_WHITESPA
This is an update to my last patch (which you may not see because I sent it
from the wrong email address). Here are my updated notes:
This patch implements the .trim() method for strings.
Problem: I don't like the magic number '32
not_whitespace = is_cclass 32, s, start
But I couldn't fig
On Sun, 2009-01-11 at 12:39 -0500, Andrew Whitworth wrote:
> This is something that obviously needs to be avoided. PASM doesn't
> require that P42 be the 42nd register in an array. It only requires
> that values put into P42 aren't overwritten and the register isn't
> repurposed later. The simplest
# New Ticket Created by Alan Rocker
# Please include the string: [perl #62204]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt3/Ticket/Display.html?id=62204 >
(On Windows XP Home) after mingw32-make realclean and Configure.pl
STDERR output attache
# New Ticket Created by Alan Rocker
# Please include the string: [perl #62206]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt3/Ticket/Display.html?id=62206 >
Under Windows (XP Home) Strawberry Perl
Attached are STDERR output and the summary of S
Following up.
Note that you need to delete the first 'say' line and uncomment the
second. Running the first 'say' line clears up the fault with the second
one. Deleting the first, yields the fault.
Tried the script using parrot and perl6.pbc eliminates the fault.
Richard
Patrick R. Michaud
# New Ticket Created by "Carl Mäsak"
# Please include the string: [perl #62196]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt3/Ticket/Display.html?id=62196 >
rakudo: class A { method foo { say "" ~~ * } }; A.new.foo
rakudo 35420: OUTPUT«Null PM
# New Ticket Created by Matthew Walton
# Please include the string: [perl #62200]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt3/Ticket/Display.html?id=62200 >
Put this code through Rakudo:
use v6;
role TestRole {
method foo() { ... }
}
# New Ticket Created by Markus Laker
# Please include the string: [perl #62198]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt3/Ticket/Display.html?id=62198 >
Scalar variables interpolate, but array and hash elements don't:
m...@edward:~$ perl6 -
# New Ticket Created by Alan Rocker
# Please include the string: [perl #62202]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt3/Ticket/Display.html?id=62202 >
Running Configure.pl under Windows (XP Home), Strawberry Perl, produces
the following err
Richard Hainsworth wrote:
> Could someone help me understand what is going on in the following snippet?
>
> my %players = {'william'=>2, 'peter'=>3,'john'=>1,'mary'=>5};
> my @ranking = %players.sort: { .value };
> for @ranking {.say};
>
> I cut and pasted from Patrick's blog on sorting and playe
Carl (>):
> Rakudo r35404 doesn't work according to spec in the area of 'state'
> variables and cloned blocks.
>
> $ perl6 -e 'my $i = 0; my $func = { state $x = $i++; say $x }; my ($a,
> $b) = $func.clone, $func.clone; $a(); $b(); $a()'
> 0
> 1
> 2
>
> According to S04, this should be equivalent
From: Allison Randal
Date: Sun, 11 Jan 2009 01:13:06 -0800
Bob Rogers wrote:
>
> What about those of us who can't log in? I can't even reset my
> password, let alone update anything . . .
It won't let you log in at all? Or, once you log in it won't let you do
anything?
On Wed Jan 07 09:16:32 2009, cspencer wrote:
>
>class Foo {
> method list {
>say "bar"
> }
>};
>
>my $f = Foo.new;
>$f.list
>
> will produce the following error in Rakudo:
>
>too few arguments passed (0) - 1 params expected
>current instr.: 'parrot;Foo;li
On Tue Jan 06 15:04:36 2009, mberends wrote:
> Up until about mid December 2008, the Rakudo perl6 -e copied
> its command line arguments into @*ARGS. Sorry, revision
> number unknown. At the end of December, perl6 -e was
> ignoring command line arguments. This feature is probably
> untested. For ex
Richard (>):
> use v6;
>
> my %players;
> my $scores = open('./skaters.txt', :r) or die $!;
> for =$scores {
> my ($name,@list) = .split /\,/;
> %players{$name} = ([+] @list.sort[2..6]) / 5;
> };
>
> my @ranking = %players.sort: { .value };
> for -> $m {
> given pop @ranking {
> say "$m Me
On Sat Jan 10 10:00:20 2009, richardh wrote:
> / + / is what I thought it should be.
>
> { ... } is what rakudo current gives, which from the point of view of
> runnable code and comprehensible output, are wrong.
In general, being able to use .perl on subs and methods implies that an
implementat
# New Ticket Created by "Carl Mäsak"
# Please include the string: [perl #62188]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt3/Ticket/Display.html?id=62188 >
Rakudo r35404:
$ ./perl6 -e 'BEGIN { say "OH HAI" }' # works
OH HAI
$ ./perl6 -e 'BEGIN
# New Ticket Created by "Carl Mäsak"
# Please include the string: [perl #62186]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt3/Ticket/Display.html?id=62186 >
I'm toying around with precompilation in Rakudo r35404.
I can print the value of a 'tim
# New Ticket Created by "Carl Mäsak"
# Please include the string: [perl #62184]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt3/Ticket/Display.html?id=62184 >
Rakudo r35404 doesn't work according to spec in the area of 'state'
variables and cloned
Thanks for the response.
I downloaded parrot onto my office machine (35397), and tested as you
suggested. All worked and in fact I couldnt reproduce the bug!!! :((
I will try again with parrot at home with version 35286
This happened to me before - I got a segmentation fault working with a
H
# New Ticket Created by "Carl Mäsak"
# Please include the string: [perl #62182]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt3/Ticket/Display.html?id=62182 >
Rakudo r35404 doesn't know how to .WHATify or numify a Match object:
$ perl6 -e "say ('
Patrick R. Michaud via RT wrote:
On Sat Jan 10 03:34:57 2009, masak wrote:
rakudo: File.new
rakudo 35336: OUTPUT«get_bool() not implemented in class
'File' [...]
rakudo: say File.new
rakudo 35336: OUTPUT«get_string() not implemented in class
'File' [...]
rakudo: say File.new.WHAT
rakudo
Here's a solution to Scripting Games #2. Script and data file attached.
The algorithm closely follows the published solution by the perl expert. Here
is the model solution
use 5.010;
use strict;
use warnings;
use List::Util qw(sum);
my %score;
open(my $fh, "<", "C:/Scripts/skaters.txt") or die
Pm (>), Carl (>>):
> > Same goes for Undef, which should arguably also be able to output
> > .values, I think.
>
> Perl 6 doesn't have C.
What I guess I meant was that the following shouldn't happen either:
$ perl6 -e 'my $x; say $x.values'
Method '!flatten' not found for invocant of class 'Unde
Carl (>), Pm (>>), Carl (>>>):
> > > Same goes for Undef, which should arguably also be able to output
> > > .values, I think.
> >
> > Perl 6 doesn't have C.
>
> What I guess I meant was that the following shouldn't happen either:
>
> $ perl6 -e 'my $x; say $x.values'
> Method '!flatten' not fou
Have you got the second data file in the current directory?
I link perl6 to /usr/local/bin, change to the directory with the text
file (skaters.txt) and script (skatersv2.pl), and then run.
Richard
Will Coleda via RT wrote:
On Sat Jan 10 12:19:38 2009, richardh wrote:
Getting a wierd seg
Hi there,
some additional information about that bug (I trying to found workaround):
if ~~ /'a'/ { say "Yay" } # so Array ~~ Regex works properly (
Regex ~~ Array still broken)
":)".say if ~~ 'a' # nothing :(
":(".say if ~~ 'a b c' # :( # looks like arrays flattening
(old bug again) here
ihr
# New Ticket Created by "jason switzer"
# Please include the string: [perl #62178]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt3/Ticket/Display.html?id=62178 >
When mixing gather with a while loop, only the last element tested by the
while predi
On Sat Jan 10 12:19:38 2009, richardh wrote:
> Getting a wierd segmentation fault with the following program (also
> attached).
>
> I am using rakudo from parrot 35286
>
> When I run the program below, it runs and I get almost the right
> answer
> (but uninitialised values and
> incorrect output)
Author: bernhard
Date: Sun Jan 11 04:40:38 2009
New Revision: 35410
Modified:
trunk/docs/pdds/draft/pdd08_keys.pod
Log:
[codingstd] shorten long lines.
Modified: trunk/docs/pdds/draft/pdd08_keys.pod
==
--- trunk/docs
Pm (>):
> Is C a class? I can't find any mention of it in the synopses.
OH, you're right. Changing the name of this ticket to "Rakudo shouldn't
expose C as a core class". :)
Hi,
ah, and this bug broke my code :
I was using Str ~~ Array, Regex ~~ Array and it works properly before.
> ":)".say if 'a' ~~
Non-dwimmy hyperoperator cannot be used on arrays of different sizes
or dimensions.
> ":)".say if /b/ ~~
Non-dwimmy hyperoperator cannot be used on arrays of different
Hi!
> More precisely, I dont understand the meaning of the ':' after '.sort'
see line 1825 of S03
C<< infix:<:>>>, the invocant maker
...
ack (or grep) ': {}' in Spec dir can give a lot of examples.
ihrd
the first line creates a hash,
the second line sorts the hash values into an array.
the third loops thru the array values printing one array member per line
On Jan 10, 2009, at 2:26 PM, Richard Hainsworth wrote:
Could someone help me understand what is going on in the following
snippet?
my %p
# New Ticket Created by Richard Hainsworth
# Please include the string: [perl #62176]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt3/Ticket/Display.html?id=62176 >
Getting a wierd segmentation fault with the following program (also
attached).
I
# New Ticket Created by "Carl Mäsak"
# Please include the string: [perl #62172]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt3/Ticket/Display.html?id=62172 >
perl6: my @a = 1..8; sub foo(@a) { say +...@a; bar(@a) }; sub
bar(@a) { say +...@a }; f
On Sat Jan 10 09:45:05 2009, masak wrote:
> rakudo: " a b c".split(/ <.sp>+ /).perl.say
> rakudo 35344: OUTPUT«["", "a", "b", "c"]»
> oh, and the p5 behavior of trimming trailing fields is not
in p6
> (for split)
> * masak submits rakudobug
TimToady pointed out that Rakudo actually does as
Pm (>), Carl (>>):
>> rakudo: " a b c".split(/ <.sp>+ /).perl.say
>> rakudo 35344: OUTPUT«["", "a", "b", "c"]»
>> oh, and the p5 behavior of trimming trailing fields is not in p6
>> (for split)
>> * masak submits rakudobug
>
> This looks totally correct to me. What output are you expecting
On 2009 Jan 11, at 3:50, Richard Hainsworth wrote:
To be precise - why the ':' after the sort?
'%players.sort' calls the 'sort' method/sub on the hash '%players'.
'{.value}' runs '.value' on $_ at some point. But when?
So once again, what is the ':' doing? How else could this code be
writt
Bob Rogers wrote:
What about those of us who can't log in? I can't even reset my
password, let alone update anything . . .
It won't let you log in at all? Or, once you log in it won't let you do
anything?
I just reset your password, let me know if you don't get an automated
email about th
On Thu Jan 01 10:16:14 2009, dave.wh...@gmail.com wrote:
> I've been trying to figure out how to do a "($hd, @tl) = @list"
assignments.
>
> ./perl6 -e '
> my @list = 1,2,3;
> my ($hd, @tl) = @list;
> say ([$hd], [...@tl]).perl
> '
> [[1], []]
Now working as of 35397:
$ cat x
my @
On Fri Jan 02 12:06:57 2009, publiustemp-perl6compil...@yahoo.com wrote:
>
> However, any whitespace after the opening paren causes a parse
> failure:
>
> class Foo {
> has ($.this,
> $.that,
> );
> }
> my Foo $foo .= new( this => 3, that => 4 );
> say $foo.this;
On Fri Jan 02 12:21:24 2009, dave.wh...@gmail.com wrote:
> The default "new" method allows values of attributes to be set as
> named args -- but rakudo doesn't hoist params from base classes:
>
> rakudo: class A { has $.foo }; class B is A { has $.bar
> };
> B.new( foo => 1, bar =>
thanks for the response, but i was really looking for a bit more detail.
To be precise - why the ':' after the sort?
'%players.sort' calls the 'sort' method/sub on the hash '%players'.
'{.value}' runs '.value' on $_ at some point. But when?
So once again, what is the ':' doing? How else could
On Fri Nov 21 14:54:47 2008, masak wrote:
> This should output "dito" twice:
>
> $ ./perl6 -e '{ say $^same; say $same }.("dito")'
> Scope not found for PAST::Var '$same'
>
> ...but it doesn't in Rakudo r32290.
but it does in r35397:
$ ./parrot perl6.pbc
> { say $^same; say $same }.('rakudo
On Mon Nov 24 09:12:36 2008, masak wrote:
> rakudo: for 1..5 -> $a, $b { say $a, $b }
> rakudo 33137: OUTPUT[1234StopIterationcurrent instr.:
> '_block11' pc 78 (EVAL_15:29)]
>
> I haven't searched the specs or the tests for what should happen, but
> I'm pretty sure this shouldn't throw an e
Now fixed in r35397:
$ ./parrot perl6.pbc
> sub foo(%h?) { { a => 1, %h }.perl.say; };
> foo( { b => 2 } );
{"a" => 1, "b" => 2}
> foo( { } );
{"a" => 1}
> foo( );
{"a" => 1}
>
We need tests for optional array and hash parameters in the test suite,
so assigning ticket to moritz.
On Sat Nov 08 00:54:52 2008, ihrd wrote:
>
> sub foo (@a) { 1.say for @a }
> foo((1,2,3,4)); # only one 1
> foo([1,2,3,4]); # only one 1
> foo( my @a = 1,2,3 ); # only one 1
Now fixed as of r35392:
$ ./parrot perl6.pbc
> sub foo(@a) { 1.say for @a }
> foo((1,2,3,4));
1
1
1
60 matches
Mail list logo