[perl #57094] [BUG] infix:= converts a PGE::Match to a Str, not a Match
Hi, After checking with the latest Rakudo, I think this issue is now resolved. We get: my $x = food; my $y = $x.match(/$x=[f](o+)/); say $y.WHAT; # Match say $y; # foo say $yx; # f say $y[0]; # oo However, this still failed: say $y ~~ Match; # gave 0 So I fixed that in 33504, and I think this ticket is done now. I also unfudged the tests for the type checking against Match and added a tests that assigns a match object to a scalar and uses it as above. Thanks, Jonathan
[perl #56602] [TODO] 'is also' doesn't work on class Str (but everywhere else)
On Sun Nov 23 11:31:29 2008, moritz wrote: However the tests discovered that class Str can't be extended thusly (Method 'mydouble' not found for invocant of class 'Perl6Str', you get that output if you run the test file directly instead of the fudged version), so I'll leave this ticket open for now. This is now fixed, and I unfudged the test. Thanks! Jonathan
[perl #61060] Parser bug with attributes and blocks
On Fri Dec 05 02:05:07 2008, [EMAIL PROTECTED] wrote: This is a bit of a fragile one as it moves around depending on what NCI functions I have compiled. This segfaults for me: class foo { has $x; method y() { { $x } } } Previously it segfaulted like this: class Foo { has $x; method y($bar) { given (1) { baz($x, $bar) } } } Was a fairly easy bug to track down and fix inside Rakudo, which I've done in r33527. I also went hunting for the reason it segfaulted, because Parrot shouldn't do that. Looking in the debugger showed we were looking at garbage data, but didn't help me see why. Then I found that if I got the compiler to just spit out PIR, then tried to compile that PIR, it turned out it was invalid. A trace later, I realized that even if the PIR compiler bailed out at some point, it still tried to run the :init subs in the not-finished-compiling-yet bytecode. We now (r33526) check if there compile actually succeeded before trying to run the resulting code... ;-) Thanks! Jonathan
[perl #61052] [BUG]: r33482 Can't run 'make realclean' in languages/perl6 directory
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #61052] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=61052 This bug has been around for a while, but I've been too lazy to report it :) My build tools automatically run a 'make realclean' if I type 'rebuild' in a directory with a Makefile. If you do that in languages/perl6, you can no longer run make in that directory. Doing an svn up doesn't help. Going back to the top level and running a 'make realclean make' also doesn't help. I know of no way to recover from this aside from doing a fresh checkout. Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog- http://use.perl.org/~Ovid/journal/ Twitter - http://twitter.com/OvidPerl Official Perl 6 Wiki - http://www.perlfoundation.org/perl6
[perl #60898] Zip and ranges don't mix
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #60898] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=60898 10:04 moritz_ rakudo: say (a b c Z 1..10).perl 10:05 p6eval rakudo 33300: OUTPUT[elements() not implemented in class 'Range'#current instr.: 'infix:Z' pc 4039 (src/gen_builtins.pir:2555)#] 10:05 moritz_ rakudo: say (a b c Z list(1..10)).perl 10:05 p6eval rakudo 33300: OUTPUT[[a, 1, b, 2, c, 3]#] So infix:Z doesn't seem to like Range objects (sorry, the copy paste substituted the newline character with #, I'm on an UTF-8 deprived terminal rights now :-/ )
[perl #59982] [BUG] MMD fail for undef/complex interaction.
On Sun Nov 23 10:33:24 2008, moritz wrote: On Sat Oct 18 17:15:30 2008, bacek wrote: Hello. 00:05 bacek rakudo: my $a; $a = $a + 1i; say $a 00:05 polyglotbot OUTPUT[Multiple Dispatch: No suitable candidate found for 'add', with signature 'PPP-P'current instr.: 'infix:+' pc 1941 (src/gen_builtins.pir:1368)called from Sub '_block11' pc 60 (EVAL_12:25)called from Sub 'parrot;PCT;HLLCompiler;eval' pc 864 (src/PCT/HLLCompiler.pir:498)called from Sub Added test to the test suite in (pugs) r23061, t/spec/S03-operators/autovivification.t Fixed in r33214 and test unfudged. Note on the fix and what I'm guessing general direction may be on such things. I did it by implementing .Complex (which I believe should exist as a method on Any), which is what coerces something to Complex. Types can override this if they want to coerce in their own special way. I suspect when we write things such as the infix:+ in a Perl 6 prelude we'll end up writing something like: multi method infix:+(Complex $a, $b as Complex) { ... } Which could coerce that second parameter into being a Complex (note that the Complex method actually returns a Complex, and doesn't modify the original value). I believe the Any method would also be exported... multi method Complex() is export { ... } So we'll get a sub form too... Complex(...) But trying to introduce a sub form right now causes clashes with the Complex proto-object in the namespace. Ouch. :-( Anyway, that's a wider issue and not specific to this ticket, so treating as resolved. Jonathan
[perl #60426] [BUG] Implementation of Enums isn't perfect.
On Sat Nov 08 20:39:00 2008, [EMAIL PROTECTED] wrote: bacek rakudo: enum Fooget_string; polyglotbot OUTPUT[A method named 'get_string' already exists in class ''. It may have been supplied by a role.current instr.: '_block15' pc -339673149 ((unknown file):-1)called from Sub '_block15' pc 169 (EVAL_11:55)called from Sub 'parrot;PCT;HLLCompiler;evalpmc' pc 804 ..(src/PCT/HLLCompiler.pir:468)called from Sub 'parrot;PCT;HLLCompiler;compile' pc 4... bacek rakudo's enums are really bad... Fixed this one in r33217. bacek rakudo: enum Foopick; polyglotbot RESULT[Null PMC access in find_method()current instr.: '_block14' pc 25 (EVAL_15:12)called from Sub 'parrot;PCT;HLLCompiler;eval' pc 866 (src/PCT/HLLCompiler.pir:501)called from Sub 'parrot;PCT;HLLCompiler;evalfiles' pc 1141 (src/PCT/HLLCompiler.pir:631)called from Sub ..'parrot;PCT;HLLCompiler;command_line' pc 1320 (src/PCT/HLLCompiler.pir:72... That one worked when I tired it today, so not sure what it was. Maybe related to the single element enum breakage that was fixed before now. Thanks for reporting, Jonathan
[perl #60854] died when try to instant class with attribute type Range
On Wed Nov 26 04:27:12 2008, ihrd wrote: Hi! Rakudo 33212, example: class R { has Range $.range } my $r = R.new; died with: Null PMC access in clone() current instr.: 'parrot;Perl6Object;!cloneattr' pc 782 Ah yes, a missing null check. Added in r33218. Thanks, Jonathan
[perl #60366] [PATCH] 'does' fails with roles that have '::' in their names
On Wed Nov 05 22:58:18 2008, [EMAIL PROTECTED] wrote: There are two bugs here. The attached patch fixes bug #2 but not bug #1. Bug #1) role A::B is not interpreted as a role, but just as a module. ./perl6 -e 'role A { method foo { say Foo; } }; say A.WHAT' Role ./perl6 -e 'role A::B { method foo { say Foo; } }; say A::B.WHAT' Module Fixed. Bug #2) applying a role searches for the role in the wrong namespace. ./perl6 -e 'role A::B { method foo { say Foo; } }; class B does A::B {}; B.new.foo' Method 'foo' not found for invocant of class 'B' ./perl6 -e 'role A::B { method foo { say Foo; } }; class A::B::C does A::B {}; A::B::C.new.foo' Method 'foo' not found for invocant of class 'A;B;C' Applied your patch with minor simplifications to the code and with my fix to issue #1, it does indeed resolve this issue. Both in together as r33215, plus added a few tests. Thanks! Jonathan
[perl #60796] There's something wrong with creating classes inside block eval
On Mon Nov 24 15:12:48 2008, masak wrote: masak rakudo: eval { class A { has $.x } }; say A.new(x=5).x p6eval rakudo 33156: OUTPUT[5Null PMC access in find_method()current instr.: 'parrot;Perl6;Compiler;main' pc 136910 (src/gen_actions.pir:13693)] masak it gives the right answer, but then decides to die on some error! :) Taking a look at the S04: (Perl 6's eval function only evaluates strings, not blocks.) So I think the example is wrong (it sorta worked because classes are declared at compile time and you're declaring a package class inside that block; thus, even though we never invoked the block it still ended up declaring the class; if you'd put a say in there, it wouldn't have been run.) So, why the odd error? In the builtins we weren't checking what was passed to eval to a string. This led to oddness inside eval/the compiler/somewhere - turns out if you feed in something that ain't a string it does interesting stuff...but not until exit time! :-) Anyway, a glance at S29 suggests the signature of eval should be: multi eval ( Str $code, Grammar :$lang = CALLER::$?PARSER) That is, we type-check it's a Str rather than coerce. So I've put in a type check now and your example now gives a parameter type check failure, which - unless the spec changes to say we should coerce instead of type check - appears to be the right thing. (Note: a spectest did do a very curious/useless use of eval, which I ripped out...) Thanks, Jonathan
[perl #60778] Strange error message in Rakudo on $var .= string
On Mon Nov 24 07:52:42 2008, masak wrote: $ perl6 -c -e 'my $a; $a .= A' Method 'panic' not found for invocant of class 'PGE;Match' I inadvertently wrote this when meaning '~='. It would probably be a good thing to emit a helpful error message in this case. (Unless it's legal Perl 6, which STD doesn't think it is.) Note that Rakudo (r33067) dies here during compilation, trying to find a missing method 'panic'. Aye, and that method panic was being called to give a helpful error message! :-) Fixed things up now (r33221) so we call panic on something that knows how to. Thanks, Jonathan
[perl #60850] r33207: Multiple spectest failures on OS X
Hi! Thanks for testing. :-) On Tue Nov 25 23:38:58 2008, [EMAIL PROTECTED] wrote: t/spec/S12-methods/default-trait.t (Wstat: 0 Tests: 6 Failed: 1) Failed test: 2 I'd be especially interested in the test output of this one (or to know if it's no longer failing with latest Rakudo). Since I was just working on that recently, and can't reproduce a failure here. Thanks, Jonathan
[perl #60620] @a[1].=subst parsefail
On Mon Nov 17 13:49:03 2008, masak wrote: Rakudo r32733: masak rakudo: my @a; @a[0].=subst( '', '') polyglotbot OUTPUT[PAST::Compiler can't compile a null nodecurrent instr.: [...] Ah, yes, .= was only handling a scalar on the LHS. Thanks to PAST enhancements since I first implemented .=, it was nice and easy to refactor it into something that'd do the right thing... my @a = 'abc'; @a[0] .= subst('b','d'); say @a[0] adc my %h = x = 'abc'; %hx .= subst('b','d'); say %hx adc Committed in r33225, plus added tests into assign.t. Thanks, Jonathan
[perl #60150] Rakudo can only call non-lexical -sigil subs
On Sun Oct 26 14:26:27 2008, masak wrote: Rakudo r32151 is only able to call -sigil subs if they have not been initialized with my. $ ./perl6 -e 'b = say; b(5)' # works 5 $ ./perl6 -e 'my b = say; b(5)' # fails Lexical 'b' not found [...] This was fixed earlier today, and I've made sure there's a couple of tests too. Thanks, Jonathan
[perl #60718] [PATCH] better error message for .new on undefined class
On Thu Nov 20 20:46:18 2008, [EMAIL PROTECTED] wrote: If you accidentally try to instantiate a class that has not been defined, but the namespace for that class has been vivified, then you get an obscure error message: ... With the attached patch, Rakudo instead dies with a more informative message: ... The patch is a bit of a hack. It introduces a new() method to Module.pir which just constructs the error message and dies. Most of the added code is used to build the intended class name. Surely someone more familiar with the NameSpace pmc can improve it a bit? We should actually detect this at compile time, not runtime. That depends on registering and checking/looking up symbols as we compile, which is on the task list for the next month or so. So thanks for the patch, but I'm afraid it's the wrong approach. I will leave the ticket open, however, as something that needs to happen as a result of the symbol registry stuff. Once we get a useful error message at compile time, it's can be closed. Thanks! Jonathan
[perl #60850] r33207: Multiple spectest failures on OS X
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #60850] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=60850 I still have out of country guests, so I won't have much follow up time on this. If there's specific help I can give, let me know and I'll see if I can squeeze in some time. Note that if you are using Test::Harness 3.X, you probably need to grab the latest version from Subversion: svn co http://svn.hexten.net/tapx/trunk test_harness Otherwise, the t/spec/S12-classes/declaration-order.t failure will not show up in the summary. I've also attached a the full output of 'make spectest'. Summary of failures: Test Summary Report --- t/spec/S02-literals/quoting.rakudo (Wstat: 256 Tests: 0 Failed: 0) Non-zero exit status: 1 Parse errors: No plan found in TAP output t/spec/S03-operators/increment.rakudo(Wstat: 0 Tests: 41 Failed: 0) TODO passed: 1, 3-4, 6, 8-9, 11-12, 14, 16 t/spec/S12-class/declaration-order.t (Wstat: 6 Tests: 2 Failed: 0) Non-zero wait status: 6 t/spec/S12-methods/default-trait.t (Wstat: 0 Tests: 6 Failed: 1) Failed test: 2 Files=224, Tests=6417, 295 wallclock secs ( 1.68 usr 0.88 sys + 489.80 cusr 24.57 csys = 516.93 CPU) Result: FAIL uname -a $ uname -a Darwin curtis-poes-computer-3.local 9.5.1 Darwin Kernel Version 9.5.1: Fri Sep 19 16:19:24 PDT 2008; root:xnu-1228.8.30~1/RELEASE_I386 i386 $ cd .. parrot $ svn info Path: . URL: https://svn.perl.org/parrot/trunk Repository Root: https://svn.perl.org/parrot Repository UUID: d31e2699-5ff4-0310-a27c-f18f2fbe73fe Revision: 33207 Node Kind: directory Schedule: normal Last Changed Author: moritz Last Changed Rev: 33207 Last Changed Date: 2008-11-25 21:43:42 + (Tue, 25 Nov 2008) Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog- http://use.perl.org/~Ovid/journal/ Twitter - http://twitter.com/OvidPerl Official Perl 6 Wiki - http://www.perlfoundation.org/perl6 $ make spectest cd t/spec svn up At revision 23095. perl t/harness --fudge --keep-exit-code --jobs --tests-from-file=t/spectest.data t/spec/S02-builtin_data_types/array_extending.t ok t/spec/S02-builtin_data_types/anon_block.rakudo ok ===( 45;5 0/? 1/45 0/? )===Use of uninitialized value Use of uninitialized value Use of uninitialized value Use of uninitialized value Use of uninitialized value Use of uninitialized value Use of uninitialized value Use of uninitialized value t/spec/S02-builtin_data_types/array_ref.rakudo . ok ===( 90;6 1/97 0/? 0/? )===Use of uninitialized value Use of uninitialized value Use of uninitialized value Use of uninitialized value Use of uninitialized value Use of uninitialized value Use of uninitialized value Use of uninitialized value Use of uninitialized value Use of uninitialized value Use of uninitialized value Use of uninitialized value Use of uninitialized value t/spec/S02-builtin_data_types/array.rakudo . ok t/spec/S02-builtin_data_types/bool.t ... ok t/spec/S02-builtin_data_types/assigning-refs.rakudo ok t/spec/S02-builtin_data_types/catch_type_cast_mismatch.rakudo .. ok t/spec/S02-builtin_data_types/flattening.rakudo ok ===( 269;14 0/? 1/32 0/? )==Use of uninitialized value Use of uninitialized value Use of uninitialized value Use of uninitialized value t/spec/S02-builtin_data_types/hash_ref.rakudo .. ok ===( 301;18 1/58 0/? 0/? )==Use of uninitialized value Use of uninitialized value Use of uninitialized value Use of uninitialized value t/spec/S02-builtin_data_types/hash.rakudo .. ok t/spec/S02-builtin_data_types/multi_dimensional_array.rakudo ... ok t/spec/S02-builtin_data_types/nested_pairs.t ... ok t/spec/S02-builtin_data_types/nested_arrays.t .. ok t/spec/S02-builtin_data_types/mixed_multi_dimensional.rakudo ... ok ===( 495;27 0/? 0/? 1/8 )Use of uninitialized value t/spec/S02-builtin_data_types/subscripts_and_context.rakudo ok t/spec/S02-builtin_data_types/num.rakudo ... ok t/spec/S02-builtin_data_types/type.rakudo .. ok t/spec/S02-literals/array-interpolation.rakudo . ok ===( 590;32 1/79 0/? 0/? )==Undefined value shifted from empty range t/spec/S02-builtin_data_types/range.rakudo . ok
[perl #60636] [TODO] implement 'is rw' trait on classes
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #60636] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=60636 Rakudo needs to have the 'is rw' trait on classes at some point (which according to S12 implies that all attributes are rw by default). (Ticket inspired by this discussion: http://www.perlmonks.org/?node_id=724288 )
[perl #60662] Failed tests: t/pmc/nci.t
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #60662] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=60662 --- osname= linux osvers= 2.6.23-gentoo-r3 arch= x86_64-linux cc= x86_64-pc-linux-gnu-gcc --- Flags: category=core severity=medium ack=no --- I just updated svn and built parrot with just perl ./Configure.pl, make, make test. I had the following test fail: prove -dv t/pmc/nci.t # $Test::Harness::Switches: # 1 tests to run t/pmc/nci# Running: /usr/bin/perl5.8.8 t/pmc/nci.t # PERL5LIB=/etc/perl:/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux:/usr/lib64/perl5/vendor_perl/5.8.8:/usr/lib64/perl5/vendor_perl:/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux:/usr/lib64/perl5/site_perl/5.8.8:/usr/lib64/perl5/site_perl:/usr/lib64/perl5/5.8.8/x86_64-linux:/usr/lib64/perl5/5.8.8:/usr/local/lib/site_perl:. 1..68 ok 1 - load library fails ok 2 - dlfunc on undef ok 3 - dlfunc function not found ok 4 - nci_c - return a char in an INTEGER register ok 5 - nci_d and nci_dlvar_double ok 6 - nci_f and nci_dlvar_float ok 7 - nci_l - return a long in an INTEGER register ok 8 - nci_p - return a pointer to int ok 9 - nci_t - return a C-string ok 10 - nci_s - return a short in an INTEGER register ok 11 - nci_v and nci_dlvar_int ok 12 - nci_dd - PASM ok 13 - nci_dd - PIR ok 14 - get_string() ok 15 - nci_fff ok 16 - nci_isc ok 17 - nci_ssc ok 18 - nci_csc ok 19 - nci_it ok 20 - nci_it ok 21 - nci_tt ok 22 - nci_dd - stress test ok 23 - nci_dd - clone ok 24 - nci_ ok 25 - nci_i4i ok 26 - nci_ii3 ok 27 - nci_tb ok 28 - nci_tB ok 29 - nci_pi - struct with ints ok 30 - nci_pi - struct with floats ok 31 - nci_pi - align ok 32 - nci_pi - char* ok 33 - nci_pi - nested struct * ok 34 - nci_pi - nested struct * w named access ok 35 - nci_pi - func_ptr* with signature ok 36 - nci_pi - nested struct aligned ok 37 - nci_pi - nested struct unaligned ok 38 - nci_pi - nested, unaligned, named ok 39 - nci_pi - int ok 40 - nci_ip ok 41 - nci_vP ok 42 - nci_cb_C1 - PASM ok 43 - nci_cb_C1 - PIR ok 44 - nci_cb_C2 - PASM ok 45 - nci_cb_C3 - PIR ok 46 - nci_cb_D1 - PASM ok 47 - nci_cb_D2 - PASM ok 48 - nci_cb_D2 - PIR ok 49 - nci_cb_D3 - PIR ok 50 - nci_cb_D4 - synchronous callbacks ok 51 - nci_pip - array of structs ok 52 - nci_i33 - out parameters and return values ok 53 - nci_vpii - nested structs ok 54 - nci_p - nested array in a struct ok 55 - nci_pii - writing back to libnci_test.so ok 56 - nci_vv and nci_dlvar_int ok 57 - dlvar - unknown symbol ok 58 - dlfunc - unknown symbol ok 59 - loading same library twice ok 60 - opcode 'does' ok 61 - conversion d - P ok 62 - conversion S - P ok 63 - conversion I - P not ok 64 - nested structs should be independent # TODO RT #31292 # Failed (TODO) test 'nested structs should be independent' # at t/pmc/nci.t line 2538. # got: 'X: 1 # Y: 100 # X: 1 # Y: 200 # ' # expected: 'X: 1 # Y: 100 # X: 1 # Y: 100 # ' ok 65 - arity ok 66 - nci_vVi - void** out parameter ok 67 - nci_ttt - t_tt parameter # Failed test 'nci_vfff - t_tt parameter' not ok 68 - nci_vfff - t_tt parameter # at t/pmc/nci.t line 2689. # Exited with error code: [SIGNAL 3] # Received: # Parrot VM: PANIC: vfff is an unknown signature type. # CAN_BUILD_CALL_FRAMES is disabled, add the signature to src/call_list.txt! # C file src/nci.c, line 7500 # Parrot file (not available), line (not available) # # We highly suggest you notify the Parrot team if you have not been working on # Parrot. Use parrotbug (located in parrot's root directory) or send an # e-mail to [EMAIL PROTECTED] # Include the entire text of this error message and the text of the script that # generated the error. If you've made any modifications to Parrot, please # describe them as well. # # Version : 0.8.1-devel # Configured : Wed Nov 19 05:57:18 2008 GMT # Architecture: nojit # JIT Capable : No # Interp Flags: 0 # Exceptions : (missing from core) # # Dumping Core... # # Expected: # 1 # 1 # 1 # # Looks like you failed 1 test of 68. dubious Test returned status 1 (wstat 256, 0x100) DIED. FAILED test 68 Failed 1/68 tests, 98.53% okay Failed Test Stat Wstat Total Fail List of Failed --- t/pmc/nci.t1 256681 68 Failed 1/1 test scripts. 1/68 subtests failed. Files=1, Tests=68, 6 wallclock secs ( 1.24 cusr + 2.49 csys = 3.73 CPU) Failed 1/1 test programs. 1/68 subtests failed. This is on a machine running Gentoo linux. If there's any other information i can provide let me know. Adam --- Summary of my parrot 0.8.1 (r32864) configuration: configdate='Wed Nov 19 05:57:18 2008 GMT' Platform: osname=linux, archname=x86_64-linux jitcapable=0, jitarchname=nojit, jitosname=linux, jitcpuarch=amd64 execcapable=0 perl=/usr/bin/perl5.8.8 Compiler: cc='x86_64-pc-linux-gnu-gcc', ccflags='
[perl #58244] [BUG] inheritance of attributes
On Tue Nov 04 14:55:43 2008, [EMAIL PROTECTED] wrote: After studying these, it appears that they are actually not inheritance issues (which may exist, but I don't think it's the problem here), but actually the same problem as you get in doing: my $x; $x -= 3; Namely, that x and y are undefined, and doing -= on them gives the MMD error. So once we fix that, this ticked should also be cleared up. This was fixed, and the two files attached to this ticket now run; closing ticket. Thanks for reporting, Jonathan
[perl #58396] Closure parameters do not work in if statements in Rakudo
On Wed Aug 27 06:17:33 2008, masak wrote: r30590: $ ./perl6 -e 'sub testa { return 5 }; if testa() - $a { say $a }' Statement not terminated properly at line 1, near - $a { sa [...] This now works (thanks to pmichaud++) - resolving ticket. Jonathan
[perl #60572] can`t set attribute-array for object in .new
On Sun Nov 16 01:25:10 2008, ihrd wrote: example: class Foo { has @.a; } my @b = 1,2,3; my $f = Foo.new(a = @b); $f.a.perl.say; # [] Fixed in r32733. Thanks, Jonathan
[perl #60528] Rakudo wrongly permits mutation of readonly variables in some cases
On Fri Nov 14 05:58:21 2008, pmichaud wrote: On Thu, Nov 13, 2008 at 03:21:45PM -0800, Carl Mäsak wrote: Rakudo r32629 sometimes dies when assigning a readonly variable to itself, and sometimes not. $ ./perl6 -e 'for a b c - $foo { $foo = $foo; say $foo }' # dies, good Cannot assign to readonly variable. [...] $ ./perl6 -e 'for split(/sp/, a b c) - $foo { $foo = $foo; say $foo }' # bhd! a b c There's a bit more going on behind the scenes here -- the $foo = $foo line in the second case is also promoting Parrot String values into Rakudo Str objects. I suspect that promotion is causing the readonly property on $foo to be lost. My guess is that we want to adjust Parrot's Ccopy opcode so that it doesn't modify the destination PMC's properties. I've fixed it in a patch that's about to go in as soon as it smokes; please can somebody make sure that a regression test goes in for this. Thanks, Jonathan
[perl #60358] Rakudo doesn't recognize grammars with :: in the name
On Wed Nov 05 19:31:36 2008, chrisdolan wrote: It took a while to understand the code, but the solution was a one-liner. Patch attached. Unfortunately, the patch produced a bunch of spectest failures. However, it wasn't because the patch was wrong, but rather a bug in some code generation in PCT. I fixed that, and then the patch worked and did the Right Thing, so it's applied in r32546. Plus got us spectesting this. Thanks! Jonathan
[perl #58602] subset types and multi dispatch don't mix
On Fri Sep 05 08:26:34 2008, [EMAIL PROTECTED] wrote: Rakudo r30787 dies on multi dispatch when subset types are involved: test file: subset Even of Int where { $_ % 2 == 0 }; subset Odd of Int where { $_ % 2 == 1 }; multi sub test_subtypes(Even $y){ 'Even' } multi sub test_subtypes(Odd $y){ 'Odd' } say test_subtypes(3) dies with No applicable methods. I just checked this after further fixes to Perl6MultiSub and am happy to say that as of r32528 this now works (whether that's the revision it started working in, I'm not sure - but it does the Right Thing.) Thanks! Jonathan
[perl #58388] [BUG] Num typecheck doesn't accept integers
On Wed Aug 27 02:29:23 2008, stifynsemons wrote: my Num $x = 3; causes a typecheck failure, whereas: Fixed in r32528. Thanks, Jonathan
[perl #59484] [TODO] Implement $?PACKAGE in Rakudo
On Tue Sep 30 06:04:03 2008, masak wrote: ...as described in S02: http://perlcabal.org/syn/S02.html#line_1944 Package declarations are not implemented yet, but even without them, $?PACKAGE could be useful in the following case: class A { say This is class $?PACKAGE } Implemented in r32567; for the example you give here we now get the output This is class A. Note that of you've got a reference to the namespace, not the proto-object, which is what you'll be able to get (IIUC) when $?CLASS is done. Jonathan
[perl #60356] Rakudo doesn't allow inheriting from classes with :: in the name
On Wed Nov 05 21:38:15 2008, chrisdolan wrote: ... and here's a patch to Rakudo's actions.pm to implement the fix. I would be very happy if someone more experienced with NQP and PAST looked over the patch to see if there's a better way to do this. Looks to be pretty much what I'd have done myself, for what that counts for. :-) I haven't figured out the spec tests yet, so I only tested with the following one-liner: ./perl6 -e 'class A::B { method foo { say Foo; } }; class A::B::C is A::B {}; A::B::C.new.foo' It passed the spectests that moritz++ wrote too. So, patch applied in r32376, and the spectests are untodo'd. Thanks, Jonathan
[perl #59104] export sub from used module is broken if make pir
On Sat Sep 20 01:25:09 2008, moritz wrote: On Fri Sep 19 22:45:29 2008, ihrd wrote: Hi, I compile parrot r31282 and November do not export sub from modules on pir (in r31264 the same situation): I suspect that could be related to r31226 | jonathan | 2008-09-18 12:46:58 +0200 (Thu, 18 Sep 2008) | 1 line [rakudo] Make use happen at BEGIN time. This lets us use modules that contain classes. However, we still have various issues to follow up on with this (for example, making it work when you use a module that does a use itself, which gives very odd errors at the moment, and making this play well when a pre-compiled modul e does a use). Yes, it was. I've now in r32325 done something that gives us the best of both worlds, so you can still use classes written in modules (pre-compiled ones too) but pre-compiled PIR modules work again. We'll want to re-visit it at some point in the future, but for now this un-breaks what was broken before. Hope this helps! Jonathan
[perl #57446] Enums of only one element don't work i rakudo
On Sat Aug 02 13:02:39 2008, pmichaud wrote: On Wed, Jul 30, 2008 at 10:46:27PM -0700, Carl Mäsak wrote: $ svn info | grep Revi Revision: 29902 $ ./perl6 -e 'enum WeekdayMonday Tuesday;' # works $ ./perl6 -e 'enum WeekdayMonday;' # doesn't get_pmc_keyed() not implemented in class 'Perl6Str' [...] Likewise, $ ./perl6 -e 'enum A B C' # works $ ./perl6 -e 'enum A' # doesn't get_pmc_keyed() not implemented in class 'Perl6Str' [...] I suspect the problem is that the enum code is expecting the angles to always return a List. Instead it should probably be evaluating what it gets in list context. Yes, indeedy. Fixed in r32329, plus added some tests for this case. Jonathan
[perl #59928] Calling methods in many-jointed classes doesn't work
On Thu Oct 16 10:22:06 2008, masak wrote: Moritz (), Carl (): Rakudo r31994 can call methods on classes without :: in them, but not on classes having them. $ perl6 -e 'class A { method foo { say OH HAI } }; A.new.foo' OH HAI $ perl6 -e 'class A::B { method foo { say OH HAI } }; A::B.new.foo' Method 'foo' not found for invocant of class 'A;B' [...] We clearly need more OO tests. Care to add that one (as TODO) to one of the S12 tests that is included in `make spectest`? I added the new test file t/spec/S12-class/namespaced.t -- feel free to merge it (and its single test) into another test file. I'm not sure I got the TODO fudging right. In r32333 I got this passing and added the (now unfudged) test to spectest_regression. Thanks, Jonathan
[perl #60176] Rakudo fails on defining classes with core roles
On Mon Oct 27 10:55:52 2008, masak wrote: Rakudo r32151 can't create classes with roles from the Rakudo-defined classes. $ ./perl6 -e 'role B {}; class A does B {}' # this works $ perl6 -e 'class A does Int {}' # this doesn't Method 'methods' not found [...] Now, Int is a class in Rakudo, so I'm not 100% sure this should work. Still, strange error message. At the moment Int is not a Role, so I would not expect this to work. The error message sucked, I agree - it's now as of r32335 'does keyword can only be used with roles'. I'm not sure what to do with this ticket now - the error message is improved. But should Int become a role? If so, maybe we rename the ticket to do that? Jonathan
[perl #60008] @array ~~ / regexp / do not work properly, look like array stratification there
On Mon Oct 20 06:11:17 2008, ihrd wrote: my @a = ('a', 'b' ); say @a ~~ / 'b' /?? ':)' !! ':('; # :) say @a ~~ / ^ 'b' /?? ':)' !! ':('; # :( say @a ~~ / ^ 'a' /?? ':)' !! ':('; # :) say @a ~~ / ^ 'a' $ / ?? ':)' !! ':('; # :( They're all smiling as of r32328. Spasibo, Jonathan
[perl #58918] [BUG] Can't use a subdir class twice
On Tue Sep 16 05:36:02 2008, stifynsemons wrote: In r31096, use allows a program to use module A and module B, and allows module B to use module A, when module A defines a method as long as all three files are in the same directory. However, when you try and put module A and module B in the Lib subdirectory and use them as Lib::A and Lib::B, then rakudo complains with: A method named 'test' already exists in class 'A'. It may have been supplied by a role. current instr.: 'parrot;PCT::HLLCompiler;evalpmc' pc 10631758 ((unknown file):-1) perl6(18090) malloc: *** error for object 0x315ad60: double free *** set a breakpoint in malloc_error_break to debug Segmentation fault The attached file illustrates the problem. I unpacked those and ran it, and it runs without errors now (I added a print statement in test.p6 to make sure that it actually survived too!) I did a fix for a related issue earlier today, so that one may have done it, or it may have been something someone else did. But this appears to be resolved. Thanks, Jonathan
[perl #60160] [BUG] [PATCH] recursive use causes infinite loop.
On Sun Oct 26 19:55:51 2008, [EMAIL PROTECTED] wrote: The following simple test involves two .pm files that depend on each other. In revision 32120, this causes an infinite loop. The attached trivial patch prevents the loop by making Rakudo mark the modules as loaded before parsing them. This is how Perl5 behaves. Looks good to me; applied in r32327. Thanks! Jonathan
[perl #60190] [BUG] problems with the compiler-option -O2 on a 64bit-system
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #60190] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=60190 Hello I want to build parrot-RPMs on a 64bit system under Fedora 9 for the parrot-version 0.8.0. The command make rpms failed. The reason is that the compiler-option -O2 prevent building parrot with languages on a 64bit system. The following commands shows this problem: perl Configure.pl --optimize=-O2 ... make perl6 ... gmake -C compilers/tge gmake[1]: Entering directory `/home/gz016/parrot-sources/test2/parrot-0.8.0/compilers/tge' ../../parrot ../../runtime/parrot/library/PGE/Perl6Grammar.pbc --output=TGE/Parser.pir TGE/Parser.pg gmake[1]: *** [TGE/Parser.pir] Segmentation fault gmake[1]: Leaving directory `/home/gz016/parrot-sources/test2/parrot-0.8.0/compilers/tge' make: *** [compilers.dummy] Error 2 So I build the RPMs without the compiler-option -O2. But perhaps there will someone be able to find a way to solve this problem. Gerd Pokorra
[perl #60006] [BUG] there is a problem with the function die
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #60006] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=60006 Hello! There is a problem with the function die in Rakudo. I tried the function die under Windows and Linux. Under both OS it don't work. Gerd Pokorra [EMAIL PROTECTED] parrot]$ ./parrot languages/perl6/perl6.pbc -e die Died current instr.: 'die' pc 13123 (src/gen_builtins.pir:8122) called from Sub '_block11' pc 17 (EVAL_12:11) called from Sub 'parrot;PCT;HLLCompiler;eval' pc 851 (src/PCT/HLLCompiler.pir:494) called from Sub 'parrot;PCT;HLLCompiler;command_line' pc 1342 (src/PCT/HLLCompiler.pir:721) called from Sub 'parrot;Perl6;Compiler;main' pc 17106 (perl6.pir:179) [EMAIL PROTECTED] parrot]$ [EMAIL PROTECTED] parrot]$ [EMAIL PROTECTED] parrot]$ svn info Pfad: . URL: http://svn.perl.org/parrot/trunk Basis des Projektarchivs: http://svn.perl.org/parrot UUID des Projektarchivs: d31e2699-5ff4-0310-a27c-f18f2fbe73fe Revision: 31923 Knotentyp: Verzeichnis Plan: normal Letzter Autor: bernhard Letzte geänderte Rev: 31923 Letztes Änderungsdatum: 2008-10-13 12:45:09 +0200 (Mo, 13 Okt 2008) [EMAIL PROTECTED] parrot]$
[perl #60016] [PATCH] Make basic Perl 6 tests pass
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #60016] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=60016 If you do this after building parrot: cd languages/perl6 make test This basic test suite will fail. That's because of this test program: t/00-parrot/06-op-inplace.t It was written before modules could be loaded and manually printed out ok $num lines, but it did so out of sequence. This causes Test::Harness to note a parse error and report a failure for the test suite, even though all tests pass. I've updated it to use Test and output test numbers in sequence without altering the semantics of the test. make test in languages/perl6 now passes on my MacBook. Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog- http://use.perl.org/~Ovid/journal/ Twitter - http://twitter.com/OvidPerl Official Perl 6 Wiki - http://www.perlfoundation.org/perl6 perl6tests.patch Description: Binary data
[perl #60018] [PATCH] Update README test information
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #60018] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=60018 I was having trouble figuring out how to run individual tests. Moritz Lenz explained the correct way of handling this, so this patch adds that information to the README so that others won't have to bug the list (not that they'll read that :) Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog- http://use.perl.org/~Ovid/journal/ Twitter - http://twitter.com/OvidPerl Official Perl 6 Wiki - http://www.perlfoundation.org/perl6 perl6readme.patch Description: Binary data
[perl #59918] Re: building parrot
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #59918] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=59918 On Wed, Oct 15, 2008 at 9:52 AM, Will Coleda [EMAIL PROTECTED] wrote: Do you have a previously installed parrot? It's possible that we're inadvertently linking against the installed libparrot instead of the one in your build dir. No file by that name on the box anywhere. Mike -- Michael P. Soulier [EMAIL PROTECTED] Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction. --Albert Einstein
[perl #59790] t/stm/basic_mt.t #4 hangs under cygwin since svn 31655-ish
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #59790] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=59790 perl t/stm/basic_mt.t hangs since about October 5 under cygwin. This is reproducible directly from the command line (perl t/stm/basic_mt.t). It's parrot that's hanging. I looked around and it looks like the TAP modules can't mark a test as needing a timeout (so to speak), so it hangs the smoke tests until parrot.exe is killed manually. I run the cygwin smoke tests nightly in the hopes that its useful, and to poke around with parrot as it evolves, so I think my estimation of the svn rev where it started hanging is accurate +/- 20 revs. Krishna Sethuraman [EMAIL PROTECTED] Summary of my parrot 0.7.1 (r31839) configuration: configdate='Thu Oct 9 20:04:04 2008 GMT' Platform: osname=cygwin, archname=i686-cygwin-thread-multi-64int jitcapable=1, jitarchname=i386-cygwin, jitosname=CYGWIN, jitcpuarch=i386 execcapable=1 perl=/usr/bin/perl.exe Compiler: cc='ccache gcc', ccflags='-U__STRICT_ANSI__ -pipe -I/usr/local/include -DHASATTRIBUTE_CONST -DHASATTRIBUTE_DEPRECATED -DHASATTRIBUTE_MALLOC -DHASATTRIBUTE_NONNULL -DHASATTRIBUTE_NORETURN -DHASATTRIBUTE_PURE -DHASATTRIBUTE_UNUSED -DHASATTRIBUTE_WARN_UNUSED_RESULT -falign-functions=16 -maccumulate-outgoing-args -W -Wall -Waggregate-return -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wdisabled-optimization -Wendif-labels -Wextra -Wformat -Wformat-extra-args -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimplicit -Wimport -Winit-self -Winline -Winvalid-pch -Wmissing-braces -Wno-missing-format-attribute -Wpacked -Wparentheses -Wpointer-arith -Wreturn-type -Wsequence-point -Wno-shadow -Wsign-compare -Wstrict-aliasing -Wstrict-aliasing=2 -Wswitch -Wswitch-default -Wtrigraphs -Wundef -Wunknown-pragmas -Wno-unused -Wwrite-strings -Wbad-function-cast -Wdeclaration-after-statement -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wnonnull', Linker and Libraries: ld='gcc', ldflags=' -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--stack,8388608 -Wl,--enable-auto-image-base -L/usr/local/lib', cc_ldflags='', libs='-ldl -lcrypt -lgmp' Dynamic Linking: share_ext='.dll', ld_share_flags='-shared', load_ext='.dll', ld_load_flags='-shared' Types: iv=long, intvalsize=4, intsize=4, opcode_t=long, opcode_t_size=4, ptrsize=4, ptr_alignment=1 byteorder=1234, nv=double, numvalsize=8, doublesize=8 --- Environment: HOME =//sjcnetapp/home/ksethura LANG (unset) LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH =/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/c/Perl/site/bin:/ cygdrive/c/Perl/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cy gdrive/c/WINDOWS/system32/wbem:/cygdrive/c/program files/common files/roxio shared/dllshared/:/cygdrive/c/program files/perforce:/cygdrive/c/program files/rational/common:/cygdrive/c/program files/rational/clearcase/bin SHELL (unset)
[perl #58998] [TODO] remove underscores from numbers to make imcc happy
On Thu Sep 18 00:49:59 2008, [EMAIL PROTECTED] wrote: r31220: say 23_433 23433 say 23_433.4_4 error:imcc:syntax error, unexpected IDENTIFIER, expecting '\n' ('_433') in file 'EVAL_13' line 12 23 Obviously the underscores in the fractional part of the number needs to be stripped by rakudo before emitting them as PIR. Fixed in r31225. I was going to say add a test, but 6 just started passing unexpectedly! :-) Thanks, Jonathan
[perl #58936] [TODO] promote 'use' to happen at compile time
On Tue Sep 16 13:04:11 2008, [EMAIL PROTECTED] wrote: ... But move class Dog { ... } into Dog.pm and import it with 'use Dog;' and Rakudo is like 'Attempt to inherit from non-existent parent class'. This bug is like fixed. Well, kinda. Your example now runs. However, modules using modules then causes some fun (though I'm not convinced this change has made the situation worse), and this won't play so nicely with pre-compiled modules. Those'll want tickets of their own, though, so resolving this ticket since use has been promoted to happen at runtime now. Thanks, Jonathan
[perl #58924] [BUG] my %a; %ai = 't'; for keys %a { .say } misbehaving
On Tue Sep 16 08:56:29 2008, cognominal wrote: It prints 0\n instead of the expected i\n Fixed this in 31227, and values, and also cleaned up kv. They are now multis that we use !EXPORT on (kv had been written specially rather than just exporting the kv method on Mapping - just deleted that and added it to export list). Fixing these passes us another 8 TODO'd spectests. w00t. Thanks, Jonathan
[perl #58824] Inheriting from imported classes is broken in Rakudo
On Sat Sep 13 03:41:27 2008, masak wrote: Rakudo r31066 is experiencing problems with classes defined in used modules. $ perl6 -e 'class A {}; class B is A {}' # this works $ cat A.pm # but... put the class A in a file... class A {} $ ./perl6 -e 'use A; class B is A {}' # ...and it stops working Attempt to inherit from non-existent parent class [...] Ah, I fixed a dupe of this ticket earlier on today - use wasn't being done at compile time, but rather at runtime. Just checked and this now works, so resolving ticket. Thanks, Jonathan
[perl #58828] Make calleable -sigil parameters work in rakudo
On Sat Sep 13 04:33:53 2008, masak wrote: In Rakudo r31066, this works... $ ./perl6 -e 'sub a($b) { $b(5) }; a(say)' # cool! 5 ...but not the following: bacek rakudo: sub a(b) { b(5) }; a(say) polyglotbot OUTPUT[Could not find non-existent sub bcurrent instr.: 'a' pc 139 (EVAL_15:63)called from Sub '_block11' pc 27 (EVAL_15:15)called from Sub 'parrot;PCT::HLLCompiler;eval' pc 806 (src/PCT/HLLCompiler.pir:481)called from Sub 'parrot;PCT::HLLCompiler;evalfiles' pc 1078 polyglotbot ..(src/PCT/HLLCompiler.pir:610)called from Sub 'parrot;PCT::HLLCompiler;comma... bacek this is definitely not-yet-implemented-rakudo-feature bacek It should work according to S06 kthxbai. OH HAI...you can haz fix in r31228. Plz I can haz spectests so we avoidz regreshuns? kthxbai, Jonathan
[perl #58958] Build of 0.7.1 fails with Intel compiler on Linux
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #58958] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=58958 I'm trying to build Parrot 0.7.1 with Intel Compiler (see version information below). The operating system is Ubuntu 8.04, 64-bit. Build succeeds with GCC (4.2.3 installed). Parameters to Configure.pl are as follows: perl Configure.pl --cc=icc --cxx=icc --ld=icc I have four versions installed under /opt: 9.1.042 in 32 and 64-bit; 10.1.015 in 32 and 64-bit. (Switching between them using the method recommended by Intel: source iccvars.sh.) I have been successful in compiling previous versions of Parrot with icc in the past; I think 0.6.4 was the last one that worked. For both 32-bit versions, Configure.pl fails at: --cut-- init::manifest - Check MANIFEST.done. init::defaults - Set Configure's default values.done. init::install - Set up installation paths..done. init::miniparrot -Tweak settings for miniparrot...skipped. init::hints - Load platform and local hints filesdone. init::headers - Find header files distributed with Parrot..done. inter::progs -Determine what C compiler and linker to use...Compilation failed with 'icc' --cut-- I have been unable to enable Configure.pl to produce more output, or the error messages themselves. 32-bit icc works fine when compiling other programs on the same system. For 64-bit 9.1.042 and 10.1.015, I get the following error: --cut-- /usr/bin/perl5.8.8 tools/build/c2str.pl --all src/string.c src/ops/core_ops.c src/ops/core_ops_switch.c src/byteorder.c src/charset.c src/core_pmcs.c src/cpu_dep.c src/datatypes.c src/debug.c src/debug.c(1384): warning #593: variable regleft was set but never used unsigned charregleft; ^ src/dynext.c src/embed.c src/encoding.c src/events.c src/exceptions.c src/exceptions.c(74): error: identifier _CONST_STRING_74 is undefined VTABLE_set_integer_keyed_str(interp, exception, ^ src/exceptions.c(76): error: identifier _CONST_STRING_76 is undefined VTABLE_set_integer_keyed_str(interp, exception, ^ src/exceptions.c(106): error: identifier _CONST_STRING_106 is undefined const INTVAL severity = VTABLE_get_integer_keyed_str(interp, ^ src/exceptions.c(125): error: identifier _CONST_STRING_125 is undefined exit_status = VTABLE_get_integer_keyed_str(interp, ^ src/exceptions.c(276): error: identifier _CONST_STRING_276 is undefined int exitcode = VTABLE_get_integer_keyed_str(interp, exception, ^ src/exceptions.c(287): warning #191: type qualifier is meaningless on cast type (Parrot_runloop * const)VTABLE_get_pointer(interp, handler); ^ src/exceptions.c(401): error: identifier _CONST_STRING_401 is undefined VTABLE_set_integer_keyed_str(interp, exception, ^ compilation aborted for src/exceptions.c (code 2) make: *** [src/exceptions.o] Error 2 --cut-- Will provide more information on request. -- Ville Koskinen
[perl #58936] [TODO]
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #58936] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=58936 With Rakudo 0.7.0-devel r31065 inheritance works as in this single file: class Dog { has $.name is rw; method bark() { say $.name says Woof!; } } class Pug is Dog { method set_name( $n ) { $.name = $n; } } my $pot = Pug.new(); $pot.set_name( 'Spot' ); $pot.bark(); But move class Dog { ... } into Dog.pm and import it with 'use Dog;' and Rakudo is like 'Attempt to inherit from non-existent parent class'. On 2008-09-16 in #perl6 moritz explains that 'use' happens (erroneously) at run time whereas it should happen at compile time, and gives a workaround 'BEGIN { use Dog; };' that works. Synopsis 11 topic Runtime Importation contrasts 'use' and 'require' in terms of time. This request is to obviate the workaround.
[perl #58150] Doing split on the result of a slurped empty file results in a Null PMC Access in rakudo
On Fri Aug 29 13:14:19 2008, ronaldxs wrote: $ empty ./perl6 -e 'say split(\n, $*IN.slurp)' # but this fails Two proposed patches attached. The patch to src/pmc/parrotiio.pmc seems to fix the problem as originally stated. Then the patch to languages/perl6/src/classes/Str.pir seems to fix 'say $*IN.slurp.split(\n)'. If you have any questions please ask. Thanks for the patches! The first one to ParrotIO, I fully agree with so I have applied it in r30981 (if you slurp an empty file, the empty string would seem a much more sensible and predictable result than a NULL string, which suggests something went wrong with the read). And this fixes the test that was originally submitted for this ticket. :-) The second patch was not quite correct - we need to have it :multi for when we implement the regex variant. I changed it to: .sub 'split' :method :multi('String') So it's a bit more liberal about what sorts of strings it gets for now. Thanks! Jonathan
[perl #58602] subset types and multi dispatch don't mix
On Fri Sep 05 08:26:34 2008, [EMAIL PROTECTED] wrote: Rakudo r30787 dies on multi dispatch when subset types are involved: Yes; this ticket depends on us switching over to the new multi-dispatcher (perl6multisub.pmc), which does handle this case. I hope to get that sorted out in the near future. Thanks, Jonathan
[perl #58012] Empty contextualizer @() should be same as @($/)
Hi, This is implemented in r30983, as are $() and %() (which mean $($/) and %($/) respectively). Also unfudge'd a spec test. Jonathan
[perl #58012] Empty contextualizer @() should be same as @($/)
Hi, This is implemented in r30983, as are $() and %() (which mean $($/) and %($/) respectively). Also unfudge'd a spec test. Jonathan
[perl #58012] Empty contextualizer @() should be same as @($/)
Hi, This is implemented in r30983, as are $() and %() (which mean $($/) and %($/) respectively). Also unfudge'd a spec test. Jonathan
[perl #58012] Empty contextualizer @() should be same as @($/)
Hi, This is implemented in r30983, as are $() and %() (which mean $($/) and %($/) respectively). Also unfudge'd a spec test. Jonathan
[perl #57338] parrot segfaults after nonexistent method is called from within sub invoked without parens in rakudo
On Sun Jul 27 08:06:04 2008, masak wrote: This also works, but segfaults: $ ./perl6 -e 'class A {}; sub c { say A.new.b() }; c' Method 'b' not found for invocant of class 'A' current instr.: 'c' pc 99 (EVAL_13:42) called from Sub '_block11' pc 17 (EVAL_13:11) called from Sub 'parrot;PCT::HLLCompiler;eval' pc 806 (src/PCT/HLLCompiler.pir:481) called from Sub 'parrot;PCT::HLLCompiler;command_line' pc 1305 (src/PCT/HLLCompiler.pir:708) called from Sub 'parrot;Perl6::Compiler;main' pc 14567 (perl6.pir:172) perl6(27149) malloc: *** error for object 0xcc2e40: double free *** set a breakpoint in malloc_error_break to debug Segmentation fault Is this still an issue - I think I saw something to the effect taht the double free had been resolved recently-ish? Thanks, Jonathan
[perl #58558] Implement stubby exception generators in Rakudo
On Wed Sep 03 11:10:21 2008, masak wrote: Implement the '...', '???' and '!!!' operators, as described in S03:1691. I've just done in r30980 the argumentless case of '...': sub foo { ... } my $x = foo(); say $x; Attempt to execute stub code (...). The argument version needs a bit more work as it needs the args rule from STD.pm, and we can't do !!! and ??? in Rakudo yet because it ends up getting parsed as three prefix:! or prefix:? by the operator precedence parser. That probably waits on a hack (same one needed for - to work on RHS) or LTM, if I'm understanding what's going on correctly. So, ticket should stay open while we do the rest, but this is the first piece of the puzzle, and hopefully useful. Thanks, Jonathan
[perl #57858] $/ is de-defined in if blocks in rakudo
Hi, All broken examples in this ticket now work as or r22207. Thanks, Jonathan
[perl #58352] The inside of a while loop loses $/ in Rakduo
On Wed Aug 27 02:10:10 2008, moritz wrote: On Mon Aug 25 01:37:17 2008, masak wrote: r30528: $ ./perl6 -e 'while (test ~~ /(es)/) { say $0; exit; }' Null PMC access in get_pmc_keyed_int() [...] Segmentation fault FWIW, the error shows up in r30503, whose slightly Orwellian message reads [rakudo] allow access to $/, $!, $_ in while loops, closes RT #58306. FYI I added tests for that to t/spec/S05-match/blocks.t This was resolved in a commit earlier today (same one that fixed a very similar bug in if blocks). Also now unskipped some tests in the mentioned test file. Thanks, Jonathan
[perl #58678] [BUG] defining a regex after a grammar places the regex in the grammar namespace
On Mon Sep 08 09:08:50 2008, [EMAIL PROTECTED] wrote: Rakudo, r30888. When defining a grammar and regex, defining a regex after a grammar places the regex in the grammar namespace, but vice versa works fine. Below is some demo code (switch the definition placements and comment out the check against Foo::Bar to see it magically work): grammar Foo { rule TOP {\d+} }; regex Bar {\d+}; # smart match against Foo may change based on RT 58676 '123' ~~ Foo; say $/; '1234' ~~ Foo::Bar; # works?!? say $/; '12345' ~~ Bar; # fails say $/; Ah yes, forgot to clear the thingy holding the current namespace. Fixed it in r31006; if you have time to contribute a test for this somewhere, that'd be wonderful. Thanks for reporting, Jonathan
[perl #58392] Recursion and for loops interact badly in Rakudo
Hi, Here is a pure PIR example that doesn't depend on Rakudo at all. .sub main :main $P0 = new 'Integer' $P0 = 2 'f'($P0) .end .sub 'f' .param pmc l .lex $l, l $P0 = find_lex $l if $P0 = 0 goto ret print entering $P1 = find_lex $l say $P1 $I0 = 1 for: if $I0 3 goto for_end '_block1'() inc $I0 goto for for_end: ret: .end .sub '_block1' :outer('f') $P2 = find_lex $l $P3 = new 'Integer' $P3 = $P2 - 1 'f'($P3) print looping in $P4 = find_lex $l say $P4 .end Gives the same erroneous output as the Rakudo program. Jonathan
[perl #58726] [PATCH] add the option encoding to Configure.pl
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #58726] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=58726 Hello, this patch adds the option encoding to the configuration of Parrot: perl Configure.pl --encoding=UTF-8 According to this option a line like the following will be generated in the file include/parrot/config.h: #define PARROT_DEF_ENCODING UTF-8 In the function Parrot_charsets_encodings_init according to the macro the function Parrot_make_default_encoding will be called to set the specified default encoding. I attached a tar-file that holds one patch file (generated with diff -u) for each modified file. Gerd Pokorra patch.tar Description: Unix tar archive
[perl #58354] [PATCH] for the file parrot.spec
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #58354] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=58354 Hello, this patch removes the file parrot-config from parrot.spec, because it will no longer installed. Gerd Pokorra patch.tar Description: Unix tar archive
[perl #58004] Investigate junction of code object failures (S03-junctions/misc.t)
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #58004] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=58004 - Likely depends on junction dispatcher
[perl #57970] Finish implementing radix notation (see S02-literals/radix.t for details)
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #57970] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=57970 - C code in Perl6Str.pmc needs refactoring and updating
[perl #58014] Implement NaN and Inf
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #58014] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=58014 - Need to determine if Parrot will support NaN/Inf directly, or if Rakudo should write these
[perl #57964]
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #57964] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=57964
[perl #57972] Implement eqv and === operators
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #57972] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=57972 - No dependencies
[perl #57966] Implement Whatever (
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #57966] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=57966
[perl #57974] Implement missing infix:xx= operator
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #57974] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=57974 - Awaiting parser improvements to properly parse and handle infix_postfix_meta_operator
[perl #57980] Fix bugs with nested ?? !!
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #57980] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=57980 - Awaiting parser improvements (PGE)
[perl #57976] Implement infix:orelse
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #57976] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=57976 - Requires some specialized structures, perhaps a new PAST::Op pasttype (PCT)
[perl #57978] Implement last/redo/next/continue control exceptions
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #57978] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=57978 - Needs last/redo/next/continue exceptions in PCT (PCT)
[perl #57984] Finish implementing given and check/fix tests in S04-statements\given.t
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #57984] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=57984 - Need resumable exceptions (Parrot)
[perl #57982] Fix lambda expression parse bug when used as rvalue
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #57982] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=57982 - Needs parser/PGE fix (PGE)
[perl #58012] Empty contextualizer @() should be same as @($/)
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #58012] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=58012 - File an RT ticket for this with test case
[perl #58010] Implement ::?CLASS
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #58010] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=58010 - Update in actions.pm to define compiler variable
[perl #57986] ) in array indexes
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #57986] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=57986 - need an implementation of Whatever
[perl #58002] Implement state variables
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #58002] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=58002 - Need to fix lexical and initialization issues (Parrot)
[perl #58020] Fix problem with using Str as a type constraint or in MMD
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #58020] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=58020 - File an RT ticket for this?
[perl #57968] Fix issues with Int type constraint and Integer PMCs
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #57968] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=57968 - awaiting .HLL capabilities
[perl #57996] Make m/.../ syntax for constructing a regex work
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #57996] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=57996 - Update grammar.pg (short-term), or wait for STD.pm integration
[perl #58018] Fix MMD-related bugs in S03-operators\range.t
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #58018] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=58018 - Need to refactor comparison ops in rakudo to avoid or handle 'cmp'
[perl #58000] Comparison operators on junctions should return junction of True/False
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #58000] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=58000 - Needs junction dispatcher
[perl #58022] Implement return type coercion (as) and constraint (of)
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #58022] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=58022
[perl #57998] Fix modulo bugs and MMD-related bugs for += and -= (S03-operators\arith.t)
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #57998] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=57998 - Awaiting parser improvements to properly parse and handle infix_postfix_meta_operator
[perl #58006] Fix .{key} parsefail when (hash index into $_)
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #58006] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=58006 - likely parser bug (Rakudo grammar.pg)
[perl #57990] Implement prefix:\ operator
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #57990] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=57990 - Need some clarity in spec and spectests for Capture objects
[perl #58008] Implement loops and conditionals taking pointy blocks
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #58008] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=58008 - Needs some minor PCT updates (PCT)
[perl #57988] Implement Rat data type
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #57988] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=57988 - awaiting clearer spec/understanding of the relationship between Num and Rat
[perl #57992] Implement infinite ranges
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #57992] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=57992 - awaiting Whatever implementation
[perl #58024] Implement .perl on code objects
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #58024] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=58024 - Need a clarification of what .perl should return here
[perl #56748] [BUG] Null PMC access in type()
On Wed Jul 09 10:48:19 2008, [EMAIL PROTECTED] wrote: I found a small piece of code that reproduces the Null PMC access in type() error: sub f(Int $n){ if ($n = 0 ){ f($n-1); } } f(0); produces the above error on parrot + rakudo r29207, Debian GNU Linux i386 32bit. I fixed a while ago the bug that prevented us seeing the real exception. Today I have fixed the root cause of this, which was the type check failure. So this now runs as it should (I stuck a say $n in and tried it with f(4) and so forth, and it works as expected). Thanks, Jonathan
[perl #56944] [BUG] integer arithmtics should result in integers
On Tue Jul 15 04:12:36 2008, [EMAIL PROTECTED] wrote: Rakudo r29470: $ ../../parrot perl6.pbc -e 'say (1+1).WHAT' Num $ ../../parrot perl6.pbc -e 'say (1*1).WHAT' Num $ ../../parrot perl6.pbc -e 'say (1**1).WHAT' Num All of these should print Int instead. And they do as of r30092. Thanks! Jonathan
[perl #54736] error on winxp with perl6.exe 0.6.2
Hi, On Fri May 23 14:26:47 2008, [EMAIL PROTECTED] wrote: a simple say 6; throws Null PMC access in isa() current instr.: 'parrot;Perl6Object;make_proto' pc 58 (src/gen_builtins.pir:81) called from Sub 'parrot;Perl6Str;onload' pc 1181 (src/gen_builtins.pir:804) called from Sub 'parrot;Perl6::Compiler;main' pc -1 ((unknown file):-1) This bug dates back to 0.6.2 - can you give it another try now and see if this problem is gone? Thanks! Jonathan
[perl #56014] bug in spectest_regression
On Sun Jun 29 14:06:44 2008, pmichaud wrote: On Wed Jun 18 09:38:09 2008, [EMAIL PROTECTED] wrote: A test in spectest_regression failed, It was in S02-polymorphic_types: I'm running on Win32 (XP SP2), parrot/perl6 was built with Visual Studio 9 Express and Activestate 5.8 Output is below: t\spec\S02-polymorphic_types\subset-code...ok t\spec\S02-polymorphic_types\subset-range..ok 5/6set_pmc_keyed_str() not impleme nted in class 'Key' current instr.: 'eval_dies_ok' pc 1623 (EVAL_18:648) called from Sub '_block11' pc 151 (EVAL_12:43) called from Sub 'parrot;PCT::HLLCompiler;eval' pc 806 (src\PCT\HLLCompiler.pir:4 81) called from Sub 'parrot;PCT::HLLCompiler;evalfiles' pc 1088 (src\PCT\HLLCompiler .pir:610) called from Sub 'parrot;PCT::HLLCompiler;command_line' pc 1267 (src\PCT\HLLCompi ler.pir:699) called from Sub 'parrot;Perl6::Compiler;main' pc 11945 (perl6.pir:173) t\spec\S02-polymorphic_types\subset-range..dubious Test returned status 1 (wstat 256, 0x100) DIED. FAILED test 6 Charlie Could you perhaps try again with an updated version of Rakudo Perl? I'm thinking this bug may have been resolved but don't have an easy way to check under the environment you're running. I'm on WinXP and using the MSVC++ compiler and the ActiveState Perl 5.8, and don't see this issue. If there's no followup on this for the next week or so I suggest we assume this is resolved and close it. Thanks, Jonathan
[perl #56618] [BUG] rakudo segfaults calling subs in a module
On Sun Jul 06 10:13:15 2008, jhorwitz wrote: excellent, this fixes my problem. do we want to close out this ticket and let RT #47956 handle the rest, or are there still some lingering issues to address with :instanceof? Maybe, but we're not using it for the moment and there's some larger design discussions to be had around this stuff. So I think we can close this ticket now the issue it reports is resolved, and any :instanceof issues can have tickets of their own. Thanks, Jonathan
[perl #57388] Namespaces don't work in class declarations
On Tue Jul 29 11:27:34 2008, [EMAIL PROTECTED] wrote: Hi there, declaring classes in other namespaces except the toplevel one results in emtpy classes (revision 29850). This code: class Foo::Bar { method foo {} } my $b = Foo::Bar.new; $b.foo; Gives this stacktrace Method 'foo' not found for invocant of class 'Foo::Bar' Thanks for reporting; this is resolved in r30105. Jonathan
[perl #57340] Empty {} or pair {1=2} does not create anonymous hash in rakudo
On Sun Jul 27 08:27:18 2008, masak wrote: From S06 http://dev.perl.org/perl6/doc/design/syn/S06.html: ] {...} is always a block. However, if it is completely empty or consists ] of a single list, the first element of which is either a hash or a pair, it ] is executed immediately to compose a Hash object. ] ] [...] ] ] $obj = { 1=2, 3=4, 5=6 }; # Anonymous hash Rakudo is not up to spec on this point: $ ./perl6 -e 'my $a = { 1 = 2 }; say $a1' get_pmc_keyed() not implemented in class 'Closure' This and the other cases that are mentioned in the bit of spec you quoted are implemented as of r30104. Thanks, Jonathan
[perl #57422] Assigning to instance hashes,arrays fails
Hi, As of r30090, the following: -- class Foo { has %.bar is rw; method set_bar { %.bara = 'baz'; } } my $foo = Foo.new; $foo.set_bar(); my %s = $foo.bar; say %sa; -- Now prints baz. Also this: -- class Bar { has @.bar is rw; method set_bar { @.bar[0] = 100; @.bar[1] = 200; } } my $bar = Bar.new; $bar.set_bar(); my @t = $bar.bar; say @t[0]; say @t[1]; -- Prints 100, then 200. Thanks for reporting! Jonathan
[perl #57652] [BUG] successfull 'when' does not skip the following tests.
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #57652] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=57652 Yesterday, I downloaded and compiled perl6 of parrot-0.6.4. Testing some basic perl6 features, I found this example: my xyz=spot; given $xyz { when 'spot' { say 'is spot';} when /spot/ { say 'contains spot'; } default { say 'unknown'; } } This should print 'is spot'. But, in fact, it prints all three lines: is spot contains spot unknown I hope that this can be fixed easily.
[perl #57626] [BUG] perl6 -e 'say hello' == Segmentation fault
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #57626] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=57626 * Today I downloaded parrot-0.6.4 to my Debian PC. * I also installed the libicu-dev, libicu38 packages before configuration * cd parrot-0.6.4; perl Configure.pl; make; cd languages/perl6; make perl6 * It seems that every program that starts with 'say' produces a Segmentation fault on my system * I will happily provide additional info (if requested) or test newer versions on my PC to verify that the bug is present/gone. Best regards, Yaakov