[perl #63152] [PATCH] implement 'make' and support '$/' a method parameter

2009-02-11 Thread via RT
# New Ticket Created by Chris Dolan # Please include the string: [perl #63152] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=63152 > The attached patch brings Rakudo up to the level of NQP as a language for grammar actio

[perl #63154] [PATCH] support :lang(Perl6) embedded in PGE

2009-02-11 Thread via RT
# New Ticket Created by Chris Dolan # Please include the string: [perl #63154] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=63154 > The simple attached patch allows embedded code in PGE to call back into Rakudo. The do

[perl #62894] Rakudo thinks that protoobjects are defined

2009-02-11 Thread jn...@jnthn.net via RT
On Thu Jan 29 02:18:55 2009, masak wrote: > so protoobjects are defined? > rakudo: class A {}; my A $a; say $a.defined > rakudo 36139: OUTPUT«1␤» > well, that's wrong > * masak submits rakudobug > perl6: my $a; say $a.defined > rakudo 36139: OUTPUT«0␤» > ..elf 25110, pugs: OUTPUT«␤» > perl6

[perl #62828] .clone inside while loop which shifts off an array doesn't clone properly in Rakudo

2009-02-11 Thread jn...@jnthn.net via RT
On Tue Jan 27 05:27:07 2009, masak wrote: > rakudo: class A { has $.b; }; while shift [A.new( :b(0) )] -> > $a { say $a.b; $a.clone( :b($a.b + 1) ); say $a.b; last; } > OUTPUT[0␤1␤] > * masak submits rakudobug Fixed in git 59024e0 and added pretty much this exact code as a test case to S12-attri

[perl #63002] Int values cannot be passed as params and then used in ranges in Rakudo

2009-02-11 Thread jn...@jnthn.net via RT
On Tue Feb 03 07:25:43 2009, masak wrote: > Parrot r36318 (before the merge that broke Rakudo), and Rakudo 21f374. > > $ perl6 -e 'my $a = 5; say $a.PARROT; say $a .. 5' > Int > 5 > $ perl6 -e 'my $a = 5; sub foo($a) { say $a.PARROT; say $a .. 5 }; foo($a)' > ObjectRef->Int > Undefined value shift

[perl #62768] Rakudo dies when PIR-compiling a module that depends on a module with undeclared barewords

2009-02-11 Thread jn...@jnthn.net via RT
On Wed Feb 11 05:15:12 2009, jn...@jnthn.net wrote: > On Fri Jan 30 01:29:38 2009, masak wrote: > > The failure during PIR compilation turned out to be due to an undeclared > > identifier 'B'. > > > > $ cat A.pm > > use v6; > > > > class A { > > has B $!b; > > } > > $ cat A/B.pm > > use v6; >

[perl #61682] Cloning affects the original object under certain conditions in Rakudo

2009-02-11 Thread jn...@jnthn.net via RT
On Thu Dec 25 06:49:28 2008, masak wrote: > Rakudo r34342 sometimes destroys the original object when running > .clone(). This works: > > $ cat right.p6 class A { has $.b; } > my @q = A.new( :b(1) ); > my $p = shift @q; > $p.clone( :b($p.b + 1) ); > say $p.b; > > $ perl6 right.p6 > 1 > > But whe

[perl #58676] [BUG] smart-matching to Grammar should check type, not set $/

2009-02-11 Thread jn...@jnthn.net via RT
On Mon Sep 08 08:46:20 2008, cjfie...@illinois.edu wrote: > The following is an example: > > grammar Foo { > rule TOP {\d+}; > }; > > my $x = '12345'; > > $x ~~ Foo; # Is $x a Foo? (No) This now today will do a type-check. (Note that .new on grammars is still a bit kinky, but .parse and

[perl #59828] Rakudo parses equals sign in rule declaration, whereas STD doesn't

2009-02-11 Thread jn...@jnthn.net via RT
On Sun Oct 12 04:59:26 2008, masak wrote: > r31879: > > $ perl6 -e 'rule x = { x }' > get_iter() not implemented in class 'Closure' > [...] > > STD considers this faulty syntax (and I do, too), but Rakudo > apparently tries to make sense of it, and fails at runtime trying to > apply prefix:<=> to

[perl #60826] Subset types and lexicals don't mix

2009-02-11 Thread jn...@jnthn.net via RT
On Tue Nov 25 13:56:09 2008, moritz wrote: > Rakudo r33193: > > > my $x = 5; subset MyInt of Int where { $^num % $x == 0}; my MyInt $a > = 10; say $a; > Type mismatch in assignment. > > If I use a constant instead of the lexical $x, it works just fine. > > There's a test for that in t/spec/S12-

[perl #62702] Rakudo misparses empty regex definitions as sub calls

2009-02-11 Thread jn...@jnthn.net via RT
On Sat Jan 24 08:40:24 2009, masak wrote: > Rakudo r35957: > > $ perl6 -e 'grammar G { regex TOP {} }' > Could not find non-existent sub TOP > [...] > > This is the wrong error message to give. The empty regex in TOP should > be disallowed. After fixes for a related ticket earlier, this now repo

Re: [perl #63154] [PATCH] support :lang(Perl6) embedded in PGE

2009-02-11 Thread Patrick R. Michaud
On Tue, Feb 10, 2009 at 08:32:50PM -0800, Chris Dolan wrote: > The simple attached patch allows embedded code in PGE to call back > into Rakudo. The double curlies are still necessary due to PGE > implementation details. With this patch the following simple > examples work: > > % perl6 -e

[perl #61886] [TODO] Grammar.parse and Grammar.parsefile

2009-02-11 Thread jn...@jnthn.net via RT
On Wed Dec 31 13:10:48 2008, masak wrote: > and Grammar.parse($string) should work > is that specced? > or StoryGrammar.new($string).TOP > <[particle]> yes, trying to help you Get It Right. > TimToady: I gotta write this down somewhere. > .parse($string) on a grammar doesn't seem to be impleme

[perl #62700] .parse hangs on empty grammar

2009-02-11 Thread jn...@jnthn.net via RT
On Sat Jan 24 08:38:49 2009, masak wrote: > It's r35957, and Rakudo seems to hang on the following: > > $ perl6 -e 'grammar G {}; G.parse("")' > > Putting in a 'regex TOP { something }' seems to work... but it's a bit > unintuitive that nothing happens without it, not even an error > message. Fi

Re: [perl #63002] Int values cannot be passed as params and then used in ranges in Rakudo

2009-02-11 Thread Patrick R. Michaud
On Wed, Feb 11, 2009 at 05:02:52AM -0800, jn...@jnthn.net via RT wrote: > Was more clone-related fun. I suspect when we've been calling Parrot's > clone directly, we'll usually want to really be calling .clone() on the > object, since it can handle ObjectRef chains. That fixes this issue. (Of > cou

[perl #60380] [TODO] catch modification of read-only arguments

2009-02-11 Thread jn...@jnthn.net via RT
On Thu Nov 06 10:37:55 2008, mor...@casella.verplant.org wrote: > Rakudo r32373: > > $ ./perl6 -e 'sub f($x) {$x++}; my $y = 2; f($y); say "still here"' > still here > > that should die, because subroutine arguments are read-only by default. > A test for that is in t/spec/S06-traits/misc.t. > Fi

[perl #61824] ++ makes variables rw, <-> seemingly doesn't

2009-02-11 Thread jn...@jnthn.net via RT
On Mon Dec 29 10:17:11 2008, masak wrote: > rakudo: my @a = <1 2 3 4 5 6>; my @b = (10..16); for @a Z @b > <-> $a,$b { $a++ }; say @a; > rakudo 34586: OUTPUT«234567␤» > rakudo: my @a = <1 2 3 4 5 6>; my @b = (10..16); for @a Z @b > <-> $a,$b { $a = $a +1 }; say @a; > rakudo 34586: OUTPUT«Canno

[perl #61528] Optional typed parameters can cause type check failure when no value passed

2009-02-11 Thread jn...@jnthn.net via RT
On Fri Dec 19 08:49:28 2008, cspencer wrote: > > When defining a subroutine such as the following: > >sub foo (Int $x?) { say "x = $x" }; > > and calling it without passing in a value as in: > >foo(); > > a type check error will occur: > >Parameter type check failed in call to foo

[perl #63048] Omitted typed named params cause errors in Rakudo

2009-02-11 Thread jn...@jnthn.net via RT
On Fri Feb 06 23:12:31 2009, mberends wrote: > Improving the signal-to-noise ratio of the above, using perl6 -e'...': > > class A {method m(Str :$p){my $p2=$p // "";say "m$p2"}}; A.new.m("HAI") > class A {method m(Str :$p){my $p2=$p // "";say "m$p2"}}; A.new.m() > > The first line works. > The se

[perl #61348] Rakudo dies strangely when classes are extended with "is also" without first being defined

2009-02-11 Thread jn...@jnthn.net via RT
On Thu Jan 29 21:08:33 2009, s1n wrote: > On Sun Dec 14 02:12:09 2008, masak wrote: > > Rakudo r33860 can handle extending classes with new methods just fine... > > > > $ perl6 -e 'class A {}; class A is also { method foo() { say "OH HAI" > > } }' # works > > > > ...but not when the class wasn't

References to parts of declared packages

2009-02-11 Thread Jonathan Worthington
Hi, If we declared, for example: role A::B {}; Then what should a reference to A be here? At the moment, Rakudo treats it as a post-declared listop, however I suspect we should be doing something a bit smarter? If so, what should the answer to ~A.WHAT be? Thanks, Jonathan

Re: References to parts of declared packages

2009-02-11 Thread Jon Lang
On Wed, Feb 11, 2009 at 12:15 PM, Jonathan Worthington wrote: > Hi, > > If we declared, for example: > > role A::B {}; > > Then what should a reference to A be here? At the moment, Rakudo treats it > as a post-declared listop, however I suspect we should be doing something a > bit smarter? If so,

Re: References to parts of declared packages

2009-02-11 Thread Carl Mäsak
Jon (>), Jonasthan (>>): >> If we declared, for example: >> >> role A::B {}; >> >> Then what should a reference to A be here? At the moment, Rakudo treats it >> as a post-declared listop, however I suspect we should be doing something a >> bit smarter? If so, what should the answer to ~A.WHAT be? >

[nicho...@hexten.net: [1255] Avoid using -l in the one liner that determines @INC, for the benefit of Rakudo]

2009-02-11 Thread Nicholas Clark
Patrick, done: - Forwarded message from nicho...@hexten.net - Envelope-to: n...@ccl4.org Delivery-date: Wed, 11 Feb 2009 20:45:22 + Delivered-To: tapx-com...@hexten.net From: nicho...@hexten.net To: tapx-com...@hexten.net Subject: [1255] Avoid using -l in the one liner that determines

Re: References to parts of declared packages

2009-02-11 Thread Jon Lang
Carl Mäsak wrote: >> * A should be treated as a post-declared package. > > Whatever this means, it sounds preferable. :) It means that you can define package A without ever declaring it, by declaring all of its contents using such statements as 'role A::B ', 'sub A::Foo', and so on. -- Jonathan

S03: how many metaoperators?

2009-02-11 Thread Jon Lang
With the addition of the reversing metaoperator, the claim that there are six metaoperators (made in the second paragraph of the meta operators section) is no longer true. Likewise, the reduction operator is no longer the fourth metaoperator (as stated in the first sentence of the reduction operat

Re: [perl #36283] [TODO] pasm/pir: forbid assignment syntax for inout params

2009-02-11 Thread kjstol
I almost couldn't believe how I could have missed that, until I remembered what was the problem.Thing is, there are some ops (and of course, this should be possible, as users can load dynops) that have different variants, with different directions for the first arg. For instance: (can't remember th

Perl 6 pod processor in Perl 5

2009-02-11 Thread Gabor Szabo
As an experiment to check how we could reuse CPAN to distribute Perl 6 packages I uploaded Perl6::Conf The code itself is not interesting, my main interest is the "distribution". One of the issues I encountered is the display on the two search engines: http://search.cpan.org/dist/Perl6-Conf/ http

Re: Perl 6 pod processor in Perl 5

2009-02-11 Thread Mark Overmeer
* Gabor Szabo (szab...@gmail.com) [090212 06:44]: > As an experiment to check how we could reuse CPAN to distribute Perl 6 > packages. > > Not surprisingly neither of them can handle the perl pod. > I contacted both maintainers asking to look into it suggesting > to use Perl6::Perldoc of Damian bu