Geth rakudo: 89f33bbee1 | (Zoffix Znet)++ | 2 files
Fix REPL breakage from last commit

Need to explicitly stringify DepSpec if we gonna .contains it.
REPL testing routines explicitly request the `none` REPL line editor, so the exploding logic that tries to figure out line editor to use was never exercised.
01:36
rakudo: e9cff7954a | (Zoffix Znet)++ | t/02-rakudo/repl.t
Explicitly unset REPL env vars for the test

In case testing environment has them set for some reason.
01:39
AlexDaniel please someone more knowledgeable review github.com/perl6/doc/commit/9b6068...9eec985674 09:32
[Tux] Rakudo version 2018.02.1-110-ge9cff7954 - MoarVM version 2018.02-22-g9233d85e7
csv-ip5xs0.802 - 0.804
csv-ip5xs-207.478 - 7.603
csv-parser36.423 - 36.623
csv-test-xs-200.459 - 0.469
test9.053 - 9.101
test-t2.516 - 2.533
test-t --race1.056 - 1.079
test-t-2045.409 - 45.817
test-t-20 --race15.666 - 16.368
10:05
jnthn AlexDaniel: About github.com/perl6/doc/commit/9b6068...9eec985674 - either the question should be refined to contain the words "between modules", or it should note that circular dependencies within a single compilation unit (e.g. file) can be handled fine enough by stubbing 12:15
I see it's under a modules heading, now I look at the context a bit more, but since it's indexed, people could I guess come to it straight from a search 12:16
But also, since Perl 6 has no "1 file = 1 class" limitation, in many cases moving various classes inside a compilation unit can be a solution too 12:17
AlexDaniel jnthn: github.com/perl6/doc/commit/1ffc90ee81 ? 12:21
jnthn AlexDaniel++ 12:22
MasterDuke jnthn: a native int array's AT-POS just returns nqp::atposref_i. it's atposref because it has to be writable, correct? 12:48
jnthn Correct 12:58
MasterDuke thanks, trying to figure out that native array optimization we talked about recently 13:00
m: loop (my int $i = 0; $i < 10_000_000; ++$i) { $ = $i }; say now - INIT now 14:23
camelia 1.94084471
MasterDuke m: for ^10_000_000 -> int $_ { $ = $_ }; say now - INIT now
camelia 1.6581478
MasterDuke m: my int $a; loop (my int $i = 0; $i < 10_000_000; ++$i) { $a = $i }; say $a; say now - INIT now
camelia 9999999
0.090344
MasterDuke m: my int $a; for ^10_000_000 -> int $_ { $a = $_ }; say $a; say now - INIT now 14:24
camelia 9999999
1.42030021
MasterDuke in the first case, for is faster, in the second, loop is faster
m: my $a; for ^10_000_000 -> int $_ { $a = $_ }; say $a; say now - INIT now 14:25
camelia 9999999
0.862367
MasterDuke m: my $a; loop (my int $i = 0; $i < 10_000_000; ++$i) { $a = $i }; say $a; say now - INIT now
camelia 9999999
0.6786487
MasterDuke and then if you don't type $a, the for becomes faster and the loop slower 14:26
Geth rakudo: MasterDuke17++ created pull request #1589:
Don't call Regexes in HyperRace's GrepCode
15:05
Zoffix m: my @has := (^10_000).eager; my @wanted := @has.grep(*.contains: '2').List; my $w = '2'; my $x = '2'; use Test; is-deeply @has.grep({ /<{$w}>/}).List, @wanted 15:25
camelia ok 1 -
Zoffix m: my @has := (^10_000).eager; my @wanted := @has.grep(*.contains: '2').List; my $w = '2'; my $x = '2'; use Test; is-deeply @has.grep({ /<{$w}>/}).List, @wanted
camelia ok 1 -
Zoffix m: my @has := (^10_000).eager; my @wanted := @has.grep(*.contains: '2').List; my $w = '2'; my $x = '2'; use Test; is-deeply @has.race.grep({ /<{$w}>/}).List, @wanted
camelia A worker in a parallel iteration (hyper or race) initiated here:
in sub _is_deeply at /home/camelia/rakudo-m-inst-1/share/perl6/sources/C712FE6969F786C9380D643DF17E85D06868219E (Test) line 632
in sub is-deeply at /home/camelia/rakudo-m-inst-1/ā€¦
Zoffix jnthn: ^ is the second one meant to work? If yes, any tips for fixing it? I'm getting the same errors when making .grep(Regex) work 15:26
it crashes with "Cannot find method 'Any' on object of type Match" or sometimes gives incorrect grepped results
s/second/last one/; 15:27
jnthn Zoffix: Wonder if it's some kind of tripping over $/ thing 15:37
m: my @has := (^10_000).eager; my @wanted := @has.grep(*.contains: '2').List; my $w = '2'; my $x = '2'; use Test; is-deeply @has.race.grep({ my $/; /<{$w}>/}).List, @wanted 15:38
camelia A worker in a parallel iteration (hyper or race) initiated here:
in sub _is_deeply at /home/camelia/rakudo-m-inst-1/share/perl6/sources/C712FE6969F786C9380D643DF17E85D06868219E (Test) line 632
in sub is-deeply at /home/camelia/rakudo-m-inst-1/ā€¦
jnthn Though in that case I'd have expected the above evaluation to fix it 15:39
oh
m: my @has := (^10_000).eager; my @wanted := @has.grep(*.contains: '2').List; my $w = '2'; my $x = '2'; use Test; is-deeply @has.race.grep({ my $/; m/<{$w}>/}).List, @wanted
camelia A worker in a parallel iteration (hyper or race) initiated here:
in sub _is_deeply at /home/camelia/rakudo-m-inst-1/share/perl6/sources/C712FE6969F786C9380D643DF17E85D06868219E (Test) line 632
in sub is-deeply at /home/camelia/rakudo-m-inst-1/ā€¦
jnthn Yeah, it's not that
Zoffix m: my $x = "2"; await ^100000 .map: { start /<{$x}>/.ACCEPTS: "42" }
jnthn m forces the evaluation right off
camelia ( no output )
Zoffix m: my $x = "2"; await ^100000 .map: { start /<{$x}>/.ACCEPTS: "42" }
camelia An operation first awaited:
in block <unit> at <tmp> line 1

