Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2014-08-09

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

All times shown according to UTC.

Time Nick Message
00:00 japhb Or is that: beer --> jnthn --> code
00:01 jnthn Probably sleep in not so long, but today I did things that mean I have a decent amount of Perl 6 time ahead of YAPC::EU, when there was a risk I'd have almost none. :)
00:01 japhb Very good news, that
00:02 jnthn Turning 3 longhaul flights into 1 usually is. :)
00:02 japhb Woah, yeah
00:04 jnthn As to the r-m benchmark regressions, are they all ones involving for loops?
00:04 japhb Loops in general, methinks
00:05 japhb Time 2014.07 against nom/master, and you can see the regression in both nqp-m and r-m
00:07 japhb (Note that I haven't tested -jvm or -parrot to see if these are at the VM-specific level or the VM-agnostic level)
00:09 jnthn OK
00:09 jnthn Will give it a look tomorrow, after some sleep :)
00:11 japhb Sure, sleep well
00:13 jnthn 'night o/
00:13 diakopter o/
00:27 sergot joined #moarvm
01:01 colomon joined #moarvm
01:25 zakharyas joined #moarvm
01:32 FROGGS_ joined #moarvm
06:54 woolfy joined #moarvm
07:24 woolfy left #moarvm
07:49 itz joined #moarvm
09:10 brrt joined #moarvm
09:10 brrt \o
09:12 FROGGS_ o/
09:14 nwc10 \o/
09:22 nwc10 jnthn: so beer is followed by very headache?
09:22 nwc10 or just much lie-in?
09:35 brrt oh, much tail call optimization
09:47 colomon joined #moarvm
09:59 woolfy joined #moarvm
09:59 woolfy left #moarvm
10:17 woolfy joined #moarvm
10:17 woolfy left #moarvm
10:21 lizmat joined #moarvm
11:21 jnthn nwc10: Much lie-in, plus coffee, reading news, shopping... :)
11:22 FROGGS life is good :o)
11:23 jnthn According to the news, not for everyone...
11:27 FROGGS yeah, that's one reason I don't watch/read the news
11:30 FROGGS jnthn: btw, I have a "fix" for that NFA bug
11:30 FROGGS I just have to add a "+@substates;" after that line: https://github.com/perl6/nqp/blob/master/src/QRegex/NFA.nqp#L330
11:32 jnthn Huh?
11:32 jnthn That's a no-op?
11:32 FROGGS I know :o)
11:32 FROGGS but it keeps that variable in place I think
11:33 FROGGS otherwise it ends up being a null object or so
11:33 jnthn If that makes a difference it's gotta be a bug of some kind...
11:33 FROGGS yeah, I just don't know how to debug that further
11:33 FROGGS all I know is that it is not a speshbug
11:33 jnthn ah
11:33 jnthn That's a relief :)
11:34 FROGGS well, sort of :o)
11:34 jnthn Instruction deletion gone wild or something
11:34 jnthn Well, that means it could be in code-gen...
11:34 FROGGS hmmm, maybe I should --dump my program?
11:35 FROGGS I mean, with and without my "fix"
11:35 jnthn Yes, that's worth a try
11:35 FROGGS k, will do that today
11:36 jnthn Though I did a fix for --dump recently, but it ended up in moar-jit...
11:36 FROGGS but right now I can continue hacking on v5, which is nice :o)
11:36 jnthn OK :)
11:36 FROGGS jnthn: well, I can cherry-pick it, no?
11:36 jnthn True :)
11:36 jnthn FROGGS++ for tracking this down
11:36 FROGGS not yet done :o)
11:56 woolfy1 joined #moarvm
11:56 woolfy1 left #moarvm
12:06 colomon joined #moarvm
12:09 lizmat joined #moarvm
12:10 woolfy joined #moarvm
12:10 woolfy left #moarvm
12:26 cognome joined #moarvm
13:08 timotimo jnthn: i tried --dump very recently on moar-jit and it still error'd out due to SC lazyness stuff :(
13:11 jnthn huh...why does it even care about SCs...
13:12 * jnthn is doing a JVM build of his qast_restructure stuff
13:17 timotimo let me try stuff out.
13:18 jnthn "Error while reading from file: java.nio.charset.MalformedInputException: Input length = 1"
13:18 jnthn wtf
13:19 timotimo we had that recently, didn't we?
13:21 jnthn Hm, I think somebody else may have reported it...
13:21 timotimo something about one of the files not being generated properly or something?
13:21 jnthn gen/jvm/CORE.setting looks a reasonable size at least
13:22 timotimo timo@schmand ~/p/nqp (master)> moar --dump NQPCORE.setting.moarvm
13:22 timotimo Unhandled exception: SC not yet resolved; lookup failed
13:24 jnthn oh...
13:25 jnthn Somehow some quotes are being turned to ANSI during generating gen/jvm/CORE.setting
13:26 timotimo the JVM trying to be helpful?
13:26 timotimo like MS word? %)
13:29 jnthn StandardWriteHandle seems to do setEncoding(tc, Charset.forName("UTF-8"));
13:40 jnthn bah, found it
13:40 jnthn Of course, what shoulda been a 2 line patch took a bunch more because Java. :/
13:53 vendethiel hehe, suffering for us so that *we* don't have to suffer writing java (to use the jvm) :p
14:18 jimmyz_ joined #moarvm
14:20 jimmyz_ Stage parse      :  31.236, before: ~33.3s, after qast_refactor. :)
14:21 jnthn Yeah, I saw a small speedup too. And a bit less memory use
14:22 jimmyz_ yeah
14:23 jimmyz_ The last number I can remember was `Stage parse      :  ~46s(MoarVM)`
14:24 timotimo oh wow
14:24 timotimo that must have been very long ago ;)
14:24 timotimo oh, wait! :D
14:24 timotimo jnthn++
14:24 jimmyz_ yeah, long time ago :)
14:25 jimmyz_ while parrot was ~600s
14:25 timotimo ouch!
14:34 avar joined #moarvm
14:34 avar joined #moarvm
14:42 ggoebel1111112 joined #moarvm
14:59 brrt joined #moarvm
15:00 colomon joined #moarvm
15:07 dalek joined #moarvm
15:08 brrt \o
15:08 timotimo /o
15:09 brrt :-)
15:11 jnthn o/ brrt
15:11 brrt \o jnthn :-)
15:11 brrt how was beer yesterday?
15:12 jnthn Delicious. The curry too. :)
15:12 brrt :-)
15:13 brrt you seem to eat a lot of curry :-)
15:15 brrt i think i can push run_handler into doing the right thing, but i kind of promise it'll be a hack
15:15 nwc10 m: say  5.7454e+01/5.7776e+01; say 5.7454e+01/6.597e+01
15:15 camelia rakudo-moar 356d57: OUTPUT«0.994426751592357␤0.870911020160679␤»
15:16 jnthn brrt: Can you outline your overall plan?
15:16 jnthn brrt: My thought on it was that a lngjmp back to the interpreter and rely on the enter JIT trampoline to do the right thing...
15:17 brrt i can after i get back
15:17 brrt oh, that's possible too, but mine is a bit simpler :-)
15:17 brrt basically, run_handler ends one way or the other with MVM_frame_unwind_to
15:17 brrt the error is in the goto_offset thingy
15:18 brrt which is taken from the bytecode handler, but which should be 0 for the jit handler
15:18 jnthn Yes; that needs to set a jit_entry_label I guess
15:18 brrt that's the last part yes
15:18 brrt but as i said, it's a bit of a hack
15:18 brrt :-)
15:18 * brrt brb
15:19 jnthn k :)
15:20 nwc10 jnthn: optimised build passed. ASAN build now at the setting
15:20 timotimo nwc10: does --dump work for you?
15:20 timotimo like moar --dump foobar.moarvm?
15:21 nwc10 ==29762==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7fda28f7b8d4 sp 0x7fffb95388c0 bp 0x7fffb9538bb0 T0)
15:21 nwc10 that looks like "no"
15:21 timotimo oh, wow.
15:22 zakharyas joined #moarvm
15:51 itz joined #moarvm
17:06 cognome joined #moarvm
19:16 brrt joined #moarvm
19:38 dalek MoarVM/jit-handlers: a1f710d | (Bart Wiegmans)++ | src/core/exceptions. (2 files):
19:38 dalek MoarVM/jit-handlers: Support some kinds of handlers
19:38 dalek MoarVM/jit-handlers: review: https://github.com/MoarVM/MoarVM/commit/a1f710d759
19:41 timotimo "some kind of" %)
19:54 dalek MoarVM/jit-handlers: d1fd1e5 | (Bart Wiegmans)++ | src/jit/ (5 files):
19:54 dalek MoarVM/jit-handlers: Generalise throwish control.
19:54 dalek MoarVM/jit-handlers:
19:54 dalek MoarVM/jit-handlers: Sometimes, the throwish op may throw to the same frame the source.
19:54 dalek MoarVM/jit-handlers: The simplest way of dealing with that by far is letting the
19:54 dalek MoarVM/jit-handlers: interpreter start the JIT code in the right place. But in that case
19:54 dalek MoarVM/jit-handlers: the invokish control guard will not do the right thing, so it has
19:54 dalek MoarVM/jit-handlers: to be replaced by two different guards.
19:54 dalek MoarVM/jit-handlers: review: https://github.com/MoarVM/MoarVM/commit/d1fd1e55ca
19:55 * brrt is tired today
19:55 brrt now for the real test
19:55 brrt does this work
19:56 brrt it hath not broken yet
19:58 jnthn :)
19:58 jnthn brrt++ # progress
19:59 brrt it just worketh
20:00 brrt wtf
20:00 jnthn ooh
20:00 brrt i'm not expecting that
20:00 jnthn Does this mean we can JIT frames with handlers now? :)
20:00 brrt ... yes
20:00 jnthn \o/
20:00 brrt and apparantly, that hasn't broken anywhere in {nqp, rakudo} testsuites
20:01 brrt i'm still not sure if i believe it
20:01 FROGGS *g*
20:02 jnthn o.O
20:02 jnthn Wow.
20:02 * jnthn hopes it's really for realz :)
20:05 dalek MoarVM/jit-handlers: 74be8e0 | (Bart Wiegmans)++ | src/jit/emit_ (3 files):
20:05 dalek MoarVM/jit-handlers: Increase stack space by 32 bytes
20:05 dalek MoarVM/jit-handlers:
20:05 dalek MoarVM/jit-handlers: This gives us some scratch stack space wherein
20:05 dalek MoarVM/jit-handlers: we can safely stuff temporary values even when
20:05 dalek MoarVM/jit-handlers: we're using stack arguments for C calls.
20:05 dalek MoarVM/jit-handlers: review: https://github.com/MoarVM/MoarVM/commit/74be8e012d
20:05 * brrt too
20:07 brrt 29.5 s on stage parse :-D
20:08 brrt btw, anybody any experience on doing a hard reset on a philips tv
20:08 brrt oh, 28.399 s without jit
20:08 brrt an old-style, cathode-ray-tube philips tv
20:09 brrt i may have locked mine and without a remote, there's no way to unlock it
20:09 jnthn :(
20:09 FROGGS how do you lock a tv?
20:09 * jnthn has no idea
20:09 brrt bad luck with button-pressing
20:09 * jnthn barely watches TV :)
20:09 brrt but FROGGS, good question
20:09 * brrt watches star trek quite a bit
20:10 FROGGS brrt: https://answers.yahoo.com/question/index?qid=20100420022602AA80Wnu
20:10 FROGGS (star trek)++
20:10 brrt :-) i've found that, but i don't have a remote
20:11 FROGGS uhh
20:11 FROGGS how old school :P
20:11 brrt well, all i use it for is the wii, which is also the thing that plays the star trek :-)
20:13 FROGGS but you can't switch to AV?
20:13 brrt nope, because lock
20:13 FROGGS :/
20:13 brrt why does a tv have a lock? i don't know
20:13 brrt i can't fathom it
20:14 FROGGS back in the days when SCART was popular the tv switched to AV when something star playing a video
20:14 FROGGS brrt: you can try to pull the power cord for 15min
20:16 brrt hmm
20:16 brrt i'll try that
20:17 brrt nope still locked
20:17 brrt (i've unplugged the power cord hours ago)
20:17 FROGGS ohh
20:17 FROGGS :/
20:19 brrt uh oh, broken on windows
20:19 FROGGS hmmm, they also say that you can press the power button on the tv like five seconds, and then it will reboot O.o
20:20 FROGGS but that sounds like it would work for newer devices
20:22 brrt false alarm
20:22 colomon joined #moarvm
20:25 brrt wtf, windows-in-a-vm is /significantly/ faster than linux-native
20:25 brrt i.e. 24.5s for stage parse
20:25 jnthn o.O
20:25 jnthn MSVC does make a better job of Moar than GCC, it seems.
20:26 FROGGS brrt: that also happens on my machine
20:26 brrt but, much false alarm it seems
20:26 FROGGS stage parse is faster on my Win7 VM, but compiling a lot of small files takes a lot longer
20:26 FROGGS like when compiling MoarVM
20:27 jnthn brrt: False alarm on things working, or on Windows bustage?
20:27 brrt windows bustage
20:27 jnthn ah, good
20:27 brrt :-)
20:28 brrt hmm, i can't directly compare building on windows vs building on linux, since on linux i use -j 4 and that... helps
20:29 brrt but, this works for me, i'm going to merge iin with moar-jit
20:30 brrt tomorrow i think i'll do the inline labels, which should be easy-ish in comparison
20:31 jnthn OK :)
20:31 brrt i should figure out where inline borders are actually used
20:32 brrt i think in deopt - but we don't need it there - and in dynvars
20:34 dalek MoarVM/moar-jit: 2641788 | (Bart Wiegmans)++ | src/core/ (3 files):
20:34 dalek MoarVM/moar-jit: Simplify die so it's more JIT-able
20:34 dalek MoarVM/moar-jit: review: https://github.com/MoarVM/MoarVM/commit/2641788766
20:34 dalek MoarVM/moar-jit: 1159e41 | (Bart Wiegmans)++ | / (12 files):
20:34 dalek MoarVM/moar-jit: WIP on Handler support.
20:35 dalek joined #moarvm
20:36 jnthn I think dynvars are the key place
20:37 jnthn Ah, I think I figured out what's up with timotimo's lazy_static_lex_vivify branch
20:38 brrt do tell
20:39 timotimo ah, cool
20:39 jnthn It just went indexing into a table that you need to scan through to get a matchign index.
20:39 jnthn 'cus not all lexicals have a static env entry
20:41 brrt i'm off for tonight :-)
20:41 jnthn 'night, brrt++... good luck with your TV!
20:42 brrt thanks :-) 'night jnthn++
20:42 brrt left #moarvm
20:42 jnthn Grrr....still doesn't work
20:44 jnthn (Different kind of breakage, though)
21:16 jnthn Well, now it builds and passes NQP tests...
21:16 jnthn Rakudo next.
21:22 timotimo huh. that seems like something i should have really noticed
21:28 jnthn State vars are a bit specail too
21:29 jnthn Anyway, got a working Rakudo that passes sanity test too
21:34 timotimo that's excellent!
21:37 jnthn Not much of a win just yet, though
21:45 woolfy joined #moarvm
21:45 dalek MoarVM: 5494549 | jnthn++ | src/ (5 files):
21:45 dalek MoarVM: Make static lexical deserialization lazier.
21:45 dalek MoarVM:
21:45 dalek MoarVM: Only deserialize on first usage of a particular lexical now. Cache it
21:45 dalek MoarVM: so future lookups are fast. Much work in this patch by timotimo++.
21:45 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/5494549ce3
21:48 timotimo jnthn: sorry for causing you so much work for cleaning up after me :S
21:48 lizmat joined #moarvm
21:48 timotimo especially since i don't really seem to be improving
22:06 jnthn timotimo: Well, it was probably still less work than me coming up with the patch from scratch. :)
22:07 timotimo maybe a bit less
22:07 timotimo :P
22:07 jnthn We still have lots of things in the way of really avoiding a lot of deserialization.
22:07 jnthn (At startup)
22:07 timotimo aye
22:08 jnthn Not least that we associated every code ref with a code object
22:08 jnthn Meaning we demand the code objects at startup. All of thme.
22:08 timotimo so we may not even need to have separate "loading" of stuff from the setting, just separate deserialization will help a great deal, eh?
22:08 jnthn Which in turn means we have to deserialize their Signature and Parameter objects.
22:08 jnthn Yeah, I think we can get a lot of the win out of deserialization.
22:08 timotimo https://gist.github.com/timo/ba36a47223115daeb6d0#file-gistfile3-txt - that is this beauty, eh?
22:09 jnthn yes :)
22:09 jnthn As you might imagine, we save some QAST nodes, some MAST nodes, and so forth if we can avoid this.
22:09 timotimo we're not even re-using the registers! :)
22:09 jnthn Oh?
22:09 jnthn wtf
22:09 timotimo i thought it was due to having Stmt instead of Stmts where we emit this
22:10 timotimo but when i changed it i was unable to test if it changed, as moarvm blows up during --dump on my machines
22:18 woolfy joined #moarvm
22:27 jnthn --dump should be fixed now between master and moar-jit, provided the static lexical environment not being lazily deserialized was the only issue
22:28 timotimo i'll check it out
22:30 timotimo This is MoarVM version 2014.07-331-g3c39bf8 -> Unhandled exception: SC not yet resolved; lookup failed
22:31 jnthn Did you do a master/moar-jit merge somewhere?
22:31 jnthn There's a patch on each side and I think it's only fixed between the two
22:35 timotimo i reset --hard to origin/moar-jit
22:35 timotimo and built without --enable-jit
22:37 jnthn yes, but then you don't have the commit I just did in master
22:37 woolfy left #moarvm
22:38 jnthn Anyways, heading away for the evening. 'night
22:41 timotimo oh!
22:41 timotimo in *master*
22:41 timotimo okay, gnite!
22:41 timotimo i obviously misinterpreted "between" in that sentence
22:42 timotimo now it segfaults instead. let's see about that.
22:51 timotimo okay, fully_deserialized == 0 means we need to force deserialization to finish
22:54 timotimo ah, MVM_bytecode_finish_frame is what we want
22:59 avar joined #moarvm
22:59 avar joined #moarvm
23:01 timotimo hum. MVM_frame_vivify_lexical only operates on a Frame, not a StaticFrame, iiuc
23:01 timotimo so iirc frame->static_info is what points to our StaticFrame
23:02 timotimo i think i'll want to just switch the lexical dumping over to just read directly from the static environment's flags
23:02 timotimo that way it could even point out if and what the lexical should be vivified to
23:03 timotimo oh, this frame_lexicals thing is something the dump code came up with
23:06 timotimo and bytecode_finish_frame is what is needed to fill in the lexical_names registry
23:08 timotimo okay. i'm not saying i understand fully what happens when exactly, but the code runs again :)
23:09 dalek MoarVM: bb61ea4 | (Timo Paulssen)++ | src/core/bytecodedump.c:
23:09 dalek MoarVM: bytecode dumping has to finish frames before poking around in them
23:09 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/bb61ea4874
23:12 timotimo "what happens when", as in which piece of the vivification dance happens when
23:12 timotimo and in what order those are valid etc
23:13 timotimo i was quite shocked when i just saw stage parse at 45 seconds, until i realized i had compiled moar with --optimize=0
23:21 timotimo i don't quite see where this code gets generated :\
23:22 timotimo ah, nqp also emits this, so it must be either in moar or nqp, not necessarily in rakudo
23:38 timotimo nope. i can't quite find where this code is generated
23:47 timotimo well, chasing this "bad code gen" is probably not important; if i understand correctly, this piece will want to be replaced by something "lazy" anyway

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