[perl #125716] [LTA] error on typo

2017-10-01 Thread Aleks-Daniel Jakimenko-Aleksejev via RT
I guess this is not better, but it's progress: ===SORRY!=== Error while compiling -e Could not instantiate role 'A': Cannot invoke this object (REPR: Null; VMNull) at -e:1 On 2015-07-29 04:08:02, elizabeth wrote: > Please merge with #125716 or vice-versa :-) > > > On 29 Jul 2015, at 12:58, Tobi

[perl #125821] [LTA] error message when doing .rotate(Inf)

2017-10-01 Thread Aleks-Daniel Jakimenko-Aleksejev via RT
It is better now, but still LTA: This type cannot unbox to a native integer: P6opaque, Failure in block at -e line 1 On 2015-08-14 22:27:20, alex.jakime...@gmail.com wrote: > Code: > say .rotate(Inf); > > Result: > Earlier failures: > No zero-arg meaning for infix:<%> > in block at ./test.pl:2

[perl #125816] [9999] "x".indent(9999999999999999999999999999999999999999999999999)

2017-10-01 Thread Aleks-Daniel Jakimenko-Aleksejev via RT
Now it complains about unboxing a large int. On 2015-08-14 21:07:37, alex.jakime...@gmail.com wrote: > First part is OK, but once we start increasing the number it falls > apart. > > say "x".indent(9); > repeat count > 1073741824 arbitrarily unsupported... > in bloc

[perl #125820] [9999] .roll(-9999999999999999999999999999999999999999999999999)

2017-10-01 Thread Aleks-Daniel Jakimenko-Aleksejev via RT
This now simply complains about unboxing a large integer. Not sure when this changed, but testneeded. On 2015-08-14 22:21:17, alex.jakime...@gmail.com wrote: > Code: > say e> .roll(-9).perl; > > Result: > it hangs > > Code: > say e> .roll(- > e> 99

[perl #126101] [BUG] 0.lotsof9s badly approximated

2017-10-01 Thread Aleks-Daniel Jakimenko-Aleksejev via RT
I think this is already fixed in https://github.com/rakudo/rakudo/commit/f6e25b54ea18ba7bd7d7861537d2439933000cb3 ¦f6e25b54ea18ba7bd7d78^: 1.83886070 Rat|999/1611392 True ¦f6e25b54ea18ba7bd7d78: 1 Rat|999/1000

[perl #125336] Weird infinite ranges: Inf..0, -Inf..0 and NaN..0

2017-10-01 Thread Aleks-Daniel Jakimenko-Aleksejev via RT
I think that this stuff is resolved. Not sure when exactly because bisectable is refusing to work today, but this is TESTNEEDED. On 2015-06-05 09:18:44, alex.jakime...@gmail.com wrote: > Code: > .say for Inf..0 > > Result: > -9223372036854775808 > -9223372036854775808 > -9223372036854775808 > -922

[perl #124455] substr on compact array

2017-10-01 Thread Aleks-Daniel Jakimenko-Aleksejev via RT
Oh wow, that's really interesting… and old. I don't think that substr should work like this. Normal arrays are stringified by 「substr」, why would it do something completely different for a native array? So for both UInt and uint8 arrays I'd expect “65 66 67” as an output. I think this ticket is r

[perl #124197] [REGEX] * quantifier infinite loop

2017-10-01 Thread Aleks-Daniel Jakimenko-Aleksejev via RT
This reminds me of https://rt.perl.org/Ticket/Display.html?id=132004 On 2015-03-27 15:01:38, drf...@pobox.com wrote: > OS: Ubuntu 14.04 LTS on VirtualBox > Host: Windows 8, dual Core i5 > > Rakudo version: current as of 3/25/2015 > > This edge case invokes the OOM killer on my test machine. It req

Re: [perl #132195] Feature request: Have Test.pm6 tests accept an optional second description.

2017-10-01 Thread Tom Browder via RT
On Sun, Oct 1, 2017 at 17:23 Zoffix Znet via RT wrote: > On Sun, 01 Oct 2017 10:10:55 -0700, tbrowder wrote: ... > My vote on this feature is a most definite -1. I see no reason to > over-engineer a core module to support some fringe usecase. > The tests routines return the test status, so you ca

Re: [perl #132195] Feature request: Have Test.pm6 tests accept an optional second description.

2017-10-01 Thread Tom Browder
On Sun, Oct 1, 2017 at 17:23 Zoffix Znet via RT wrote: > On Sun, 01 Oct 2017 10:10:55 -0700, tbrowder wrote: ... > My vote on this feature is a most definite -1. I see no reason to > over-engineer a core module to support some fringe usecase. > The tests routines return the test status, so you ca

[perl #132195] Feature request: Have Test.pm6 tests accept an optional second description.

2017-10-01 Thread Zoffix Znet via RT
On Sun, 01 Oct 2017 10:10:55 -0700, tbrowder wrote: > The purpose of the second description would be for use if a test > fails. For example we look at the current output of a successful test > of a module’s META6.json file: > > t/000-meta-test.t .. > 1..1 > ok 1 - have a META file > ok 2

[perl #132195] Feature request: Have Test.pm6 tests accept an optional second description.

2017-10-01 Thread Zoffix Znet via RT
On Sun, 01 Oct 2017 10:10:55 -0700, tbrowder wrote: > The purpose of the second description would be for use if a test > fails. For example we look at the current output of a successful test > of a module’s META6.json file: > > t/000-meta-test.t .. > 1..1 > ok 1 - have a META file > ok 2

Re: Perl 6 Object Construction - General Advice

2017-10-01 Thread Daniel Schröer
Am 30.09.2017 19:34 schrieb "Mark Devine" : My most common OC case: initialize attributes at OC time from external input that will be parsed with grammars &/| scrubbed with elaborate conditional tests. Just a shot in the dark without fully understanding the above: maybe your difficulties indicat

Re: Perl 6 Object Construction - General Advice

2017-10-01 Thread Brandon Allbery
On Sun, Oct 1, 2017 at 4:56 PM, Timo Paulssen wrote: > *method new* is useful only if you want to take positional parameters for > the .new — the default new you get from *Mu* only accepts named arguments > and passes them on as-is to *self.bless*. They then get passed to every > *BUILD* and *TWE

Re: Tip: assign a value to a hash using a variable as a key

2017-10-01 Thread ToddAndMargo
On 10/01/2017 09:17 AM, Brandon Allbery wrote:      (b d) What does the ".succ" do? In this case it's just an example of an expression that wouldn't have worked by normal interpolation (although $v.succ() would have, as I described earlier). succ is short for "successor"; thin

Re: Perl 6 Object Construction - General Advice

2017-10-01 Thread Timo Paulssen
I wrote another more in-depth (but potentially less useful to you) mail about this further down the thread, but I thought it'd be good to point this out near the top: I think the /self.bless(|%args)!initialize/ idiom is a work-around for /submethod TWEAK/ not yet existing when this code was writte

Re: Perl 6 Object Construction - General Advice

2017-10-01 Thread Timo Paulssen
Here's the internal details of the guts: BUILDALL has so far been sort of an interpreter for something called the "buildplan". When a class gets composed (usually what happens immediately when the parser sees the closing } of the class definition) all attributes are considered along with their def

Re: Perl 6 Object Construction - General Advice

2017-10-01 Thread Brandon Allbery
On Sun, Oct 1, 2017 at 1:02 PM, yary wrote: > > I hadn't heard of TWEAK, thought that BUILD was for setting private > attributes and other tasks the object runs to build itself. > IIRC having BUILD overrides default values, so if you want to have those and still adjust things at object initializa

[perl #132195] Feature request: Have Test.pm6 tests accept an optional second description.

2017-10-01 Thread via RT
# New Ticket Created by Tom Browder # Please include the string: [perl #132195] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=132195 > The purpose of the second description would be for use if a test fails. For example we lo

Re: Perl 6 Object Construction - General Advice

2017-10-01 Thread yary
I barely write any p6 but my impression was to avoid bless, and stick with using named arguments for object creation. Using positional parameters forces creating a "method new ..." I hadn't heard of TWEAK, thought that BUILD was for setting private attributes and other tasks the object runs to bui

Re: [perl #132194] $*PROGRAM-NAME is not assignable / does not change process's name

2017-10-01 Thread Brandon Allbery
On Sun, Oct 1, 2017 at 12:35 PM, Zoffix Znet wrote: > $*PROGRAM-NAME is supposed to be a replacement for Perl 5's $0, but it > doesn't work that way. > > What I'd expect to work: > > use v6; > $*PROGRAM-NAME = 'foo'; > This is not portable and not reliable --- although it will probably work on t

Re: [perl #132194] $*PROGRAM-NAME is not assignable / does not change process's name

2017-10-01 Thread Brandon Allbery via RT
On Sun, Oct 1, 2017 at 12:35 PM, Zoffix Znet wrote: > $*PROGRAM-NAME is supposed to be a replacement for Perl 5's $0, but it > doesn't work that way. > > What I'd expect to work: > > use v6; > $*PROGRAM-NAME = 'foo'; > This is not portable and not reliable --- although it will probably work on t

[perl #132194] $*PROGRAM-NAME is not assignable / does not change process's name

2017-10-01 Thread via RT
# New Ticket Created by Zoffix Znet # Please include the string: [perl #132194] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=132194 > Opening a ticket, per https://github.com/perl6/roast/issues/339 ---8<

Re: Tip: assign a value to a hash using a variable as a key

2017-10-01 Thread Brandon Allbery
On Sun, Oct 1, 2017 at 4:01 AM, ToddAndMargo wrote: > On 09/30/2017 07:59 PM, Brandon Allbery wrote: > >> Inside " " strings, variables like $foo and (simple) expressions >> (described above) will be replaced by their values; and you can use { } to >> insert the result of any expression. (This al

Re: Tip: assign a value to a hash using a variable as a key

2017-10-01 Thread Brandon Allbery
On Sun, Oct 1, 2017 at 4:01 AM, ToddAndMargo wrote: > On 09/30/2017 07:59 PM, Brandon Allbery wrote: > >> parenthesized expression (so, "hi $foo.name " will not >> work (it'll expand '$foo' instead of '$foo.name ') but >> "hi $foo.name ()" will,

Re: Tip: assign a value to a hash using a variable as a key

2017-10-01 Thread Brandon Allbery
On Sun, Oct 1, 2017 at 4:32 AM, Richard Hainsworth wrote: > > >> Is English your first Language? I asked this because of your use >>> >> of the word "interpolate", which you used correctly. >> > This is an odd question and comes across as prejudiced. If someone uses a > word correctly, then how

Re: [perl #132183] Insufficient debug messages from zef/perl6.bat when package build fails

2017-10-01 Thread Steve Mynott
It seems a bit unfair ("shooting the messenger") blaming zef for module install error messages and after all it does says "Perl 5 version requirement not met" Looking at what triggers this error... https://github.com/niner/Inline-Perl5/blob/master/Build.pm#L6 suggests you need 5.18 or better and

Re: [perl #132183] Insufficient debug messages from zef/perl6.bat when package build fails

2017-10-01 Thread Steve Mynott via RT
It seems a bit unfair ("shooting the messenger") blaming zef for module install error messages and after all it does says "Perl 5 version requirement not met" Looking at what triggers this error... https://github.com/niner/Inline-Perl5/blob/master/Build.pm#L6 suggests you need 5.18 or better and

Re: Tip: assign a value to a hash using a variable as a key

2017-10-01 Thread ToddAndMargo
On 10/01/2017 01:32 AM, Richard Hainsworth wrote: Remember also that Larry Wall - perl's "inventor" - is a linguist, and the use of language in perl6 space in particular reflects that. Hi Richard, Hmm. That does explain its ease of use over other languages. I really liked Perl 5, althoug

[perl #130125] [REGEX] negative numbers in ranges are understood incorrectly (/ .**{-10..-5} /)

2017-10-01 Thread Zoffix Znet via RT
On Thu, 17 Nov 2016 14:14:25 -0800, alex.jakime...@gmail.com wrote: > *Code:* > say ‘abcefghij’ ~~ / .**{-10..-5} / > > *Result:* > 「abcefghij」 > > I think it should match nothing. Thank you for the report. This is now fixed. Fix: https://github.com/rakudo/rakudo/commit/681d6be9742e7c0 Test:

[perl #130127] [REGEX] Excluded endpoints in ranged quantifiers do not work at all (/ .**{2^..^2} /)

2017-10-01 Thread Zoffix Znet via RT
On Thu, 17 Nov 2016 14:32:19 -0800, alex.jakime...@gmail.com wrote: > *Code:* > say ‘abcefghij’ ~~ / .**{0..^2} / > > *Result:* > 「ab」 > > I expected 「a」 > > > *Code:* > say ‘abcefghij’ ~~ / .**{2^..^2} / > > *Result:* > 「ab」 > > I expected it not to match anything (as if it was 3..1). Than

[perl #130911] [REGEX] bogus range o ** { 1..0 } succeeds

2017-10-01 Thread Zoffix Znet via RT
On Sat, 04 Mar 2017 01:09:20 -0800, lloyd.fo...@gmail.com wrote: > my $i = 0; > say "ooo" ~~ / "o" ** {1..$i} / #-> 「ooo」 > > It is impossible to match "one or more up to a maximum of zero" times. This > should just fail to match. If you do a literal '1' without it does the > right thing: > > per

[perl #130911] [REGEX] bogus range o ** { 1..0 } succeeds

2017-10-01 Thread Zoffix Znet via RT
On Sat, 04 Mar 2017 01:09:20 -0800, lloyd.fo...@gmail.com wrote: > my $i = 0; > say "ooo" ~~ / "o" ** {1..$i} / #-> 「ooo」 > > It is impossible to match "one or more up to a maximum of zero" times. This > should just fail to match. If you do a literal '1' without it does the > right thing: > > per

[perl #130124] [LTA] NaN in quantifiers is not allowed, message complains about P6opaque (/ .**{NaN..NaN} /)

2017-10-01 Thread Zoffix Znet via RT
On Thu, 17 Nov 2016 14:09:50 -0800, alex.jakime...@gmail.com wrote: > *Code:* > say ‘abcefgh’ ~~ / .**{0..NaN} / > > *Result:* > This type cannot unbox to a native integer: P6opaque, Failure > in block at -e line 1 > > *Code:* > say ‘abcefgh’ ~~ / .**{NaN..5} / > > *Result:* > This type canno

[perl #130127] [REGEX] Excluded endpoints in ranged quantifiers do not work at all (/ .**{2^..^2} /)

2017-10-01 Thread Zoffix Znet via RT
On Thu, 17 Nov 2016 14:32:19 -0800, alex.jakime...@gmail.com wrote: > *Code:* > say ‘abcefghij’ ~~ / .**{0..^2} / > > *Result:* > 「ab」 > > I expected 「a」 > > > *Code:* > say ‘abcefghij’ ~~ / .**{2^..^2} / > > *Result:* > 「ab」 > > I expected it not to match anything (as if it was 3..1). Than

[perl #130124] [LTA] NaN in quantifiers is not allowed, message complains about P6opaque (/ .**{NaN..NaN} /)

2017-10-01 Thread Zoffix Znet via RT
On Thu, 17 Nov 2016 14:09:50 -0800, alex.jakime...@gmail.com wrote: > *Code:* > say ‘abcefgh’ ~~ / .**{0..NaN} / > > *Result:* > This type cannot unbox to a native integer: P6opaque, Failure > in block at -e line 1 > > *Code:* > say ‘abcefgh’ ~~ / .**{NaN..5} / > > *Result:* > This type canno

[perl #130125] [REGEX] negative numbers in ranges are understood incorrectly (/ .**{-10..-5} /)

2017-10-01 Thread Zoffix Znet via RT
On Thu, 17 Nov 2016 14:14:25 -0800, alex.jakime...@gmail.com wrote: > *Code:* > say ‘abcefghij’ ~~ / .**{-10..-5} / > > *Result:* > 「abcefghij」 > > I think it should match nothing. Thank you for the report. This is now fixed. Fix: https://github.com/rakudo/rakudo/commit/681d6be9742e7c0 Test:

Re: Tip: assign a value to a hash using a variable as a key

2017-10-01 Thread Richard Hainsworth
    4) "interpolating" as it refers to Perl (not math, where you "guess"     what a value is based on values on both sides of you). Replacing something inside a string with the string representation of its value. This sense is also used in documentation for the shell, where you can also

Re: Tip: assign a value to a hash using a variable as a key

2017-10-01 Thread ToddAndMargo
On 09/30/2017 07:59 PM, Brandon Allbery wrote: On Sat, Sep 30, 2017 at 10:30 PM, ToddAndMargo > wrote: On 09/30/2017 02:15 PM, Brandon Allbery wrote: Basically: < > is single quotes and treats variables and expressions as literals. << >> is doub