Died with the exception:
Cannot find method 'Any' on object of type Match
in code at <tmp> line 1
jnthn Ah 15:41
I wonder if it's a mis-scoping in regex bug?
Zoffix Ah, yeah, it is 15:42
Zoffix goes to fix that 15:43
Hm, well, that *is* the problem for my last eval, but I'm not seeing the same for the eval with .race.grep 15:47
Guess I'll fix the one and then see if the other one still exists. 15:49
Ah, I'm blind. Yeah, there's a miscope in the race one as well 15:50
jnthn Zoffix++ # fixer of scopes
AlexDaniel oh my :| 16:15
yoleaux 12:52Z <tbrowder> AlexDaniel: your English is as good as most native-English speakers whose articles I read online these days, and better than many!
AlexDaniel did we have any Inline::Perl5 regression reported lately? 16:17
does not look soā€¦
ah, it's a regression in Inline::Perl5 itself! 17:01
wheeewā€¦
.tell nine plz github.com/niner/Inline-Perl5/issues/107 :) 17:13
yoleaux AlexDaniel: I'll pass your message to nine.
Zoffix m: role Foo { ::?ROLE.^add_multi_method: 'foo', method (|args) { dd args }; ::?ROLE.^add_multi_method: 'foo', method () { dd "herE" }; }; class :: does Foo {}.new.foo: :foo 17:22
camelia "herE"
Zoffix m: role Foo { ::?ROLE.^add_multi_method: 'foo', method (|args) { dd args }; ::?ROLE.^add_multi_method: 'foo', method (| ()) { dd "herE" }; }; class :: does Foo {}.new.foo: :foo
camelia \(:foo)
Zoffix The () candidate that commit added still takes all the named ones and it gets selected first when there are no positionals 17:23
AlexDaniel ahhhh 17:28
I see
Zoffix Looks like HEAD also has a single-pos-arg multi that has similar problem 17:32
m: role Foo { ::?ROLE.^add_multi_method: 'foo', method (| ()) { 42 }; ::?ROLE.^add_multi_method: 'foo', method (\arg, | ()) { 42 }; ::?ROLE.^add_multi_method: 'foo', method (|args) { 42 }; }; class :: does Foo {}.new.foo: :foo 17:36
camelia Cannot resolve caller foo(<anon|63896928>: :foo); none of these signatures match:
(Mu $: | is raw ())
(Mu $: \arg, | is raw ())
in block <unit> at <tmp> line 1
Zoffix (why weren't the last one added?) 17:37
dogbert17 m: for 1 .. 100 {my $a = "a" x 1_000_000; $a ~~ /./; } 17:49
camelia ( no output )
dogbert17 any ideas as to why the above snippet eats 500 Megs of ram? 17:50
Zoffix m: say 1_000_000*100*4 / 1024 / 1024 17:51
camelia 381.469727
Zoffix dunno. Do all those strings get made and used before any of them get a chance to be GCed?
dogbert17 good question, I ran valgrind on it and it seems as if most of the 'lost' memory is allocated in a function called 'collapse_strands()' 17:54
Zoffix that's the routine that unpacks roped strings that Str x int makes
huggable: ropes 17:55
huggable Zoffix, Flatten ropes: use nqp; say nqp::indexingoptimized("a" x 10)
AlexDaniel any reason why it has to do that?
to improve matching perf I guess?
it kind of makes sense actually, why would anybody be matching a str replicated 1 million times 17:56
Zoffix this uses same amount of RAM on my box; use nqp; for 1 .. 100 {my $a = nqp::indexingoptimized("a" x 1_000_000); $a ~~ /./; }
dogbert17 what happens with memory usage if you remove the match?
Zoffix and use nqp; my $a = nqp::indexingoptimized("a" x 1_000_000); for 1..100 { $a ~~ /./; } uses 87MB, while `use nqp; for 1 .. 100 {my $a = nqp::indexingoptimized("a" x 1_000_000); $a ~~ /./; nqp::force_gc}` uses 96MB, which corroborates my hypothesis 17:57
removing match still uses 470MB
Well, removing it while keepin nqp::indexingoptimized. I'd guess `for 1 .. 100 {my $a = "a" x 1_000_000; }` uses little RAM 'cause the string never gets de-roped 17:58
dogbert17 what if your looping through a large file and doing matches on each row, isn't that a similar idiom 17:59
Zoffix damn... best I can tell all QAST::Blocks are now properly scoped locally, but `my @has := (^10_000).eager; my @wanted := @has.grep(*.contains: "2").List; my $w = "2"; my $x = "2"; use Test; is-deeply @has.race.grep({ /<{$w}>/}).List, @wanted` still explodes 18:00
dogbert17 the problem description comes from RT #123974
synopsebot RT#123974 [new]: rt.perl.org/Ticket/Display.html?id=123974 [PERF] Running regex on string defined in a loop eats tons of memory
Zoffix dogbert17: I guess. The GC would run at some point I'd guess
dogbert17 Zoffix: perhaps 18:04
Zoffix :( `my $x = "2"; await ^100000 .map: { start /<{$x}>/.ACCEPTS: "42" }` is also now scoped right but still crashes the same 18:07
m: await ^100000 .map: { start /<{"2"}>/.ACCEPTS: "42" } 18:13
camelia An operation first awaited:
in block <unit> at <tmp> line 1

Died with the exception:
Cannot find method 'Any' on object of type Match
in code at <tmp> line 1
Zoffix don't even need no symbol access even
Zoffix gives Match.INTERPOLATE_ASSERTION a stare 18:15
Geth rakudo: fb882d498e | (Zoffix Znet)++ | src/Perl6/Actions.nqp
Fix cases of mis-scoped QAST::Block of regexes

  - Annotate regex's QAST::Block with in_stmt_mod and statement_id
   that's used by migrator routine to figure out what to migrate
  - Mark QAST::NodeList as a descendable node into the raker that
   looks for stuff to migrate
18:17
rakudo: 5e462e125d | (Zoffix Znet)++ | src/core/Rakudo/Internals/HyperRaceSharedImpl.pm6
Fix .grep(Regex) on Hyper/Race Seqs

Regex is a Callable, but we can't just invoke it with any object we want and gotta call .ACCEPS, which will set up the cursor and invoke the regex with it.
Fix by unifying GrepSM and GrepCode classes. Handling the Regex case in GrepCode makes that case 99% the same as GrepSM, so just unify them and make the class clone Callables and invoke them directly, while Regexes and rest of stuff would get .ACCEPTS calls.
18:37
Zoffix ZOFFLOP: t/spec/S11-modules/nested.t
Zoffix Ohhhh 18:39
/<{"2"}>/ uses EVAL and EVAL ain't (currently) thread-safe
So that's why it's crashing 18:40
Well, at least we fixed the QAST::Block migrations :P
(the ticket for &EVAL threadsafety is R#1391 ) 18:42
synopsebot R#1391 [open]: github.com/rakudo/rakudo/issues/1391 EVAL is not thread safe
Geth roast: 169937bec1 | (Zoffix Znet)++ | S32-list/grep.t
Cover .grep(Regex) on Race/Hyper seqs

Rakudo fix: github.com/rakudo/rakudo/commit/5e462e125d
18:43
nqp: usev6++ created pull request #429:
[JVM] Let seekfh return offset, not file handle
18:51
jstuder hey 6devs. I have a moar/nqp/rakudo fix (WIP) for signal enums matching the host system that I was hoping to get some feedback on 18:54
github.com/rakudo/rakudo/issues/1588
any feedback is appreciated :) 18:57
Zoffix (that stuff's over my head)
jstuder just need more exposure to C, I think. Trust me, the stuff you are achieving in Rakudo puts my meager efforts to shame :) 19:02
but we're all trying to get better and to contribute to a worthwhile project at the same time. That's why we're all here right? 19:05
Zoffix ZofBot: is that why you're here?
ZofBot Zoffix, think he worked in a bank
jstuder maybe that's not zofbot's reason then :P 19:06
Zoffix ZOFFLOP: t/spec/S32-list/grep.t (new test 45) 19:17
The one that test hypers with regexes that interpolates a shared scalar var :|
doesn't wanna flop when runnin on its own 19:18
jnthn jstuder: Will try and look at that this week (tomorrow if I can); prod me if I forget :) 19:26
jstuder ok will do. Nothing urgent but I just want to know that I'm not going about things the wrong way. Thanks. 19:28
timotimo jstuder: the first MVMROOT for sig_hash isn't right, you only need to root it after it was returned 19:30
Zoffix Ah, *phew* the flop was due to a flawed test :) 19:32
timotimo and in MVM_io_signal_handle we probably have to root a few things in case io_populate_sig_values gets called and causes a GC run, then queue, schedulee, and async_type may become stale pointers
Geth roast: e8e8329804 | (Zoffix Znet)++ | S32-list/grep.t
Do not assume .race returns stuff in order
19:33
jstuder timotimo: as far a rooting goes, does that apply to the other vars in the MVMROOT3 as well? We only want to root after the MVMObject is created? 19:34
timotimo if you initialize the variables to NULL, i believe it would be safe 19:35
jstuder so a best practice would be to initialize MVMCollectable (or what could be considered Collectable) pointers to either their desired values or to NULL before ROOTing so that if GC kicks in it's not trying to free whatever garbage is in memory, am I understanding correctly? 19:41
Zoffix Man t/spec/S10-packages/precompilation.t flopped and now it stuck in failed state in `not ok 47 - precompiled module constants get updated on change` 19:47
'cause I modified &dd and I doubt that affected that test.
Tried running `rm -fr **/.precomp` but it still fails :/
Zoffix runs `touch src/core/Any.pm6` and recompiles 19:48
nope, still fails. Weird 19:51
Ah, I guess I aborted one run and now one of the files got stuck modifed. This is why it's a good idea not to modify test files in-place during runs :/ 19:52
travis-ci Rakudo build failed. Zoffix Znet 'Fix .grep(Regex) on Hyper/Race Seqs
travis-ci.org/rakudo/rakudo/builds/348998026 github.com/rakudo/rakudo/compare/f...462e125df9
Zoffix travis-ci.org/rakudo/rakudo/builds/348998026 19:53
*sigh* useless robot
timotimo jstuder: it's less that it tries to free garbage, it's more that it'll try to figure out what kind of object it is by following a few pointers, which are rather likely invalid, and then invoking a function pointer afterwards 19:54
Zoffix ZOFFLOP: t/spec/S11-modules/require.t 19:58
ZOFVM: Files=1290, Tests=153252, 151 wallclock secs (20.41 usr 3.39 sys + 3231.36 cusr 164.81 csys = 3419.97 CPU)
Geth roast: c20e38ea2d | usev6++ | S32-encoding/encoder.t
[JVM] Fudge failing tests for encode-chars
19:59
rakudo: 7773c3d5e4 | (Zoffix Znet)++ | src/core/Any.pm6
Do not make Failures handled in &dd

