[perl #131243] [REGEX] Interpolating a Hash in a regex treats it as a list and errors out

2017-12-29 Thread Sam S. via RT
On Tue, 02 May 2017 08:35:34 -0700, c...@zoffix.com wrote: > Both of these forms produce the error below > > my %stuff = ; > say 'foo bar meows' ~~ m:g/ %stuff\S+ /; > say 'foo bar meows' ~~ m:g/ %() \S+ /; > > # P6opaque: no such attribute '$!reified' in type List when trying to > get >

[perl #132352] Set operators unfriendly to mutable types

2017-10-23 Thread Sam S. via RT
On Mon, 23 Oct 2017 05:23:55 -0700, c...@zoffix.com wrote: > Set operators are a lot less useful with mutable types, like SetHash, > because > even when one of the operands is a SetHash, they still return a Set, > making > constructs like `∖=` or `∪=` entirely unusable: > > my $days = SetHash.new:

[perl #124527] [BOGUSTEST] [REGEX] S05-metasyntax/interpolating-closure.t line:28 reason: 'dunno'

2017-10-21 Thread Sam S. via RT
This look like a bogus test to me. On the RHS of the ~~ operator, `$_` is bound to the LHS string "aaabccc". `$var ??` evaluates the regex $var in boolean context, which causes it to match against this string. Since there is no match, this causes the ternary operator to return the `rx{abc}` br

[perl #132217] [UNI] `unival` ignores everything but first chars

2017-10-07 Thread Sam S. via RT
On Tue, 03 Oct 2017 17:52:39 -0700, c...@zoffix.com wrote: > Perhaps it should throw when it was given trailing stuff after the > relevant char? > > 00:49 dpk m: say unival("1\x[300]23") > 00:49 camelia rakudo-moar 98fae3: OUTPUT: «1␤» > 00:50 dpk that … seems like a potential securi

[perl #127906] [REGEX] Sequential array interpolation `||@foo` doesn't backtrack

2017-10-07 Thread Sam S. via RT
It affects `|` array interpolation as well: ➜ say "ab" ~~ / < ab a > b /;# 「ab」 ➜ say "ab" ~~ / @() b /; # Nil ➜ say "ab" ~~ / |@() b /; # Nil

[perl #127906] [REGEX] Array interpolation depends on order of array elements

2017-10-07 Thread Sam S. via RT
On Wed, 20 Jul 2016 08:32:12 -0700, c...@zoffix.com wrote: > I was able to golf it a bit further (still present in Rakudo 58dc8c). > Removing >> or changing first-match || to longest-match | no longer > shows the bug: > > m: "bc" ~~ /||@() >>/ or say "Failed" > rakudo-moar 58dc8c: OUTPUT«Failed␤»

[perl #130906] [TESTNEEDED] [REGRESSION] Reducing a Seq with `=>` fails with "P6opaque: no such attribute '$!reified' in type List"

2017-10-06 Thread Sam S. via RT
Tests committed: https://github.com/perl6/roast/commit/9ea27ad2e Closing.

[perl #130117] [TESTNEEDED] [REGEX] Sequential alternation `||` does not respect `:ratchet`

2017-10-06 Thread Sam S. via RT
Tests were added here: https://github.com/perl6/roast/commit/65a762217

[perl #131973] [TESTNEEDED] [REGEX] Backtracking modifiers on individual atoms fail to override a regex-global `:ratchet` modifier.

2017-10-06 Thread Sam S. via RT
Tests were added here: https://github.com/perl6/roast/commit/65a762217

[perl #126951] [TESTNEEDED] Interpolating a typed hash into an argument list produces wrong keys

2017-10-06 Thread Sam S. via RT
Test added: https://github.com/perl6/roast/commit/8773139c37 Closing.

[perl #131936] [TESTNEEDED] [REGRESSION] [REGEX] Match.made leaks a `NQPMu`

2017-10-06 Thread Sam S. via RT
Test were added by Zoffix a month ago: https://github.com/perl6/roast/commit/8674f1e8c Closing.

[perl #126757] [LTA] error message talks about ~ but there is no ~ in my code (33..126 .pick.chr)

2017-10-06 Thread Sam S. via RT
On Wed, 04 Oct 2017 22:10:22 -0700, alex.jakime...@gmail.com wrote: > To produce an error message that is more precise we'll need more > information > than just a line number, but we don't have that during the run time. Couldn't the confusing wording be fixed without additional information? As I

[perl #131003] [ANNOYING][SEGV] Heap corruption when using Gumbo

2017-10-04 Thread Sam S. via RT
What is the point of the `[ANNOYING]` tag? All bugs are probably annoying to *someone*...

[perl #131973] [RFC] Backtracking modifiers on individual atoms fail to override a regex-global `:ratchet` modifier.

2017-10-04 Thread Sam S. via RT
On Mon, 28 Aug 2017 09:20:33 -0700, sml...@gmail.com wrote: > I sent a pull request to nqp that fixes this, please review: > > https://github.com/perl6/nqp/pull/368 The PR was merged (and Rakudo's nqp version bumped). Marking the ticket TESTNEEDED. (Note that some possible tests are listed in th

[perl #130117] [REGEX] Sequential alternation `||` does not respect `:ratchet`

2017-10-04 Thread Sam S. via RT
On Mon, 28 Aug 2017 11:50:51 -0700, sml...@gmail.com wrote: > I sent a pull request which fixes this bug: > > https://github.com/perl6/nqp/pull/368 > > Please review. The PR was merged (and Rakudo's nqp version bumped). Marking the ticket TESTNEEDED. (Note that some possible tests are listed in

[perl #132185] [LTA] file tests and Failure do not interact as expected

2017-09-30 Thread Sam S. via RT
On Sat, 30 Sep 2017 13:47:22 -0700, allber...@gmail.com wrote: > So I included at least one discussion in the ticket that was utterly > pointless and left unread. At this point I'm just going to assume only > half-exposing the underlying mechanism is considered a feature and I need > to use a diffe

[perl #131490] Crash in Junction:D.BUILDALL `This type (Scalar) does not support elems`

2017-09-30 Thread Sam S. via RT
On Sat, 30 Sep 2017 13:13:31 -0700, c...@zoffix.com wrote: > Don't see a reason why not. Well, passing a 'type' string parameter to select between what is essentially different object sub-types, seems internal-ish. I can't think of anything else in the public Perl 6 API which does this; a more

[perl #132185] [LTA] file tests and Failure do not interact as expected

2017-09-30 Thread Sam S. via RT
I agree with Zoffix that this seems to be fine as is. Generally speaking, IO operations that logically require an existing path will return a Failure if the path does not in fact exist: Slurp its content? Failure. Rename/move/copy it? Failure. Check its size? Failure. Check if it is of t

[perl #131395] Using a cross meta operator on an empty list complains about not supporting elems

2017-09-30 Thread Sam S. via RT
On Mon, 29 May 2017 11:36:49 -0700, c...@zoffix.com wrote: > On Mon, 29 May 2017 10:02:27 -0700, thunderg...@comcast.net wrote: > > Using a cross meta operator on an empty list complains "This type > > (Scalar) does not support elems". > > > > say (1,2).elems; say ().elems; say (1,2) X (); >

[perl #131490] Crash in Junction:D.BUILDALL `This type (Scalar) does not support elems`

2017-09-30 Thread Sam S. via RT
On Fri, 02 Jun 2017 18:58:22 -0700, c...@zoffix.com wrote: > While chasing some other bugs, came across this one: > > m: Junction.new.BUILDALL: {} > rakudo-moar ef9872: OUTPUT: «This type (Scalar) does not > support elems␤ in block at line 1␤␤» > > Not sure how much it matters in itself, but

[perl #126092] pairs X pairs can't bind to subsig

2017-09-29 Thread Sam S. via RT
On Fri, 18 Sep 2015 00:51:42 -0700, larry wrote: > 00:13 < TimToady> m: for (1,2,3).pairs X (4,5,6).pairs -> ($x,$y) { say "$x > $y" } > 00:13 <+camelia> rakudo-moar c0e0c9: OUTPUT«This type cannot unbox to a > native string␤ in block at /tmp/YnA_LhZbRO:1␤␤» It gives a nicer error message now:

[perl #132121] [REGEX] (RFC?) Overflow of writing to captures

2017-09-18 Thread Sam S. via RT
On Mon, 18 Sep 2017 10:45:21 -0700, c...@zoffix.com wrote: > Apparently it's possible to assign to capture variables to change what > the resultant Match will have. > > The first question: is this actually something specced and supported? > Especially the fact that further captures continue their

[perl #132120] [REGEX] Accessing captures from another capture fails a match

2017-09-18 Thread Sam S. via RT
On Mon, 18 Sep 2017 09:00:54 -0700, c...@zoffix.com wrote: > IRC: https://irclog.perlgeek.de/perl6/2017-09-18#i_15181575 > > We can use $0 here to refer to previous capture and regex matches: > m: say "11" ~~ /(\d)[$0]/ > rakudo-moar 48a84d: OUTPUT: «「11」␤ 0 => 「1」␤» > > But if we capture

[perl #122504] [TESTNEEDED] 'return' invoked outside of a routine should throw an exception

2017-09-16 Thread Sam S. via RT
> It looks to me like the tests already in S04-statements/return.t > should suffice, no? You're right. Closing the ticket.

[perl #126139] [BUG] [GLR] nested lazy cross operators confuse the continuations

2017-09-12 Thread Sam S. via RT
Merged two commits that I'm pretty sure are about the same issue. On Tue, 22 Sep 2015 18:09:54 -0700, larry wrote: > 18:00 < TimToady> m: my @v := [1, 2]; my \step1 = 8 X* ^4; my \step2 = @v > X+> step1; say step2 X% 256; > 18:00 <+camelia> rakudo-moar 631ac4: OUTPUT«===SORRY!===␤Cannot invoke thi

[perl #130612] [REGEX] [@LARRY] LTM doesn't use text order for tie break as expected

2017-09-12 Thread Sam S. via RT
Confirmed on IRC that this is a bug. Relevant log¹ (edited for clarity): Is it intended that LTM prefers \d and <[0..9]> over and <:Number>, as a tie-breaker? (re. RT #130612) no, that wasn't intended m: say '1' ~~ / \d | { sa

[perl #126332] [BUG] .assuming ignores anything from the second argument onwards in Rakudo

2017-09-12 Thread Sam S. via RT
On Mon, 12 Oct 2015 05:33:13 -0700, masak wrote: > m: my &f := &substr.assuming('hello world'); say f(0, 2); > rakudo-moar 70a94d: OUTPUT«hello world␤» > m: say &substr.assuming('hello world')(0, 2) > rakudo-moar 70a94d: OUTPUT«hello world␤» > [...] It works fine now: ➜ say &substr.assum

[perl #130612] [BUG] LTM doesn't use text order for tie break as expected

2017-09-11 Thread Sam S. via RT
Actually... Rakudo *does* generally follow interpretation (b): ➜ 'x' ~~ / .* { say '*' } | .? { say '?' } /; # * ➜ 'x' ~~ / .? { say '?' } | .* { say '*' } /; # ? The observed bug is specifically with character classes: ➜ '1' ~~ / { say 'digit' } | <[0..9]> { say '0..9' }

[perl #130612] [BUG] LTM doesn't use text order for tie break as expected

2017-09-11 Thread Sam S. via RT
This bug is still present in Rakudo version 2017.08-104-g76f1d8970 built on MoarVM version 2017.08.1-148-g1059eed1 implementing Perl 6.c. --- However, there's also a design question to be answered here: On Sat, 21 Jan 2017 10:32:39 -0800, ronaldxs wrote: > https://design.perl6.org/S

[perl #132066] [BUG] Code blocks cause backtracking fail in `|` alternation with ratcheting

2017-09-11 Thread Sam S. via RT
PS: This *really* needs to be properly documented on http://docs.perl6.org though - I've submitted a ticket for that here: https://github.com/perl6/doc/issues/1550

[perl #132066] [BUG] Code blocks cause backtracking fail in `|` alternation with ratcheting

2017-09-11 Thread Sam S. via RT
On Mon, 11 Sep 2017 09:48:01 -0700, dzw...@gmail.com wrote: > `|` matches the longest input: > > 'ab' ~~ / ^:ratchet [ . | .. ] $ / > 「ab」 > > If the regex contains empty code blocks, backtracking fails: > > 'ab' ~~ / ^:ratchet [ {}. | {}.. ] $ / > Nil Not a bug. As the S05 design document expla

[perl #126117] [BUG] defined value as type constraint is accepted and doesn't work

2017-09-11 Thread Sam S. via RT
On Sun, 20 Sep 2015 09:17:21 -0700, zef...@fysh.org wrote: > Presumably using a defined value (anything other than a type object) > as a type constraint should be a semantic error. It does throw a compile-time error for the `my` declaration now, however the error message is not appropriate:

[perl #126125] [LTA] malformed "my" spuriously claims lack of type declaration

2017-09-11 Thread Sam S. via RT
On Sun, 20 Sep 2015 14:00:53 -0700, zef...@fysh.org wrote: > Presumably the "malformed my" error is correct, but the preceding "type > 'Any' is not declared" is bogus. It now no longer prints the bogus "type 'Any' is not declared" error, only the correct "malformed my" error: ➜ my Any⏏ :D $

[perl #126269] [BUG] unexpected behavior for reduced composition

2017-09-11 Thread Sam S. via RT
On Mon, 05 Oct 2015 09:10:42 -0700, grond...@yahoo.fr wrote: > The following two expressions should give the same result: > > $ perl6 -e 'say ([o] (1 + 1/*), (2 + 1/*))(Inf);' > 1.5 > > $ perl6 -e 'say ([o] (++$ + 1/*) xx 2)(Inf);' > 3 What's happening is that the `++$` operation isn't evaluated

[perl #122345] [BUG] Returning from a parameter list default counts as returning 'outside of any Routine' in Rakudo on Moar

2017-09-10 Thread Sam S. via RT
On Sun, 20 Jul 2014 10:29:57 -0700, masak wrote: > < masak> r: sub { sub foo($x = return) { $x }; say foo }(); say "alive" > rakudo-jvm bbdcfd: OUTPUT«alive␤» > ..rakudo-moar bbdcfd: OUTPUT«Attempt to return outside of > any Routine [...] > ..rakudo-parrot bbdcfd: OUTPUT«alive␤Nominal type check

[perl #122504] [BUG] 'return' invoked outside of a routine should throw an exception

2017-09-10 Thread Sam S. via RT
A `return` outside a routine now always seems to throw a run-time error, as it should: $ perl6 -e 'return' Attempt to return outside of any Routine in block at -e line 1 $ perl6 -e '{ return }' Attempt to return outside of any Routine in block at -e line 1

[perl #121327] [BUG] Array shift in loop in loop in loop shifts from an outdated array (on second iteration) in Rakudo

2017-09-10 Thread Sam S. via RT
It works fine now: ➜ for ^2 { my @b = 1 xx 4; say (@b.shift xx 2) xx 2 } ((1 1) (1 1)) ((1 1) (1 1)) Was apparently fixed a year ago: https://gist.github.com/Whateverable/e2a6fe61150eb2595ac0ff6929daeab1 https://github.com/rakudo/rakudo/commit/5e61516 Can be closed with tes

[perl #111474] [BUG] Variable in string in <{ }> interpolator in regex doesn't get a proper lookup in Rakudo

2017-09-10 Thread Sam S. via RT
On Thu, 01 Mar 2012 13:07:28 -0800, masak wrote: > nom: '' ~~ / :my $a; <{ '$a' }> / > nom 48af8c: OUTPUT«===SORRY!===␤Variable $a is not > declared␤at eval_0:1␤» This works fine now - and has so for a while¹, apparently since a commit² in May 2015: say '123' ~~ / :my $a=2; <{ '$a' }> /, #

[perl #121991] [BUG] Unless 'use soft' is in play, .wrap should die in Rakudo

2017-09-10 Thread Sam S. via RT
On Fri, 30 May 2014 09:51:18 -0700, masak wrote: > m: sub a {"foo"}; sub b {"bar"~callsame}; &a.wrap(&b); say a(); > rakudo-moar 90cd58: OUTPUT«foo␤» This now works: ➜ sub a {"foo"}; sub b {"bar"~callsame}; &a.wrap(&b); say a(); barfoo Is TimToady's recommendation of forbidding `.wrap

[perl #120995] [BUG] Error when passing the same named argument twice using different aliases

2017-09-10 Thread Sam S. via RT
On Mon, 13 Jan 2014 18:28:14 -0800, m...@kli.org wrote: > > sub f(:a(:b($x))) { say $x } > sub f(Any :a(:b($x))) { ... } > > f(:a("A"), :a("B")) > B > > f(:a("A"), :b("B")) > Unexpected named parameter 'a' passed I've had a look at `src/Perl6/Metamodel/BOOTSTRAP.nqp`, which is where the error mes

[perl #120995] Same argument present multiple times is okay with one name, not with two

2017-09-10 Thread Sam S. via RT
On Mon, 13 Jan 2014 18:28:14 -0800, m...@kli.org wrote: > > sub f(:a(:b($x))) { say $x } > sub f(Any :a(:b($x))) { ... } > > f(:a("A"), :a("B")) > B > > f(:a("A"), :b("B")) > Unexpected named parameter 'a' passed > > If nothing else, the error message is LTA. But basically we're allowed > to pass

[perl #114684] [BUG] Return type mismatch should return Failure, not throw exception

2017-09-10 Thread Sam S. via RT
On Fri, 31 Aug 2012 12:36:48 -0700, pmichaud wrote: > 19:34 r: sub abc() returns Int { my $r = 3.5; $r }; my > $x = abc(); say 'alive'; > 19:34 rakudo 231137: OUTPUT«Type check failed for return > value; expected 'Int' but got 'Rat'␤ in sub abc at /tmp/P8uacuh4gB:1␤ > in block at /tmp/P8uac

[perl #113628] [BUG] error when doing a hyper-mutate-flip on an array

2017-09-10 Thread Sam S. via RT
On Wed, 13 Jun 2012 23:13:01 -0700, masak wrote: > r: (my @) ».=« flip > rakudo 90333b: OUTPUT«===SORRY!===␤ResizablePMCArray: Can't > shift from an empty array!␤» Still present in: This is Rakudo version 2017.08-104-g76f1d8970 built on MoarVM version 2017.08.1-148-g1059eed1 impleme

[perl #111912] [BUG] Composing an inherited class through a parametric role doesn't work in Rakudo

2017-09-10 Thread Sam S. via RT
On Wed, 21 Mar 2012 08:32:55 -0700, masak wrote: > nom: role A[::T $] { also is T }; class B { }; class C does > A[B] { }; say C ~~ B > rakudo 1a468d: OUTPUT«===SORRY!===␤Cannot type check against > type variable T␤» Now it throws earlier, and with a nicer error message: ===SORRY!=== Error

[perl #107844] [BUG] .wrap and 'is export' don't play along in Rakudo

2017-09-10 Thread Sam S. via RT
On Tue, 10 Jan 2012 02:16:07 -0800, masak wrote: > about wrap again: https://gist.github.com/1585730 > > Included here for completeness: > > ┌─[tadzik@yavin4]─[~/src/perl/bailador] (master)* > └─[%]─> cat lib/Bailador.pm > module Bailador; > > our sub our_template { > return "(our template)

[perl #95970] [BUG] Code.callwith introduces an official CALLER frame in Rakudo

2017-09-10 Thread Sam S. via RT
On Sat, 30 Jul 2011 14:19:40 -0700, masak wrote: > is there a method for invoking a Routine? besides > postcircumfix:<( )>, I mean? > rakudo: sub foo($a) { say $a }; &foo.callwith(42) > rakudo 922500: OUTPUT«42␤» > That's what I thought when I saw .callwith :) > oh, interesting, .callwith with

[perl #132042] [CONC] rakudo hangs while concurrently walking trees

2017-09-10 Thread Sam S. via RT
Even simpler test-case: for ^1 { start say $_ } For me, this almost always hangs (after printing a few dozen or few hundred lines), with the MoarVM version currently used by Rakudo nom: MoarVM version 2017.08.1-128-gde6dced But *no longer* hangs with MoarVM master (which has the fi

[perl #132047] [BUG] Splicing Seq into array installs immutable values

2017-09-10 Thread Sam S. via RT
On Fri, 08 Sep 2017 18:37:50 -0700, tomentiru...@gmail.com wrote: > > > my @h > [] > > @h.splice: 0, 0, 1.Seq > [] > > @h[0].VAR.WHAT > (Int) > > @h[0] = 5 > Cannot modify an immutable Int (1) > in block at line 1 > > I got hit by this with: @a.splice: 0, 0, Any xx 2 Good find. It's also no

[perl #132052] [BUG] size passed as parameter to parametric Buf.new method die with error

2017-09-10 Thread Sam S. via RT
It doesn't seem to be specific to type `size_t` - it also happens with other native types such as `int`. Shorter example: ➜ sub a (int $a) { Blob[int].new($a) }; say a 12; Type check failed in initializing element #0 to Blob[int]; expected int but got Int (12) Examples that *don't* f

[perl #132051] [BUG] Parametric type object passed as literal die with error

2017-09-10 Thread Sam S. via RT
Although that particular error message seems to be specific to `Blob`, it also breaks with other parametric roles (such as `Array`), because the generic parameter T of the outer role seems to be passed through without being specialized first. Shorter examples: ➜ role R[::T] { method a { A

[perl #129878] [BUG][UNI] Stringifying a List adds in spaces between each item

2017-09-07 Thread Sam S. via RT
On Wed, 06 Sep 2017 15:20:17 -0700, coke wrote: > With a recent rakudo, these now both output 1 Bisectable shows that it was fixed during recent MoarVM changes: https://gist.github.com/Whateverable/01a82d07e8009c7beffe5893432dddf2 https://github.com/rakudo/rakudo/commit/593fa5f Among the

[perl #132014] [REGEX] Some Zero-Width assertion appear to not work in

2017-09-05 Thread Sam S. via RT
Duplicate of https://rt.perl.org/Ticket/Display.html?id=131964 ?

[perl #126249] $/ constructed just once in [REGEX]

2017-08-31 Thread Sam S. via RT
This has been fixed by TimToday in April, in one of these commits: https://gist.github.com/Whateverable/23122ebe34ebeccfdfc3cd04845c54f4 https://gist.github.com/smls/aff6a56c1cfcce5c7779251aee394e42 Tests needed.

[perl #132004] [REGEX] Recursion causes infinite loop, even if it can't match anything and another LTM branch can.

2017-08-31 Thread Sam S. via RT
Shorter example: grammar Flail { token TOP { 'w' | 'v' } } Flail.subparse('vww').say;

[perl #132003] grammar cannot parse from Blob/Buf

2017-08-31 Thread Sam S. via RT
In Perl 6.c, regexes/grammars can only parse strings (at the grapheme level). If you want to parse a Blob or Buf, you have to decode it into a string first by calling the `.decode` method¹ on it. Early Perl 6 design documents² suggested support for parsing at the byte or code-point level, but t

[perl #131983] [BUG] mixin thread safety

2017-08-29 Thread Sam S. via RT
@David I think this is not a thread safety issue, but rather a result of `role`s (intentionally) not being closures. I.e. a duplicate of this RT: This is a duplicate of https://rt.perl.org/Ticket/Display.html?id=130965

[perl #131985] [BUG] curly-brace interpolation thread safety

2017-08-29 Thread Sam S. via RT
Possibly related to: https://rt.perl.org/Ticket/Display.html?id=131871

[perl #130947] [BUG] Multi-dimensional Hash subscripts return a List even when indexing a single element

2017-08-28 Thread Sam S. via RT
I sent a pull request which fixes this bug: https://github.com/rakudo/rakudo/pull/1139

[perl #130117] [REGEX] Sequential alternation `||` does not respect `:ratchet`

2017-08-28 Thread Sam S. via RT
I sent a pull request which fixes this bug: https://github.com/perl6/nqp/pull/368 Please review.

[perl #131973] [RFC] Backtracking modifiers on individual atoms fail to override a regex-global `:ratchet` modifier.

2017-08-28 Thread Sam S. via RT
I sent a pull request to nqp that fixes this, please review: https://github.com/perl6/nqp/pull/368 On Mon, 28 Aug 2017 05:53:36 -0700, coke wrote: > At this stage, something's presence in one of the SYN doesn't mandate > that it needs to be present in rakudo. I'd say this particular issue is pre

[perl #131936] [REGRESSION] [REGEX] Match.made leaks a `NQPMu`

2017-08-27 Thread Sam S. via RT
Fixed by lizmat in commit: https://github.com/rakudo/rakudo/commit/5db5b1dbfa0b625130573574e2409972387e9f75 Tests needed.

[perl #130117] [REGEX] :r does not prevent backtracking (say ‘abcz’ ~~ /:r [‘a’ || ‘abc’ ] ‘z’ /)

2017-08-27 Thread Sam S. via RT
Relevant: https://rt.perl.org/Ticket/Display.html?id=123934#txn-1401917 In short, `||` alternations don't respect `:` in Rakudo, whereas `|` alternations (and other atoms such as quantifiers) do respect it. Simpler test-case: ➜ say "ab" ~~ / [ "ab" | "a" ]: "b" /; Nil ➜ say "ab"

[perl #129845] [CONC] `.dir` returns corrupted `IO::Path`s under concurrent load

2017-08-26 Thread Sam S. via RT
Both the demo script (from the top post) and the one-line test case (2nd post) now pass without error! Bisectable identifies a commit from last week as the fix: https://gist.github.com/97d96022fdfed416e67ecadf5b2b9353 https://github.com/rakudo/rakudo/commit/231cb3f Is there a way to wri

[perl #130773] [BUG] Bogus "Useless use" warning for WhateverCode in EVAL

2017-08-26 Thread Sam S. via RT
This bug is still present in Rakudo version 2017.08-8-g753c9a5ea built on MoarVM version 2017.08.1-19-g151a2563 implementing Perl 6.c.

[perl #130711] [REGEX] `**` quantifier with dynamic count, misbehaves under `:exhaustive` matching

2017-08-26 Thread Sam S. via RT
This bug is still present in Rakudo version 2017.08-8-g753c9a5ea built on MoarVM version 2017.08.1-19-g151a2563 implementing Perl 6.c.

[perl #130602] [BUG] `1, 2 Xand "ab".ords` fails with "Cannot invoke this object (REPR: Uninstantiable; Callable)"

2017-08-26 Thread Sam S. via RT
This bug is still present in Rakudo version 2017.08-8-g753c9a5ea built on MoarVM version 2017.08.1-19-g151a2563 implementing Perl 6.c.

[perl #130604] [PARSER] Weirdness when mixing `..` and `...` without parens

2017-08-26 Thread Sam S. via RT
This bug is still present in Rakudo version 2017.08-8-g753c9a5ea built on MoarVM version 2017.08.1-19-g151a2563 implementing Perl 6.c.

[perl #130572] Parenthesized `for` loop is eager, even with `lazy` keyword

2017-08-26 Thread Sam S. via RT
This bug is still present in Rakudo version 2017.08-8-g753c9a5ea built on MoarVM version 2017.08.1-19-g151a2563 implementing Perl 6.c.

[perl #126951] [BUG] Interpolating a typed hash into an argument list produces wrong keys

2017-08-26 Thread Sam S. via RT
Shorter test-case: ➜ say :{ a => 1, b => 2 }.FLATTENABLE_HASH; {Str|a => a => 1, Str|b => b => 2} Compare to a normal Hash which works fine: ➜ say { a => 1, b => 2 }.FLATTENABLE_HASH; {a => 1, b => 2}

[perl #126951] [BUG] Interpolating a typed hash into an argument list produces wrong keys

2017-08-26 Thread Sam S. via RT
This bug is still present in Rakudo version 2017.08-8-g753c9a5ea built on MoarVM version 2017.08.1-19-g151a2563 implementing Perl 6.c.

[perl #131956] Zen/Whatever slice ignore :v

2017-08-24 Thread Sam S. via RT
I'm surprised that zen slices accept adverbs at all. Isn't the whole point of a zen slice to return the invocant object directly, without looking at its elements or constructing a slice from them? I would probably make it print an error along the lines of: ===SORRY!=== Adverbs don't mak

[perl #113042] [BUG] [WEIRD] LTA internals-leaky error message when doing 'for our $:: ();' in Rakudo

2017-08-22 Thread Sam S. via RT
Is this still considered a BUG/LTA? Isn't the error messages it prints now (see last comment by coke) pretty reasonable?

[perl #130910] [WEIRD] Sometimes parameterized regexes print nonsense about the number of arguments (//)

2017-08-22 Thread Sam S. via RT
Sorry, copy-pasto in the second-to-last output listing. It is: meh start meh end $ = 「a」 Too few positionals passed; expected 2 arguments but got 1 in regex meh at [...]

[perl #130910] [WEIRD] Sometimes parameterized regexes print nonsense about the number of arguments (//)

2017-08-22 Thread Sam S. via RT
It has to do with backtracking, because: 1) The problem disappears when `:ratchet` mode is enabled in the top-level regex: ➜ my regex meh ($t) { . }; ➜ say "ab" ~~ /^ :ratchet $ /; Nil 2) The problem disappears when the named regex is made a `token`: ➜ my token meh ($t)

[perl #131932] Inconsistency: `&infix:<^^>` evaluates Callables, but regular `^^` doesn't

2017-08-19 Thread Sam S. via RT
It's the same with && and ||: ➜ &infix:<&&>(1, -> {say 2}); # 2 ➜ say 1 && -> {say 2}; # -> { #`(Block|169403552312) ... } ➜ &infix:<||>(0, -> {say 2}); # 2 ➜ say 0 || -> {say 2}; # -> { #`(Block|786414142008) ... } And also with the loose-precedence versi

[perl #131925] [BUG] [REGEX] Smartmatch against `m//` operator mishandles junctions

2017-08-19 Thread Sam S. via RT
bisectable6: say .any ~~ m/a/; smls, On both starting points (old=2015.12 new=e3e29c5) the exit code is 0 and the output is identical as well smls, Output on both points: «False»

[perl #131925] Smartmatching a junction against a regex object vs m// (‘a’|‘b’ ~~ m/‘a’/)

2017-08-19 Thread Sam S. via RT
The problem only appears if `m//` is used directly as the RHS of `~~`: $_ = 'a' | 'b'; say m/a/; # any(「a」, Nil) say $_ ~~ m/a/; # False say $_ ~~ { m/a/ }; # any(「a」, Nil)

[perl #131870] [CONC] [REGEX] Capture lookup inside regex is not threadsafe

2017-08-09 Thread Sam S. via RT
Heh, on further thought, they may be the same issue after all. In `/(...) { ... $i ... $0 ... }`, both the $i and the $0 (or $/ rather) are outer lexicals from the point of view of the curly block, right? So it might be a general problem with the way that *code blocks inside regexes* access o

[perl #131870] [CONC] [REGEX] Capture lookup inside regex is not threadsafe

2017-08-09 Thread Sam S. via RT
Also notable is that multiple iterations somehow see the same value for `$i` (as observed in the output listing above). I've sumbitted a separate issue for that (RT #131871), because the Capture-lookup bug of the current issue occurs even when removing the `$i`.

[perl #131783] [LTA] :delete holes in Arrays get turned to Mus when coercing to List or Slip

2017-07-23 Thread Sam S. via RT
> Which then goes back to: what is the use case of Slipping an Array? Same as slipping any other type of Iterable: Fine-grained, elegant flattening and concatenating. Compare: my @all = flat $first, @rest; my @all = $first, |@rest; When you *know* that $first is a Scalar and @rest is an A

[perl #131686] [BUG] [X] @list-of-lists misbehaves with list of one list

2017-07-18 Thread Sam S. via RT
On Tue, 18 Jul 2017 07:45:16 -0700, joshu...@gmail.com wrote: > My thinking is that doing `[X] ((3,2),)` is kinda like doing `[X] > ((3,2),Empty)`... Assuming I understand your analogy correctly, that's exactly what's *not* happening, and is why this RT exists. See: dd [X] 3, 2; # ((3

[perl #126895] Cannot constrain an optional parameter with a subset type

2017-07-15 Thread Sam S. via RT
This bug is still present in This is Rakudo version 2017.06-251-g23ad2c388 built on MoarVM version 2017.06-91-g146c8fcc implementing Perl 6.c.

[perl #131754] [LTA] Error message when using a term bareword as if it were a subroutine

2017-07-15 Thread Sam S. via RT
A possibly better way to phrase it: ===SORRY!=== Error while compiling [...] Constant "foo" is followed by another term at [...] --> say foo⏏ 4; If your meant to refer to the subroutine "foo" declared at [...], then either: * Use `foo(...)` to disambiguate. * Rename

[perl #131686] [BUG] [X] @list-of-lists misbehaves with list of one list

2017-07-02 Thread Sam S. via RT
I agree that things like my @divisors = [X] @prime-factor-powers; my @transpose = [Z] @matrix; look perfectly reasonable and elegant, and the fact that the single-sub-list edge-case ruins them is regrettable. Nor can I image any scenario where the current behavior of that edge-case is

[perl #128758] Reduce with numeric ops does not numify things if only one arg is passed ([*] set(1,2,3))

2017-06-29 Thread Sam S. via RT
It looks like this bug hasn't been *completely* fixed: dd &infix:<+>( "2" ); # 2 dd &infix:<*>( "2" ); # 2 dd [*] "2"; # 2 dd [+] "2"; # 2 dd reduce &infix:<*>, "2"; # 2 dd reduce &infix:<+>, "2"; # "2" i.e. it doesn't work w

[perl #131397] semicolon subscripting in multi dim arrays has odd interactions with numeric string indexes

2017-05-31 Thread Sam S. via RT
Shorter example: my @a = [2, 4], [6, 8]; say @a[1; 1].perl; # 8 say @a["1"; "1"].perl; # (8,) PS: Definitely seems related to the following ticket: https://rt.perl.org/Ticket/Display.html?id=130947

[perl #127974] [CONC] sprintf() not threadsafe/reentrant if the format tokens use explicit indices

2017-05-28 Thread Sam S. via RT
Still present in Rakudo version 2017.05-272-gfa7aa1c36 built on MoarVM version 2017.05-25-g62bc54e9 implementing Perl 6.c.

[perl #128462] [BUG] Unspace after a sigil-less term causes parser error

2017-05-28 Thread Sam S. via RT
This bug is still present in This is Rakudo version 2017.05-272-gfa7aa1c36 built on MoarVM version 2017.05-25-g62bc54e9 implementing Perl 6.c.

[perl #128054] [BUG] In a string enclosed in parens, a {}-interpolation can't access the topic $_ of a statement modifier

2017-05-28 Thread Sam S. via RT
This bug is still present in This is Rakudo version 2017.05-134-g0c5fe56cc built on MoarVM version 2017.05-25-g62bc54e9 implementing Perl 6.c.

[perl #126569] [BUG] xx-repeated expression enclosed in parens can't access the topic $_ of a statement modifier

2017-05-28 Thread Sam S. via RT
Still present in This is Rakudo version 2017.05-134-g0c5fe56cc built on MoarVM version 2017.05-25-g62bc54e9 implementing Perl 6.c.

[perl #126595] Cannot bind a Seq to a variable list

2017-05-27 Thread Sam S. via RT
This was fixed by Zoffix one month ago (including tests): https://rt.perl.org/Ticket/Display.html?id=131222#txn-1458062 Closing.

[perl #128866] [BUG] Array[Int] ~~ Array[Numeric] is false

2017-05-17 Thread Sam S. via RT
> How come last one should be same? Aren't they different types? I'd expect > `Array[Int] ~~ Positional[Numeric]` to give False They are different types, but one could logically be considered a "subtype" of the other (and would be in some programming languages). E.g. in C#, a class Foo which ta

[perl #128603] [LTA] Error on typoed named args: :foo:

2017-05-06 Thread Sam S. via RT
Same thing happens when the method call syntax is typoed to include both colon and and parens: ➜ say 100.base:(16) ===SORRY!=== This type (QAST::WVal) does not support positional operations

[perl #131238] [LTA] "This type cannot unbox to a native string" when not returning a `Str` from method `gist`

2017-05-02 Thread Sam S. via RT
Fair enough.

[perl #127204] [IO] for $fh.read(1024) -> $blob

2016-09-21 Thread Sam S. via RT
Unless I'm missing something, there is no bug here. Here's how each example works: for $fh.lines -> $line { ... } The .lines method is only called once, and returns a lazy sequence of lines (represented as a Seq object). The `for` loop then iterates this sequence. for $fh.read(1024) ->

[perl #129115] [BUG] loop doesn't allow the redeclaration of the symbol

2016-08-29 Thread Sam S. via RT
I found an old IRC discussion where TimToday specifically confirms that the `loop` construct doesn't get an exception to the consistent scoping rules of `my` variables: mikemol for(int foo; foo < n; ++foo) { /* some code */ } ; /* use

[perl #129115] [BUG] loop doesn't allow the redeclaration of the symbol

2016-08-28 Thread Sam S. via RT
Not a bug, as S04 explains: Blocks are delimited by curlies, or by the beginning and end of the current compilation unit (either the current file or the current EVAL string). Unlike in Perl 5, there are (by policy) no implicit blocks aro

[perl #128275] [BUG] Circular module dependency is not detected; causes program to hang

2016-05-29 Thread Sam S. via RT
Hm you're right, predeclaration doesn't seem to be the correct solution to your problem after all. But this bug tracker is not the right place for Perl 6 user support, it should be reserved for collecting info on actual Rakudo bugs. You should ask on the #perl6 IRC channel instead, I'm sure some

[perl #128275] [BUG] Circular module dependency is not detected; causes program to hang

2016-05-28 Thread Sam S. via RT
Relevant info from IRC discussion: psch: we did have circular module loading detection at some point... probably got clobbered with all the CUR work though :/ lizmat: before, the detection lived in the nqp code, if I recall lizmat: now, it is the responsibility of the CUR to detect circul

[perl #128275] Visitor Pattern requires too much CPU and causes the compile error

2016-05-28 Thread Sam S. via RT
You have circular dependency between your two modules. That's not allowed. In Bug/Acceptor.pm, instead of doing `use Bug::Visitor;`, predeclare it instead using `class Bug::Visitor {...}`. (Yes, those are three literal dots in the source code.) --- I'm leaving the ticket open for now, because

  1   2   >