[perl #58718] [BUG] Assigning result of "WHAT" to Perl6Scalar makes wrong result.

2008-09-11 Thread jn...@jnthn.net via RT
On Tue Sep 09 07:34:40 2008, bacek wrote: > perl6 via RT wrote: > > > > During investigating bug from #58276 I found very nasty bug with > > assigning to Perl6Scalar. > > Actually bug #58278. > Actually wasn't Perl6Scalar itself, but rather what a proto did in item context. Fixed that in r31004

[perl #60822] [TODO] lexical subroutines

2008-11-26 Thread jn...@jnthn.net via RT
On Tue Nov 25 13:19:15 2008, moritz wrote: > Rakudo as of r33193 doesn't implement lexical subroutines; neither 'my > sub ...' is implemented nor does 'my $x = sub { ... }' work properly (a > test for the latter can be found in t/spec/integration/man-or-boy.t). > All of: my $x = sub { ... } my &x

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

2008-11-26 Thread jn...@jnthn.net via RT
On Sat Nov 08 04:58:36 2008, bacek wrote: > there is attached patch to factor check readonly status to separate > function. Unfortunately I can't add call to '!CHECK_READONLY' > into (prefix|postfix)(++|--) because I'm waiting to resolve #59596 :) Thanks for the patch. However, it's not really th

[perl #60404] Array becomes string in subroutine or method calls

2008-11-26 Thread jn...@jnthn.net via RT
On Sat Nov 08 09:32:09 2008, pmichaud wrote: > On Sat, Nov 08, 2008 at 12:54:52AM -0800, Ilya Belikin 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 > > > > This one really pesky bug :( >

[perl #58276] [BUG] Can't iterate over list that was passed as a subroutine argument

2008-12-05 Thread jn...@jnthn.net via RT
On Fri Aug 22 15:13:14 2008, [EMAIL PROTECTED] wrote: > Rakudo r30452: > > > sub a(@b) { for @b { .say } }; my @x = (1, 2, 3); a(@x) > 1 2 3 > > That should be > 1 > 2 > 3 > This now works (probably has for a while, I just spotted the ticket and thought "ah, didn't we fix that one?"), but do we

[perl #60092] $/ cannot be assigned to other vars or passed as a parameter

2008-12-05 Thread jn...@jnthn.net via RT
On Fri Oct 24 10:30:00 2008, [EMAIL PROTECTED] wrote: > > Chris Dolan writes the following to p6u: > > > > I'm learning about Match objects today. I can't assign $/ to a > > variable or pass it to a method. > > This sounds a lot like > [perl #57094] [BUG] infix:= converts a PGE::Match to a Str, n

[perl #61216] [PATCH] Implemetation of list assignment for IOIterator

2008-12-09 Thread jn...@jnthn.net via RT
On Tue Dec 09 03:11:55 2008, bacek wrote: > There is (temporary) patch for support list assignment for IOIterator. > E.g. $i = =$fh; @a=$fh. > This isn't, I don't think, the right approach; instead, IOIterator itself wanted the changes. So, done it a way I think is at least a bit more correct, if

[perl #61214] [PATCH] Implementation of IO.lines and lines(Str)

2008-12-09 Thread jn...@jnthn.net via RT
On Tue Dec 09 03:10:00 2008, bacek wrote: > There is patch for implemtation of IO.lines and lines(Str) > Applied in r33705. Thanks, Jonathan

[perl #57356] Iterating a filehandle dies

2008-12-09 Thread jn...@jnthn.net via RT
On Mon Jul 28 07:09:28 2008, [EMAIL PROTECTED] wrote: > $ ../../parrot perl6.pbc -e 'my $x = open "README"; for =$x { .say }' > Works as of r33708. Thanks, Jonathan

[perl #57974] Implement missing infix: operator

2008-12-09 Thread jn...@jnthn.net via RT
Just investigated this and we both implement this and run spectests for it, so closing ticket.

[perl #61104] [TODO] Implement array method dispatch

2008-12-17 Thread jn...@jnthn.net via RT
On Sat Dec 06 14:10:48 2008, masak wrote: > This should work, according to S12: > > $ perl6 -e 'class A { method x(Int $a) { say "Int" }; method y(Str $a) > { say "Str" }; method z { my @candidates = &x, &y; For this to work, I guess it implies that methods get entries in the namespace as A::x so

[perl #61024] Rakudo doesn't flush output before waiting for input

2008-12-17 Thread jn...@jnthn.net via RT
On Wed Dec 03 11:12:08 2008, masak wrote: > Rakudo r33458 doesn't flush its STDOUT when waiting for user STDIN input. > > $ perl -e 'print "hi"; <>' > hi^C > $ ./perl6 -e 'print "hi"; my $a = =$*IN' > ^C This is working now; checked it myself on Win32 and PerlJam++ and mortiz++ tested it on other

[perl #57214] [BUG] eval 'class C is D {}' causes assertion failure

2008-12-17 Thread jn...@jnthn.net via RT
On Sat Jul 26 06:45:21 2008, jn...@jnthn.net wrote: > On Wed Jul 23 01:51:32 2008, mor...@casella.verplant.org wrote: > > t/spec/S12-class/declaration-order.t by Carl Mäsak revealed a parrot bug > > which can be reproduced with this small sample: > > $ cat eval-bug.t > > eval ' class D is C {}'; >

[perl #57722] [PATCH] Substr with negative start and length gives different results from perl5

2008-12-17 Thread jn...@jnthn.net via RT
On Thu Aug 07 12:41:32 2008, ronaldxs wrote: > From the irc log for today (8/7) > > 15:50 ron perl6: my $a = '0123456'; say > substr($a, -5, -2); > 15:50 p6eval elf 21826, pugs: OUTPUT[234?] > 15:50 > ..rakudo 29834: OUTPUT[23456?] > > > perl5 agrees with the pugs output. > > Attached patch

[perl #61430] Arrays can not be smartmatched in Rakudo

2008-12-17 Thread jn...@jnthn.net via RT
On Wed Dec 17 06:02:40 2008, masak wrote: > rakudo: say (1,2,3) ~~ [1,2,3] > rakudo 34020: OUTPUT[Method 'ACCEPTS' not found for invocant > of class 'Perl6Array'[...] > * masak submits rakudobug Implemented ACCEPTS (including the dwimming on Whatever) in r34042. Unfudged the couple of basic test

[perl #61124] [TODO] Implement .clone method on objects

2008-12-17 Thread jn...@jnthn.net via RT
On Sun Dec 07 04:42:25 2008, masak wrote: > The following should work in Rakudo: > > $ perl6 -e 'class A {}; my $a = A.new.clone' > Method 'clone' not found for invocant of class 'A' > [...] > Segmentation fault > > Perhaps more to the point, the following should work too, and print > "5\n42\n":

[perl #61334] Rakudo thinks that somethings that aren't ambiguities are

2008-12-17 Thread jn...@jnthn.net via RT
On Sat Dec 13 08:08:17 2008, masak wrote: > rakudo: multi foo(&c where { .arity == 1 }) { say "One." }; > multi foo(&c where { .arity == 2 }) { say "Two." }; foo({$^a + $^b + > $^c }) > rakudo 33858: OUTPUT[Ambiguous dispatch to multi 'foo'. > Ambiguous candidates had signatures:␤:(Any c where al

[perl #61356] Lexicals declare outside of class not visible in the class

2008-12-17 Thread jn...@jnthn.net via RT
On Sun Dec 14 02:26:54 2008, masak wrote: > It feels a bit odd that the below two one-liners don't work the same > way in Rakudo r33860. > > $ perl6 -e 'class A { my $a = method { say self.WHAT }; method x { > self.$a() } }; A.new.x' > A > > $ perl6 -e 'my $a = method { say self.WHAT }; class A {

[perl #60716] [PATCH] invoke multi-level namespace grammars from rules

2008-12-17 Thread jn...@jnthn.net via RT
On Sat Nov 29 08:34:39 2008, chrisdolan wrote: > Without my patch, the first of the following succeeds but the second > fails. With the patch, they both succeed. My patch allows you to use > more than one "::" in a <> element *inside* a regex. > > grammar Grammar::Deep { token foo { 'foo' }; } >

[perl #61332] Rakudo doesn't disallow calling a sub with a code parameter with an Int argument

2008-12-17 Thread jn...@jnthn.net via RT
On Sat Dec 13 07:59:45 2008, masak wrote: > rakudo: sub foo(&code_block where { 1 <= .arity <= 2 }) { say > "OH HAI" }; foo(1) > rakudo 33858: OUTPUT[Method 'arity' not found for invocant of > class 'Int'␤current instr.: '_block23' pc 417 (EVAL_14:163)␤] > what does Int have to do with it? > ma

[perl #61102] Calling private methods with the string syntax doesn't work in Rakudo

2008-12-17 Thread jn...@jnthn.net via RT
On Sun Dec 07 03:31:55 2008, moritz wrote: > On Sat Dec 06 14:07:35 2008, masak wrote: > > Rakudo r33577 can do private method calls. > > > > $ perl6 -e 'class A { my method x {}; method y { self!x } }; A.new.y' > > > > And it can do calls to methods whose name is given in a string. > > > > $ pe

[perl #61866] has $.x = 'default' / my Foo $x .= new together have issues

2008-12-30 Thread jn...@jnthn.net (via RT)
# New Ticket Created by jn...@jnthn.net # Please include the string: [perl #61866] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=61866 > 22:58 <@jonathan> rakudo: class Foo { has $.x = 42; }; say Foo.new.x 22:58 < polyglot

[perl #62200] [BUG] Role composition failure: erroneous method conflict

2009-01-12 Thread jn...@jnthn.net via RT
On Sun Jan 11 14:06:52 2009, moritz wrote: > On Sun Jan 11 12:02:21 2009, matt-w wrote: > > Put this code through Rakudo: > > > > use v6; > > > > role TestRole { > > method foo() { ... } > > } > > > > class TestClass does TestRole { > > method foo() { say "render"; } > > } > > > > my Te

[perl #60814] Cannot create lowercase classes in Rakudo

2009-01-19 Thread jn...@jnthn.net via RT
On Tue Nov 25 09:42:24 2008, masak wrote: > rakudo: class foo { }; say foo; > rakudo 33193: OUTPUT[invoke() not implemented in class > 'foo'␤current instr.: '_block11' pc 19 (EVAL_11:13)␤] > Yes, now you've found the "can't have a class with a lowercase > name" thingy in > Rakudo. :-)_ >

[perl #62326] [BUG] can't call subs with namespaces, such as Foo::bar()

2009-01-19 Thread jn...@jnthn.net via RT
On Tue Jan 13 15:18:05 2009, moritz wrote: > 00:11 <@moritz_> rakudo: module A { sub b { return 'bar' }}; say A::b() > 00:11 < p6eval> rakudo 35511: OUTPUT«b␤» > > should return 'bar', of course > This and the various other cases in this ticket are resolved in r35763. Thanks! Jonathan

[perl #61120] [BUG] Inherited classes doesn't provide initialisation of inherited attributes in constructor

2009-01-19 Thread jn...@jnthn.net via RT
On Sun Dec 07 03:06:11 2008, moritz wrote: > On Sun Dec 07 02:47:22 2008, theba...@gmail.com wrote: > > rakudo: class A { has $.a }; class B is A {}; my $b = > > B.new(a=>"foo"); > > rakudo 33597: OUTPUT[You passed an initialization parameter > > that does not have a matching > > As a test case

[perl #61978] [TODO] Rakudo needs a .does method in Object

2009-01-19 Thread jn...@jnthn.net via RT
On Mon Jan 05 10:22:53 2009, moritz wrote: > Rakudo r34428: > > ./perl6 -e '1.does(Int)' > Method 'does' not found for invocant of class 'Int' > > Every object should have .does method, which should check the same type > conformance as $object ~~ Type does. > There are many tests for .does spread

[perl #61880] //= not understood by Rakudo

2009-01-19 Thread jn...@jnthn.net via RT
On Wed Dec 31 08:44:02 2008, masak wrote: > Rakudo r34703: > > $ perl6 -e 'my $year; $year //= 2009' > get_iter() not implemented in class 'Integer' > > This looks like a misparse, interpreting '//= 2009' as '// =2009'. > Tried just adding it to generate as a meta-op, then realized that we're us

[perl #45999] [TODO] Handle multi-methods in Parrot_ComposeRole()

2009-01-20 Thread jn...@jnthn.net via RT
On Tue Oct 02 11:01:32 2007, pcoch wrote: > In src/objects.c:Parrot_ComposeRole() there is the todo item: > > * XXX TODO: multi-method handling. */ > > I think this means that multi-method handling neds to be handled at this > point in the code. > Indeed. Done this in r35820. Thanks, Jonathan

[perl #60924] Grammars in classes causes Rakudo to crash

2009-01-22 Thread jn...@jnthn.net via RT
On Sat Nov 29 17:03:22 2008, masak wrote: > Rakudo r33329 can't instantiate classes that contain a grammar. > > $ perl6 -e 'class A { grammar B {} }; A.new' > Null PMC access in get_string() > [...] Fixed in r35884, and tests added in Pugs r25000 (plus to make sure you can invoke rules in the nes

[perl #61350] Method declarations and nested classes don't collaborate well

2009-01-22 Thread jn...@jnthn.net via RT
On Sun Dec 14 02:13:42 2008, masak wrote: > In Rakudo r33860, the following happens when you try to put a method > in an outer class after having defined an inner class: > > $ perl6 -e 'class A { class B {}; method x { say self.WHAT } }; A.new.x' > Null PMC access in get_string() > [...] > > $ pe

[perl #61574] Rakudo doesn't treat inner classes as being contained in the namespace of outer ones

2009-01-22 Thread jn...@jnthn.net via RT
On Sun Dec 21 07:55:53 2008, masak wrote: > rakudo 34202: OUTPUT[Failure␤] > rakudo: class Outer { class Inner {} }; say Inner.WHAT > rakudo 34202: OUTPUT[Inner␤] > * masak submits rakudobug Fixed in r35884, and tests added in Pugs r24999. Thanks, Jonathan

[perl #62260] [BUG] END blocks don't see external variables

2009-01-22 Thread jn...@jnthn.net via RT
On Tue Jan 13 08:58:08 2009, pmichaud wrote: > On Tue, Jan 13, 2009 at 05:17:16PM +0100, Jonathan Worthington wrote: > > Patrick R. Michaud wrote: > >> Confirmed -- there are still issues with lexicals in a > >> variety of control blocks. > >> > >> > > I skimmed the code for that today. I notice

[perl #62730] Internal Parrot errors leak through when passing some kinds of pairs

2009-01-28 Thread jn...@jnthn.net via RT
On Sun Jan 25 04:44:47 2009, masak wrote: > Rakudo r35994: > > $ perl6 -e 'Hash.new( a => "b" )' > $ perl6 -e 'Hash.new( "a" => "b" )' > argument doesn't hash > [...] > I figured this would be easy to fix, but it's not. Basically, because for infix:=> we could have any complex expression that gen

[perl #62852] Method calls to junctions do not autothread in Rakudo

2009-01-28 Thread jn...@jnthn.net via RT
On Tue Jan 27 14:13:52 2009, masak wrote: > rakudo: class A { method b { say (1..10).pick } }; > any(A.new, A.new, A.new).b > rakudo 36065: OUTPUT«Could not locate a method 'b' to invoke > on class 'Junction'. [...] > uhm. > rakudobug? > masak: if you please ;-) > * masak submits > > The expe

[perl #57332] Matching against nonexistent class throws wrong kind of error

2009-01-28 Thread jn...@jnthn.net via RT
On Mon Jan 26 02:42:39 2009, masak wrote: > This now works in r35994: > > $ perl6 -e 'say "mm, pie" ~~ A' > Could not find non-existent sub A > [...] > > Not sure if I can resolve the ticket though, since things are still not > checked before runtime: > > $ perl6 -e 'say "OH HAI"; say "mm, pie"

[perl #61068] Null PMC access when illegally redefining a class inside an eval inside an ok() call from Test.pm

2009-01-28 Thread jn...@jnthn.net via RT
On Fri Dec 05 14:29:52 2008, masak wrote: > $ cat nasty-bug > use Test; > > class B {} > ok(eval('class B {}')); > > $ md5 Test.pm > MD5 (Test.pm) = a53345a042f07d942f239830773cea54 > > $ perl6 nasty-bug > Null PMC access in type() > current instr.: '_block11' pc 53 (EVAL_12:19) As of r36096 th

[perl #61444] Rakudo allows declaring an enum called 'Object'

2009-01-28 Thread jn...@jnthn.net via RT
On Wed Dec 17 13:43:49 2008, masak wrote: > <[particle]> rakudo: enum Object; say Object::Failure; > [particle]: shouldn't defining an enum called 'Object' > constitute an error of some sort? > <[particle]> sure looks like a bug to me > * masak reports As of r36096, this now gives a compile time

[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

[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

[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

[perl #60152] if(something) is not treated as a sub call in Rakudo

2009-02-13 Thread jn...@jnthn.net via RT
On Mon Oct 27 11:21:57 2008, pmichaud wrote: > On Sun, Oct 26, 2008 at 02:47:12PM -0700, Carl Mäsak wrote: > > > > rakudo: if(3 < 5) { say "yes" } # that should fail > > > > Early experimentation indicates that this goes for unless, while, > > until and given as well, and probably others I can't

[perl #60258] Matching against a method produces the wrong result in Rakudo

2009-02-13 Thread jn...@jnthn.net via RT
On Fri Oct 31 06:31:53 2008, masak wrote: > Rakudo r32247 does the wrong thing when matching a something against > the ".method" syntax. > > $ perl6 -e 'class A { method alwaystrue { return 1 } }; given A.new { > say "irrelevant" ~~ .alwaystrue }' > 0 > > According to the big matching table in S0

[perl #60966] wrong data pass

2009-02-13 Thread jn...@jnthn.net via RT
On Mon Dec 01 05:13:01 2008, tantra wrote: > In this code, result will be 123, but i think that it must be 1. > > sub test(@test is copy) > { > @test[0] = 123; > }; > > my @test = (1, 2, 3); > test(@test); > > print @test[0]; Indeed - fixed in git 6059ad9 and added tests to S06-traits/is-co

[perl #61772] Slurpy array 'is copy' returns incorrectly.

2009-02-13 Thread jn...@jnthn.net via RT
Hi, OK, good news and bad. :-) Cutting down the example a tad for the interesting bit: > sub array_slurpy (*...@array) { > say sprintf "Array has %d elements and the first value is > '%s'", > @array.elems, @array[0]; > return @array; > } > > sub array_slur

[perl #61106] Something doesn't work in hash indexing through a closure in Rakudo

2009-02-13 Thread jn...@jnthn.net via RT
On Sun Dec 07 04:33:27 2008, masak wrote: > Moritz (>), Carl (>>): > >> Rakudo r33577 responds strangely to the following program: > >> > >> $ perl6 -e 'my $locator = method { . }; my %h = { here => "foo" > >> }; say %h.$locator' > >> get_pmc_keyed() not implemented in class 'Undef' > >> [...] > >>

[perl #61034] Null PMC access when assigning result from an empty given inside a do expression

2009-02-13 Thread jn...@jnthn.net via RT
On Thu Dec 04 04:35:43 2008, pmichaud wrote: > On Wed, Dec 03, 2008 at 03:54:16PM -0800, Carl Mäsak wrote: > > # New Ticket Created by "Carl Mäsak" > > # Please include the string: [perl #61034] > > # in the subject line of all future correspondence about this issue. > > # http://rt.perl.org/rt

[perl #61446] Rakudo dies when trying to define an enum with zero elements

2009-02-13 Thread jn...@jnthn.net via RT
On Thu Jan 29 21:02:29 2009, s1n wrote: > On Thu Jan 29 20:48:56 2009, s1n wrote: > > As of r36167, this isn't crashing anymore. Should probably mark this > > resolved since it's now OBE. > > I added a test to S12-enums/basic.t to make sure this works: > > > --- basic.t (revision 25107) > +++

[perl #61744] error:imcc:syntax error, unexpected VAR, expecting '(' ('var')

2009-02-13 Thread jn...@jnthn.net via RT
On Fri Dec 26 14:41:49 2008, markusl wrote: > I'm attempting to compile Parrot and Perl 6 for the first time using > gcc 4.1.2 > on Linux. I've checked out revision 34399 form svn. Parrot compiles > successfully, but languages/perl6 fails like this: > > > m...@edward:~/parrot/languages/perl6$ m

[perl #61106] Something doesn't work in hash indexing through a closure in Rakudo

2009-02-13 Thread jn...@jnthn.net via RT
On Fri Feb 13 06:05:01 2009, jn...@jnthn.net wrote: > On Sun Dec 07 04:33:27 2008, masak wrote: > > Moritz (>), Carl (>>): > > >> Rakudo r33577 responds strangely to the following program: > > >> > > >> $ perl6 -e 'my $locator = method { . }; my %h = { here => "foo" > > >> }; say %h.$locator' > > >

[perl #61204] :x() in .subst does not fail when there aren't enough matches

2009-02-13 Thread jn...@jnthn.net via RT
On Tue Dec 09 02:00:40 2008, masak wrote: > Rakudo r33613 treats the :x($n) adverb as "up to $n matches", not (as > specced) "exactly $n matches". > > $ perl6 -e 'say "foofoofoo".subst("foo", "bar", :x(3))' # right > barbarbar > > $ perl6 -e 'say "foofoofoo".subst("foo", "bar", :x(4))' # wrong >

[perl #61452] Rakudo doesn't treat several whatever stars in a row correctly in a list smartmatch

2009-02-13 Thread jn...@jnthn.net via RT
On Wed Dec 17 15:38:07 2008, masak wrote: > rakudo: say (1,2,3) ~~ (1,*,*,3) > rakudo 34053: OUTPUT[0␤] > Hmm. > jnthn: what do you think of that first one? > The first one looks like a bug. > jnthn: :) > * masak submits And as of git daa2eea it looks like an ex-bug. Plus added a bunch of te

[perl #61532] Method declaration not parsed correctly when "is also" present

2009-02-13 Thread jn...@jnthn.net via RT
On Fri Dec 19 09:20:41 2008, cspencer wrote: > > The following code: > >class Array is also { > method splice(@array: $offset = 0, Int $size? = 0, *...@values) { >say "Splicing array: offset = $offset, size = $size"; > } >}; > >(1..10).splice(1, 1); > > does not pa

[perl #61454] Rakudo complains about hypers when matching some list with whatever stars in them

2009-02-13 Thread jn...@jnthn.net via RT
On Wed Dec 17 15:43:01 2008, masak wrote: > rakudo: say (3) ~~ (*,3,*) > rakudo 34053: OUTPUT[Non-dwimmy hyperoperator cannot be used > on arrays of different sizes or dimensions. Fixed in git f7b4b86 and tests added. Thanks, Jonathan

[perl #61776] Rakudo gives incorrect output for subtypes

2009-02-13 Thread jn...@jnthn.net via RT
On Sat Dec 27 14:08:48 2008, publiustemp-perl6us...@yahoo.com wrote: > subset Letter of Str where { $_ =~ /^ <[a..z]> $/ }; > > my $first_letter = 'a'; > say $first_letter; > > my Letter $second_letter = 'a'; > say $second_letter; > > sub doit (Letter $letter) { >

[perl #61776] Rakudo gives incorrect output for subtypes

2009-02-13 Thread jn...@jnthn.net via RT
On Fri Feb 13 10:06:37 2009, jn...@jnthn.net wrote: > On Sat Dec 27 14:08:48 2008, publiustemp-perl6us...@yahoo.com wrote: > > subset Letter of Str where { $_ =~ /^ <[a..z]> $/ }; > > > > ...snip... > > > That's a Perl 5-o. :-) You likely meant: > > subset Letter of Str where { $_ ~~ /^

[perl #61654] Where-clauses only work correctly with blocks -- not smartmatch

2009-02-13 Thread jn...@jnthn.net via RT
On Wed Dec 24 07:35:47 2008, dwh...@nvidia.com wrote: > (rakudo 34337) > > Examples: > > sub foo( $x where { $_ eq "x" } ) { say "X" } > x("x") > > works, but > > sub foo( $x where "x" ) { say "X" } > sub foo( $x where /x/ ) { say "X" } Now also work as of git 0f87695. Plus added tests. T

[perl #62164] Smartmatch dies when comparing a Str and an Array

2009-02-13 Thread jn...@jnthn.net via RT
On Sat Jan 10 08:20:33 2009, masak wrote: > perl6: say "foo" ~~ ["foo", "bar"] > ..rakudo 35339: OUTPUT«Non-dwimmy hyperoperator cannot be > used on arrays of different sizes or dimensions [...] This now works (gives 0). And will reply to next bit of the ticket separately... Thanks, Jonathan

[perl #62164] Smartmatch dies when comparing a Str and an Array

2009-02-13 Thread jn...@jnthn.net via RT
On Sun Jan 11 04:36:44 2009, ihrd wrote: > Hi, > ah, and this bug broke my code : > I was using Str ~~ Array, Regex ~~ Array and it works properly before. > > > ":)".say if 'a' ~~ Now gives no output, which is the correct thing. If you were expecting different, your code is wrong. :-) Maybe you

[perl #62196] Null PMC access on smartmatch inside method in Rakudo

2009-02-13 Thread jn...@jnthn.net via RT
On Sun Jan 11 09:42:35 2009, masak wrote: > rakudo: class A { method foo { say "" ~~ * } }; A.new.foo > rakudo 35420: OUTPUT«Null PMC access in find_method() [...] > * masak reports rakudobug > masak: Is that dependent on it being in a class? > jnthn: yes. > rakudo: say "" ~~ * > rakudo: sub

[perl #62346] No interactivity ? No prompt?

2009-02-13 Thread jn...@jnthn.net via RT
On Wed Jan 14 05:08:59 2009, richardh wrote: > I thought > our Str prompt Str > had been implimented. > > Does prompt exist in parrot? > It now exists in Rakudo as of git 1ac6625. > If not, would be possible to do in reasonable future? > Depends if this part of the ex-future is reasonable to yo

[perl #62892] Rakudo dies when trying to do 'is' inheritance on a role

2009-02-13 Thread jn...@jnthn.net via RT
On Thu Jan 29 02:02:53 2009, masak wrote: > rakudo: role A {}; class B is A {} > rakudo 36139: OUTPUT«Null PMC access in get_string() [...] > * masak submits rakudobug > > I haven't checked in the specs what this should do, but STD says it's > allowed. It should pun the role into a class, and i

[perl #62278] Feed Operators do not work?

2009-02-13 Thread jn...@jnthn.net via RT
On Tue Jan 13 02:40:17 2009, richardh wrote: > The feed operators ==> and <== dont appear to work. > Not on the rakudo feature status page > > I tried the following code (I know it is better to use [+] for this > example, but I was looking for a simple code snippet). > > my @arr = ( 1,2,3,4 ); >

[perl #63286] Re: Multi dispatch and generics don't mix

2009-02-17 Thread jn...@jnthn.net (via RT)
# New Ticket Created by jn...@jnthn.net # Please include the string: [perl #63286] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=63286 > Moritz Lenz wrote: > Parrot r36678, Rakudo 0f87695c: > > class Scissor { }; >

[perl #61352] Anonymous classes cannot inherit from named classes

2009-02-18 Thread jn...@jnthn.net via RT
On Mon Feb 16 11:20:06 2009, bacek wrote: > On Sun Dec 14 02:15:27 2008, masak wrote: > > The following doesn't parse in Rakudo r33860: > > > > $ perl6 -e 'class A { method x { say "OH HAI" } }; my $c = class is A > > {}; $c.x' > > Statement not terminated properly at line 1, near "{}; $c.x" > > [

[perl #61488] Something is wrong with inheritance in Rakudo

2009-02-18 Thread jn...@jnthn.net via RT
On Thu Dec 18 13:04:15 2008, masak wrote: > rakudo: class A { has $.bar; }; class B is A { has Int $.foo > }; class C is B; my $m = C.new( A{ :bar }, B{ :foo<5> } ); say > $m.foo; > rakudo 34078: OUTPUT[Int␤] > aha. > * masak submits rakudobug /me commits rakudofix (git 6663565). And untodo's t

[perl #61604] [TODO] allow 'does RoleName' inside a class

2009-02-18 Thread jn...@jnthn.net via RT
On Mon Dec 22 06:24:11 2008, moritz wrote: > currently (r34146) Rakudo allows 'class MyClass does RoleName { ... }', > but not 'class MyClass { does RoleName; ... }' (same with 'is > ClassName)', which should be allowed accordingly to S12:113. > Incorporated parsing this in as close to how STD.pm

[perl #61840] [TODO] min= and max= operators

2009-02-18 Thread jn...@jnthn.net via RT
On Fri Feb 13 23:07:32 2009, bacek wrote: > On Mon Jan 05 12:00:25 2009, moritz wrote: > > Carl MXXsak (via RT) wrote: > > > > > > $ perl6 -e 'my $a = 5; $a min= 2; say $a' > > > get_iter() not implemented in class 'Integer' > > > [...] > > > > Added tests to t/spec/S03-operators/assign.t (which gr

[perl #49173] [TODO] Allow source written in perl6

2009-02-18 Thread jn...@jnthn.net via RT
On Fri Dec 28 15:59:18 2007, pmichaud wrote: > Currently all of the builtins for perl6 are written in PIR. > However, it would make more sense if some builtins were written > in Perl 6. > And boy did it take us a little while to get there, but today we have. :-) See under src/setting/ for various

[perl #62902] Rakudo thinks that a proto-object in an attribute isn't ===-equal to its class

2009-02-25 Thread jn...@jnthn.net via RT
On Thu Jan 29 05:13:48 2009, masak wrote: > A protoobject in a normal lexical variable: > > rakudo: class A {}; my A $a; say $a === A # works > rakudo 36143: OUTPUT«1␤» > > A protoobject in an object attribute: > > rakudo: class A {}; class D { has A $!a; method foo { say $!a > === A } }; D.n

[perl #62364] [BUG] *

2009-02-25 Thread jn...@jnthn.net via RT
On Wed Jan 14 14:02:17 2009, publiustemp-perl6interna...@yahoo.com wrote: > I tried to implement "plan *" for 'no_plan' and this is the minimal > test case: > > perl6 $ perl6 -e 'my $plan = *; say $plan.isa(Whatever)' > Method 'isa' not found for invocant of class 'Whatever' > Ah yes, Whatever wa

[perl #62004] Enum values aren't recognized without their namespace

2009-02-25 Thread jn...@jnthn.net via RT
On Tue Jan 06 02:51:59 2009, masak wrote: > Rakudo r34997 doesn't allow enum values to be written without their > namespace: > > $ perl6 -e 'enum Color ; my Color $c = Color::white; > say $c' > 0 > $ perl6 -e 'enum Color ; my Color $c = white'too few > arguments passed (0) - 1 params expected > [.

[perl #63146] [TODO] Implement (*) in the LHS of 'my' declarations

2009-02-25 Thread jn...@jnthn.net via RT
On Wed Feb 11 01:21:29 2009, masak wrote: > Larry (>): > > Actually, that would have to be (*@) in a my, since a my takes a > > signature. You can only use (*) in an ordinary list assignment: > > > > (*) = 5; > > ($a,$b,$c,*) = @values; > > Ok, since the latter two work already, I'm resc

[perl #63232] Rakudo doesn't Z together mixes of elements and ranges properly

2009-02-25 Thread jn...@jnthn.net via RT
On Wed Feb 18 09:02:32 2009, ml...@physik.uni-wuerzburg.de wrote: > Vasily Chekalkin via RT wrote: > > On Sat Feb 14 08:16:28 2009, masak wrote: > >> rakudo: say "a".."c" Z "?", "a".."b"; > >> rakudo a0a390: OUTPUT«a?bab␤» > >> > >> From the last example, we see that there's a 'c' missing from th

[perl #63462] .parse doesn't work on many-jointed grammars

2009-02-25 Thread jn...@jnthn.net via RT
On Wed Feb 25 01:06:52 2009, masak wrote: > rakudo: grammar A::B { regex TOP { foo } }; A::B.parse("") > rakudo 7f8ba6: OUTPUT«Null PMC access in get_string() [...] > Huston, we have a problem. > * masak submits rakudobug Problem resolved in git 59fcc4e and test added to S05-grammar/parse_and_p

[perl #63442] MMD doesn't take methods of parent class into account

2009-02-25 Thread jn...@jnthn.net via RT
On Tue Feb 24 09:33:18 2009, ml...@physik.uni-wuerzburg.de wrote: > > class Foo { > multi method a($d) { > say "Any-method in Foo"; > } > } > class Bar is Foo { > multi method a(Int $d) { > say "Int-method in Bar"; > } > } > > Bar.new.a("not an Int"); > > # vim: f

[perl #63374] [BUG] Build fails with segfault while generating gen_settings.pir

2009-02-25 Thread jn...@jnthn.net via RT
On Sun Feb 22 23:38:52 2009, rooneg wrote: > On Fri, Feb 20, 2009 at 11:23 AM, perl6 via RT > wrote: > > > I'm getting a crash on OS X when trying to build rakudo. This is with > > parrot r36907 and the current version of rakudo > > (f23eda2c5251db5a90f5fdd3b587d4c234ee70e4) from github. > > No

[perl #57398] Actually assigning to a read-only variable in rakudo causes parrot to segfault

2009-02-25 Thread jn...@jnthn.net via RT
On Tue Jul 29 21:49:31 2008, masak wrote: > $ svn info | grep Revi > Revision: 29869 > > $ ./perl6 -e 'sub a($x) { $x = 5 }; my $y = 7; a($y);' > Cannot assign to readonly variable > [...] > > works, but the following works but segfaults: > > $ ./perl6 -e 'sub a($x) { $x = 5 }; my $y = 7; a($y);

[perl #57396] Accessing an uninitialized value inside a sub in rakudo makes parrot segfault

2009-02-25 Thread jn...@jnthn.net via RT
On Tue Jul 29 21:40:30 2008, masak wrote: > $ ./perl6 -e 'my $x; $x.foo()' > > works, but > > $ ./perl6 -e 'sub a { my $x; $x.foo() }; a()' > Method 'foo' not found for invocant of class 'Undef' > current instr.: 'a' pc 82 (EVAL_13:42) > called from Sub '_block11' pc 17 (EVAL_13:11) > called from

[perl #63264] [BUG] Subsets are defined by default.

2009-02-25 Thread jn...@jnthn.net via RT
On Mon Feb 16 12:46:55 2009, bacek wrote: > > perl6: subset Strand where {$_ == 0 | 1 | -1}; say Strand.defined > rakudo c4f0f9: OUTPUT«1␤» This now gives 0 as expected as of git 3484985. Added spectest for it to S12-subset/subtypes.t. Thanks! Jonathan

[perl #62262] [BUG] initialiazation of parent attributes

2009-03-13 Thread jn...@jnthn.net via RT
On Mon Jan 12 14:44:35 2009, moritz wrote: > I've added some tests to t/spec/S12-construction/new.t which boil down to: > > #+snip > class Parent { > has $.x; > } > > class Child is Parent { > has $.y; > } > > my $o; > ... > > lives_ok { $o = Child.new( :y(4), Parent{ :x<5> }) }, >

[perl #62966] Rakudo reports a type mismatch in assignment when typing an attribute with a role

2009-03-13 Thread jn...@jnthn.net via RT
On Sun Feb 01 02:19:22 2009, masak wrote: > With Rakudo 153a4a8 on Parrot r36239, I get the following: > > $ perl6 -e 'role A {}; class B { has A $!a }; B.new' > Type mismatch in assignment. > [...] > > I see nothing wrong with the above, so I don't think the error is > justified. Aye, there we

[perl #63568] Null PMC access when calling *any* method on a multi sub in Rakudo

2009-03-13 Thread jn...@jnthn.net via RT
On Tue Mar 10 13:45:27 2009, moritz wrote: > On Sun Mar 01 02:44:17 2009, masak wrote: > > oh and is arity defined on multi subs ? > > rakudo: sub f($z) {}; &f.arity.say > > rakudo af4b73: OUTPUT«1␤» > > rakudo: multi sub f($z) {}; &f.arity.say > > rakudo af4b73: OUTPUT«Null PMC access in find

[perl #63812] MMD bug with one candidate, who have where trait

2009-03-13 Thread jn...@jnthn.net via RT
On Thu Mar 12 06:28:03 2009, ihrd wrote: > class C { > proto method Foo ($any) { ":)".say } > multi method Foo ($foo where { $_ eq "foo"}) { "$foo".say } > } > C.Foo("foo"); # foo > C.Foo("bar"); # should smile but > # die with "Parameter type check failed for $foo > in

[perl #63594] [BUG] memory leaks

2009-03-13 Thread jn...@jnthn.net via RT
On Mon Mar 02 01:04:52 2009, ml...@physik.uni-wuerzburg.de wrote: > It seems that even the simplest programs leak memory: > > $ perl6 -e 'while 1 { }' > > Watching this in top (1) shows that it leaks about 1m per second on my > machine (linux amd64). > It's interesting to note that while this le

[perl #63570] Null PMC access in &f.signature.params in Rakudo

2009-03-13 Thread jn...@jnthn.net via RT
On Sun Mar 01 02:51:32 2009, masak wrote: > rakudo: sub f($z) {}; &f.signature.params > rakudo af4b73: RESULT«Null PMC access in find_method()␤ [...] > * masak submits rakudobug Fixed in git 41267fd. Thanks, Jonathan

[perl #63872] [PATCH] implement $*PROGRAM_NAME (S28)

2009-03-14 Thread jn...@jnthn.net via RT
On Sat Mar 14 11:07:14 2009, mbere...@autoexec.demon.nl wrote: > Just a one liner to copy the full pathname of the running Perl script, or > otherwise '-e' into $*PROGRAM_NAME. (The * twigil does not appear in the > patch). > Thanks, applied as git 6d97951. Not sure what it should do in -e, but wi

  1   2   3   4   5   6   7   8   >