IOninja cool 00:22
travis-ci Rakudo build failed. Elizabeth Mattijsen 'Make %% about 14x faster for Int,Int case 02:25
travis-ci.org/rakudo/rakudo/builds/204332866 github.com/rakudo/rakudo/compare/7...5e25bd575c
buggable [travis build above] ✓ All failures are due to timeout (0), missing build log (1), or GitHub connectivity (0).
IOninja Has SeekFromCurrent, SeemFromBeginning, etc. stuff been bikeshed to death? 02:32
Wondering why such long-to-type args as opposed to just :start, :current, :end named args 02:33
and global Enums vs. named args too
the only seek tests I recall are the ones I wrote a month or so back... 02:34
.. I think...
mhm, no matches for `grep -R 'Seek' .` in 6.c-errata 02:35
IOninja will propose this for a change in the Action Plan for the IO grant
.oO( :from-beginning, :from-current, :from-end )
02:36
m: @*ARGS = '--foo=SeekFromEnd'; sub MAIN (Str :$foo) {} 02:38
camelia Usage:
<tmp> [--foo=<Str>]
IOninja tehe :)
MasterDuke how do i find if a QAST::Var has a value (during optimize time, not run time)? 05:59
nine ugexe: that's a staging repo. It's meant for packaging, i.e. the generated files would be copied into another, existing repository. We delete the staging repo's version file so the version file of the target repo does not get overwritten. 07:51
ugexe: Also so that not every module package (e.g. rpm) contains the same version file as that would create file conflicts on installation. 07:52
lizmat IOninja: re Seekxxx, lack of imagination I guess 09:09
I though the names would be better than 0, 1, 2 which they were before that 09:10
*thought
Geth rakudo/nom: e270a15beb | (Elizabeth Mattijsen)++ | src/core/Rakudo/Iterator.pm
Make sure we can Mu xx *
rakudo/nom: 1811b80dc0 | (Elizabeth Mattijsen)++ | src/core/Rakudo/Iterator.pm
Introducing R:I.OneValueTimes

