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.
Geth nqp/nqp-mbc: 2f9fbb1278 | (Stefan Seifert)++ | src/vm/moar/QAST/QASTCompilerMAST.nqp
Bring back serialization string heap optimization

With a few tricks MoarVM can use the bytecode file's string heap for strings needed in deserialization, too. This avoids the need for setting up a string list in dependencies+deserialize.
08:35
nqp/nqp-mbc: 7694fcf901 | (Stefan Seifert)++ | src/vm/moar/QAST/QASTOperationsMAST.nqp
Use unbox_u to get at MAST::Local's $!index to avoid the coercion dance
dogbert2_ there's a passing TODO in t/05-messages/02-errors.t, test #3 11:19
lizmat dogbert2_: I'm not seeing that :-( 11:27
correction: I do 11:28
Geth rakudo: 18eed380b0 | (Elizabeth Mattijsen)++ | t/05-messages/02-errors.t
Unfudge passing test, dogbert++
11:29
Zoffix There's a 6.c spec `ok Nil.ACCEPTS(Any) == Nil, 'Nil.ACCEPTS always returns Nil';` 11:58
But that's a broken test, because it's using `==` operator. Were it to use `===`, it'd fail because that method returns False
And there's a commented out piece of code in rakudo saying actually making it return Nil hangs roast: github.com/rakudo/rakudo/blob/mast...il.pm6#L12 11:59
Geth roast: ac1ad09150 | (Zoffix Znet)++ | S02-types/nil.t
Correct Nil tests

