Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2014-08-14

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

All times shown according to UTC.

Time Nick Message
01:03 FROGGS_ joined #moarvm
02:21 lue joined #moarvm
03:52 brother| joined #moarvm
03:52 sergot_ joined #moarvm
03:55 ilbot3 joined #moarvm
03:55 Topic for #moarvm is now https://github.com/moarvm/moarvm | IRC logs at  http://irclog.perlgeek.de/moarvm/today
04:11 ilbot3 joined #moarvm
04:11 Topic for #moarvm is now https://github.com/moarvm/moarvm | IRC logs at  http://irclog.perlgeek.de/moarvm/today
04:21 cognome joined #moarvm
04:23 zakharyas joined #moarvm
04:33 zakharyas1 joined #moarvm
05:00 itz_ joined #moarvm
05:10 japhb_ joined #moarvm
05:10 btyler_ joined #moarvm
06:05 itz joined #moarvm
07:19 brrt joined #moarvm
07:20 brrt \o
07:21 timotimo o/
07:22 timotimo when gsoc is over, i'll be missing the rapid fire of new jit features :S
07:22 timotimo i suppose i'll just have to get my own hands dirty writing a bit of assembly for the jit :\
07:31 brrt i suspect the fire won't be so rapid anymore, no
07:32 brrt i'm enrolled for my next year btw :-)
07:32 timotimo university?
07:34 brrt yes, in energy-and-environmental sciences
07:34 timotimo oh
07:34 timotimo that sounds good :)
07:34 brrt if all checks out i'm going to work on smart grid technology :-)
07:36 timotimo that's way cool.
07:38 brrt yeah, i hope it is
07:44 brrt brb :-)
07:50 nwc10 timotimo: well volunteered :-)
08:08 moritz ... and energy-and-environmental folks have good chances to work in data centers too :-)
08:09 timotimo perl6 doesn't have good chances yet, but by the time brrt graduates maybe it will :P
08:19 jnthn morning o/
08:25 nwc10 \o morning
08:48 brrt joined #moarvm
08:49 brrt morning jnthn
08:51 klaas-janstol joined #moarvm
08:53 * brrt is wondering how to fast implement floor() in asm
08:53 * jnthn is trying le_I and friends :)
08:54 moritz brrt: aren't there rounding primitives the in SSE instructions?
08:54 brrt i'd think so
08:54 brrt but sse instruction set aren't exactly... ehm... googleable
08:54 timotimo jit operation implementation: where will it end?!
08:55 jnthn When we jitted all the ops that are likely to show up on hot paths :P
08:55 moritz http://softpixel.com/~cwright/programming/simd/sse.php
08:56 brrt hey, that's handy :-)
08:56 donaldh joined #moarvm
08:56 moritz brrt: I just googled for 'rounding sse' :-)
08:56 * brrt slight facepalm
09:00 brrt timotimo: http://steve-yegge.blogspot.nl/2007/06/rich-programmer-food.html
09:01 brrt with regards to the question 'how long will we be busy with the JIT compiler' ;-)
09:07 nwc10 brrt: can you cheat - write C, get the compiler to output assembler, see what it chose?
09:07 brrt of course
09:07 brrt thats exactly what my 'asmof' bash script does ;-)
09:07 nwc10 also, it occurred to me - IIRC it was timotimo who added "a" and aggregated the bail out logs
09:08 timotimo yup, that's me
09:08 nwc10 is it viable to fix it to only start logging bail out after stage 0?
09:08 nwc10 in some way?
09:08 nwc10 because basically stage 0 doesn't matter, and will solve itself after the next bootstrap update
09:08 timotimo a few weeks/months(?) earlier i suggested allowing to put some special character at the start or end of the env var to switch between append and overwrite
09:08 nwc10 one possible way is "rm" as part of the makefile at the end of stage 0
09:08 timotimo another is to just "make m-bootstrap-files"
09:08 timotimo you don't have to commit that
09:09 nwc10 aha that's probably the best way
09:09 timotimo it's the simplest at least
09:09 brrt i think that was very recent when you suggested that timotimo
09:09 jnthn Aye. And a bootstrap update even on my zippy machine is a few of seconds off every NQP build
09:09 timotimo nice.
09:10 jnthn So we might just want to go for it at some point soon anyway.
09:10 nwc10 other other thing I thought, which might be a repeat of what's already said, or might be "too early" - for things like "JIT a few bigint ops." - is it possible to programatticaly generate both the code in interp.c and the JIT code for the OP, from a common definition?
09:11 nwc10 jnthn: parallel tests for NQP would also shave time, at least on POSIX platforms
09:16 jnthn How do we tweak the Makefile to have that happen?
09:17 moritz prove -j 4
09:17 lizmat joined #moarvm
09:18 moritz that'll run 4 jobs in parallel, unconditionally
09:18 jnthn Yeah, I was more thinking "pay attention to the TEST_JOBS env var"
09:18 moritz (that is, independent of th enumber of cores)
09:20 brrt basically, floor() is a function call, and i'm wondering if it could not be
09:20 brrt if that would be worth the trouble
09:20 nwc10 I don't know for x86 or x86_64
09:20 nwc10 IIRC it's viable in ARM assembler
09:21 moritz jnthn: probably easist would be a small wrapper around prove that adds -j $ENV{TEST_JOBS} if $ENV{TEST_JOBS} is set
09:22 jnthn Right. Like a t/harness in Rakudo but simpler
09:22 moritz aye
09:23 FROGGS__ joined #moarvm
09:29 dalek MoarVM: d85a1df | jnthn++ | src/jit/ (2 files):
09:29 dalek MoarVM: JIT [eq|ne|lt|le|gt|ge]_I.
09:29 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/d85a1df646
09:29 brrt it's basically, not so feasible to implement floor
09:29 brrt cuz corner case
09:29 jnthn .oO( a floord plan... )
09:34 moritz I wonder if it would be a (big?) speedup to first check if both bigints are actually stored as small integers, and if yes, use the direct comparison
09:35 brrt uhm, what is the plan in mod_n if any is NaN
09:36 timotimo i think it'd result in NaN?
09:39 dalek MoarVM: fb7a4a5 | jnthn++ | src/ (4 files):
09:39 dalek MoarVM: JIT getlexouter.
09:39 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/fb7a4a5b5d
09:39 jnthn BAIL: op <sp_guardcontconc>
09:39 jnthn Aww!
09:39 timotimo contconc does sound cute.
09:42 jnthn Bailing on it ain't though :P
09:43 donaldh joined #moarvm
09:51 * brrt is going to skip mod_n for now
09:51 brrt in real code, it should be rare, because really, who does that
09:54 timotimo aye
09:54 timotimo it gets replaced by mod_i for almost all cases now
09:54 timotimo it was "just" an oversight in the nqp optimizer :)
09:58 dalek MoarVM: a7b0a1a | jnthn++ | src/jit/graph.c:
09:58 dalek MoarVM: JIT capturelex.
09:58 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/a7b0a1abdc
09:58 nwc10 "I" need a faster machine. The goalposts move faster than the build cycle
10:02 timotimo heh heh :)
10:02 timotimo maybe the build just needs to get even faster :D
10:07 brrt uhm
10:08 brrt can we switch contconc for sp_guardconc, decont, sp_guardconc?
10:08 brrt hmm
10:08 brrt or wait
10:09 brrt if contspec->fetch invokes, then sp_guardcontconc is wrong
10:09 jnthn I'm pondering a variant of the guard which can just index straight into the container type...
10:10 brrt so i assume there's a check for contspec->fetch_never_invokes in spesh
10:10 brrt the simpler the better
10:10 jnthn Yes, there's a check for that in spesh
10:10 jnthn So it can never invoke
10:10 brrt ah ok
10:10 brrt good
10:10 brrt then the conversion into 3 ops is overkill
10:17 klaas-janstol joined #moarvm
10:32 dalek MoarVM: 9573e69 | (Bart Wiegmans)++ | src/jit/ (2 files):
10:32 dalek MoarVM: JIT sp_guardcontconc
10:32 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/9573e69535
10:32 jnthn ooh :)
10:39 nwc10 sorry for the naive question - why is that one particulary ooh-worthy?
10:51 jnthn Because it's extremely common in spesh'd Perl 6 code
10:51 jnthn m: say 4.8 / 5.3
10:51 camelia rakudo-moar 88326e: OUTPUT«0.905660␤»
10:52 jnthn Allows JITting of things that saves 10% off while_hash_set benchmark
10:52 jnthn And likely many similar ones
10:53 timotimo neato :)
10:54 timotimo so, if i understood correctly, dynasm currently lacks support for supplying registers from a variable and thus we have to move all our data from heap to registers and back to the heap and cannot keep data in registers between emitted ops, right?
10:55 jnthn Yes; making dynasm handle that is only part of the story, though.
10:56 timotimo yes, after that we'll need to have a register allocator that shuffles around which register stores what for how long
10:56 timotimo what else am i missing?
10:58 jnthn That you musn't cheat in ways that break deopt
10:59 timotimo oh
10:59 timotimo so where-ever we deopt, it must either look like we never did the register allocation stuff or we have to store everything back the way it would have been
11:00 jnthn Yes
11:00 timotimo oh, another unrelated question: that Frame 1, with the ~2000 locals ... we return from that before we go on to run user code, right?
11:00 jnthn Well, not *everything*
11:00 timotimo as in: that doesn't sit on the stack, making every garbage collection run 2000 local references more expensive etc?
11:00 jnthn No, Frame 1 is the outer scope of the running program
11:01 jnthn In the grand scheme of things, 2000 locals is a drop in the ocean given the amount of things a GC run might consider.
11:01 timotimo hm.
11:02 timotimo if it's cheap, i suppose it's fine.
11:10 timotimo before: 3940src/vm/moar/stage0/
11:10 timotimo after : 3876src/vm/moar/stage0/
11:10 timotimo not overwhelming, but it's a difference :)
11:28 timotimo This is MoarVM built with JIT support version 2014.07-375-g8b1c1a0
11:28 timotimo does that look good? jnthn?
11:29 jnthn I might put "built with JIT support" at the end
11:30 timotimo i had that first, but then i thought "maybe someone would be matching the version by doing words()[*-1]"
11:30 nwc10 if they do that, that's their problem
11:30 timotimo OK :)
11:30 nwc10 it feels like optimising for the uncommon case
11:30 dalek MoarVM: e97226e | (Timo Paulssen)++ | src/main.c:
11:30 dalek MoarVM: let --version advertise jit support
11:30 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/e97226eada
11:40 nwc10 m: say  my $o = 5.6177e+01; my $n = 5.5998e+01; say $n/$o; say $n/6.597e+01
11:40 camelia rakudo-moar 758974: OUTPUT«56.177␤0.996813642593944␤0.848840381991815␤»
11:40 nwc10 oops
11:41 nwc10 m: my $o = 5.6177e+01; my $n = 5.5998e+01; say $n/$o; say $n/6.597e+01
11:41 camelia rakudo-moar 758974: OUTPUT«0.996813642593944␤0.848840381991815␤»
11:41 nwc10 OK, so slightly faster than "last" time and quite a bit faster than about 2.5 weeks ago
11:42 timotimo should the exit code for --version be a different one from "successfully ran a user program"?
11:43 nwc10 Perl 5, Python and Ruby all seem to exit 0
11:43 nwc10 tclsh doesn't understand --version
11:44 timotimo OK
12:06 jnthn bbiab
12:27 brrt joined #moarvm
13:21 klaas-janstol joined #moarvm
13:42 brrt joined #moarvm
13:50 jnap joined #moarvm
14:02 brrt hmm
14:03 brrt i'm still wondering how to refactor param_*_?
14:03 brrt any advice?
14:15 jnthn brrt: Passing a pointer to the reg in and returing something that indicates existence could do it
14:15 brrt hmm yeah
14:15 jnthn brrt: And you just disregard the return value for the required variatns
14:15 brrt do we still need the 'required' field then?
14:15 jnthn Since it'll never return but then throw
14:15 brrt we could handle the exception in the interpreter
14:15 brrt true
14:17 brrt but, there are non-interpreter uses of these functions, and these would like to have the object, not a register to put them in
14:17 jnthn Those are confined to bootstrap.c though?
14:18 jnthn And I suspect we can factor out a helper static function to make it convenient for those
14:18 jnthn They are absolutely not hot path at all
14:18 brrt hmm yeah i suppose you're right
14:18 brrt ok
14:18 brrt i'll get to that then
14:18 brrt (finally i might add)
14:18 jnthn \o/
14:21 brrt though adding a fifth argument might make a speed loss on win64 systems
14:26 * brrt afk for a bit
14:26 brrt left #moarvm
14:39 donaldh_ joined #moarvm
14:42 ggoebel1111117 joined #moarvm
15:18 [Coke] jnthn: all set for brrt's review on GSOC?
15:18 [Coke] just want to make sure he has no surprises.
15:22 jnthn [Coke]: Yes, will be ready to submit the eval on Mon/Tue from my side :)
15:26 dalek MoarVM: e953112 | jnthn++ | src/ (4 files):
15:26 dalek MoarVM: Support write/close of STDIN for async proc.
15:26 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/e953112199
15:27 japhb \o/  # async STDIN!
15:29 jnthn Just got it to write to clipboard :)
15:29 jnthn my $proc = Proc::Async.new(path => 'c:\windows\system32\clip.exe', :w);
15:29 jnthn my $proc_done = $proc.start;
15:29 jnthn await $proc.say('omg stuff from rakudo');
15:29 jnthn $proc.close_stdin;
15:29 jnthn await $proc_done;
15:30 btyler_ ooooh, cool
15:30 japhb Awesome sauce.
15:31 japhb Is there a single place to look at all these examples?
15:31 jnthn No
15:31 jnthn I've just had a file that I've been scribbling bits in
15:31 * japhb chuckles
15:31 jnthn I should probably turn this into a p6doc entry :)
15:31 japhb Yes please.  :-)
15:35 dalek MoarVM: 610e8d0 | TimToady++ | src/core/frame.c:
15:35 dalek MoarVM: don't pass dynvar metrics we don't use currently
15:35 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/610e8d0434
15:52 [Coke] moar still busted in daily runs.
15:52 [Coke] (moar jit is fine)
16:00 [Coke] nevermind, I'm an idiot. it'll be fine tomorrow.
16:22 zakharyas joined #moarvm
16:29 jnthn oh noes, who bust the maor build...
16:31 hoelzro I've been seeing more problems with mokudo since last I built it
16:31 FROGGS not me :P
16:31 dalek MoarVM: 7cfcdba | jnthn++ | src/jit/emit.h:
16:31 dalek MoarVM: Must mark thing used in main MVM_PUBLIC.
16:31 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/7cfcdba105
16:31 hoelzro git bisect points to 49f19ca
16:32 jnthn hoelzro: Hm. That's an odd thing to cause problems; if anything, it's causing less optimization to happen...
16:32 FROGGS hoelzro: what kind of problems?
16:33 hoelzro FROGGS: segfaults during tests of a module I've been working on
16:33 FROGGS eww
16:34 hoelzro yeah =/
16:34 timotimo did you try the usual MVM_SPESH_INLINE_DISABLE, MVM_SPESH_DISABLE dance?
16:34 FROGGS can you golf it down?
16:34 hoelzro I never learned that dance
16:34 hoelzro FROGGS: after work, I can try
16:34 FROGGS nice :o)
16:35 hoelzro I saw it this morning, and git bisect takes little attention but a lot of time, so I figured I could do that while I work on work stuff =)
16:39 hoelzro timotimo: what dance is this, btw?
16:39 timotimo setting MVM_SPESH_INLINE_DISABLE=1 and trying it, then setting MVM_SPESH_DISABLE=1
16:39 timotimo that way you can kind of find out if spesh is likely to blame
16:39 hoelzro timotimo: that "fixes" it
16:39 hoelzro (MVM_SPESH_INLINE_DISABLE=1, that is)
16:39 timotimo ah
16:40 timotimo that could be a hint!
16:40 jnthn Can you try s/INLINE/OSR/ instead?
16:41 japhb Well, it *is* a hint, it just could be a red herring also.  :-)
16:41 hoelzro MVM_SPESH_OSR_DISABLE=1 perl6 t/05-cmd-options.t segfaults
16:42 japhb .oO( Clupeidae, 7000 Å )
16:42 jnthn That narrows it down a good bit
16:45 hoelzro the repo is at https://github.com/hoelzro/Subcommander if anyone wants to take a look
16:46 hoelzro I can try to golf it down after work
16:46 hoelzro but it's StarCraft night tonight, so I might not get around to it until tomorrow morning =)
17:08 dalek MoarVM: 079d3bd | jnthn++ | src/strings/ops.c:
17:08 dalek MoarVM: Add a mechanism for debugging strand issues.
17:08 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/079d3bd969
17:08 dalek MoarVM: 010a964 | jnthn++ | src/strings/ops.c:
17:08 dalek MoarVM: Fix bug in string repeat reported by Mouq++.
17:08 dalek MoarVM:
17:08 dalek MoarVM: Fixes the crash in htmlify in p6doc.
17:08 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/010a9643e1
17:34 FROGGS jnthn: see http://perlcabal.org/syn/S05.html#Array_aliasing and http://perlcabal.org/syn/S05.html#Hash_aliasing
17:34 FROGGS jnthn: now I think it is not LHF anymore... but probably doable
17:40 timotimo it used to be an LHF, now it isn't any more?
17:44 jnthn The tree grew... :P
17:50 jnthn Yeah, looks a little tricky
17:50 jnthn dinner; bbiab
18:01 timotimo jnthn: if we are clever about it, we can arrange the numbers from 0 to 64 in a string that's shorter than 10 + 54 * 2 characters! :)
18:01 timotimo by using strands and references to substrings and such
18:10 [Coke] is that triciest worth it?
18:10 [Coke] er, *trickiness.
18:10 timotimo i don't actually know how much shorter that'd end up being
18:11 timotimo i also don't remember what that series is called that optimizes this kind of thing
18:12 timotimo https://stackoverflow.com/questions/4389353/what-is-the-shortest-string-of-numbers-which-contains-all-the-numbers-between-0
18:12 timotimo AKA https://en.wikipedia.org/wiki/De_Bruijn_sequence
18:16 jnthn Thing is, a strand itself needs a little space
18:17 jnthn So we almost certainly don't come out ahead
18:20 klaas-janstol joined #moarvm
18:20 timotimo aaw :(
18:22 klaas-janstol joined #moarvm
18:43 tgt joined #moarvm
18:49 tgt Hi. Calling nqp::p6listitems on a type object segfaults on moar. On parrot it says "cannot look up attributes in a type object". (I called Array».say accidentally.)
18:51 jnthn m: Array>>.say
18:51 camelia rakudo-moar 0bbeda: OUTPUT«(signal )»
18:51 diakopter cool
18:57 Ven joined #moarvm
19:10 jnthn tgt: The SEGVs were easily fixed, but it shouldn't have been trying that anyway.
19:10 jnthn (That is, it's wrong on Parrot too)
19:10 jnthn (And now it just gives an exception on Moar)
19:11 timotimo any fruits of the low hanging kind around tonight?
19:12 jnthn timotimo: Maybe some JIT? :)
19:13 jnthn Are existspos and assign JITted, for example?
19:13 timotimo i think i've seen brrt commit assign and assignunchecked
19:13 timotimo i think i built existskey, but not existspos
19:13 jnthn OK. existspos is hit by every array access
19:13 jnthn (in Perl 6)
19:14 timotimo seems like i'll have to write MVM_repr_exists_pos first
19:14 klaas-janstol joined #moarvm
19:15 timotimo well, that was easy :)
19:19 timotimo Stage parse      :  27.635 - on my laptop with jit turned on ...
19:20 timotimo Stage parse      :  28.208 - with jit disabled
19:20 timotimo ^-  yay
19:20 hoelzro up next: fusion starts to pay off ;)
19:21 diakopter how much of that 27.6 is the jitting
19:21 timotimo don't know :\
19:21 diakopter is it in a background thread yet?
19:22 timotimo no
19:22 timotimo we also don't do the free-ing in a background thread yet either
19:23 diakopter ah
19:24 timotimo i'll just push my changes and then i'll be AFK for a bit
19:25 dalek MoarVM: 58902e7 | (Timo Paulssen)++ | src/ (3 files):
19:25 dalek MoarVM: existspos existsjit
19:25 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/58902e7375
19:48 klaas-janstol joined #moarvm
20:04 nwc10 timotimo: PASS (except for the usual sin. Sadly)
20:18 jnap joined #moarvm
21:52 zakharyas joined #moarvm
23:38 colomon joined #moarvm

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