Perl 6 - the future is here, just unevenly distributed

IRC log for #p6dev, 2016-04-07

| Channels | #p6dev index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:44 colomon joined #p6dev
01:03 timotimo i'm running a long-term job on hack.p6c.org, i've it to be nice, so i hope it doesn't disturb anyone
01:03 timotimo if it misbehaves, feel free to kill it; it can be resumed if necessary
01:34 colomon joined #p6dev
07:52 lizmat jnthn: a while ago, when working on Blob/Buf, I realiized that Buf ~= Blob is really implemented as Buf = Buf ~ Blob
07:53 lizmat jnthn: which means that there's quite a lot of copying going on when Buf's get bigger
07:53 lizmat jnthn: so I was wondering whether it would be an idea to implement ~= for Buf/Blob "beforehand"
07:53 lizmat jnthn: which would then internally be an nqp::splice
07:54 psch .tell skids ec52cce does indeed seem to have fixed RT #126527
07:54 lizmat jnthn: opinions / suggestions / feasibility ?
07:54 psch ah
07:54 psch neaux yoleaux
08:01 RabidGravy joined #p6dev
08:37 jnthn lizmat: No, because = is an operator on a container (a Scalar in this case) rather than on the Buf itself.
08:38 jnthn lizmat: We already have $buf.append(Blob) for in-place, no?
09:35 psch aha, RT #126491 is somewhere in the optimizer!
09:35 psch apparently something happens to the ast that loses the clone with the mixin
09:36 psch hm, or maybe r-j just can't deal with the ast correctly that comes out...
09:36 psch 'cause they do look identical across r-j and r-m, which i suppose is good :)
09:37 psch the bug itself is < my $value = 42 but False; say ?$value > printing "True"
09:38 psch which doesn't happen when calling it as &infix:<but>(42, False) or when passing 42 but False into a sub
09:38 psch on the other hand, binding the original expression to $value produces the same, wrong, result
09:38 moritz psch: you can try with --optimize=off, no?
09:39 psch moritz: i did, that works, hence why i think it's in the optimizer
09:41 psch ah, but --optimize=0 still has the bug
09:42 psch hm, so apparently using the optimizer at all is what causes this..?
09:44 psch ...doesn't that mean that walking the ast already changes it, and isn't that bad? :P
09:45 jnthn Could also easily mean that some optimization forgets to check the current level and just applies itself unconditionally
09:55 psch hm, lexical -> local lowering seems to always happen
09:55 psch well, that's the first thing i saw at least
09:59 psch ...but that's not for dynamics, and $*v = ... has the same problem vOv
12:47 [Tux] joined #p6dev
13:16 skids joined #p6dev
13:20 psch progress!
13:20 psch $ ./perl6-j -e'my $x = (rand * 3).Int; my $v = $x but False; say ?$v'
13:20 psch False
13:20 psch so infix:<but> is pure, which does constant folding, but something there doesn't work
13:21 psch note, it's just progress in figuring this out, not progress in fixing it... :)
13:24 psch further, it apparently only happens with Str,Num and Int as LHS to but, which means Perl6/Optimizer.pm:1435-1444 are probably involved
13:25 psch which still means that nqp-j interprets the ast differently, doesn't it..? :/
13:31 psch m: my $x = 42 but False; say +($x.^can('Bool'))
13:31 camelia rakudo-moar 61d231: OUTPUT«3␤»
13:31 psch that's 2 on r-j
13:32 psch and $x.WHAT is Int, without the anon role
13:32 * psch isn't sure where to look from there vOv
15:39 synopsebot6 joined #p6dev
16:49 dogbert2 joined #p6dev
18:16 FROGGS joined #p6dev
18:30 bartolin joined #p6dev
19:06 perlpilot left #p6dev
19:12 AlexDaniel joined #p6dev
19:33 TimToady joined #p6dev
19:39 nine jnthn: how can a <unit> node and a nameless block share the same cuid when I already changed cuid assignment to random numbers, i.e. 127638.666581016?
19:54 Skarsnik joined #p6dev
20:20 jnthn nine: No idea...I made them just ascending integers which shoulda been good enough already
20:21 jnthn nine: I mean, the same code maybe coulda been compiled twice, which would have this result
20:24 jnthn In fact, that's probably the most likely reason
20:25 jnthn Log calls into the QAST -> MAST compiler to see where it happens, maybe?
20:38 hankache joined #p6dev
20:41 nine will do :)
20:42 nine Well the thing is already riddled with debug output...so it's mostly a matter of knowing what to look out for

| Channels | #p6dev index | Today | | Search | Google Search | Plain-Text | summary