00:01 tokuhiro_ joined 00:59 tokuhiro_ joined 01:28 vendethiel joined 05:38 vendethiel joined 06:53 FROGGS joined 07:02 ShimmerFairy joined 08:59 zakharyas joined 09:41 brrt joined
brrt good * 09:42
timotimo good!
brrt howsit today 09:48
timotimo it's okay
brrt i'm going to apply the new-and-improved instruction encoding, and think that if there are any bugs left, i hope it's somewhere else 09:49
timotimo i hope so, too
brrt maybe even in the templates
timotimo Portable Efficient Assembly Code-generator in Higher-level Python (PeachPy) 09:50
brrt do you think it'd be interesting if i gave a how-to-work-on-the-jit workshop / talk at some perl workshop someday
oh really? where do you find such a thing
timotimo github
nwc10 brrt: it might be interesting, but you may end up with a lot of prep time invested for not massive payback 09:51
brrt can't find that
timotimo PeachPy can be used to explore instruction length, opcodes, and alternative encodings:
brrt hmmmm
timotimo github.com/Maratyszcza/PeachPy
nwc10 I don't know how many folks who attended the NQP tutorial session actually hack on NQP 09:52
brrt hmmmmmmmmmm
ok
nwc10 although to be clear
brrt but JIT's have a coolness factor
nwc10 oh yes
brrt :-P
nwc10 you'll get attendees
but whether you gain contributors is something different
brrt trueish 09:53
psch considering the jnthns slides are still somewhat the best first stop for the nqp-curious, maybe a workshop is worth it for the material it produces alone
brrt (timotimo: cool) 09:54
well... the thing is
nwc10 although the NQP course is somewhat different in the trade offs for "will it get contributors" as lizmat++ and woolfy++ sponsored its creation
psch so even if the workshop doesn't directly pull contributors, having the material might make it easier for interested parties later on
nwc10: right, that's obviously a factor
nwc10 oh, I totally agree on that - having the material is useful
brrt i don't see how i'll get contributors without such material
nwc10 you don't need to run a 2 day workshop to create introduction docs 09:55
brrt no
i'm not thinking 2 day workshop
nwc10 oh, wait
brrt i'm thinking
nwc10 you said talk :-)
brrt 1 hour
at most
nwc10 *That* is probably worth it, if you'd find it fun to do
I blame an empty stomach for getting the wrong end of the stick 09:56
brrt i blame not being native english for not parsing that
:-)
brrt lunch & 09:59
09:59 brrt left 10:07 colomon joined 10:40 Ven joined
arnsholt A JIT talk would definitely be worth it 11:56
Not only is there the PR factor, but it'd probably make a small dent in the bus-number of the JIT code by letting the other people working on Moar get some deeper insight into how the JIT operates 11:57
12:18 ShimmerFairy joined 12:40 Ven joined 12:41 JimmyZ joined 12:52 brrt joined
brrt is back :-) 12:52
timotimo ohej 12:54
brrt cool thing, PeachPy 12:59
but......
very low level
not sure how much this improves above using a portable assembler
JimmyZ dynasm is portable too :P 13:01
brrt aye, but it works at runtime 13:08
this is an assembler
in python
with
gadgets, and stuff
but it's a static assembler, as near as i can tell
oh, it can also work at runtime 13:09
cool
especially for something like pypy, although i'm sure they have their own solution 13:10
JimmyZ dynasm is much small, and works well on windows without installing python/lua 13:21
brrt aye 13:22
although, if you want to build it, we're actually building minilua for that
one of the things i'm proud of, is that at build time, we do all the preprocessing from source for the JIT 13:23
there's not checkin of gnerated assets into git
13:28 Ven joined 13:32 brrt joined
JimmyZ yeah 13:39
13:47 tokuhiro_ joined 13:52 Ven joined 13:56 dalek joined 14:12 pyrimidi_ joined 14:49 tokuhiro_ joined 14:51 FROGGS joined 16:33 vendethiel joined 16:50 tokuhiro_ joined 17:01 tokuhiro_ joined
jnthn evening, #moarvm 17:38
TimToady o/ 17:39
17:39 Ven joined
jnthn had a nice, but exhausting time at communityday.se :) 17:39
Last minute talk writing is a great way to get crazy behind on backlog... :P 17:40
nwc10 good UGT heresey, jnthn 17:42
first masak, now you
what is the world coming to? :-)
TimToady jnthn: we have a new slurpy now for one-arg
jnthn TimToady: Which selection of ASCII chars did you go for? :) 17:46
m: <* |>.roll((2, 3).pick).join.say for ^5;
camelia rakudo-moar 3dfa85: OUTPUTĀ«||ā¤*||ā¤||ā¤|*ā¤|**ā¤Ā»
TimToady m: sub foo (+@args) { say @args.elems }; foo [1..4]; foo [1..4],2
camelia rakudo-moar 3dfa85: OUTPUTĀ«4ā¤2ā¤Ā»
TimToady m: sub foo (+args) { say args.elems }; foo [1..4]; foo [1..4],2 17:47
camelia rakudo-moar 3dfa85: OUTPUTĀ«4ā¤2ā¤Ā»
TimToady but the first caches
jnthn Why +? :)
TimToady I just got through explaining that on #perl6
jnthn Ah, then I'll backlog it :)
jnthn was hoping there was a one-liner answer ;)
FROGGS <TimToady> there wasn't really any other good character left on the keyboard, and I got tired of typing *| 17:48
jnthn Aww, I was hoping for a nice mnemonic :) 17:49
Maybe the + reminders of numbers which reminds you of 1-arg rule :)
FROGGS hehe
jnthn Wow, I need to reminder of grammar...
TimToady well, it sort of still means "one or more", only differently :) 17:51
FROGGS I am reminded of bleem now...
18:11 Peter_R joined
FROGGS hmmmm, t/04-nativecall/16-rt125408.t really is a spesh bug... 18:29
or at least affectes by spesh
affected* 18:30
so, due to inlining we end up with: Wrong kind of access to numeric CArray 18:32
jnthn Ooh, I should probably cut us a release... 18:43
To not block the Rakudo one
[Coke] jnthn++
m: say "foo" & "a nice old foo" ~~ /foo/ 18:44
camelia rakudo-moar 25fed4: OUTPUTĀ«ļ½¢all(Failure.new(exception => X::OutOfRange.new(what => "Start argument to substr", got => "5", range => "0..3", comment => "use *5 if you want to index relative to the end"), backtrace => Backtrace.new), "e o")ļ½£ā¤Ā»
[Coke] ww. 18:45
18:49 brrt joined
brrt good * 18:51
FROGGS hi brrt
brrt hi FROGGS
[Coke] RT: 1,014 tickets; 4 [GLR] tickets, 3 Christmas blockers, 11 testneeded 18:53
Dammit. ww
18:53 brrt joined
FROGGS wow, the speshbug I mentioned is about reading garbage memory 18:57
brrt what speshbug is that 18:58
garbage memory lives in every corner
jnthn FROGGS: Discovered with Valgrind?
FROGGS jnthn: no, it get the wrong element kind, and I printed it and it is a large number which changes at every run 18:59
valgrind points to MVM_jit_enter_code (compile.c:123) 19:00
and indeed, disabling the JIT makes it go away
brrt oh, really
oops
also
huh
hmmm 19:02
do you have the broken code segment for me to peer over
19:02 tokuhiro_ joined
brrt oh, shame 19:06
anyway, i'll be off soon.
dalek arVM: 7326278 | jnthn++ | docs/ChangeLog:
2015.09 ChangeLog entries.
19:08
arVM: 6fe21fd | jnthn++ | VERSION:
Bump VERSION to 2015.09.
19:09 FROGGS joined
FROGGS brrt: rakudo's t/04-nativecall/16-rt125408.t 19:10
nice, the test passes when I comment the two cases:
src/jit/graph.c:223: case MVM_OP_unbox_n: return MVM_repr_get_num;
src/jit/graph.c:1988: case MVM_OP_unbox_n: {
19:10 brrt joined
FROGGS ohh, it is actually enough to comment the latter 19:10
though, what that means, I dun't know
brrt oh 19:11
huh
lemmesee
FROGGS maybe that hides just the problem somehow?
dalek arVM/even-moar-jit: 9b19870 | brrt++ | 3rdparty/dynasm:
Update DynASM for robustified rsp/r12 and rbp/r13
19:13
brrt possibly.......
which test are we talking about now
FROGGS rakudo/t/04-nativecall/16-rt125408.t 19:14
brrt ah, yes, that's been broken for some time for me
FROGGS aye
remove the lives-ok and you'll see the error message 19:15
and then I print the "kind" in src/6model/reprs/CArray.c:347 19:16
that shows there is garbage mem
brrt: it fails for some time because jnthn patched something so that more stuff gets inlined
here github.com/rakudo/rakudo/commit/56...34f9e9594b 19:17
brrt darn jnthn with fixing rakudo to demonstrate my JIT bugs :-P
jnthn :P 19:18
Release nearly cut.
moarvm.org/releases/MoarVM-2015.09.tar.gz 19:20
[Coke] jnthn++ 19:22
brrt yes, jnthn++
i'm off for tonight
FROGGS++ for pointing this out 19:23
FROGGS gnight brrt
nwc10 jnthn++
dalek arVM: ef1eb19 | jnthn++ | ports/macports/Portfile:
Update Portfile.
FROGGS afaict the kind (which happens to contain garbage) is put in literally in graph.c around line 860 19:24
jnthn 860? 19:26
here that line reads { MVM_JIT_REG_OBJBODY, invocant },
dalek arVM: 3cae936 | coke++ | ports/macports/Portfile:
update Portfile
19:27
FROGGS jnthn: a few lines later, containing MVM_JIT_LITERAL
that list of the seven args pretty well fits the signature of bind_pos:
static void bind_pos(MVMThreadContext *tc, MVMSTable *st, MVMObject *root, void *data, MVMint64 index, MVMRegister value, MVMuint16 kind) {
jnthn FROGGS: How can I reproduce the failure? 19:29
FROGGS jnthn: just run rakudo/t/04-nativecall/16-rt125408.t 19:30
jnthn It passes...
FROGGS grr
jnthn: then your jit behaves differently
it fails on linux and osx
maybe seven args is just an unlucky number for JITs on linux and osx? 19:31
jnthn Indeed, I get it to fail on Linux too
I thought 7 was meant to be the number of perfection :P 19:32
FROGGS hehe
m: .fmt('%#b').say for 22384, 1648, 26480 19:33
camelia rakudo-moar 1e7018: OUTPUTĀ«0b101011101110000ā¤0b11001110000ā¤0b110011101110000ā¤Ā»
jnthn It does upset valbrind. 19:34
*valgrind
==23787== Conditional jump or move depends on uninitialised value(s)
==23787== at 0x5018E56: bind_pos (CArray.c:340)
FROGGS it does on my box
ohh wait
jnthn So yeah, that confirms your junk
FROGGS %d is not right for a short, right? 19:35
in printf I mean
jnthn
.oO( I'm glad I know my your from my you're... )
yeah, that's int
FROGGS hehe
[Coke] opened macport ticket to track new release.
jnthn Though it probably won't matter
FROGGS [Coke]++
m: .fmt('%#b').say for 55152, 22128, 26224 19:36
camelia rakudo-moar 1e7018: OUTPUTĀ«0b1101011101110000ā¤0b101011001110000ā¤0b110011001110000ā¤Ā»
FROGGS it is only partially junk
then lower byte is fine, though that is clearly not a six 19:37
(which would be MVM_reg_num64) 19:38
jnthn Ah 19:40
I think that it's something to do with arg 6's compilation
If I replace MVM_JIT_REG_VAL_F with MVM_JIT_REG_VAL then the failure goes away 19:41
We of course are passing things wrongly so will no doubt insert junk
But the 7th arg is fine then
FROGGS hmmm 19:45
confirmed 19:46
jnthn oh, or does it 19:47
We take MVMRegister 19:48
Which is a union
So maybe my fix does the right thing?
19:49 colomon_ joined
FROGGS hmmm, I cannot tell 19:49
I've got the suspicion that this line is wrong: 19:52
src/jit/emit_x64.dasc:1576: | mov TMP6, qword WORK[arg.v.reg];
why is MVM_JIT_REG_VAL and MVM_JIT_REG_VAL_F identical when MVM_JIT_LITERAL and MVM_JIT_LITERAL_F is not?
jnthn I think my fix is right, fwiw 19:53
Tring to further verify 19:54
FROGGS k
:o) 19:55
jnthn Yeah, seems that is it 20:01
If the C code declares the type is a uniion, then we should always pass it in a normal register even if one remember is floating point, it seems
I think we hvae this bug in other places too 20:03
And the reason it don't show up on Win32 is that you pass anything more than arg 4 on the stack 20:04
FROGGS yeah
jnthn: graph.c:708 is such a candidate 20:05
jnthn Doing an audit of other places at the moment 20:06
Seems just 2 other places 20:07
FROGGS I think I've got more 20:09
dalek arVM: 60a48e8 | jnthn++ | src/jit/graph.c:
Correct JIT of devirtualized REPR ops.

Since the C function we end up calling expects an MVMRegister, which is a union, we should not use the SEE registers even when the value we are passing is known to be floating point. The callee expects it in a normal register.
20:13
FROGGS there are my changes: gist.github.com/FROGGS/3a0eb94ad0145840886b
ohh, lemme pull and compare
jnthn I authored the patch on Windows, actually testing it on POSIX now 20:14
(train wifi is icky for SSH to my Linux dv box)
Looks good to me in the test 20:15
FROGGS line 1229 is not such a candidate?
jnthn FROGGS: No 20:16
Well, lemme verify but I considered that and decided fine
FROGGS how so?
jnthn case MVM_OP_bindkey_n: return MVM_repr_bind_key_n;
'cus we *do* call a function with an MVMnum64 in the sig 20:17
If the thing we're calling declares in its sig it expects floating point it expects to fine it in the SSE reg
FROGGS and not with an MVMRegister... aha
jnthn But if it declares MVMRegister, it doesn't know what it's gonna get
Funky :)
TIL ;)
FROGGS :o)
I bet this can go now: github.com/MoarVM/MoarVM/blob/60a4...aph.c#L708 20:19
because of this: github.com/MoarVM/MoarVM/commit/60...c6299L1019
20:20 diakopter joined
jnthn da 20:22
oops
yes
FROGGS hehe, I understood anyway :o)
20:24 pyrimidine joined 20:27 lizmat joined
FROGGS jnthn: I just did nqp, rakudo, libxml2 and SDL tests... all is happy 20:27
jnthn \o/
I'll toss that skip thing 20:28
dalek arVM: 002edea | FROGGS++ | src/jit/graph.c:
devirt MVM_OP_{push,unshift}_n, as they dont explode anymore
FROGGS jnthn: done
:P
jnthn oh, darmn :P
FROGGS Darm? O.o 20:29
jnthn I was about to push it too :P
FROGGS .oO( Ohh appendix! )
jnthn :)
Hah, that's appendix in German? :D
FROGGS Darm, yes :o)
jnthn hah
FROGGS also intestine 20:30
appendix is just the little useless one... Darm means the bigger one 20:31
now you know how it must feel like living in Darmstadt :o)
jnthn
.oO( What a crappy city! )
20:32
FROGGS jnthn: you cat the release already? 20:33
ohh, also tagged, yes 20:34
jnthn Yeah
We had this issue for a couple of months
We can live with it not being in this release.
FROGGS we just need to fudge that sanity test 20:36
jnthn *nod*
FROGGS closed the RT ticket in your name 20:37
is that proper enlgish?
err, eng-somthing 20:38
20:43 diakopter joined, TimToady joined
timotimo does the devirt fix go in the release still? 20:54
or is it too late already?
FROGGS too late 20:55
but we don't care, we are using bleeding edge :o)
jnthn timotimo: It's already been in a relees before, so... 20:56
timotimo right. and my skip was still causing tests to be well, right?
anywey, bedtime 20:59
gotta get up real early tomorrow. bah.
jnthn My empathies. I had to do that today... :/ 21:00
timotimo mhh
poor us
FROGGS your skip did not help for another op that was buggy 21:01
timotimo damn
which one? push/unshift?
FROGGS and so I skipped that sanity test in rakudo
bindpos_n
timotimo ah
damn it.
i'm always quite a bit annoyed when bug fixes happen right after a release 21:02
oh well.
FROGGS but after the release is before the release
so it will make it in the release in time :o) 21:03
and ppl are using rakudobrew, so all is well
timotimo right
21:04 tokuhiro_ joined
jnthn That's time based releases. 21:06
But the alternative doesn't really work any better.
FROGGS aye, time based released do a pretty good job here
we can do on-demand released when everybody moved over to #hurd :D 21:07
21:12 Peter_R joined 21:21 colomon joined 23:05 tokuhiro_ joined