Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2015-09-17

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

All times shown according to UTC.

Time Nick Message
00:01 tokuhiro_ joined #moarvm
00:59 tokuhiro_ joined #moarvm
01:28 vendethiel joined #moarvm
05:38 vendethiel joined #moarvm
06:53 FROGGS joined #moarvm
07:02 ShimmerFairy joined #moarvm
08:59 zakharyas joined #moarvm
09:41 brrt joined #moarvm
09:42 brrt good *
09:42 timotimo good!
09:48 brrt howsit today
09:48 timotimo it's okay
09:49 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
09:49 brrt maybe even in the templates
09:50 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
09:50 brrt oh really? where do you find such a thing
09:50 timotimo github
09:51 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
09:51 timotimo PeachPy can be used to explore instruction length, opcodes, and alternative encodings:
09:51 brrt hmmmm
09:51 timotimo https://github.com/Maratyszcza/PeachPy
09:52 nwc10 I don't know how many folks who attended the NQP tutorial session actually hack on NQP
09:52 brrt hmmmmmmmmmm
09:52 brrt ok
09:52 nwc10 although to be clear
09:52 brrt but JIT's have a coolness factor
09:52 nwc10 oh yes
09:52 brrt :-P
09:52 nwc10 you'll get attendees
09:52 nwc10 but whether you gain contributors is something different
09:53 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
09:54 brrt (timotimo: cool)
09:54 brrt well... the thing is
09:54 nwc10 although the NQP course is somewhat different in the trade offs for "will it get contributors" as lizmat++ and woolfy++ sponsored its creation
09:54 psch so even if the workshop doesn't directly pull contributors, having the material might make it easier for interested parties later on
09:54 psch nwc10: right, that's obviously a factor
09:54 nwc10 oh, I totally agree on that - having the material is useful
09:54 brrt i don't see how i'll get contributors without such material
09:55 nwc10 you don't need to run a 2 day workshop to create introduction docs
09:55 brrt no
09:55 brrt i'm not thinking 2 day workshop
09:55 nwc10 oh, wait
09:55 brrt i'm thinking
09:55 nwc10 you said talk :-)
09:55 brrt 1 hour
09:55 brrt at most
09:55 nwc10 *That* is probably worth it, if you'd find it fun to do
09:56 nwc10 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
09:56 brrt :-)
09:59 * brrt lunch &
09:59 brrt left #moarvm
10:07 colomon joined #moarvm
10:40 Ven joined #moarvm
11:56 arnsholt A JIT talk would definitely be worth it
11:57 arnsholt 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
12:18 ShimmerFairy joined #moarvm
12:40 Ven joined #moarvm
12:41 JimmyZ joined #moarvm
12:52 brrt joined #moarvm
12:52 * brrt is back :-)
12:54 timotimo ohej
12:59 brrt cool thing, PeachPy
12:59 brrt but......
12:59 brrt very low level
12:59 brrt not sure how much this improves above using a portable assembler
13:01 JimmyZ dynasm is portable too :P
13:08 brrt aye, but it works at runtime
13:08 brrt this is an assembler
13:08 brrt in python
13:08 brrt with
13:08 brrt gadgets, and stuff
13:08 brrt but it's a static assembler, as near as i can tell
13:09 brrt oh, it can also work at runtime
13:09 brrt cool
13:10 brrt especially for something like pypy, although i'm sure they have their own solution
13:21 JimmyZ dynasm is much small, and works well on windows without installing python/lua
13:22 brrt aye
13:22 brrt although, if you want to build it, we're actually building minilua for that
13:23 brrt 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 brrt there's not checkin of gnerated assets into git
13:28 Ven joined #moarvm
13:32 brrt joined #moarvm
13:39 JimmyZ yeah
13:47 tokuhiro_ joined #moarvm
13:52 Ven joined #moarvm
13:56 dalek joined #moarvm
14:12 pyrimidi_ joined #moarvm
14:49 tokuhiro_ joined #moarvm
14:51 FROGGS joined #moarvm
16:33 vendethiel joined #moarvm
16:50 tokuhiro_ joined #moarvm
17:01 tokuhiro_ joined #moarvm
17:38 jnthn evening, #moarvm
17:39 TimToady o/
17:39 Ven joined #moarvm
17:39 * jnthn had a nice, but exhausting time at communityday.se :)
17:40 jnthn Last minute talk writing is a great way to get crazy behind on backlog... :P
17:42 nwc10 good UGT heresey, jnthn
17:42 nwc10 first masak, now you
17:42 nwc10 what is the world coming to? :-)
17:42 TimToady jnthn: we have a new slurpy now for one-arg
17:46 jnthn TimToady: Which selection of ASCII chars did you go for? :)
17:46 jnthn m: <* |>.roll((2, 3).pick).join.say for ^5;
17:46 camelia rakudo-moar 3dfa85: OUTPUT«||␤*||␤||␤|*␤|**␤»
17:46 TimToady m: sub foo (+@args) { say @args.elems }; foo [1..4]; foo [1..4],2
17:46 camelia rakudo-moar 3dfa85: OUTPUT«4␤2␤»
17:47 TimToady m: sub foo (+args) { say args.elems }; foo [1..4]; foo [1..4],2
17:47 camelia rakudo-moar 3dfa85: OUTPUT«4␤2␤»
17:47 TimToady but the first caches
17:47 jnthn Why +? :)
17:47 TimToady I just got through explaining that on #perl6
17:47 jnthn Ah, then I'll backlog it :)
17:47 * jnthn was hoping there was a one-liner answer ;)
17:48 FROGGS <TimToady> there wasn't really any other good character left on the keyboard, and I got tired of typing *|
17:49 jnthn Aww, I was hoping for a nice mnemonic :)
17:49 jnthn Maybe the + reminders of numbers which reminds you of 1-arg rule :)
17:49 FROGGS hehe
17:49 jnthn Wow, I need to reminder of grammar...
17:51 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 #moarvm
18:29 FROGGS hmmmm, t/04-nativecall/16-rt125408.t really is a spesh bug...
18:29 FROGGS or at least affectes by spesh
18:30 FROGGS affected*
18:32 FROGGS so, due to inlining we end up with: Wrong kind of access to numeric CArray
18:43 jnthn Ooh, I should probably cut us a release...
18:43 jnthn To not block the Rakudo one
18:43 [Coke] jnthn++
18:44 [Coke] 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")」␤»
18:45 [Coke] ww.
18:49 brrt joined #moarvm
18:51 brrt good *
18:51 FROGGS hi brrt
18:51 brrt hi FROGGS
18:53 [Coke] RT: 1,014 tickets; 4 [GLR] tickets, 3 Christmas blockers, 11 testneeded
18:53 [Coke] Dammit. ww
18:53 brrt joined #moarvm
18:57 FROGGS wow, the speshbug I mentioned is about reading garbage memory
18:58 brrt what speshbug is that
18:58 brrt garbage memory lives in every corner
18:58 jnthn FROGGS: Discovered with Valgrind?
18:59 FROGGS jnthn: no, it get the wrong element kind, and I printed it and it is a large number which changes at every run
19:00 FROGGS valgrind points to MVM_jit_enter_code (compile.c:123)
19:00 FROGGS and indeed, disabling the JIT makes it go away
19:00 brrt oh, really
19:00 brrt oops
19:00 brrt also
19:00 brrt huh
19:02 brrt hmmm
19:02 brrt do you have the broken code segment for me to peer over
19:02 tokuhiro_ joined #moarvm
19:06 brrt oh, shame
19:06 brrt anyway, i'll be off soon.
19:08 dalek MoarVM: 7326278 | jnthn++ | docs/ChangeLog:
19:08 dalek MoarVM: 2015.09 ChangeLog entries.
19:08 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/7326278b3e
19:08 dalek MoarVM: 6fe21fd | jnthn++ | VERSION:
19:08 dalek MoarVM: Bump VERSION to 2015.09.
19:08 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/6fe21fde27
19:09 FROGGS joined #moarvm
19:10 FROGGS brrt: rakudo's t/04-nativecall/16-rt125408.t
19:10 FROGGS nice, the test passes when I comment the two cases:
19:10 FROGGS src/jit/graph.c:223:    case MVM_OP_unbox_n: return MVM_repr_get_num;
19:10 FROGGS src/jit/graph.c:1988:    case MVM_OP_unbox_n: {
19:10 brrt joined #moarvm
19:10 FROGGS ohh, it is actually enough to comment the latter
19:10 FROGGS though, what that means, I dun't know
19:11 brrt oh
19:11 brrt huh
19:11 brrt lemmesee
19:11 FROGGS maybe that hides just the problem somehow?
19:13 dalek MoarVM/even-moar-jit: 9b19870 | brrt++ | 3rdparty/dynasm:
19:13 dalek MoarVM/even-moar-jit: Update DynASM for robustified rsp/r12 and rbp/r13
19:13 dalek MoarVM/even-moar-jit: review: https://github.com/MoarVM/MoarVM/commit/9b19870e68
19:13 brrt possibly.......
19:13 brrt which test are we talking about now
19:14 FROGGS rakudo/t/04-nativecall/16-rt125408.t
19:14 brrt ah, yes, that's been broken for some time for me
19:14 FROGGS aye
19:15 FROGGS remove the lives-ok and you'll see the error message
19:16 FROGGS and then I print the "kind" in src/6model/reprs/CArray.c:347
19:16 FROGGS that shows there is garbage mem
19:16 FROGGS brrt: it fails for some time because jnthn patched something so that more stuff gets inlined
19:17 FROGGS here https://github.com/rakudo/rakudo/commit/56ae33ea0a5ac3d54a5fef2aa15eab34f9e9594b
19:17 brrt darn jnthn with fixing rakudo to demonstrate my JIT bugs :-P
19:18 jnthn :P
19:18 jnthn Release nearly cut.
19:20 jnthn http://moarvm.org/releases/MoarVM-2015.09.tar.gz
19:22 [Coke] jnthn++
19:22 brrt yes, jnthn++
19:22 brrt i'm off for tonight
19:23 brrt FROGGS++ for pointing this out
19:23 FROGGS gnight brrt
19:23 nwc10 jnthn++
19:23 dalek MoarVM: ef1eb19 | jnthn++ | ports/macports/Portfile:
19:23 dalek MoarVM: Update Portfile.
19:23 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/ef1eb190d5
19:24 FROGGS afaict the kind (which happens to contain garbage) is put in literally in graph.c around line 860
19:26 jnthn 860?
19:26 jnthn here that line reads { MVM_JIT_REG_OBJBODY, invocant },
19:27 dalek MoarVM: 3cae936 | coke++ | ports/macports/Portfile:
19:27 dalek MoarVM: update Portfile
19:27 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/3cae936665
19:27 FROGGS jnthn: a few lines later, containing MVM_JIT_LITERAL
19:27 FROGGS that list of the seven args pretty well fits the signature of bind_pos:
19:27 FROGGS static void bind_pos(MVMThreadContext *tc, MVMSTable *st, MVMObject *root, void *data, MVMint64 index, MVMRegister value, MVMuint16 kind) {
19:29 jnthn FROGGS: How can I reproduce the failure?
19:30 FROGGS jnthn: just run rakudo/t/04-nativecall/16-rt125408.t
19:30 jnthn It passes...
19:30 FROGGS grr
19:30 FROGGS jnthn: then your jit behaves differently
19:30 FROGGS it fails on linux and osx
19:31 FROGGS 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
19:32 jnthn I thought 7 was meant to be the number of perfection :P
19:32 FROGGS hehe
19:33 FROGGS m: .fmt('%#b').say for 22384, 1648, 26480
19:33 camelia rakudo-moar 1e7018: OUTPUT«0b101011101110000␤0b11001110000␤0b110011101110000␤»
19:34 jnthn It does upset valbrind.
19:34 jnthn *valgrind
19:34 jnthn ==23787== Conditional jump or move depends on uninitialised value(s)
19:34 jnthn ==23787==    at 0x5018E56: bind_pos (CArray.c:340)
19:34 FROGGS it does on my box
19:34 FROGGS ohh wait
19:34 jnthn So yeah, that confirms your junk
19:35 FROGGS %d is not right for a short, right?
19:35 FROGGS in printf I mean
19:35 jnthn .oO( I'm glad I know my your from my you're... )
19:35 jnthn yeah, that's int
19:35 FROGGS hehe
19:35 [Coke] opened macport ticket to track new release.
19:35 jnthn Though it probably won't matter
19:35 FROGGS [Coke]++
19:36 FROGGS m: .fmt('%#b').say for 55152, 22128, 26224
19:36 camelia rakudo-moar 1e7018: OUTPUT«0b1101011101110000␤0b101011001110000␤0b110011001110000␤»
19:36 FROGGS it is only partially junk
19:37 FROGGS then lower byte is fine, though that is clearly not a six
19:38 FROGGS (which would be MVM_reg_num64)
19:40 jnthn Ah
19:40 jnthn I think that it's something to do with arg 6's compilation
19:41 jnthn If I replace MVM_JIT_REG_VAL_F with MVM_JIT_REG_VAL then the failure goes away
19:41 jnthn We of course are passing things wrongly so will no doubt insert junk
19:41 jnthn But the 7th arg is fine then
19:45 FROGGS hmmm
19:46 FROGGS confirmed
19:47 jnthn oh, or does it
19:48 jnthn We take MVMRegister
19:48 jnthn Which is a union
19:48 jnthn So maybe my fix does the right thing?
19:49 colomon_ joined #moarvm
19:49 FROGGS hmmm, I cannot tell
19:52 FROGGS I've got the suspicion that this line is wrong:
19:52 FROGGS src/jit/emit_x64.dasc:1576:        | mov TMP6, qword WORK[arg.v.reg];
19:52 FROGGS why is MVM_JIT_REG_VAL and MVM_JIT_REG_VAL_F identical when MVM_JIT_LITERAL and MVM_JIT_LITERAL_F is not?
19:53 jnthn I think my fix is right, fwiw
19:54 jnthn Tring to further verify
19:54 FROGGS k
19:55 FROGGS :o)
20:01 jnthn Yeah, seems that is it
20:01 jnthn 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
20:03 jnthn I think we hvae this bug in other places too
20:04 jnthn 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
20:05 FROGGS jnthn: graph.c:708 is such a candidate
20:06 jnthn Doing an audit of other places at the moment
20:07 jnthn Seems just 2 other places
20:09 FROGGS I think I've got more
20:13 dalek MoarVM: 60a48e8 | jnthn++ | src/jit/graph.c:
20:13 dalek MoarVM: Correct JIT of devirtualized REPR ops.
20:13 dalek MoarVM:
20:13 dalek MoarVM: Since the C function we end up calling expects an MVMRegister, which
20:13 dalek MoarVM: is a union, we should not use the SEE registers even when the value we
20:13 dalek MoarVM: are passing is known to be floating point. The callee expects it in a
20:13 dalek MoarVM: normal register.
20:13 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/60a48e85b4
20:13 FROGGS there are my changes: https://gist.github.com/FROGGS/3a0eb94ad0145840886b
20:13 FROGGS ohh, lemme pull and compare
20:14 jnthn I authored the patch on Windows, actually testing it on POSIX now
20:14 jnthn (train wifi is icky for SSH to my Linux dv box)
20:15 jnthn Looks good to me in the test
20:15 FROGGS line 1229 is not such a candidate?
20:16 jnthn FROGGS: No
20:16 jnthn Well, lemme verify but I considered that and decided fine
20:16 FROGGS how so?
20:16 jnthn case MVM_OP_bindkey_n: return MVM_repr_bind_key_n;
20:17 jnthn 'cus we *do* call a function with an MVMnum64 in the sig
20:17 jnthn If the thing we're calling declares in its sig it expects floating point it expects to fine it in the SSE reg
20:17 FROGGS and not with an MVMRegister... aha
20:17 jnthn But if it declares MVMRegister, it doesn't know what it's gonna get
20:17 jnthn Funky :)
20:17 jnthn TIL ;)
20:17 FROGGS :o)
20:19 FROGGS I bet this can go now: https://github.com/MoarVM/MoarVM/blob/60a48e85b4928a9d66f2f8b87c5fdb65633a7d99/src/jit/graph.c#L708
20:19 FROGGS because of this: https://github.com/MoarVM/MoarVM/commit/60a48e85b4#diff-df7f32b20e74e35d9db8f2f3a89c6299L1019
20:20 diakopter joined #moarvm
20:22 jnthn da
20:22 jnthn oops
20:22 jnthn yes
20:22 FROGGS hehe, I understood anyway :o)
20:24 pyrimidine joined #moarvm
20:27 lizmat joined #moarvm
20:27 FROGGS jnthn: I just did nqp, rakudo, libxml2 and SDL tests... all is happy
20:27 jnthn \o/
20:28 jnthn I'll toss that skip thing
20:28 dalek MoarVM: 002edea | FROGGS++ | src/jit/graph.c:
20:28 dalek MoarVM: devirt MVM_OP_{push,unshift}_n, as they dont explode anymore
20:28 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/002edeab36
20:28 FROGGS jnthn: done
20:28 FROGGS :P
20:28 jnthn oh, darmn :P
20:29 FROGGS Darm? O.o
20:29 jnthn I was about to push it too :P
20:29 * FROGGS .oO( Ohh appendix! )
20:29 jnthn :)
20:29 jnthn Hah, that's appendix in German? :D
20:29 FROGGS Darm, yes :o)
20:29 jnthn hah
20:30 FROGGS also intestine
20:31 FROGGS appendix is just the little useless one... Darm means the bigger one
20:31 FROGGS now you know how it must feel like living in Darmstadt :o)
20:32 jnthn .oO( What a crappy city! )
20:33 FROGGS jnthn: you cat the release already?
20:34 FROGGS ohh, also tagged, yes
20:34 jnthn Yeah
20:34 jnthn We had this issue for a couple of months
20:34 jnthn We can live with it not being in this release.
20:36 FROGGS we just need to fudge that sanity test
20:36 jnthn *nod*
20:37 FROGGS closed the RT ticket in your name
20:37 FROGGS is that proper enlgish?
20:38 FROGGS err, eng-somthing
20:43 diakopter joined #moarvm
20:43 TimToady joined #moarvm
20:54 timotimo does the devirt fix go in the release still?
20:54 timotimo or is it too late already?
20:55 FROGGS too late
20:55 FROGGS but we don't care, we are using bleeding edge :o)
20:56 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?
20:59 timotimo anywey, bedtime
20:59 timotimo gotta get up real early tomorrow. bah.
21:00 jnthn My empathies. I had to do that today... :/
21:00 timotimo mhh
21:00 timotimo poor us
21:01 FROGGS your skip did not help for another op that was buggy
21:01 timotimo damn
21:01 timotimo which one? push/unshift?
21:01 FROGGS and so I skipped that sanity test in rakudo
21:01 FROGGS bindpos_n
21:01 timotimo ah
21:01 timotimo damn it.
21:02 timotimo i'm always quite a bit annoyed when bug fixes happen right after a release
21:02 timotimo oh well.
21:02 FROGGS but after the release is before the release
21:03 FROGGS so it will make it in the release in time :o)
21:03 FROGGS and ppl are using rakudobrew, so all is well
21:03 timotimo right
21:04 tokuhiro_ joined #moarvm
21:06 jnthn That's time based releases.
21:06 jnthn But the alternative doesn't really work any better.
21:06 FROGGS aye, time based released do a pretty good job here
21:07 FROGGS we can do on-demand released when everybody moved over to #hurd :D
21:12 Peter_R joined #moarvm
21:21 colomon joined #moarvm
23:05 tokuhiro_ joined #moarvm

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