Don't use `==` for testing for a `Nil`. Correcting these tests shows Nil.ACCEPTS(Any) returns False in rakudo, so fudge that test.
I don't really see the point of making this special behaviour for ACCEPTS. IIRC only regexes return something other then True/False.
12:02
Zoffix I guess it makes sense when you consider Failures are Nilk 12:06
R#2419 12:07
synopsebot R#2419 [open]: github.com/rakudo/rakudo/issues/2419 Nil.ACCEPTS returns False and flawed spec says it must be Nil
Geth roast: bd7bdb82d5 | (Zoffix Znet)++ | S02-types/nil.t
Extra test for Nil.FALLBACK with args
12:09
dogbert2_ lizmat, Zoffix: do you have failing tests in t/spec/S06-currying/positional.t ? 12:24
lizmat++ (fixing tests)
Zoffix 15:58 lizmat this seems to break some tests in t/spec/S06-currying/positional.t that apparently do not expect the coerce_type to appear
15:58 lizmat imo the tests are broken
Geth rakudo: 65d4fd7144 | (Elizabeth Mattijsen)++ | src/core/Nil.pm6
Update reason for commenting out
12:26
tbrowder___ hi all, question on rakudo nqp: is it worthwhile to specify int type for indices? currently such is not consistent, but there is a lot of array indexing scattered throughout, many without explicit typing 12:41
Zoffix tbrowder___: theoretically yes, but I when I tried, I got slightly slower results. Someone (diakopter or maybe Ven`) commented about that on one of my NQP commits and said the slower results were due to boxing somewhere. 12:50
nine tbrowder___: yes, it is.
Ven` doesn't recall doing that(?)
nine Well, it's always a good idea to look at the spesh log. Sometimes we do crazy coercion and boxing dances 12:51
Zoffix Ven`: then maybe it was someone else 12:51
Ven` At least I'd be surprised, because I'm bad at this low-level stuff. 12:52
tbrowder___ theoretically, most of the pod code is compile-time during parsing, so wouldn’t boxing/unboxing not apply? 12:53
the indices are typically over arrays of chars 12:54
Geth rakudo: 45eeab7876 | (Elizabeth Mattijsen)++ | 2 files
Implement Code.cando

  - which is a very simple smartmatch of the signature with the capture
  - the Routine.cando one is much more complex as it support multi dispatch
  - fixes R#2420
  - also make sure Routine.cando only takes instantiated captures
12:55
synopsebot R#2420 [open]: github.com/rakudo/rakudo/issues/2420 [RFC] Some Callables can't do .cando
rakudo: a434a187ef | (Tom Browder)++ (committed using GitHub Web editor) | docs/rakudo-nqp-and-pod-notes.md
add info
13:01
Geth rakudo: 69533b5064 | (Elizabeth Mattijsen)++ | src/core/Code.pm6
Make sure Code.cando has the same return type as Routine.cando

Even though it will always be either a zero or 1 element list
13:12
Geth roast: 86dc2d14e6 | (Elizabeth Mattijsen)++ | S06-other/introspection.t
Added tests for R#2420
13:31
synopsebot R#2420 [open]: github.com/rakudo/rakudo/issues/2420 [testneeded] Some Callables can't do .cando
Geth rakudo: 4154e7447a | (Tom Browder)++ (committed using GitHub Web editor) | docs/rakudo-nqp-and-pod-notes.md
add note on pod token .ast handling
14:08
tbrowder___ another grammar/actions question: would adding classes instead of always using .ast be counterproductive? it would at least be easier IMHO to see the parse flow for persons new to the code. 14:14
Zoffix tbrowder___: I don't understand what you mean 14:33
Zoffix Like.. what do you by classes instead of .ast? .ast is just a data store to shuttle stuff between tokens. I don't understand how classes enter the picture to replace that. 14:35
*do yo umean 14:36
Zoffix m: 'bark bark bark'.encode.decode('utf-c8').say 14:39
camelia Can not decode a utf-8 buffer as if it were utf-c8
in block <unit> at <tmp> line 1
Zoffix Why not? It's just bytes.
samcv Zoffix: good question. i am not against letting people do that 14:40
Zoffix TIL that Liskov was a woman 14:43
(just 'cause of that Slavik-sounding last name which doesn't have a feminine ending) 14:44
s/was/is/; 14:45
Filed as R#2421 14:46
synopsebot R#2421 [open]: github.com/rakudo/rakudo/issues/2421 [LTA] Cannot decode a buffer of bytes if it was produced by utf8 encode
Zoffix hm, so .decode: $encoding doesn't use the Encoding::Registry stuff yet, does it? 14:51
hm, looks like .slurping an IO::Path also doesn't see that I registerd a new encoding 14:53
IO::Handle works. Good 'nuf for now, I guess
Zoffix decides to pick another topic for 6.d teaster 14:56
tbrowder___ Zoffix: the problem with ast, for me, is it’s harder to find its format without a lot of searching, but if it were a class instance it would be easier to (1) find its member attributes and (2) use the attributes. That would be at least a bit self-documenting, and the only question for me is how much, if any, is performance affected. 15:11
Zoffix tbrowder___: I've no idea what you mean.
You know there's a .dump method, on QAST and Match objects? 15:12
I've no idea what you mean by "its format"? 15:13
Like it's already an introspectable object. 15:15
tbrowder___ yes, but the dump method is very tedious, and doesn’t directly help change structure—it merely shows the layout of the object. 15:16
afak, the introspection is done through the dump, and can’t be seen otherwise. 15:19
*afaik
Zoffix tbrowder___: are we talking about QAST::Node objects or something else? 15:42
nine Oh the joy of fixing merge conflicts because of whitespace cleanup :/ github.com/perl6/nqp/commit/86362f...d3f52637bf 16:05
For future reference: please just don't 16:06
Zoffix :) 16:08
Zoffix c: 2015.12,HEAD my @needles = 1, 2, 3, 10, 100; my @haystack = ^1000 .pick: 600; { for ^1000 { my $ = @needles ⊆ @haystack }; say now - ENTER now } 16:18
committable6 Zoffix, ¦2015.12: «20.1532034␤» ¦HEAD(74687ae): «0.4214398␤» 16:19
Zoffix i.kym-cdn.com/photos/images/newsfe...1308706785
47.82x as fast 16:20
japhb Zoffix wouldn't that potentially give different timings simply as a matter of whether @needles actually is a subset of @haystack, and how quickly that can be determined? (e.g., what if @haystack has no 1 in it?) 16:24
Since the two different versions would potentially pick different @haystacks I mean. 16:25
Zoffix *sigh* 16:28
jnthn Yeah, I was annoyed by that PR doing so called "code quality improvements", which mostly meant `final` clutter, whitespace changes, style changes that aren't better just different...I didn't see a single useful thing in there. Wish I'd not been distracted with other things and could have shot the PR down before it got merged :/ 16:41
Maybe we need a tighter commit policy on NQP, as MoarVM and Rakudo have. 16:42
AlexDaniel nine: git merge -Xignore-all-space ? 16:46
nine AlexDaniel: how do I do that in a rebase? 16:59
AlexDaniel `git rebase -Xignore-all-space master` ? 17:00
or whatever the branch is
AlexDaniel the behavior of that stuff is somewhat dodgy, but you're reviewing the results anyway, right? :) 17:02
tbrowder___ Zoffix: i'm talking about match objects and their .ast slot. i guess they eventually become QAST objects, but I'm trying to modify things, in rakudo nqp code, that have been "made" but need to be modified before the final class definition is completed. 17:09
nine AlexDaniel: yeah, it's not like I'm merging to master today :) 17:17
AlexDaniel thanks :D 17:18
nine Except for... how are we doing on the release? I would like to merge a couple of preparatory commits to get rid of a couple of bootstrap cycles
AlexDaniel actually, yeah
AlexDaniel starts release branches 17:19
feel free to do whatever you want
in nqp and rakudo at least
lizmat: according to CI (AppVeyor) some tests are failing on Windows after your commits 17:30
Geth rakudo: fa3dc0ab52 | (Zoffix Znet)++ (committed using GitHub Web editor) | t/05-messages/02-errors.t
Use valid port number
17:35
Zoffix That test looks bogus 17:37
AlexDaniel: I don't think the async sock issues are completely fixed. That test is meant to die with "invalid argument", but on my box it dies with "Failed to resolve host name 'localhost' with family 152. Error: 'ai_family not supported'" 17:46
hm, or at least it does with my latest version of the test :/ 17:47
Geth nqp/nqp-mbc: 60 commits pushed by (Stefan Seifert)++
review: github.com/perl6/nqp/compare/7694f...c019c98834
17:48
rakudo/nqp-mbc: 95de4e2ab4 | (Stefan Seifert)++ | src/vm/moar/Perl6/Ops.nqp
Get rid of MAST
rakudo/nqp-mbc: 994fac8612 | (Stefan Seifert)++ | src/vm/moar/Perl6/Ops.nqp
Take the list ouf of MAST::InstructionList
rakudo/nqp-mbc: 49304528ef | (Stefan Seifert)++ | src/vm/moar/Perl6/Ops.nqp
Get rid of push_ilist
nine That was one tough rebase
Zoffix ah, k, it's just one you get if you go way too high with the port
nine But rebasing gave me a .5 seconds boost in stage mast :) 17:53
Of course I expect the same boost in master...but who knows? 17:54
Zoffix tbrowder___: no, they remain Match objects. .ast methods can contain whatever you need them to contain, which in Rakudo's Grammar/Actions would most often be QAST::Node objects. You can modify them any way you want with positional and operations and assigning to attributes for named args. Also, MoarVM's remote debugger ( App::MoarVM::Debug ) can let you inspect those objects in realtime.
tbrowder___: so basically to me it sounds like you want to have custom classes in places where we already have generic classes in hopes that it'd be easier to use, but IMO having a universal set of operations (positionals/nameds access) is far more useful and easier to use than a billion custom classes. This is especially true later in the food chain, such as static optimizer where you could be combing 17:56
over a node that comes from anywhere. It's useful to have them all be QAST::Node than SomeCustomClassWithLongDescThatWeUseForBegingBlocks
hm, looks like the port argument to async sock is overwriting some data in memory: 17:58
m: start { sleep 2; exit }; react whenever IO::Socket::Async.listen: "localhost", 2¹⁷-1 { done }
camelia An operation first awaited:
in block <unit> at <tmp> line 1

