Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2014-06-28

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

All times shown according to UTC.

Time Nick Message
00:27 btyler joined #moarvm
00:53 timotimo joined #moarvm
00:53 tokuhirom joined #moarvm
01:00 FROGGS joined #moarvm
01:03 FROGGS_ joined #moarvm
01:47 ilbot3 joined #moarvm
01:47 Topic for #moarvm is now https://github.com/moarvm/moarvm | IRC logs at  http://irclog.perlgeek.de/moarvm/today
02:18 [Coke] joined #moarvm
06:00 lizmat joined #moarvm
06:00 woolfy joined #moarvm
07:41 brrt joined #moarvm
07:41 brrt good moarning
07:50 brrt .tell masak that moarvm actually does this, it's sp_6oget_ and sp_6obind_, and i've implemented the non-vivifying ones in JIT this week :-)
07:50 brrt (wrt to the 'hidden class' paper)
07:51 brrt or... isn't that what it's about?
08:41 woolfy joined #moarvm
08:41 lizmat joined #moarvm
08:51 lizmat_ joined #moarvm
09:00 vendethiel joined #moarvm
11:45 jnthn Hm, where on earth is dalek...
11:46 tadzik stuck on the stairs? Or how did that joke go
11:46 jnthn :P
11:48 brrt \o jnthn
11:49 jnthn o/ brrt
11:49 brrt how are things
11:49 brrt have you had to travel to norway yet?
11:49 jnthn Didn't shake off the cold yet
11:50 jnthn No, I won't have to.
11:50 jnthn So I'll be about plenty next week.
11:50 brrt :-) well, get well soon
11:50 jnthn Will probably take a couple of days of it to do Perl 6 things, in fact. :)
11:50 brrt very nice :-)
11:50 jnthn Got some meetings on Wednesday; otherwise, I'll be about here quite a lot.
11:50 * brrt renembers that he should blog, but has been to busy to do so in the last week or so
11:50 brrt that is good (for me :-))
11:51 brrt hey, ehm, now that i've 'passed' my midterm evaluation, have you any advice for me on how to do better?
11:51 brrt there must be something i can improve :-)
11:53 jnthn Well, I wouldn't mind more atomic or descriptive commits...
11:54 jnthn 97ff5e0d9e for example says it's about getlex, but also happens to add gethow/getwhat/null
11:54 brrt oh, ehm, yes, that is correct :-)
11:54 brrt quite frankly, i thought i had commited these before that
11:54 brrt i will take care of it :-)
11:55 jnthn Well, if you realize soon enough afterwards, rebase -i... :)
11:56 jnthn These days, my workflow leading up to a commit often ends up with a git add -p or a git commit -p, giving me a chance to review what I'm comitting and exclude any debugging bits.
11:56 jnthn Not saying such a workflow works for everyone, but I've found it fairly helpful.
11:58 jnthn As another example, I'd probably have done the refactor step in a12a3753f9e as a separate commit to the JIT additions.
11:59 jnthn While I'm in review mode:
11:59 jnthn https://github.com/MoarVM/MoarVM/commit/a12a3753f9e54dd06fefd3cb1c55a147c9ac3d6c#diff-aaba14a5deebf3624bd62485ddce5213R191
11:59 jnthn +        // NB: the next line is only legal because spesh stuff +        // is zeroed before it is acquired
11:59 jnthn Unfortunately, I suspect it's less than legal on big endian...
12:00 brrt hmmm
12:00 jnthn Well, or maybe.
12:00 jnthn I dunno.
12:00 brrt i dunno either
12:00 brrt :-)
12:00 brrt i should check that out
12:00 jnthn But the comment is taking up more chars than the conditional that would make the code robust.
12:00 jnthn Which kinda says it all. :)
12:00 brrt yes, that is true
12:00 brrt :-)
12:01 brrt shame on my evil little endian hackery ways
12:02 jnthn Generally, it's better to write the code a bit more robust in the first place, because debugging such things later is always a real drag.
12:02 brrt true
12:03 jnthn grmbl
12:03 jnthn .\nqp-m.bat --target=mbc --output=NQPP5QRegex.moarvm  gen\moar\stage2\NQPP5QRegex.nqp
12:03 jnthn Iteration past end of iterator
12:03 * jnthn wonders how OSR gets this wrong...
12:04 FROGGS_ o/
12:05 brrt \o FROGSS
12:06 brrt in response to your question yesterday night, X bugs make me restart my laptop; also battery-conciousness
12:19 jnthn Ah...d'oh. It moves the deopt annotation onto a PHI...
12:19 jnthn And thus re-runs a shift instruction
12:27 * brrt is working on a blog post explaining the plans of next week
12:27 brrt see you in a bit
12:30 FROGGS_ X bugs... gladly don't have them since years now
13:40 timotimo for some reason i don't understand (or maybe for no reason at all) my google-chrome tends to get rendering bugs after some time of use and it doesn't seem like restarting it fixes that
14:01 jnthn Bad news: it appears I forgot to eat lunch.
14:02 jnthn Good news: osr now builds NQP and passes tests, also builds Rakudo and passes sanity tests.
14:12 timotimo oh wow!
14:25 woolfy joined #moarvm
14:25 lizmat joined #moarvm
14:26 jnthn Seems to be doing about the right thing.
14:26 timotimo does it kick in often? :)
14:27 jnthn Not that often
14:27 jnthn But in benchmarks with outer loops, yes, it seems to
14:27 jnthn lemme try some rough timings
14:28 jnthn perl6-m --optimize=3 -e "my $i = 0; while (++$i <= 5000000) { }"
14:28 jnthn No spesh at all: 6.37s
14:28 jnthn Spesh with OSR disabled: 6.07s
14:28 jnthn Spesh with OSR: 4.55s
14:29 timotimo oh, not bad!
14:30 timotimo in nqp-land, that loop should also be jitted, eh?
14:30 jnthn I'd guess so
14:30 woolfy joined #moarvm
14:30 jnthn Note that inline isn't yet up to nailing the ++ and <= there
14:31 timotimo in perl6 land, inline nails almost nothing :)
14:32 vendethiel joined #moarvm
14:33 jnthn Right.
14:33 jnthn That's one of the next things on my todo list :)
14:37 jnthn Anyway, spectest runnign while I go shopping
14:39 vendethiel .oO( that shop must really be nearby )
14:40 timotimo :D
14:41 timotimo i remmeber the times when that wasn't the case
14:50 * vendethiel doesn't, and is happy to have started looking into perl 6 just now, cause he can (and does) play with tons of stuff already
14:51 timotimo hah
14:51 timotimo i'm also glad i've joined the community right as very exciting things started happening
14:51 vendethiel sorryfor not suffering along with you guys :P. I get to only eat the cake, not bake it
14:53 timotimo :)
14:54 vendethiel .oO( well, I'll get back to writing the recipe now )
14:54 timotimo the recipe as in "how it was baked" or the recipe as in "how to bake the next one"? :)
14:55 vendethiel the best one : how to eat it :D.
14:55 vendethiel Well, the most important one I'd say :).
14:55 timotimo aye, that's a good one :)
14:56 timotimo i've been meaning to write a turtle graphics style module and build a tutorial for p6 on top of it
14:56 timotimo now that we have a gtk3 binding, that isn't going to be terrifyingly hard any more
15:29 JimmyZ joined #moarvm
15:30 jnthn le spectests look good, and we're miles from a release, so I'm going for the merge
15:30 JimmyZ jnthn++ :)
15:33 jnthn Done Moar and NQP merges :)
15:33 jnthn dalek, dalek, where art thou...
15:35 JimmyZ she is tired :P
15:52 timotimo sweet!
16:04 zakharyas joined #moarvm
16:52 carlin_ joined #moarvm
16:59 jnthn timotimo: Remember the busted isconcrete optimization we disabled? Turns out it had a really silly bug :)
16:59 jnthn I'm spectesting with it fixed and turned on now.
17:00 jnthn But Spesh + OSR + that working (which in turn kills off the whole bindassert thing, thus why it's a win) gets us down to 4.11s.
17:01 timotimo oh wow
17:01 timotimo that's a nice win!
17:01 timotimo benchmarks are going to look much better now :3
17:01 jnthn Well, the bindassert thing not being optimized away is a inline killer.
17:01 timotimo i don't even recall what bindassert does :)
17:02 jnthn It's the thing that causes us to re-run binding with the slow-path binder to generate a good error message in the case we fail to bind the lowered signature.
17:06 timotimo ah
17:29 carlin joined #moarvm
17:58 japhb jnthn: The way that src/io/syncsocket.c does socket_connect, will a connect failure result in a leak sometimes, because on the local error path socket, connect, and dest are all freed, but in the on_connect error path, only req (== connect, I think) is freed?  Or am I misunderstanding the control flow?
18:08 jnthn japhb: Yeah, and I'm not convinced that throw inside of on_connect is the robustest thing either...
18:09 japhb Given that the status seems to be passed back anyway, should on_connect even *have* an error path?
18:10 jnthn japhb: Well, it's the uv_run(tc->loop, UV_RUN_DEFAULT); that leads to the code path that eventually calls on_connect
18:11 japhb Oh, hmmm.
18:12 jnthn japhb: libuv wants the socket world to be async, Rakudo needs us to provide sync sockets as well, so we basically re-create sync sockets atop of async ones
18:12 jnthn Though, hardware does I/O async anyway, so all sync IO is some kind of illusion I guess. :)
18:13 japhb Nodnod
18:20 TimToady I had a lot of flakiness getting the Event entry on RC not to segfault, just trying to use DateTime instead of now
18:20 TimToady and it's otherwise a real simple entry
18:23 jnthn timotimo: link?
18:23 jnthn oops
18:23 jnthn TimToady: link?
18:24 TimToady http://rosettacode.org/wiki/Events#Perl_6
18:25 TimToady especially adding another log line after the Channel.new (that also uses DateTime instead of now)
18:26 TimToady it seemed somewhat race-conditiony, insofar that it varied in how it dumped, but it usually failed for me
18:27 TimToady I think I was using DateTime.now, iirc
18:27 TimToady but maybe DateTime.Str
18:27 TimToady er, .now.Str
18:27 TimToady or some such
18:28 * TimToady is guessing refering to something not threadsafe both inside and outside the start
18:28 TimToady *ferring
18:28 TimToady hmm, that doesn't look right either :)
18:33 jnthn OK, thanks. Planning to use Monday to look over a bunch of the async/threading robustness things.
18:35 TimToady I'll put up a gist that crashes here
18:36 TimToady https://gist.github.com/anonymous/8f407afdb8cccc1ed09c
18:37 TimToady putting an extra log line after the Channel.new makes it work again here
18:37 TimToady 'course it could be something completely un-event-ful
18:38 TimToady or something only fails on Linux...
18:53 carlin joined #moarvm
19:04 timotimo o/
19:16 * jnthn back
19:16 jnthn TimToady: Thanks for the gist.
19:33 LLamaRider joined #moarvm
19:59 timotimo i miss dalek
19:59 jnthn Same
20:00 * jnthn doesn't know where dalek runs or who has admin...maybe ask on #perl6...
20:11 timotimo i'll be interested in seeing how the jit benefits from OSR soon
20:42 jnthn Meanwhile, I got extop inline stuff working enough to try that benchmark from earlier out.
20:44 jnthn After the various scalar optimizations from earlier, it stood at around 3.77s. With inlining it's down to 3.02s.
20:58 LLamaRider joined #moarvm
21:00 jnthn bah, with the extops inline improvements it manages to regress precisely one spectest...by SEGVing it.
21:32 jnthn Ah, was a more general issue, uncovered by OSR, but actually dating back to frame handling changes done during inlining.
21:37 TimToady well that's alright then; I prefer it when things are generally bad...
21:38 jnthn Seems it's generally gooder now. :)
21:38 * jnthn fires off spectest again.
21:51 timotimo i got distracted, but the benchmark results are in, just have to render the .html now
21:52 jnthn Yeah
21:53 jnthn Turns out that my machine was loaded down when I posted previous post-inline time
21:53 jnthn Now consistently getting it at like 2.7s or so
21:54 timotimo actually, i should run the 2014.06 things again
21:54 timotimo because otherwise the newer benchmarks would be missin
21:56 jnthn I just pushed inlining of extops.
21:56 timotimo oh, m
21:56 timotimo did you bump the versions?
21:56 jnthn Not yet.
21:56 timotimo can you tell how often we bail out due to extops when we're doing perl6 code rather than nqp?
21:57 timotimo i think perl6 code ends up having lots and lots of extops, as all rakudo ops are implemented as extops, eh?
21:57 timotimo or was this just about having different sets of extops on both sides of the inlining barrier?
21:57 jnthn No, it bailed as soon as it saw an extop
21:57 jnthn And they're, like, all over
21:57 jnthn Even infix:<+> used one
21:57 jnthn Well, uses...
21:59 timotimo ah, wow.
22:00 timotimo in that case, it should make almost no difference between 2014.06 and OSR-before-extop-inlining, but a bigger one between the latter and the most current one
22:00 timotimo i suppose i'll just ignore the timings i made earlier
22:01 timotimo would be glad if you could push a version bump in the next ~half hour
22:02 timotimo hm, but i can --gen-moar=master --gen-nqp=master in rakudo's configure.pl, can't i?
22:06 jnthn timotimo: pushed the version bumps
22:07 timotimo thank you :)
22:14 jnthn We're gradually closing the native gap, but there's work to go yet
22:14 jnthn my int $i = 0; while (($i = $i + 1) <= 100000000) {}
22:15 jnthn 2.64s
22:15 jnthn my $i = 0; while (++$i <= 100000000) { }
22:15 jnthn 27.82s
22:15 jnthn wait
22:15 jnthn 47.82s
22:16 jnthn m: say 47.82 / 2.64
22:16 camelia rakudo-moar 8de0fd: OUTPUT«18.113636␤»
22:16 jnthn Quite a factor still.
22:16 jnthn As a yardstick, in Perl 5
22:16 jnthn my $i = 0; while (++$i <= 100000000) { }
22:16 jnthn Takes 3.82s
22:16 jnthn Or 3.73 with use integer
22:17 timotimo wait, that's not nqp
22:17 jnthn m: say 3.73 / 2.64
22:17 camelia rakudo-moar 8de0fd: OUTPUT«1.412879␤»
22:17 jnthn This is all Rakudo
22:17 timotimo neato!
22:17 jnthn So, we've 1.4 times faster than Perl 5 on my box if you use native types typere.
22:17 jnthn *there
22:17 jnthn m: say 47.82 / 3.82
22:17 camelia rakudo-moar 8de0fd: OUTPUT«12.518325␤»
22:18 jnthn But the code you'll naively right is 12.5 times faster in Perl 5 still.
22:18 jnthn uh, write
22:18 TimToady so now it's just a smop to beat p5 :)
22:18 jnthn Well, it's interesting to ponder the path to get there.
22:19 jnthn In part, I there are code-gen improvements to be had.
22:19 jnthn *there are
22:19 jnthn There's JIT to take out the interp overhead.
22:19 timotimo huh. rc-self-describing-numbers seems to hang?
22:19 timotimo i don't think perl6-bench has anything for infinilooping benchmarks
22:20 timotimo oh, i was wrong
22:20 timotimo it did finish
22:20 jnthn But none of these deal with the more fundemental issue that ++$i in Perl 5 doesn't have to allocate
22:20 TimToady presumably we have enough type info to determine that integers below maxint don't *really* need to call .succ
22:20 jnthn While in Perl 6 it's allocating an Int each time.
22:20 jnthn TimToady: It doesn't actually call .succ at all
22:21 TimToady *whew*
22:21 jnthn TimToady: The bounds check is also a drop in the ocean at this point.
22:21 TimToady we oughta be able to figure out that it can use the same Int
22:21 timotimo so the allocation of the Int is harder; can we sp_fastcreate it at least?
22:21 timotimo TimToady: sounds like something escape analysis could enable
22:21 TimToady er, int container anyway
22:22 jnthn TimToady: Yes, that's escape analysis. It's quite hard.
22:22 jnthn But yes, that and the JITter are our sources of big improvements on this from here.
22:23 * TimToady is very happy to see the progress we've *cough* you've been making
22:24 TimToady language designers who wave their hands and say "with a good enough optimizer" are either geniuses or idiots, depending on who is helping them  :)
22:25 * TimToady feels like a genius today :)
22:25 colomon_ joined #moarvm
22:29 timotimo %)
22:33 jnthn timotimo: How long until pretty graphs? ;)
22:33 timotimo 15 minutes perhaps?
22:33 timotimo building the very newest nqp and rakudo right now
22:33 timotimo perl5, rakudo/nqp and 2014.06 are build
22:34 timotimo and timed, of course
22:35 jnthn cool
22:36 * jnthn is running "my $i = 0; while (++$i <= 100000000) { }" on R* (Rakudo Parrot) from 2014.03, which was conveniently available in an MSI
22:36 jnthn Just to get a feel for the progress
22:36 timotimo i'd like to know, too :)
22:39 jnthn It's taking a while...
22:39 timotimo oh, yikes
22:39 timotimo but while loops themselves weren't optimized recently, were they?
22:39 jnthn Rakudo's optimizer learned to take a lot of the cruft out of the basic ops
22:40 timotimo OK
22:40 jnthn Loop code-gen did improve for Moar in the last few months too
22:40 timotimo fair enough
22:40 jnthn But some of the opts were Rakduo optimizer level and influence all backends.
22:41 timotimo i like those :)
22:44 timotimo did you notice something being off with stage parse?
22:45 timotimo it seems to be taking quite a lot longer than i'm used to
22:45 jnthn It's looked fairly normal to me
22:45 timotimo well, the ssh connection aint dead
22:46 * jnthn checks his most recent build
22:46 jnthn Yeah...
22:46 jnthn It's seen it lower, but I think more stuffs ended up in the setting.
22:47 timotimo well, this has been going for more than a minute now
22:47 timotimo it's apparently also not consuming any cpu time ... ?!
22:47 jnthn o.O
22:47 tgt joined #moarvm
22:48 * timotimo is retrying
22:48 jnthn I just wonder...
22:48 jnthn oh you're kidding
22:48 jnthn jnthn--
22:48 jnthn I think it'll have deadlocked on itself.
22:48 timotimo oops :(
22:49 jnthn Yeah, braindead copy pasto on my part. Sorry.
22:49 timotimo oke :)
22:49 jnthn oh, the Parrot run finished
22:49 jnthn 1246.44s
22:49 timotimo here we lock, afterwards we lock. should work, right?
22:49 jnthn On windows, mutexes are reenterant natively so I didn't notice the issue. pthreads ones ain't.
22:49 timotimo ouch :)
22:49 timotimo yes
22:49 timotimo FFTF
22:50 jnthn Pushed fix
22:50 jnthn will bump
22:50 timotimo thanks
22:50 jnthn otherwise everybody has a borked HEAD
22:50 jnthn thanks for reporting
22:51 timotimo YW of course :)
22:52 jnthn Pushed version bumps to NQP and Rakudo now.
22:52 jnthn timotimo: BTW, there are two new envvars you may like to know about
22:52 timotimo i saw them :)
22:52 jnthn OK, cool
22:52 timotimo cool indeed
22:53 timotimo f1fd505 ← a cute commit short-id
22:53 jnthn SOS indeed :P
22:56 jnthn m: say 1246.44 / 47.82
22:56 camelia rakudo-moar 8de0fd: OUTPUT«26.065245␤»
22:56 LLamaRider joined #moarvm
22:59 timotimo i'm in the benchmarks section now
22:59 timotimo oh, wow.
23:00 raiph joined #moarvm
23:18 [Coke] src/core/interp.c:4187:17: warning: implicit declaration of function 'MVM_io_eventloop_cancel_work' is invalid in C99
23:19 timotimo huh.
23:19 jnthn hmm
23:20 jnthn [Coke]: ah, I see the prob...
23:21 jnthn [Coke]: Patched, thanks.
23:26 [Coke] jnthn: I will continue to post random moarvm build warnings as they happen to scroll by in future builds, then. :)
23:30 jnthn [Coke]: Well, they may not all be that easy. But that one was. :)

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