The future foo xx 42 workhorse. However, since turning foo xx 42 into a Seq currently breaks >>xx<< , we can't yet actually put it into production.
09:12
nine How often does one use seek anyway? It's not like any other instruction will be a seek. Though I have to admit that named arguments make a lot of sense there :) 09:13
|Tux| This is Rakudo version 2017.02-44-g1811b80dc built on MoarVM version 2017.02-9-gc5379702 10:51
csv-ip5xs 2.845
test 12.635
test-t 4.895 - 5.479
csv-parser 12.938
timotimo wow, that's quite a bit of variance 11:14
lizmat m: dd 1 xx 3 12:46
camelia (1, 1, 1)
lizmat m: dd 1 >>xx<< 3 12:47
camelia (1, 1, 1)
lizmat m: dd 1 Z 3
camelia ((1, 3),).Seq
lizmat m: dd 1 >>Z<< 3 # huh ?
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing << or >>
at <tmp>:1
------> 3dd 1 >>Z<7⏏5< 3 # huh ?
expecting any of:
infix
infix stopper
jnthn hehe, I got bit by that yesterday 12:48
First clue: look where it was when it didn't get the << it wanted
timotimo yeah, it's trying to have Z< as the op
m: (1, 2, 3) Z< (9, 2, 1) 12:49
jnthn Right. :-) Z is a meta-op, and by LTM it gets the <
camelia Potential difficulties:
Useless use of Z< in sink context
at <tmp>:1
------> 3(1, 2, 3) 7⏏5Z< (9, 2, 1)
timotimo m: say (1, 2, 3) Z< (9, 2, 1)
camelia (True False False)
timotimo yeah, '<' is longer than ''
jnthn Aye :)
And then one-pass -parsing means we commit to it :)
MasterDuke if i have a QAST::Var in Optimize.nqp, how can i tell if it has a compile-time value (in my test case i know it does, but .has-compile-time-value is always 0)? 12:59
find_lexical looked promising, but didn't work either 13:01
timotimo i think .has_compiletime_value exists? 13:02
maybe has_compile_time_value
MasterDuke yeah, but it's always 0 13:03
IOninja m: dd 1 >>[Z]<< 3
camelia ((1, 3),).Seq
timotimo oh
jnthn MasterDuke: When would this occur?
A QAST::Var represents a variable 13:04
MasterDuke jnthn: well, i'm testing with this `my $a = 0; loop (my $abc = 0; $abc <= 10000000; $abc += 5) { }; say $a`. and looking to see if $abc has (had?) a compile time value at the += 5 point 13:05
jnthn Well, has_compile_time_value being 0 there is right, 'cus it doesn't 13:07
MasterDuke heh. and i don't see a had_compile_time_value
jnthn I don't really understand that notion. 13:08
timotimo since you're already in that place, you could see if you can get the value of infix:<+>() at optimize-time
and also, if you can figure out if the variable is native in which case it can't be undefined 13:09
MasterDuke jnthn: this is in regards to $abc += 5 being much slower than $abc = $abc + 5
they optimize to similar code, but the += has a `if p6definite` added. and `call` vs `callstatic` (but i think i've figured that one out) 13:10
timotimo oh yeah, jnthn, did you see that? 2 seconds to do it with native ints and a = a + 5, but almost 250 seconds to do it with +=
MasterDuke i was surprised by the time difference between $a+=5 and $a=$a+5, a profile is kind of interesting. += is 25% spesh, 75% jit, 6000262 frames entered (1999795 eliminated by in-lining). = + is 100% jit, 671 frames entered(5999385 eliminated by in-lining) 13:11
for `my $a = 0; loop (my $b = 0; $b <= 10000000; $b+=5) { $a+=$b }; say $a` vs `my $a = 0; loop (my $b = 0; $b <= 10000000; $b=$b+5) { $a=$a+$b }; say $a` 13:12
jnthn I wonder if the itme diff is largely down to call vs callstatic? 13:14
*time
That's the difference between inlining and not
MasterDuke i think that was most of it 13:15
jnthn But I guess what you're really asking is if there's a way to find out if the variable is always assigned a definite value for its lifetime 13:16
And that's a data flow analysis question
timotimo aye, there could be $b = Any inside the loop body 13:17
MasterDuke jnthn: pretty much. looking here: github.com/rakudo/rakudo/blob/nom/....nqp#L1647
jnthn Right, or it could escape to an rw sub :)
timotimo yup
jnthn We can't afford to do that kind of stuff in Perl6::Optimizer, really
It's much more in the realm of stuff spesh could do at some point 13:18
Perl6::Optimizer generally needs to be cheap, though.
timotimo spesh really needs to be fixed so that it can also run optimize_bb over the bbs it inlines ... :\
jnthn Once I'm done with race/hyper, and rewriting ThreadPoolScheduler, spesh will probably be my focus again. 13:20
It'll also probably change quite a lot
MasterDuke well, what i've done so far is copy these lines github.com/rakudo/rakudo/blob/nom/...1560-L1563 to right before 1647
and make those :op('call') depend on the result 13:21
which does turn the 'call' from += in my test into 'callstatic' and passes spectest
jnthn That sounds reasonable 13:22
MasterDuke k, i'll PR that 13:23
argh, i was wrong. call vs callstatic alone is almost no difference in time 13:33
this has the --target=optimize output of += vs = +, and the diff: gist.github.com/MasterDuke17/e9665...0324d23c14 13:35
hm, well there is a little savings 13:37
timotimo well, the call is only executed once 13:46
wait, am i reading that correctly 13:47
which call is the non-static one before your patch?
MasterDuke i should be inside the loop, right?
*it
the `&infix:<+>` 13:48
timotimo there's two &infix:<+> there
MasterDuke and after my patch they're all callstatic 13:49
vs all call before 13:50
seems to be ~5% faster 13:51
it's a little faster, but nothing more is inlined 13:53
so still 6000262 frames vs 671
so += is ~5% faster after my patch, but still way off of = + 13:54
Geth rakudo: MasterDuke17++ created pull request #1022:
Optimize &METAOP_ASSIGN a bit
14:12
MasterDuke if i change the body of `my $a = 0; loop (my $b = 0; $b <= 10000000; $b=$b+5) { $a=$a+$b }; say $a` to `{ $a=$a+$b; if rand < 0.5 { $a = Any} }` shouldn't the fact that $a could be Any cause the same code to be genned as for $a += $b? 14:26
i.e., an `if p6definite` added into the loop
Geth roast/#130712-test: a2406c076b | Altai-man++ | integration/error-reporting.t
Test to cover RT #130712
14:28
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=130712
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=130712
Geth roast: Altai-man++ created pull request #244:
Test to cover RT #130712
14:29
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=130712
IOninja ...stupid robot 14:30
timotimo MasterDuke: no, it's just that += has that semantic that it has to account for 14:43
for Any + $b we rely on + being able to cope with one argument being undefined
for += we rely on a no-arg meaning instead
MasterDuke ah, makes sense 14:45
then is there a way to make += the same as = + without solving the data flow analysis question? 14:47
Geth rakudo: Altai-man++ created pull request #1023:
Test to cover RT #130712
14:59
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=130712
rakudo/nom: 664f767c76 | Altai-man++ | t/05-messages/01-errors.t
Test to cover RT #130712
15:00
rakudo/nom: a4816482c6 | (Zoffix Znet)++ | t/05-messages/01-errors.t
Merge pull request #1023 from Altai-man/#130712-test