Previously this didn't matter much, as .perl of both types of Failures was the same, but now that that's fixed, the output may make it seem the value given to &dd is an already-handled Failure, which isn't the case.
20:00
rakudo: b27c548fb6 | (Zoffix Znet)++ | 2 files
Differentiate precomp NC sub setup markers

Fixes github.com/rakudo/rakudo/issues/1576 R#1576
If a NativeCalled sub used is during precomp, it's marked as
  `$!setup`. However, when it's later used in non-precomp environment,
the stuff setup does is not available and so we get a SEGV.
Fix by using a separate marker for $!setup when we're in precomp mode so that when we switch to non-precomp mode, we setup again.
20:01
synopsebot R#1576 [closed]: github.com/rakudo/rakudo/issues/1576 [SEGV] Assigning NativeCall return value to constant segfaults on calling the sub again
rakudo: b5100d6a20 | (Zoffix Znet)++ (committed using GitHub Web editor) | 2 files
Merge pull request #1577 from rakudo/fix-R-1576--native-call-segv

Differentiate precomp NC sub setup markers
jstuder timotimo: ah i see. Thanks for the advice.
Zoffix ZOFVM: Files=1290, Tests=153253, 147 wallclock secs (21.13 usr 2.97 sys + 3147.11 cusr 156.99 csys = 3328.20 CPU) 20:06
Geth roast: a3e2a474f7 | usev6++ | S17-supply/throttle.t
[JVM] Skip dying test for Supply.throttle
20:16
travis-ci Rakudo build passed. Zoffix Znet 'Do not make Failures handled in &dd 21:01
travis-ci.org/rakudo/rakudo/builds/349019721 github.com/rakudo/rakudo/compare/5...73c3d5e4f5
AlexDaniel .tell jnthn can you install zstd and lrzip on your system? If yes, what version of zstd? 21:25
yoleaux AlexDaniel: I'll pass your message to jnthn.
AlexDaniel .tell jnthn asking because you're still assigned on R#1259, and now I have an easy way for you to run it on your system. As long as you can get zstd and lrzip installed!
yoleaux AlexDaniel: I'll pass your message to jnthn.
synopsebot R#1259 [open]: github.com/rakudo/rakudo/issues/1259 [SEGV][regression] SEGV when running whateverable tests
AlexDaniel .tell also needs to be linux 64-bit 21:26
yoleaux AlexDaniel: I'll pass your message to also.
travis-ci Rakudo build failed. Zoffix Znet 'Merge pull request #1577 from rakudo/fix-R-1576--native-call-segv 21:28
travis-ci.org/rakudo/rakudo/builds/349020209 github.com/rakudo/rakudo/compare/7...100d6a20d2
timotimo wakelift.de/2018/03/05/delays-and-delights/ - my first TPF grant report post is up now 23:25
jnthn timotimo++ 23:35
yoleaux 21:25Z <AlexDaniel> jnthn: can you install zstd and lrzip on your system? If yes, what version of zstd?
21:25Z <AlexDaniel> jnthn: asking because you're still assigned on R#1259, and now I have an easy way for you to run it on your system. As long as you can get zstd and lrzip installed!
synopsebot R#1259 [open]: github.com/rakudo/rakudo/issues/1259 [SEGV][regression] SEGV when running whateverable tests