Died with the exception:
invalid argument
in block <unit> at <tmp> line 1
Zoffix ^ Looks good
m: start { sleep 2; exit }; react whenever IO::Socket::Async.listen: "localhost", 2¹⁸-1 { done }
camelia An operation first awaited:
in block <unit> at <tmp> line 1

Died with the exception:
Failed to resolve host name 'localhost' with family 3. Error: 'ai_family not supported'
in block <unit> at <tmp> line 1
Zoffix family 3? Huh?
m: start { sleep 2; exit }; react whenever IO::Socket::Async.listen: "localhost", 2⁶³-1 { done }
camelia An operation first awaited:
in block <unit> at <tmp> line 1

Died with the exception:
Failed to resolve host name 'localhost' with family 65535. Error: 'ai_family not supported'
in block <unit> at <tmp> line 1
timotimo that's about ipv4, ipx, ipv6, etc
Zoffix family 65535? lol.
timotimo addres family
Zoffix timotimo: yeah, but I'm not changing family. I'm changing port. 17:59
timotimo oh, that's weird
jnthn I believe the port is bitwise or'd with the shifted family to pass it down to the VM 18:00
So if the port number isn't being validated before that happens, those bits will be treated as the family
Zoffix Ah 18:01
R#2423 18:02
synopsebot R#2423 [open]: github.com/rakudo/rakudo/issues/2423 [LTA] Bad error with too high port in IO::Socket::Async.listen
tbrowder___ Zoffix: ok, thnx for yr opinion, i'll chug on and tend to documenting to the code in the meantime 18:03
Zoffix tbrowder___: Just .dump the object. It'll show you what set of positional/named operations you need to perform on it to get to the part you want to reach 18:06
eco: CoreHackers::Q
buggable Zoffix, CoreHackers::Q 'Perl 6 QAST Visualizer': modules.perl6.org/dist/CoreHackers:...fix%20Znet
Zoffix tbrowder___: and that module can make it easier to navigate the dumps from --target=ast/optimize 18:07
Geth rakudo: 6b43a22cc4 | (Zoffix Znet)++ | t/05-messages/02-errors.t
Fix/Re-fudge sock error test on Windows

  - The test was overly complicated as the error already occurs
   just from the first listen
  - On Windows, however, this test just sits there forever,
   with no response inside the whenever
   R#2424 github.com/rakudo/rakudo/issues/2424
