Re: Rakudo leaving the Parrot nest

2009-01-14 Thread Ovid
- Original Message > From: Patrick R. Michaud > Source code repository > -- > This is the immediate issue at hand, because we need to move Rakudo > out of the Parrot repository so that it can cleanly move to its new > home at parrot.org. Currently Rakudo Perl lives

Re: Rakudo leaving the Parrot nest

2009-01-14 Thread Moritz Lenz
As a Rakudo contributor I feel I should comment on this, although most of my comments aren't all that exciting. Patrick R. Michaud wrote: > Source code repository > -- [...] > Many people have strongly suggested that we switch to > using "git" as our version control system. At

Rakudo leaving the Parrot nest

2009-01-14 Thread Patrick R. Michaud
As many of you will have gathered from discussions on other mailing lists and IRC, it's time for Rakudo Perl to "leave the Parrot nest" and move to its own repository. I think we should also take this opportunity to re-evaluate the entire Rakudo Perl infrastructure and decide what will be most pr

Re: [perl #62366] AutoReply: [PATCH] Add 'no_plan' and die_on_fail to Test.pm

2009-01-14 Thread Ovid
Per a conversation with moritz, this patch fixes an issue with a couple of tests failing with the old patch (where I apparently sent the file instead of the patch). It also adds some diagnostics for ok $cond; There should be more diagnostics available in the future, but I'm on holiday soon and

Re: [perl #62366] AutoReply: [PATCH] Add 'no_plan' and die_on_fail to Test.pm

2009-01-14 Thread Ovid
- Original Message > From: perl6 via RT > This patch implements die_on_fail (halts test at first test failure), but > only > if the author calls the &die_on_fail sub in their test. This patch works much better when attached to the email :) Jeers, Ovid -- Buy the book - htt

Re: Read access to class-scope variables from the class scope

2009-01-14 Thread Larry Wall
On Mon, Jan 12, 2009 at 12:33:31PM +0100, Carl Mäsak wrote: : Writing something like this in Rakudo yesterday, I was slightly : surprised to find it not working: : : class SomeClass { : my $.warn_limit = 1000; : my $.stern_warn_limit = $.warn_limit * 1.05; : my $.expel_limit = $.war

Re: Revised solution #2

2009-01-14 Thread Larry Wall
On Wed, Jan 14, 2009 at 09:55:38AM +0300, Richard Hainsworth wrote: > However, I came across one thing in solution #3 that I posted yesterday. > $pair.fmt("%s %s") is nice, but it doesnt allow for any action on either > value or key before printing (I wanted to print the value as a > percenta

Re: getting the face value of an enum

2009-01-14 Thread Larry Wall
On Wed, Jan 14, 2009 at 02:26:23PM +0300, Richard Hainsworth wrote: > S12 defines enums and rakudo impliments them, so > perl6 > > enum wkend <>; my $x = Sun; say $x > 1 > > But suppose I want to get the "face value" of $x, viz., 'Sun'? > > How do I get it? > > say $x.key doesnt work. Why not just

Re: New Test.pm (not a patch)

2009-01-14 Thread Moritz Lenz
On Tue, Jan 13, 2009 at 11:51:45PM -0800, Ovid wrote: > - Original Message > > > From: Moritz Lenz > > > Ovid wrote: > > > OK, I'm tired of submitting bug reports. > > > > Still bug reports are valuable. When you find your motivation again, > > please continue to submit them. > > I me

[perl #62334] problem accessing outside variables from a class definition in Rakudo

2009-01-14 Thread Carl Mäsak
# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #62334] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=62334 > rakudo: my $x = "foo"; class A { my $.y = $x } # bug? rakudo 35518: OUTPUT«Lexical '$x

[perl #62342] enums not fully compliant with S12

2009-01-14 Thread via RT
# New Ticket Created by Richard Hainsworth # Please include the string: [perl #62342] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=62342 > After playing with enums, I got the following: perl6 > enum day <<:Sun(1) Mon Tu

[perl #62316] printf with too few arguments returns "Null PMC Access"

2009-01-14 Thread Carl Mäsak
# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #62316] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=62316 > Rakudo r35481 reacts badly to a printf wherein the variables needed are fewer than the v

[perl #60234] [TODO] Implement method .contains on hashes

2009-01-14 Thread Carl Mäsak via RT
.contains turned out to be a fossil from the time between .exists and :exists. Rejecting bug.

[perl #62326] Calling a sub from a Module returns sub name + args

2009-01-14 Thread via RT
# New Ticket Created by Moritz Lenz # Please include the string: [perl #62326] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=62326 > 00:11 <@moritz_> rakudo: module A { sub b { return 'bar' }}; say A::b() 00:11 < p6eval> r

[perl #62346] No interactivity ? No prompt?

2009-01-14 Thread via RT
# New Ticket Created by Richard Hainsworth # Please include the string: [perl #62346] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=62346 > I thought our Str prompt Str had been implimented. Does prompt exist in parrot?

[perl #62336] assigning the return value of a failed try { }; blows up

2009-01-14 Thread mor...@casella.faui2k3.org (via RT)
# New Ticket Created by mor...@casella.faui2k3.org # Please include the string: [perl #62336] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=62336 > Rakudo r35507: ./perl6 -e 'my $fh = open("README"); my $res = try { $fh.p

[perl #62332] Pair.map leaves $_ undefined in the codeblock parameter in Rakudo

2009-01-14 Thread Carl Mäsak
# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #62332] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=62332 > rakudo: my $x = :a<5>; say $x.map({.key => .value + 1}).perl rakudo 35518: OUTPUT«Meth

Re: Trimming arrays

2009-01-14 Thread Patrick R. Michaud
On Wed, Jan 14, 2009 at 03:37:57AM -0800, Ovid wrote: > - Original Message > > From: Patrick R. Michaud > > > > Oops -- I over-referenced here. The corrected form: > > > > For C< @array».=trim >, each element of @array would be replaced > > with its trimmed string representation. If

Re: getting the face value of an enum

2009-01-14 Thread Richard Hainsworth
Can I suggest a new method to be declared with enums, viz. .face enum day <>; my $today does day; $today = prompt "Type in a day of the week "; #later say $today ; # prints 3 say $today.face; #prints Wed Whilst having an enum being a list of values is useful, not being able to restore the

Re: getting the face value of an enum

2009-01-14 Thread Carl Mäsak
Richard (>): > S12 defines enums and rakudo impliments them, so > perl6 >> enum wkend <>; my $x = Sun; say $x > 1 > > But suppose I want to get the "face value" of $x, viz., 'Sun'? > > How do I get it? > > say $x.key doesnt work. Far as I know, the answer to your question is unspecced. (Yes, that

Re: Trimming arrays

2009-01-14 Thread Ovid
- Original Message > From: Patrick R. Michaud > > I would expect this to be roughly equivalent to: > > > > for @array { $_ .= trim; } > > > > For an array of hashes, this would result in each hash element > > of @array being replaced with a reference to an array of the > > trimmed

Re: Extending classes in a lexical scope?

2009-01-14 Thread Ovid
- Original Message > As far as I know, "Perl6Array" should _not_ be showing up in > Perl 6's namespace, and if it is doing so, that's a reportable > bug. I was just being sloppy. I was using that in PIR, not Rakudo, and I mistyped the type -- er, I wrote the wrong class name in writin

getting the face value of an enum

2009-01-14 Thread Richard Hainsworth
S12 defines enums and rakudo impliments them, so perl6 > enum wkend <>; my $x = Sun; say $x 1 But suppose I want to get the "face value" of $x, viz., 'Sun'? How do I get it? say $x.key doesnt work.