Perl 6 language and compiler development | Logs at colabti.org/irclogger/irclogger_log/perl6-dev | For toolchain/installation stuff see #perl6-toolchain | For MoarVM see #moarvm
Set by Zoffix on 27 July 2018.
releasable6 Next release in ≈2 days and ≈11 hours. 4 blockers. Please log your changes in the ChangeLog: github.com/rakudo/rakudo/wiki/ChangeLog-Draft 07:00
lizmat Files=1257, Tests=83401, 341 wallclock secs (15.21 usr 5.49 sys + 2417.15 cusr 214.65 csys = 2652.50 CPU) 09:08
Geth nqp: d09bbd6754 | (Elizabeth Mattijsen)++ | tools/build/MOAR_REVISION
Bump MoarVM to get nine++'s latest write-int fix
09:19
¦ nqp: version bump brought these changes: github.com/MoarVM/MoarVM/compare/2...3-gee6ea72
rakudo: af96fbb438 | (Elizabeth Mattijsen)++ | tools/build/NQP_REVISION
Bump NQP for nine++ write-int fixes

Also gets latest [js] work by Paweł
09:35
¦ rakudo: version bump brought these changes: github.com/perl6/nqp/compare/2018....2-gd09bbd6
lizmat just changed the @LARRY label to CONSENSUS 09:38
lizmat m: dd buf8.^find_method("read-int8")(blob8.new(255),0) 10:05
camelia (signal SEGV)
[Tux] Rakudo version 2018.11-53-gaf96fbb43 - MoarVM version 2018.11-33-gee6ea722c
csv-ip5xs0.998 - 1.058
csv-ip5xs-208.008 - 8.574
csv-parser24.463 - 27.409
csv-test-xs-200.460 - 0.478
test8.069 - 9.405
test-t1.908 - 1.915
test-t --race0.829 - 0.865
test-t-2033.969 - 36.076
test-t-20 --race9.928 - 10.627
11:26
Working home, so that might have an influence, but the system load is low and there is plenty of memory available
[Tux] Phase of the moon? Number of square miles of clouds over random part of Africa? What? 13:03
Rakudo version 2018.11-53-gaf96fbb43 - MoarVM version 2018.11-33-gee6ea722c
csv-ip5xs0.911 - 0.968
csv-ip5xs-207.168 - 8.144
csv-parser22.526 - 24.458
csv-test-xs-200.436 - 0.441
test8.389 - 8.756
test-t1.759 - 1.877
test-t --race0.808 - 0.904
test-t-2031.877 - 34.504
test-t-20 --race9.552 - 9.840
Geth roast: 4a2b127f15 | (Elizabeth Mattijsen)++ | S03-buf/write-int.t
First stab at exhaustive testing of buf8.write-intX
13:07
Geth rakudo: 5cc0e02d42 | (Elizabeth Mattijsen)++ | src/core/Buf.pm6
Add buf8.write-uint128
14:21
rakudo: fecfb22d70 | (Elizabeth Mattijsen)++ | src/core/Buf.pm6
read/write-int/num should only be called on instances

As jnthn pointed out in M#2540
jnthn Note that we should still fix the SEGV at MoarVM leve too 14:23
*level
Geth roast: cf92a15059 | (Elizabeth Mattijsen)++ | S03-buf/write-int.t
Add tests for write-uint128
14:25
roast: 88a20c74f3 | (Elizabeth Mattijsen)++ | 3 files
Add tests for calling read/write-int/num on type object
14:37
timotimo do these functions have bounds checks now, btw? they didn't just before it was merged i think 15:01
jnthn m: say 4.25 / 5.31 15:04
camelia 0.800377
dogbert2_ jnthn: opt ? 15:06
jnthn Yup
If spectest passes :)
dogbert2_ very cool 15:07
lizmat m: blob8.new.read-int8(0)
camelia MVMArray: read_buf out of bounds offset 0 start 0 elems 0 count 1
in block <unit> at <tmp> line 1
lizmat timotimo: ^^^ does that answer your question?
Geth rakudo: e747b19a79 | (Jonathan Worthington)++ | src/Perl6/Actions.nqp
Avoid repeated PseudoStash creation in regexes