18:10
synopsebot R#2424 [open]: github.com/rakudo/rakudo/issues/2424 [Windows] High port in IO::Socket::Async.listen appears to hang on Win32
Zoffix AlexDaniel: ^ that fixes the AppVeyor issue. Not quite sure how it was passing in the past, considering it hangs on 2017.07 18:11
AlexDaniel hmmm
Zoffix Oh, it was todo-ed all along 18:13
And now passes on Linux
Geth rakudo: 532c12c95a | (Zoffix Znet)++ (committed using GitHub Web editor) | .travis.yml
Use verbose `make test` on travis

  "Failed test 42" is rarely useful, especially when you can't repro locally.
Verbose tests will give more info on how the failing test fails
18:18
Geth rakudo: 54483d1fdb | (Zoffix Znet)++ (committed using GitHub Web editor) | appveyor.yml
Use verbose `make test` on appveyor

  "Failed test 42" is rarely useful, especially when you can't repro locally.
Verbose tests will give more info on how the failing test fails
Not quite sure this syntax is right, but maybe it is.
18:20
travis-ci Rakudo build errored. Zoffix Znet 'Use valid port number' 18:48
travis-ci.org/rakudo/rakudo/builds/445788309 github.com/rakudo/rakudo/compare/7...3dc0ab5203
buggable [travis build above] ✓ All failures are due to: timeout (6 failures). 18:48
Geth rakudo: 64693a213d | (Elizabeth Mattijsen)++ | src/core/Rakudo/Internals.pm6
Make internal encoding sanity lookup about 6x as fast
19:16
rakudo: lizmat self-assigned Cannot decode a buffer of bytes if it was produced by utf8 encode github.com/rakudo/rakudo/issues/2421
078b05f646 | (Elizabeth Mattijsen)++ | src/core/Buf.pm6
19:18
Geth rakudo: 790d4c7ae2 | (Elizabeth Mattijsen)++ | src/core/Buf.pm6
Remove check on encoding type when decoding utfX

  - basically, let the Blob.decode do the work
  - which, incidentally, adds :replacement and :strict optional nameds
  - in response to R#2421
  - makes the core setting about 3K smaller
  - no spectests were hurt during this operation
20:28
synopsebot R#2421 [open]: github.com/rakudo/rakudo/issues/2421 [LTA][RFC] Cannot decode a buffer of bytes if it was produced by utf8 encode
Geth rakudo: lizmat self-unassigned Cannot decode a buffer of bytes if it was produced by utf8 encode github.com/rakudo/rakudo/issues/2421
5f3da88c65 | (Zoffix Znet)++ | 2 files
20:37
travis-ci Rakudo build failed. Zoffix Znet 'Use verbose `make test` on appveyor 20:43
travis-ci.org/rakudo/rakudo/builds/445810085 github.com/rakudo/rakudo/compare/5...483d1fdb60
buggable [travis build above] ☠ Did not recognize some failures. Check results manually. 20:43
travis-ci Rakudo build failed. Elizabeth Mattijsen 'Remove check on encoding type when decoding utfX 21:13
travis-ci.org/rakudo/rakudo/builds/445868523 github.com/rakudo/rakudo/compare/0...0d4c7ae292
buggable [travis build above] ☠ Did not recognize some failures. Check results manually. 21:13
lizmat The command "make install" exited with 0. 21:14
Done. Your build exited with 1.
WAT?
travis-ci Rakudo build passed. Zoffix Znet 'Do verbose test after finalizing install' 22:09
travis-ci.org/rakudo/rakudo/builds/445894647 github.com/rakudo/rakudo/compare/7...3da88c65c1
Geth rakudo: c717b62be9 | (Zoffix Znet)++ | 2 files
Add missing verbose arg to prove
23:25