Test to cover RT #130712
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=130712
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=130712
IOninja synopsebot6: any idea what the link is for RT#130712? I can't find it nowhere. 15:06
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=130712
IOninja heh... dumbass...
timotimo MasterDuke: i wonder if the call to infix + wont get inlined because the return type of the no-arg call is unknown 15:12
perhaps we can reorder optimizations such zhat the no-arg call can be compile time evaluated 15:13
and that might cause the outer.+ to become inlined
Geth rakudo: bduggan++ created pull request #1024:
little typo
timotimo might just have to visit_children afterdoing the metaop assign optimization 15:14
the one we alread have
MasterDuke timotimo: interesting, i'll experiment
timotimo hope theres something to gain there 15:15
though one could expect spesh to inline here also 15:16
Geth rakudo/nom: d66c382308 | (Brian Duggan)++ | src/Perl6/World.nqp
"an Map" -> "a Map"
rakudo/nom: c550dd7004 | (Zoffix Znet)++ | src/Perl6/World.nqp
Merge pull request #1024 from bduggan/a_instead_of_an

little typo
timotimo it would be nice to have a more easy to analyze output from spesh to tell us what frames were inlined
could probably put that below the output of the callsite info 15:17
MasterDuke timotimo: tried adding self.visit_children after github.com/rakudo/rakudo/blob/nom/....nqp#L1646 and after github.com/rakudo/rakudo/blob/nom/...nqp#L1663, but didn't do anything 15:35
timotimo crap. 15:41
i wish it'd be easier to figure out what the optimizer thinks 15:44
but at the same time not be exposed to the firehose you'd get if it outputted stuff everywhere
MasterDuke yeah, i've tried adding some debug stuff to the optimizer and it's noisy 15:45
timotimo yeah, very 15:48
i mean, you can invent an optimization level 5 or something
since the setting uses 4, you can get through a compile without it spamming too much
but that's not the real worry anyway
MasterDuke i did something like `if $op[0].name eq '$my-made-up-name' { note('stuff') }`, which sort of works 15:50
timotimo oh 15:56
MasterDuke timotimo: got any other ideas to try out? 16:02
timotimo well, we still could do the thing where we detect that the variable in question is a native 16:03
but that only helps the int $foo case, not the Int $foo case. 16:04
MasterDuke it does already do things like assign_i in that case, lexcalref instead of lexical, and remove the if p6definite for the += constant 16:07
timotimo oh
damn
well, lexicalref still allocates an object
just to throw it away again at the soonest opportunity 16:08
MasterDuke what should it be instead?
timotimo do you know what part of the code does that specific thing? 16:12
MasterDuke not sure what you mean? 16:14
timotimo what part decides to use lexicalref
MasterDuke `QAST::Var(lexical $abc) <wanted> $abc` vs `QAST::Var(lexicalref $abc) <wanted> $abc` 16:15
for `my $a = 0; loop (my int $abc = 0; $abc <= 10000000; $abc += 5) { $a += $abc }; say $a` 16:17
IOninja m: my $x = 42; $x and= say "hi" 16:28
camelia hi
IOninja m: my $x = 42; $x or= say "hi"
camelia hi
IOninja m: my $x; $x and= say "hi"
camelia hi
IOninja bug
will fix shortly
Geth rakudo/nom: 829762ab5a | (Daniel Green)++ | src/Perl6/Optimizer.nqp
`callstatic` the metaop if possible
16:31
rakudo/nom: 2bf2834a3e | lizmat++ | src/Perl6/Optimizer.nqp
Merge pull request #1022 from MasterDuke17/optimize_metaopassign_a_bit