If we do something like:
   my $r = q|\d+|;
   "asdf123fdsa321" ~~ /<$r>/ for ^300_000;
... (6 more lines)
15:11
timotimo good :) 15:15
m: blob8.new(1).read-int32()
camelia Too few positionals passed; expected 2 or 3 arguments but got 1
in block <unit> at <tmp> line 1
timotimo m: blob8.new(1).read-int32(0)
camelia MVMArray: read_buf out of bounds offset 0 start 0 elems 1 count 4
in block <unit> at <tmp> line 1
timotimo m: blob8.new(1).read-int32(-1)
camelia MVMArray: read_buf out of bounds offset -1 start 0 elems 1 count 4
in block <unit> at <tmp> line 1
lizmat afk for the rest of today and parts of tomorrow& 15:19
Geth rakudo: adb85609c8 | (Jonathan Worthington)++ | src/core/Match.pm6
Bind a lexical to avoid it vivifying into a Scalar

This saves an allocation per match object creation; not much, but we could do with all the help we can get on this area.
15:56
rakudo: 91fd7cf8b2 | (Jonathan Worthington)++ | src/core/Match.pm6
Minor cleanup bringing decl and bind together
rakudo: f18432ea32 | (Jonathan Worthington)++ | src/core/Regex.pm6
Don't do method lookups into a variable

It's more efficient just to quote the name here; then spesh can see it's a normal method call and do specialization linking or inlining without an extra guard. With the variable, it has to do an extra gurad, which is cheap, but not free.
15:57
rakudo: 6c2f3c8346 | (Jonathan Worthington)++ | src/core/Regex.pm6
Use a single Braid for matches that don't need one

Simple regex matches simply don't need a Braid at all, so just make a single one per time we run Perl 6 and re-use it. It's a percent or so off a program doing a simple regex match in a hot loop.
lucasb m: (my int $x)++; say $x 16:49
camelia 1
lucasb m: (my int $x = 0)++; say $x
camelia Cannot resolve caller postfix:<++>(BOOTInt); the following candidates
match the type but require mutable arguments:
(Mu:D $a is rw)
(Int:D $a is rw)

The following do not match for other reasons:
(Bool:D $a is rw)
(Bool:U…
lucasb ----- :) 16:55
m: say my int8 $x = 127; say $x++; say $x
camelia 127
-129
-128
lucasb m: say my int16 $x = 32767; say $x++; say $x
camelia 32767
-32769
-32768
lucasb both bugs, right? 16:58
jnthn That's curious indeed 17:07
(And yeah, look like bugs to me) 17:12
AlexDaniel good news! Only one issue with modules: 17:19
Crypt::RC4 – Fail, Bisected: dd2af90cca8e1df56e8a770c99471414173215ef
Geth rakudo: 62243cd93a | (Jonathan Worthington)++ | src/core/Match.pm6
Avoid a throw-away cursor per <$rx> interpolation

This is worth at least 5% on a benchmark doing such interpolations in a loop.
AlexDaniel gist.github.com/AlexDaniel/eb6eb7c...965ec2b2e1 17:20
Geth rakudo: 01c56b484c | (Jonathan Worthington)++ | src/core/Regex.pm6
Re-use a "fail cursor" in simple regex matches

This saves at least 5% off a program doing regex matches in a tight loop, like:
   "asdf123fdsa321" ~~ /\d+/ for ^300_000
