[perl #75292] Exceptions make the REPL segfault
# New Ticket Created by Moritz Lenz # Please include the string: [perl #75292] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=75292 Everything that produces an exception (doesn't matter if compile time or run time) makes the REPL segfault For example: foo Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7f9c06b7f6f0 (LWP 499)] 0x7f9c06607b62 in Parrot_gc_mark_PMC_alive_fun (interp=0x2c93010, obj=0x3122720) at src/gc/api.c:181 181 VTABLE_mark(interp, obj); backtrace: #0 0x7f9c06607b62 in Parrot_gc_mark_PMC_alive_fun (interp=0x2c93010, obj=0x3122720) at src/gc/api.c:181 #1 0x7f9c066524f8 in Parrot_Exception_mark (interp=0x2c93010, _self=value optimized out) at ./src/pmc/exception.pmc:160 #2 0x7f9c06607b68 in Parrot_gc_mark_PMC_alive_fun (interp=0x2c93010, obj=0x31227e0) at src/gc/api.c:181 #3 0x7f9c0668b4d7 in Parrot_CallContext_mark (interp=0x2c93010, _self=0x3122040) at ./src/pmc/callcontext.pmc:349 #4 0x7f9c06607b68 in Parrot_gc_mark_PMC_alive_fun (interp=0x2c93010, obj=0x3122040) at src/gc/api.c:181 #5 0x7f9c06607b68 in Parrot_gc_mark_PMC_alive_fun (interp=0x2c93010, obj=0x3121b60) at src/gc/api.c:181 #6 0x7f9c0668b4d7 in Parrot_CallContext_mark (interp=0x2c93010, _self=0x3120f40) at ./src/pmc/callcontext.pmc:349 #7 0x7f9c06607b68 in Parrot_gc_mark_PMC_alive_fun (interp=0x2c93010, obj=0x3120f40) at src/gc/api.c:181 #8 0x7f9c06607b68 in Parrot_gc_mark_PMC_alive_fun (interp=0x2c93010, obj=0x3120ac0) at src/gc/api.c:181 #9 0x7f9c0668b4d7 in Parrot_CallContext_mark (interp=0x2c93010, _self=0x311ff40) at ./src/pmc/callcontext.pmc:349 #10 0x7f9c06607b68 in Parrot_gc_mark_PMC_alive_fun (interp=0x2c93010, obj=0x311ff40) at src/gc/api.c:181 #11 0x7f9c06607b68 in Parrot_gc_mark_PMC_alive_fun (interp=0x2c93010, and so on, recursively Cheers, Mooritz
[perl #75296] [BUG] Named enums don't have an .enums method returning an EnumMap, but are themselves an EnumMap in Rakudo
# New Ticket Created by Carl Mäsak # Please include the string: [perl #75296] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=75296 isBEKaml we don't have real enum types yet? masak they're not up to spec, no. masak rakudo: enum A a b c; say A.enums.WHAT p6eval rakudo eb84e9: OUTPUT«Method 'enums' not found for invocant of class 'EnumMap' [...] masak rakudo: enum A a b c; say A.WHAT p6eval rakudo eb84e9: OUTPUT«EnumMap()» masak I'm pretty sure that's wrong. * masak submits a rakudobug S12: The C.enums method returns an CEnumMap -- implying that the enum itself is not of this type, but that it wraps an EnumMap.
[perl #75302] Assignment to 'is copy' parameter which holds Whatever has no effect
# New Ticket Created by Moritz Lenz # Please include the string: [perl #75302] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=75302 Can't clear a variable that holds *: 22:21 @moritz_ rakudo: sub f($x is copy) { $x = 'abc'; say $x.WHAT; say $x.perl }; f * 22:21 +p6eval rakudo eb84e9: OUTPUT«Whatever()!whatever_dispatch_helper» Behaves as expected 22:20 @moritz_ rakudo: sub f($x is copy) { $x = Any; say $x.defined; say $x.perl }; f 'a' 22:20 +p6eval rakudo eb84e9: OUTPUT«0Any» Also behaves as expected: 22:20 @moritz_ rakudo: my $x = *; $x = Any; say $x.perl 22:20 +p6eval rakudo eb84e9: OUTPUT«Any»
Rakudo and non-ASCII character classes in rules
I came up with these tests which I though should work: ok(π ~~ /[π]/, π as a character class); ok(π ~~ /[\x03c0]/, π as a character class (hex)); ok(π ~~ /[\x0391 .. \x03c9]/, π in a character class range); ok(π ~~ /\w/, π as a word character); Of those, only the first one actually did work. The others all fail. Am I misunderstanding how these constructs should work? PS: The reason I'm running into this is that my URI matcher for RFC3987 needs to match many large blocks of characters (essentially all non-ascii, valid Unicode codepoints) per the spec at: http://www.ietf.org/rfc/rfc3987.txt Specifically: ucschar= %xA0-D7FF / %xF900-FDCF / %xFDF0-FFEF / %x1-1FFFD / %x2-2FFFD / %x3-3FFFD / %x4-4FFFD / %x5-5FFFD / %x6-6FFFD / %x7-7FFFD / %x8-8FFFD / %x9-9FFFD / %xA-AFFFD / %xB-BFFFD / %xC-CFFFD / %xD-DFFFD / %xE1000-EFFFD Which I tried to translate as: token ucschar { +[\xA0 .. \xD7FF] + [\xF900 .. \xFDCF] + [\xFDF0 .. \xFFEF] + [\x1 .. \x1FFFD] + [\x2 .. \x2FFFD] + [\x3 .. \x3FFFD] + [\x4 .. \x4FFFD] + [\x5 .. \x5FFFD] + [\x6 .. \x6FFFD] + [\x7 .. \x7FFFD] + [\x8 .. \x8FFFD] + [\x9 .. \x9FFFD] + [\xA .. \xAFFFD] + [\xB .. \xBFFFD] + [\xC .. \xCFFFD] + [\xD .. \xDFFFD] + [\xE1000 .. \xEFFFD] } But this refuses to match my test IRI's one-character path: http://www.example.com/π -- Aaron Sherman Email or GTalk: a...@ajs.com http://www.ajs.com/~ajs
Re: Rakudo and non-ASCII character classes in rules
On Mon, May 24, 2010 at 2:40 AM, Aaron Sherman a...@ajs.com wrote: Which I tried to translate as: token ucschar { +[\xA0 .. \xD7FF] + [\xF900 .. \xFDCF] + [\xFDF0 .. \xFFEF] + [\x1 .. \x1FFFD] + [\x2 .. \x2FFFD] + [\x3 .. \x3FFFD] + [\x4 .. \x4FFFD] + [\x5 .. \x5FFFD] + [\x6 .. \x6FFFD] + [\x7 .. \x7FFFD] + [\x8 .. \x8FFFD] + [\x9 .. \x9FFFD] + [\xA .. \xAFFFD] + [\xB .. \xBFFFD] + [\xC .. \xCFFFD] + [\xD .. \xDFFFD] + [\xE1000 .. \xEFFFD] } But this refuses to match my test IRI's one-character path: http://www.example.com/π For testing purposes, I re-wrote this as: token ucschar { -[\ .. ~] } Which isn't great, and certainly is not exactly the same as the above, but at least for my testing it should suffice. Also, I need to do some testing to narrow down how it happened, but I found a case where $x eq $y failed but ~$x eq $y succeeded, indicating that, contrary to spec, eq isn't coercing to Str. -- Aaron Sherman Email or GTalk: a...@ajs.com http://www.ajs.com/~ajs
[perl #75320] Quoted raises false error about right-shift
# New Ticket Created by David Green # Please include the string: [perl #75320] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=75320 Use of in a double-quoted string gets incorrectly recognised as an attempt to use the P5 right-shift operator: my $x; say $x ; Unsupported use of to do right shift; in Perl 6 please use + or ~ at line 1, near \ Note the trailing space; other characters (or none) after the works. Also, » or are OK. (See also RT#66888)
[perl #75342] [Bug] non-modifier form of 'if' within 'for' loop fails, while the modifier form works
# New Ticket Created by Prakash Kailasa # Please include the string: [perl #75342] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=75342 perl6 -v This compiler is built with the Parrot Compiler Toolkit, parrot revision 46946. # this works as expected perl6 -e 'my @a = 0, 1, 2; for @a {$_++ if $_}; say @a.perl' [0, 2, 3] # this fails perl6 -e 'my @a = 0, 1, 2; for @a { if $_ { $_++ } }; say @a.perl' [0, 1, 2] Thanks, Prakash Kailasa
Re: Rakudo and non-ASCII character classes in rules
Am 24.05.2010 08:40, schrieb Aaron Sherman: I came up with these tests which I though should work: ok(π ~~ /[π]/, π as a character class); ok(π ~~ /[\x03c0]/, π as a character class (hex)); ok(π ~~ /[\x0391 .. \x03c9]/, π in a character class range); ok(π ~~ /\w/, π as a word character); Of those, only the first one actually did work. The others all fail. The last one actually works for me. Please make sure that you have the 'icu' library installed, and that parrot's Configure.pl properly picks it up. Only then will you get partially sane Unicode handling. Am I misunderstanding how these constructs should work? nope; it seems that Rakudo expects only two characters after the \x escape sequence (which is a bug): 10:53 @moritz_ rakudo: say 'c' ~~ /[\x03c0]/ 10:53 +p6eval rakudo 10a321: OUTPUT«c» 10:55 @moritz_ rakudo: say '0' ~~ /[\x03c0]/ 10:55 +p6eval rakudo 10a321: OUTPUT«0» Cheers, Moritz
[perl #75298] [PATCH] added .fmt method to Iterator.pm so that fmt can take Iterators of any form.
# New Ticket Created by Shrivatsan # Please include the string: [perl #75298] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=75298 Hi, Attached the patch towards fixing the .fmt issue in Iterators. my %hash={a=1, b=2}; say %hash.keys.fmt('%s', ', '); 'b', 'a' This is my first patch. Let me know if you need anything else. Regards, Shrivatsan isBEKaml Sampathkumar 0001-added-.fmt-method-to-Iterator.pm-so-that-fmt-can-tak.patch Description: Binary data
[perl #75234] [BUG] sub prefix:[~] is being unexpectedly hidden by class definition.
On Thu May 20 22:07:16 2010, richardh wrote: On its own, class B executes as expectedly: class B {method n { return [~] gather for ^4 {.say;take 'b'}}};my B $x.=new; say $x.n 0 1 2 3 When another class using reduction ~ is in front of it, even if it is not executed, B fails. class A {method m { return [~] gather for ^3 {take 'a'}}};class B {method n { return [~] gather for ^4 {.say;take 'b'}}};my B $x.=new; say $x.n Could not find sub prefix:[~] Fixed now: class A {method m { return [~] gather for ^3 {take 'a'}}}; class B {method n { return [~] gather for ^4 {.say;take 'b'}}};my B $x.=new; say $x.n 0 1 2 3 Given to moritz++ for spectest coverage. Thanks, Jonathan
[perl #75322] [BUG] eqv sometimes gets confused with empty lists
# New Ticket Created by David Green # Please include the string: [perl #75322] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=75322 eqv usually reports different things as different: say ((), x, 9) eqv ((), 9, 9) say ((), x) eqv ((), 9, 9) say ({}, x) eqv ({}, 9) say ((), ()) eqv ((), 9) say ((), (), (), 1) eqv ((), ()) But various combinations where both sides start with () and the left operand with more ()'s than the right come out as true when they should be false: say ((), x) eqv ((), 9) say ((), (), 1) eqv ((), 9) say ((), (), (), 1) eqv ((), (), ) say ((), (), (), 1) eqv ((), 4)
[perl #75312] [BUG] Embedded comments don't work anymore in Rakudo
# New Ticket Created by Carl Mäsak # Please include the string: [perl #75312] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=75312 masak rakudo: sub foo(Str $x) #`{LOL IMA COMMENT} { ... } p6eval rakudo a4d326: OUTPUT«Unable to parse postcircumfix:sym( ), couldn't find final ')' [...] masak std: sub foo(Str $x) #`{LOL IMA COMMENT} { ... } p6eval std 30775: OUTPUT«ok 00:01 116m» * masak submits rakudobug masak there are variants, too. masak rakudo: sub foo($x) #`{LOL IMA COMMENT} { ... } p6eval rakudo a4d326: OUTPUT«Symbol '$ss_SS_S_S__S_S_s' not predeclared [...] masak er. masak locally, that gives Lexical '$x' not found pmichaud I don't think that Rakudo ng knows #`{} comments yet. I could be wrong about that. pmichaud (alpha did.) masak hence the rakudobug.
[perl #75316] 1...1..0 keeps Rakudo on 100% CPU usage
# New Ticket Created by Paweł Pabian # Please include the string: [perl #75316] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=75316 [18:32] bbkr rakudo: say 1...1..0 # this one kills Rakudo, should it be check for valid type on right side of ... operator? [18:32] p6eval rakudo a4d326: ( no output ) [18:32] colomon bbkr: it should work [18:32] colomon it's a ... bug [18:34] colomon bbkr: actually, what error does it get? [18:34] colomon (and looking at it again, it shouldn't work, exactly.) [18:34] colomon (oh, I see, no output) [18:35] bbkr no error, looks like infinite loop [18:35] colomon rakudo: say 1..0 [18:35] p6eval rakudo a4d326: OUTPUT«» [18:35] colomon rakudo: say 1...() [18:35] p6eval rakudo a4d326: ( no output ) [18:35] colomon yeah, okay, that won't ever do anything useful. [18:36] -- isBEKaml has joined this channel (~k...@122.174.115.64). [18:36] isBEKaml hello, #perl6! [18:36] colomon o/ [18:37] -- proller has left this server (Ping timeout: 260 seconds). [18:37] bbkr colomon: so is it bug or not (despite code being pointless)? [18:37] colomon btw, I don't see any obvious way to type \ on my phone, which means if I irc from it one hand will get worn out. [18:38] colomon bbkr: definite bug, I'd say.
Re: Rakudo and non-ASCII character classes in rules
Note that per spec, \x w/o brackets should eat as many characters as look like hex digits. If that means the code point is outside the range of valid Unicode, then it should throw an error. On Tuesday, May 25, 2010, Moritz Lenz mor...@faui2k3.org wrote: Am 24.05.2010 08:40, schrieb Aaron Sherman: I came up with these tests which I though should work: ok(π ~~ /[π]/, π as a character class); ok(π ~~ /[\x03c0]/, π as a character class (hex)); ok(π ~~ /[\x0391 .. \x03c9]/, π in a character class range); ok(π ~~ /\w/, π as a word character); Of those, only the first one actually did work. The others all fail. The last one actually works for me. Please make sure that you have the 'icu' library installed, and that parrot's Configure.pl properly picks it up. Only then will you get partially sane Unicode handling. Am I misunderstanding how these constructs should work? nope; it seems that Rakudo expects only two characters after the \x escape sequence (which is a bug): 10:53 @moritz_ rakudo: say 'c' ~~ /[\x03c0]/ 10:53 +p6eval rakudo 10a321: OUTPUT«c» 10:55 @moritz_ rakudo: say '0' ~~ /[\x03c0]/ 10:55 +p6eval rakudo 10a321: OUTPUT«0» Cheers, Moritz -- Mark J. Reed markjr...@gmail.com
Re: Rakudo and non-ASCII character classes in rules
On Tue, May 25, 2010 at 10:56:06AM +0200, Moritz Lenz wrote: 10:53 @moritz_ rakudo: say 'c' ~~ /[\x03c0]/ 10:53 +p6eval rakudo 10a321: OUTPUT«c» 10:55 @moritz_ rakudo: say '0' ~~ /[\x03c0]/ 10:55 +p6eval rakudo 10a321: OUTPUT«0» Actually, I don't think Rakudo understands \x notation in character lists at all yet. 12:31 pmichaud rakudo: say '3' ~~ /[\x03c0]/ 12:32 p6eval rakudo 10a321: OUTPUT«3» (The alpha branch understood \x, but the character class code was completely redesigned in the newer branch and this piece hasn't been restored yet.) Pm
r30782 -[S02] typo fix
Author: snarkyboojum Date: 2010-05-25 18:01:23 +0200 (Tue, 25 May 2010) New Revision: 30782 Modified: docs/Perl6/Spec/S02-bits.pod Log: [S02] typo fix Modified: docs/Perl6/Spec/S02-bits.pod === --- docs/Perl6/Spec/S02-bits.pod2010-05-25 09:21:23 UTC (rev 30781) +++ docs/Perl6/Spec/S02-bits.pod2010-05-25 16:01:23 UTC (rev 30782) @@ -1084,7 +1084,7 @@ take C* to mean CInf, we could still actually return a closure that defaults that particular argument to CInf. However, this would work only if we provide a value list context that forbids closures, -in the sense that it always calls any closure it finds it its list +in the sense that it always calls any closure it finds in its list and replaces the closure in the list with its return value or values, and then rescans from that point (kinda like a text macro does), in case the closure returned a list containing a closure. So for example,