jnthn sleep; 'night o/ 00:08
MasterDuke g'night 00:10
timotimo i should probably go sleep, too ... have been sitting on a headache for hours 00:11
(and i don't mean the US election)
travis-ci Rakudo build passed. Zoffix Znet 'Add missing space in JVM travis ignore options 00:27
travis-ci.org/rakudo/rakudo/builds/174246481 github.com/rakudo/rakudo/compare/3...81bf415c43
japhb "sitting on a headache" brings to mind a rather contortionist image. 00:45
travis-ci Rakudo build passed. Zoffix Znet 'Prevent overflow when creating large Num literals 01:24
travis-ci.org/rakudo/rakudo/builds/174329287 github.com/rakudo/rakudo/compare/a...9d7e341248
Rakudo build passed. Elizabeth Mattijsen 'Mix in shapedness in the class, rather than instance 02:10
travis-ci.org/rakudo/rakudo/builds/174360862 github.com/rakudo/rakudo/compare/7...e632ee945d
Rakudo build passed. Elizabeth Mattijsen 'Streamline shapedarray.shape' 02:41
travis-ci.org/rakudo/rakudo/builds/174367064 github.com/rakudo/rakudo/compare/b...56768b7bfc
lizmat *, #perl6-dev! 10:38
.tell jnthn is the use of nqp::multidimref_i (on Moar) vs nqp::atposnd_i (on JVM) a relic, or should it stay this way ? 10:39
yoleaux2 lizmat: I'll pass your message to jnthn.
DrForr o/ x/ 10:50
dalek p: 0d2d1f5 | (Pawel Murias)++ | / (3 files):
[js] Add missing files.
jnthn lizmat: Moar has it right 11:52
yoleaux2 10:39Z <lizmat> jnthn: is the use of nqp::multidimref_i (on Moar) vs nqp::atposnd_i (on JVM) a relic, or should it stay this way ?
jnthn m: my :a[10]; @a[2,3] = 5,6; say @a
camelia rakudo-moar fb5676: OUTPUTĀ«===SORRY!=== Error while compiling <tmp>ā¤Malformed myā¤at <tmp>:1ā¤------> myā :a[10]; @a[2,3] = 5,6; say @aā¤Ā»
jnthn m: my @a[10]; @a[2,3] = 5,6; say @a 11:53
camelia rakudo-moar fb5676: OUTPUTĀ«[(Any) (Any) 5 6 (Any) (Any) (Any) (Any) (Any) (Any)]ā¤Ā»
jnthn j: my @a[10]; @a[2,3] = 5,6; say @a
camelia rakudo-jvm 8d357a: OUTPUTĀ«[(Any) (Any) 5 6 (Any) (Any) (Any) (Any) (Any) (Any)]ā¤Ā»
jnthn Oh, right, native int array
m: my int @a[10]; @a[2,3] = 5,6; say @a
camelia rakudo-moar fb5676: OUTPUTĀ«[0 0 5 6 0 0 0 0 0 0]ā¤Ā»
jnthn j: my int @a[10]; @a[2,3] = 5,6; say @a
camelia rakudo-jvm 8d357a: OUTPUTĀ«Cannot modify an immutable Intā¤ in block <unit> at <tmp> line 1ā¤ā¤Ā»
jnthn That's what doesn't work on JVM as a result of using atposnd_i
grmbl, failing at reproducing the 20-concurrent.t failure locally 12:10
Ah, finally got it 12:15
Figuring out exactly what's going on is turning out to be rather harder, alas. Will keep hunting after lunch. 12:51
dalek kudo/js: 2ce954d | (Pawel Murias)++ | src/vm/js/perl6-runtime/runtime.js:
[js] Fix bug.
13:09
kudo/js: 6e37be5 | (Pawel Murias)++ | src/vm/js/Perl6/Ops.nqp:
[js] Fix bug.
kudo/js: b956e06 | (Pawel Murias)++ | src/Perl6/Grammar.nqp:
[js] Add a workaround for known nqp bug. Works on moarvm for some reason I haven't fully investigated yet.
p: fa33242 | (Pawel Murias)++ | src/vm/js/Compiler.nqp:
[js] Make the contex set passed to loadbytecode accessible even when the CompUnit doesn't have a .main set.
13:11
viki NeuralAnomaly: status 13:12
NeuralAnomaly viki, [āœ˜] Next release will be in 1 week and 3 days. Since last release, there are 27 new still-open tickets (1 unreviewed and 1 blockers) and 224 unreviewed commits. See perl6.fail/release/stats for details
viki NeuralAnomaly: blockers
NeuralAnomaly viki, There is 1 release blocker. See perl6.fail/release/blockers
viki, perl6.fail/130031 : gmake install step fails under Windows for 2016.10 with the Strawberry Perl buildchain
viki (if anyone is up to giving that one a go... :))
jnthn viki: Is that a regression? 13:19
viki jnthn: seems so. stmuk_ in the ticket says this problem did not exist in 2016.07
jnthn May already be fixed by MoarVM commit 404ed261be00e2 13:22
viki Ah. Will test on HEAD when I get a chance.
jnthn And I fixed another module pre-comp Windows issue since the last release also
(the second one was an issue involving rename)
(due to a missing .close somewhere) 13:23
Huh. It seems that it actually explodes on $vow.keep 13:49
viki m: dd (class Foo {} andthen 42) 13:52
camelia rakudo-moar fb5676: OUTPUTĀ«slip()ā¤Ā»
viki Hm, the docs say it returns the "first undefined arg", but the code returns an Empty :/
oh lulz... and fixing that fixes the bug I was hunting 13:53
now to understand why :/ 13:57
jnthn Update: seems that 20-concurrent.t can run into two different bugs. It's looking likely that I've got a fix for one of them so far.
viki (it doesn't help that my coworkers are having a cackling marathon grr)
Cool. jnthn++ 13:58
jnthn Turned out that issue wasn't nativecall specific. If you've run into "Cannot invoke" style things at the start of programs that set off a bunch of promises, then it may well have been this issue. 14:01
viki m: dd Slip.new andthen 42 14:02
camelia rakudo-moar fb5676: OUTPUTĀ«WARNINGS for <tmp>:ā¤Useless use of constant integer 42 in sink context (line 1)ā¤slip()ā¤Ā»
viki m: dd (Slip.new andthen 42)
camelia rakudo-moar fb5676: OUTPUTĀ«-> ;; $_ is raw { #`(Block|80757088) ... }ā¤Ā»
viki I wonder if that's a problem?
Basically the slip disappears and andthen gets 1 arg, which is thunked
m: dd (Slip.new orelse 42) 14:03
camelia rakudo-moar fb5676: OUTPUTĀ«-> ;; $_ is raw { #`(Block|58409168) ... }ā¤Ā»
viki Will cross that bridge when there's a real-life use-case with an issue, I guess. 14:04
dalek kudo/nom: a1d8e93 | lizmat++ | src/core/ (3 files):
Make copying shaped arrays 10x to 20x faster

  - create some custom iterators
  - special case from int/num arrays
  - slight regression for 1dimmed arrays: will look at that next
14:06
tadzik bloody hell, lizmat++ 14:07
this is such a pleasure to see commitlines like these :)
lizmat it is writing them as well :-) 14:08
viki \o/
I want to change this 6.c-errata test. It's broken. It should test for Any, just as the test before it, not for Empty: github.com/perl6/roast/blob/6.c-er...dthen.t#L9 14:11
Objections?
lizmat agree the test is flawed 14:13
m: dd (Any andthen 2) # huh? 14:14
camelia rakudo-moar a1d8e9: OUTPUTĀ«slip()ā¤Ā»
viki Yeah
And that's the cause of this bug: 14:15
m: say (Str andthen .uc orelse "foo")
camelia rakudo-moar a1d8e9: OUTPUTĀ«-> ;; $_ is raw { #`(Block|53815800) ... }ā¤Ā»
viki oh man, fixing that causes 8 failures :/ gist.github.com/zoffixznet/5899262...5a53e737c4 14:17
Well, 7 14:18
Oh, it's the same thing, it's testing for Empty 14:19
jnthn d'oh, I've found the second 14:21
viki m: my $side-effect = 0; dd ([\andthen] Int, ++$side-effect).gist; dd $side-effect 14:22
camelia rakudo-moar a1d8e9: OUTPUTĀ«"((Int))"ā¤Int $side-effect = 0ā¤Ā»
viki With my fix, it gives "((Int) (Int))"
dalek kudo/nom: 49fd825 | jnthn++ | lib/NativeCall.pm6:
Set up return type before flagging we're set up.

Fixes a race condition when multiple threads use a native callsite for the first time.
14:29
viki m: my $side-effect = 0; dd ([\orelse] 42, ++$side-effect).gist; dd $side-effect
camelia rakudo-moar a1d8e9: OUTPUTĀ«"(42 42)"ā¤Int $side-effect = 0ā¤Ā»
viki And this corroborates the two-(Int) result is right.
timotimo wow, how did i miss that 14:30
dalek p: 32ae9f9 | jnthn++ | tools/build/MOAR_REVISION:
Get MoarVM with method cache deserialize race fix.
14:31
kudo/nom: 0134132 | jnthn++ | tools/build/NQP_REVISION:
Bump for MoarVM method cache deserialize race fix.

This fixes various instabilities in programs that launch a bunch of concurrent work at startup. It was the second cuase of issues in t/04-nativecall/20-concurrent.t, but its effects were wider.
14:34
lizmat pulls and builds
dalek kudo/nom: 84eaff4 | jnthn++ | t/04-nativecall/20-concurrent.t:
Test no longer flops.

Or at least, in 100 attempts, I can no longer make it do so. Let's see what Travis and others think.
14:36
jnthn That should do it. 14:37
viki I've no idea why there's a few tests using andthen in S04-statement-modifiers/with.t :/ 14:38
jnthn Perhaps because they're almost equivalent 14:39
viki Well, if you're testing what `with` produces, just test against an expected result, instead of generating it with `andthen` :) 14:41
m: dd (42 with Nil)
camelia rakudo-moar a1d8e9: OUTPUTĀ«slip()ā¤Ā»
viki And it looks like `with` uses andthen under the hood
jnthn Yup
viki oh noes 14:42
jnthn I remember that being very intentional
Though my memory of those times is hazy
Pretty sure it was TimToady++ who added with/without though, and mentioned some equivalence with andthen/orelse
viki jnthn: hm, if it's intentional, then there's a bit of an issue: andthen returns Empty instead of the first undefined thing (as advertised in the docs and as, say, `orelse` does). So it can't be chained with things like orelse, because Empty messes it up. BUT, making it actually return the first undefined thing messes up the way `with` works 14:44
I see notandthen also returns an Empty
m: say (Str andthen .uc orelse "foo") 14:45
camelia rakudo-moar a1d8e9: OUTPUTĀ«-> ;; $_ is raw { #`(Block|51173592) ... }ā¤Ā»
jnthn viki: Think you'll have to run it past TimToady++ for an answer :)
viki ^ that is the result of Empty being given to orelse, but if I fix that...
m: dd (42 with Nil)
camelia rakudo-moar a1d8e9: OUTPUTĀ«slip()ā¤Ā»
viki This starts to give Nil
jnthn Yeah, which'll mess quite some things up 14:46
viki .ask TimToady could you give a ruling on whether andthen/notandthen should return Empty or the first undefined value? It creates a conflict with orelse/with either way and with needs to be rewritten without andthen: irclog.perlgeek.de/perl6-dev/2016-...i_13539174
yoleaux2 viki: I'll pass your message to TimToady.
lizmat jnthn: build + spectest 15:36
ok
jnthn: still errors with HARNESS_TYPE=6, resulting in ===MoarVM panic: Internal error: zeroed target thread ID in work pass 15:37
in the end
afk again& 15:38
dalek kudo/nom: 43cb55f | cpin++ | src/core/metaops.pm:
RT #129363: duckmap preserves structure

Implements deepmap and duckmap in terms of the same code.
15:44
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=129363
dalek kudo/nom: 1ee5247 | cpin++ | src/core/metaops.pm:
duckmap/deepmap: changes suggested in #perl6
kudo/nom: 06a84b1 | cpin++ | / (4 files):
Move coremap to Rakudo::Internals
rakudo/nom: 75f1547 | (Zoffix Znet)++ | / (4 files):
ast: cbff557 | cpin++ | S (2 files):
RT #129363: duckmap preserves structure types (#180)

  * RT #129363: duckmap preserves structure types
  * Correct oversight in duckmap test
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=129363
viki For some reason dalek doesn't report all the commits... This one went in unreported: github.com/rakudo/rakudo/commit/b4...66e707d766 15:49
lizmat viki: if it was one of a set, dalek has the tendency to just stop reporting, indeed
ah, it was a single one ? 15:50
viki Yeah, but maybe by the time they reached dalek, it combined.
I merged, then went to make change on my VM and then pushed the one that's missing.
lizmat brb 15:53
viki ZOFVM: Files=1200, Tests=130131, 153 wallclock secs (22.25 usr 3.25 sys + 2692.14 cusr 253.22 csys = 2970.86 CPU) 15:54
dalek ast/6.c-errata: 4d2ab2c | (Zoffix Znet)++ | S03-metaops/hyper.t:
Fix incorrect assumptions in test

The test checks whether duckmap is nodal, which is still the case and no 6.c-breaking behaviour occured. However, the way the test is done assumes duckmap always produces lists instead of maintaining original Iterables.
The latter is the correct behaviour, per TimToady[^1], and has been reported in RT#129363[^2], and fixed today[^3].
  [1] irclog.perlgeek.de/perl6/2016-09-26#i_13285724
  [2] rt.perl.org/Ticket/Display.html?id=129363
  [3] github.com/rakudo/rakudo/commit/75...3489481294
16:02
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=129363
lizmat .tell jnthn: any chance of optimizing dispatch:<!> ? On a benchmark of "my @a[10] = ^10; for ^10000 { my @b[10] = @a }" it is taking about 20% cpu :-( 17:32
yoleaux2 lizmat: What kind of a name is "jnthn:"?!
lizmat .tell jnthn any chance of optimizing dispatch:<!> ? On a benchmark of "my @a[10] = ^10; for ^10000 { my @b[10] = @a }" it is taking about 20% cpu :-(
yoleaux2 lizmat: I'll pass your message to jnthn.
lizmat .tell jnthn so I'm considering ripping out all private method calls where possible 17:33
yoleaux2 lizmat: I'll pass your message to jnthn.
timotimo oh, i merged the branch but didn't push 18:04
dalek kudo/nom: fdc90a2 | timotimo++ | src/Perl6/Metamodel/BUILDPLAN.nqp:
enable POSTBUILD to take part in object construction

it will be called after everything else has been done. it'll get the same arguments as the BUILD submethod, but things have already been initialized, default values populated, ...
kudo/nom: 9409d68 | timo++ | src/Perl6/Metamodel/BUILDPLAN.nqp:
POSTBUILD was bikeshod to TWEAK.
kudo/nom: 6b8d481 | moritz++ | t/spectest.data:
Run TWEAK tests
kudo/nom: cee1012 | timotimo++ | / (2 files):
05a4fe5 | lizmat++ | src/core/ (2 files):

This speeds up shaped array access and various methods like .keys
  / .pairs / .values etc. by about 2x
viki Can if !nqp::isnull($TWEAK) && $TWEAK { be simplified to just if $TWEAK { ? 18:06
timotimo would probably be able to explode on jvm 18:07
viki Cool. timotimo++
This was one of the things I was complaining about some time in the past :D
timotimo the TWEAK thing? 18:10
or nqp::isnull being missing causing the jvm to asplode?
viki The TWEAK thing. 18:11
timotimo i'm glad to hear about that 18:13
in the past i never really noticed the need, it apparently completely passed me by, or i just forgot
which is a shame because it was such a trivial addition to make
kudo/nom: 0cf7b36 | lizmat++ | src/core/Shaped1Array.pm:
Make copying 1dimm shaped arrays about 10x fast
timotimo wow, 2x? that is surprising to me 18:34
i thought calling private methods ought to be faster
lizmat yes, I thought so too when I started using them 18:38
jnthn It should be; they're meant to be rewritten in Perl6::Optimizer to simply reference the method in question. 18:39
yoleaux2 17:32Z <lizmat> jnthn: any chance of optimizing dispatch:<!> ? On a benchmark of "my @a[10] = ^10; for ^10000 { my @b[10] = @a }" it is taking about 20% cpu :-(
17:33Z <lizmat> jnthn: so I'm considering ripping out all private method calls where possible
jnthn Well, or alternatively investigate why the opt isn't happening :P 18:40
travis-ci Rakudo build failed. Zoffix Znet 'Use more idomatic code for passing Bool named args' 18:53
travis-ci.org/rakudo/rakudo/builds/174524815 github.com/rakudo/rakudo/compare/7...6a62ef3612
buggable [travis build above] ā˜  Did not recognize some failures. Check results manually.
lizmat is utterly scared of the optimizer 18:56
lizmat looks for "private" in src/Perl6/Optimizer.nqp and adds some debug code 18:57
viki had luck with running something akin to perl -pi -e 's/^(s*multi|sub|method)s+(S+)([^{]+)/$1 $2$3 nqp::say("in $1 $2");/g' src/Perl6/Optimizer.nqp. I forget the exact incantation I used, but it adds a debug print for each method called :) 19:04
There's also RAKUDO_OPTIMIZER_DEBUG var
lizmat timotimo jnthn: I think I found the issue 19:27
if you have a private method call in source referring to compiled code
like in the setting, it doesn't find nqp::getobjsc($meth)
and probably vice-versa: if compile code refer to a private method that lives in a role being compiled. same issue 19:28
so in the case of the R:I:ShapeIterator, it calls a !result method that the role doesn't have 19:29
I can see now how the Optmizer would have a problem with that 19:30
vice-versa, I'm not so sure...
but I guess it's not speshing it either 19:31
so what I did for the ShapeIterator was the right thing (for now at least) 19:34
and whenever I see dispatch:<!> appear in a profile, I will look at it :) 19:35
dalek kudo/nom: e87009e | lizmat++ | t/spectest.data:
Test files end with .t
19:54
kudo/nom: a822bcf | (Zoffix Znet)++ | src/core/Exception.pm:
Fix crash during exception reporting

Attempting to call .message on either X::Composition::NotComposable or X::Inheritance::Unsupported exception would cause a crash, referencing
  "no method .item,"
Not sure why, but the bug is fixed by changing $. twigils to $! when accessing attributes. Something to do with when these exceptions are made?
Fixes RT#129906: rt.perl.org/Ticket/Display.html?id=129906
20:00
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=129906
ast: 1e5a081 | (Zoffix Znet)++ | integration/error-reporting.t:
Test composition errors do not crash when printing

RT#129906: rt.perl.org/Ticket/Display.html?id=129906
20:01
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=129906
viki m: try EVAL Q|role A {...}; 2 does A|; 20:05
camelia rakudo-moar 0cf7b3: OUTPUTĀ«Use of uninitialized value of type Any in string context.ā¤Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.ā¤ in any try_select at gen/moar/m-Metamodel.nqp line 2653ā¤Ā»
viki Should we be fixing that warning or just let it be?
lizmat feels fix worthy 20:06
viki ok :)
:o 20:15
Added a debug print to print the type of $cur_candidate here and when run with the above code it gets printed ~1250 times! github.com/rakudo/rakudo/blob/nom/....nqp#L2126 20:16
dalek kudo/nom: d27ecfa | lizmat++ | src/core/ShapedArray.pm:
Make >1dimmed shaped array copying 20% faster

Don't use private helper methods, use lexical helper subs
20:34
kudo/nom: f06e4c3 | lizmat++ | src/core/Rakudo/Internals.pm:
Make setting up a shaped array 2x as fast

This will become less important once we set up a shaped array at compile time, but until then, it's nice to have this.
lizmat m: role A { method !a {} }; class B does A { method a() { self!a } }; B.a # call inside B::a to A::!a does *not* get optimized! 20:39
camelia ( no output )
lizmat timotimo jnthn: ^^^ should it be possible to optimize it in that case or not ? 20:40
github.com/rakudo/rakudo/blob/nom/....nqp#L1676 # reason it's not optimizing 20:44
aka nqp::getobjsc($meth) is null 20:45
m: role A { method !a { }; method a { self!a } }; class B does A { }; B.a # even if they live in the same role, in the class they do not get optimized 20:52
camelia ( no output )
lizmat only if the private method and the caller actually live in the same *class*, will the private method call be optimise 20:54
d
lizmat hopes jnthn timotimo can shine their light on ^^^ 20:56
These are the roles in the settings currently affected by lack of optimizing private methods: 21:08
Grepper Blob Buf Dateish Iterable XX-Whatever ShapedArrayCommon MappyIterator Shaped1Array Shaped2Array ShapedNArray TypedArray
s/ShapedNArray/Shaped3Array/ 21:09
jnthn Methods are cloned during role composition 21:17
And so will not be in the SC
I guess we could just poke them in to it... :) 21:18
lizmat well, wouldn't that increase the size of the binary ?
jnthn ? 21:19
No
The stuff all ends up serialized anyway
It's discovered by walking the object graph 21:20
lizmat I mean: won't that negatively affect bare startup ?
jnthn Adding it explicilty to the SC just gives you an index to use to talk about it.
Doubt it'll affect bare startup
If anything it'd help
Because the slow path needs the full HOW deserialized to resolve the method
Whereas if we reference it directly by a wval we'd potentially just deserialize the method 21:21
If it's called
dalek kudo/nom: f5bf6c1 | lizmat++ | src/core/TypedArray.pm:
Make creation of typed shaped arrays 15% faster
21:28
lizmat and with that I'm calling it an end to this miserable day 21:29
good night, #perl6-dev!
jnthn Good plan 21:31
'night, lizmat++
dalek ast: a3a4177 | usev6++ | S09-typed-arrays/native-int.t:
Fudge tests for antipairs + native arrays for JVM

These tests started to fail with commit c5c6001125
22:30
timotimo viki: now how about an "is TWEAK" attribute trait? :) 22:45
well, really "will TWEAK" would be a saner spelling :) 23:47
you'd have to use the passive form of TWEAK ... which it ... TWOKE? TWOKEN?