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.
- 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
- 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
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
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
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
# 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
# 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
# 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?
# 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
.contains turned out to be a fossil from the time between .exists and
:exists. Rejecting bug.
# 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
# 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
# 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
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
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
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
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
- 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
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
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
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
- 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
23 matches
Mail list logo