17:24
jnthn AlexDaniel: Looking at the error, it's quite possibly just exposing a bug in the module 17:28
AlexDaniel that's correct
jnthn Well, there's a few regexy speedups, anyways 17:30
m: say 3.87 / 5.31 17:31
camelia 0.728814
jnthn I've now not only made up for the performance regression in github.com/rakudo/rakudo/issues/2537 but made it probably 15% faster than it was before the issue : 17:32
And got some speedups on regexes generally :)
AlexDaniel my $sy := $!y < 0 ?? @!state[*+$!y] !! @!state[$!y]; 17:36
I guess that works
jnthn: oh wow, nice! 17:37
masak jnthn++ 17:47
yoleaux 07:15Z <jmerelo> masak: you're scheduled on the 16th, everything coming up good?
AlexDaniel OK, PR sent github.com/p6-pdf/Crypt-RC4-p6/pull/1/files
masak .tell jmerelo yup. :)
yoleaux masak: I'll pass your message to jmerelo.
masak wow, people are admirably curious about advent post status this year :) 17:48
not at all a bad thing, mind you. I might've forgotten. I hadn't, but I might've.
lucasb R#2541 17:52
synopsebot R#2541 [open]: github.com/rakudo/rakudo/issues/2541 Post-incrementing native integers across overflow boundary
lucasb for the first bug, camelia says postfix:<++>(BOOTInt), but locally I get postfix:<++>(Int) 17:54
Geth nqp: 3fe871ca16 | (Jonathan Worthington)++ | src/QRegex/Cursor.nqp
Allow a fail cursor to be provided in !cursor_init

Which will let us avoid the allocation of one every single time a regex is applied. (When we're applying simple regexes many times, the setup cost is a significant factor.)
17:56
jnthn oops, didn't notice I got an error when pushing that :) 17:57
b2gills jnthn: Looking at the past few changes, I'm wondering if where the two latest have `.'!cursor_start_cur'()` if it shouldn't be `.'!cursor_start_fail'()`. (I actually have no idea what it should be) 18:01
jnthn b2gills: No, it's correct; !cursor_start_fail is just an accessor for the very thing we're setting up here :) 18:02
b2gills Ok just checking
AlexDaniel releasable6: status 18:03
releasable6 AlexDaniel, Next release in ≈2 days and ≈0 hours. 4 blockers. 20 out of 62 commits logged (⚠ 2 warnings)
AlexDaniel, Details: gist.github.com/bb3dd6774b0c7d9af1...c92603a572
lucasb R#2542 18:04
synopsebot R#2542 [open]: github.com/rakudo/rakudo/issues/2542 Cannot assign and increment a native integer in the same expression
AlexDaniel what's going on in R#2520? Anybody has any idea?
synopsebot R#2520 [open]: github.com/rakudo/rakudo/issues/2520 [⚠ blocker ⚠] Trace traps and double frees when building Rakudo
lucasb ^^ same thing happens for native 'num's (#2542) 18:05
jnthn AlexDaniel: Well, `cur_frame = (MVMFrame *) 0x33` suggests that either we had a totally bogus cur_frame pointer there. How that could happen? No idea, from the info available. 18:10
I've no idea what influence OpenBSD could have on things to cause such a failure mode either.
Geth roast: 6f2f86cb2a | (Brad Gilbert)++ (committed using GitHub Web editor) | S03-buf/read-int.t
Fix copy-pasta in test descriptions of read-int.t

The previous change added tests for `read-int` called on type objects. It called the methods with `0` but the descriptions had a `-1` like the tests that followed them.
18:11
jnthn It'd be curious to see the stack trace for the non-JIT issue too, but even then, I'm not sure it'd tell me enough to know what the problem is. 18:12
jnthn afk 18:14
b2gills jnthn: OpenBSD writes gibberish into data when it gets freed. So it is probably a use after free bug 18:17
Or a use before initialization bug. 18:20
Geth nqp: 3fe17a6838 | (Stefan Seifert)++ | 6 files
Rebootstrap for correct signature of (read|write)(u?int|num) ops

The offset argument was specified as uint when it should have been an int. Fixing that requires a rebootstrap to avoid bytecode validator errors.
19:45
gfldex I'm getting segfaults with This is Rakudo version 2018.11-62-g01c56b484 built on MoarVM version 2018.11-33-gee6ea722c 19:52
The chance to crash is not that high. The script is thread heavy and needs to run a few seconds before it segfaults. 19:59
lucasb gfldex: is it a self-contained script? can you share it? 20:26
jnthn b2gills: I considered that, but then probably ASAN or Valgrind would show such things up, and I think they're clean (though worth checking) 20:37
b2gills Maybe there is a bug in code that doesn't get compiled by ASAN or Valgrind, but gets called by that code. 20:39
gfldex lucasb: sadly not and with coredumps on it wont crash :-/ 21:14