Optimize &METAOP_ASSIGN a bit
MasterDuke lizmat++ also, any further thoughts on github.com/rakudo/rakudo/pull/1021? 16:36
lizmat MasterDuke: feels to me that the checks like "$chars > ($?BITS == 64 ?? 16 !! 9)" could be put into a constant / compile time set lexical like $?BITS 16:38
my $?DECINT-OVERFLOW = $?BITS == 64 ?? 16 !! 9; 16:39
and then $chars > $?DECINT-OVERFLOW
MasterDuke lizmat: i thought about that, wasn't sure how much to pollute global space
lizmat or is the optimizer smart enough to catch that?
MasterDuke i'll test it 16:40
lizmat if the optimizer is smart enough to catch that, then we don't need to do anything
:-)
other than that, I have no real thoughts about the PR
afk again& 16:41
Geth rakudo/nom: 5e6f30a7a3 | (Zoffix Znet)++ | src/Perl6/Actions.nqp
Fix broken thunking of infix:<notandthen>

  `42 notandthen say "hi"` should not produce any output, but it does.
Fix by adding it to the list of ops in the actions for which thunk is processed. This does not fix the `notandthen=` case, which will be addressed in a later commit.
16:43
roast: 4487be9c9f | (Zoffix Znet)++ | S03-operators/notandthen.t
Test infix:<notandthen> thunks

Rakudo fix: github.com/rakudo/rakudo/commit/5e6f30a7a3
16:44
rakudo/nom: e0a9cf62c8 | (Zoffix Znet)++ | t/spectest.data
Add S03-operators/notandthen.t to list of testfiles to run
16:45
IOninja Trying to find a good place to stick `and=` and `or=` tests... any idea? 17:00
MasterDuke maybe some new files in ./S03-metaops? 17:02
Geth roast: 808baa47f0 | (Zoffix Znet)++ | S03-operators/assign.t
Remove executable bit on the file
IOninja I was gonna stick it into the same file where normal `and`/`or` are tested, but it's impossible to find.... :/ 17:03
oh what a coincidicense. ^ that file got some `and=` tests in it 17:05
Gonna stick mine up in there.,
Geth rakudo/nom: 3e88c41c51 | (Zoffix Znet)++ | 2 files
Fix failure to thunk RHS on or=, and=, and notandthen=
17:21
roast: 8c75750f7a | (Zoffix Znet)++ | S03-operators/assign.t
Test or=, and=, andthen=, notandthen=, and orelse= thunk RHS

The or=, and=, and notandthen= were broken and fixed in Rakudo in:
  github.com/rakudo/rakudo/commit/3e88c41c51
17:22
MasterDuke lizmat, et al: i tried pulling those checks out into lexicals and measured no difference 17:42
Geth rakudo/nom: 9e8ecb7bac | (Zoffix Znet)++ | 2 files
Fix precision loss with `cmp` involving Rationals/Int

  - Don't convert to .Num in Rational, Rational candidate,
   use `<=>` comparator instead. We still have to check for NaNs
   and .Num `cmp` .Num in that case, since <=> returns Nil for NaNs
  - Add Rational, Int and Int, Rational candidate that does same as
   Rational, Rational candidate, so we don't .Num the Rational
   in those cases, losing precision.
18:46
roast: 31d9af3884 | (Zoffix Znet)++ | S03-operators/cmp.t
Test infix:<cmp> with Rational and Int does not lose precision

Rakudo fix: github.com/rakudo/rakudo/commit/9e8ecb7bac
18:47
timotimo TYVM IOninja 18:50
IOninja any time
timotimo one time 18:51
all time
none time
MasterDuke burger time
b2gills Hammer Time! 18:57
lizmat is it easter yet ? 19:03
IOninja Nope, Apr 16s 19:04
m: say Date.new('2017-04-16') - Date.today 19:07
camelia 52
IOninja :D
.ask nine should we move away from sha1 for modules; RE: shattered.io/ ? Looks like we can even mod our sha1 with the collision detector thing: github.com/cr-marcstevens/sha1coll...ndetection not sure what the performance impact is tho 19:27
yoleaux2 IOninja: I'll pass your message to nine.
perlpilot even if we don't move away from SHA1 right away, we should at least be aware of making "not hard" if we can (For git, it's apparently hard) 19:34
jnthn What's the actual risk vector?
lizmat that someone could make a precomp module that contains different code from what was expected
jnthn Um, but the SHA-1 is of the source, not the bytecode 19:35
And we don't recompile the source to verify it
IOninja That you install a module that replaces another module.
gfldex we don't use SHA-1 to ensure security
jnthn Right, but if you can trick somebody into installing your malicious module then you've already got them, no SHA-1 vuln needed. 19:36
gfldex that's a topic for package managers of distros
jnthn: see security.googleblog.com/2017/02/an...ision.html 19:37
using sha-256 would make hash collisions less likely tho, so it's not a terrible bad move to start with 19:38
also, havin sha-* in CORE expose to users would be nice
perlpilot note how many SHA1 computations it took for them to find a collision
jnthn I'm not disputing that the SHA-1 vuln is real, just noting that it needs considering in context. 19:39
IOninja jnthn: but if we assume you can replace another module with this attack, then the parrallel is inexact. User A can install a malicious module and an app that *does not use it* would execute it
lizmat agree it's not something we need to fix before the next release :-)
IOninja Also, IMO there's a public image here at play: "Perl 6 uses SHA-1. Look, there's this website that says SHA-1 is bad"... This is enough to set a perception in users' minds regardless of how easy or practical that attack is to execute. 19:40
MasterDuke jnthn: is now a good time to bug you about Binder.java? 19:41
perlpilot But! It could affect github.com/perl6/book ;-) People could be tricked into reading about some Perl 6 that doesn't exist!
IOninja hehe
jnthn fwiw, I was under the impression we were heading towards punycode-ing the distribution longname anyway to fix stuff for folks who are unhappy about not being able to `locate` 19:43
IOninja Ah.
I don't follow or know anything about the Comp::Unit::* part of the codebase
jnthn At which point even if we SHA-1 within a distro, they're still "namespaced" under the distribution name. 19:44
I try not to these days also
MasterDuke: Well, should go for a walk soon, but pointer me at what you'd like me to look at :)
*point
Well, I don't mind knowing stuff about Comp::Unit::. But there's so many *other* things that I need to worry about, and @other are doing a nice job caring for it, so... :-) 19:45
MasterDuke: Is it about github.com/rakudo/rakudo/pull/1018 ? 19:46
MasterDuke i've updated github.com/rakudo/rakudo/pull/1018. it now builds for the JVM, and ./perl6-j -e 'say "hi"' runs fine, but a `make install` fails and i can't run the spectests. here's a gist of the output i get gist.github.com/MasterDuke1​7/2c8f...046af1331.
jnthn And it works fine without your changes? 19:47
MasterDuke yeah
jnthn I get a 404 on that gist URL?
MasterDuke gist.github.com/MasterDuke17/2c8fb...e046af1331 19:48
jnthn that worked
Even though they look the same to me :)
MasterDuke weird, there's a %u200B in the first one when i hover over
between the 1 and the 7 19:49
jnthn odd
MasterDuke and i just copied it from irclog.perlgeek.de
jnthn Hm, what's that envvar called where you get the full JVM stacktrace...
Ah, right. Can you try it with NQP_VERBOSE_EXCEPTIONS=1 19:50
That should show us where in the binder (I presume it's in the binder) that it's exploding
It spits stuff out for all exceptions, even handled ones, so it'll be a bit noisy
But the one we want should be final or near final
MasterDuke gist updated 19:51
jnthn Indentation confusation :) 19:53
The error[0] assignment is not covered by the if 19:54
After thechanges
Need braces
Totally missed that first time I read the code :)
MasterDuke argh!!
jnthn :) 19:55
walk &
MasterDuke jnthn++
timotimo i didn't even know that env var! 20:39
IOninja .ask jnthn Num.Rat coerser takes optional epsilon, Int.Rat and Rat.Rat take an optional arg they ignore, and Complex.Rat and Str.Rat don't take any args. Does it make more sense to make all .Rats take an optional arg and ignore it in cases or just have it for types that can make use of it? I'm leaning towards the latter, and removing dummy params 21:08
yoleaux2 IOninja: I'll pass your message to jnthn.
IOninja same applies to .FatRat 21:09
Geth rakudo/nom: 320c2fb464 | (Elizabeth Mattijsen)++ | src/core/Rakudo/Iterator.pm
R:I.Batch|Rotor take an iterator

This is merely changing the name of the parameter, for clarity
22:48
gfldex m: class C { has $.a = 42 }; say C.new.a 23:03
camelia 42
gfldex when or by what are initialisers executed?
m: class C { has $.a = 42 }; say C.CREATE.a
camelia (Any)
timotimo part of the BUILD process
it gets an entry in the BUILDALLPLAN 23:04
see Mu.pm6
lizmat m: say IterationBuffer ~~ List 23:20
camelia False
lizmat *phew* :-)
Geth geth: 08a8e6925c | (Zoffix Znet)++ | lib/Geth/GitHub/Hooks.pm6
Do not assume 2nd line of commit message is blank
23:23