Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2014-05-07

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

All times shown according to UTC.

Time Nick Message
01:28 JimmyZ_ joined #moarvm
01:30 JimmyZ_ FROGGS: I would suggest you using MVM_platform_unlink in MVM_file_delete on Win32, which is more CJK-friendly
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:25 donaldh joined #moarvm
02:32 jnap joined #moarvm
03:33 jnap joined #moarvm
04:34 jnap joined #moarvm
04:35 nwc10 Stage mast       : 23867.263
04:35 nwc10 vs
04:35 nwc10 Stage mast       : 18504.768
04:35 nwc10 seems that unaligned MVMint64 matters a little bit
04:35 nwc10 (this is ARMv6)
04:36 nwc10 so, anyway, found a way to save a couple of hours
04:50 hoelzro joined #moarvm
05:31 FROGGS joined #moarvm
05:34 FROGGS JimmyZ: I'll do that today (in case I don't forget)
05:34 jnap joined #moarvm
06:34 benabik joined #moarvm
06:35 jnap joined #moarvm
06:50 FROGGS joined #moarvm
06:53 zakharyas joined #moarvm
06:55 domidumont joined #moarvm
07:36 jnap joined #moarvm
08:37 jnap joined #moarvm
09:16 brrt joined #moarvm
09:37 jnap joined #moarvm
09:42 zakharyas1 joined #moarvm
10:11 nwc10 but looks like gcc's codegen for ARM is not as good as clang's
10:11 nwc10 not totally surprised
10:12 nwc10 a) Apple care about ARM
10:12 nwc10 b) someone said (forget whom, but was competant to say this) that gcc can't really cope with exploiting ARM's condition codes
10:12 nwc10 (hence the Norcroft compiler could generate much better code)
10:12 nwc10 maybe clang was written, aware of what was needed for ARM
10:38 jnap joined #moarvm
10:41 brrt (intel is making me want to buy one of their shiny new processors)
10:42 tadzik heh. I rarely buy new CPUs, but when I do, the performance boost is stunning. I don't want to ruin it by buying them too often :D
10:42 FROGGS true :o)
10:42 brrt i used to think that the cpu basically never mattered
10:42 FROGGS O.o
10:43 tadzik huh what :)
10:43 FROGGS depends on what you are doing
10:43 tadzik I recently bought an SSD for an old computer with P4 in it
10:43 tadzik it turned out that HDD was not the only cause of the slowness
10:43 FROGGS if you are a gamer, not only the cpu matters... if you a hacker, cpu+ssd matters I think
10:44 brrt tadzik, thats precisely what i found with a netbook i'm using
10:44 brrt i was reviewing to buy a SSD
10:44 tadzik brrt: that should tell you something about the importance of CPU too :)
10:44 brrt but actually looking at load made clear that it was the CPU that was maxed out much more than actual disk access
10:44 brrt actually it is quite passable now that i've switched it over to x64
10:45 brrt that is - for some workloads
10:45 tadzik what's in that netbook, atom?
10:45 FROGGS several atoms perhaps
10:45 brrt yes, single atom
10:45 brrt with hyperthreading (which does work to my amazement)
10:45 tadzik so, hydrogen?
10:46 * tadzik hides
10:46 brrt lol
10:46 FROGGS two netbooks would be hydrogen then
10:46 brrt a proton :-p
10:46 tadzik that'd be H2
10:46 FROGGS still hydrogen, no?
10:47 tadzik yep
10:47 FROGGS if it is H1 then you usually say it is a hydrogen molecule, no?
10:47 FROGGS (at least I do)
10:47 brrt hydrogen atom :-)
10:47 tadzik I guess
10:47 FROGGS or an ion?
10:47 FROGGS gah, I dunno :o)
10:48 brrt an ion is a charged molecule or atom :-)
10:48 brrt a single H with a single electron would be a hydrogen radical
10:48 FROGGS ahh, of course
10:48 tadzik so I'm using helium which pretends to be berylium...
10:49 FROGGS so now we know: brrt's netbook is a radical when it is plugged in
10:50 brrt :-)
11:09 avar joined #moarvm
11:09 avar joined #moarvm
11:26 domidumont joined #moarvm
11:39 jnap joined #moarvm
11:41 domidumont joined #moarvm
12:13 brrt left #moarvm
12:40 jnap joined #moarvm
13:05 LLamaRider joined #moarvm
13:29 jnap joined #moarvm
13:45 btyler joined #moarvm
13:53 benabik joined #moarvm
13:53 JimmyZ FROGGS++
13:59 JimmyZ nwc10++, fixed the longstanding x86 building bug
14:01 nwc10 JimmyZ: I wasn't actually *trying* to do that. It was just a happy accident
14:03 nwc10 but it seems to have been a very timely happy accident, given Moar Star
14:03 JimmyZ anyway, it's not a easy bug :P
14:04 nwc10 oh no it was not.
14:04 moritz well, two weeks ago would've been even moar awesome :-)
14:04 JimmyZ :-)
14:24 donaldh joined #moarvm
14:41 FROGGS joined #moarvm
14:50 zakharyas joined #moarvm
16:05 btyler_ joined #moarvm
16:47 TimToady um, just to set the record straight for posterity, H is a radical only if its electron is missing (or if you could give it an extra electron somehow, which is really hard)
16:47 TimToady one H and one electron is simply a hydrogen atom
16:49 TimToady well, one proton and one electron, to be more precise
16:50 TimToady I guess you could say that an H plus an electron is a radical, if you mean H as the atom first, but H+ is the normal radical for H
16:51 TimToady I suppose the other way to make H- would be to make an antiproton :)
16:53 * TimToady wanders off to decrease the SNR over on #perl6 instead
19:12 cognominal__ joined #moarvm
19:12 dalek MoarVM/loop_labels: 3eea1e7 | nicholas++ | src/strings/utf8.c:
19:12 dalek MoarVM/loop_labels: Remove BOM-discarding code from MVM_string_utf8_decode()
19:12 dalek MoarVM/loop_labels:
19:12 dalek MoarVM/loop_labels: This code is unreachable on a platform where char is signed, because there
19:12 dalek MoarVM/loop_labels: utf8[0] will be between -128 and and 127 inclusive, and hence never equal to
19:13 dalek joined #moarvm
19:13 timotimo jnthn: should i think a bit about making "set" operations not show up in the resulting bytecode after spesh if we can re-name the registers instead?
19:19 timotimo i'm thinking a set instead of a decont is pretty cheap, but even cheaper should be no set at all?
19:19 jnthn Right
19:19 jnthn We probably want to do it in the backwards analysis as we're killing dead instructions.
19:22 timotimo my thoughts exactly
19:22 timotimo especially since i can figure out if the second argument to "set" has only a single use which is the set instruction itself
19:23 timotimo i'll probably have to handle the facts database properly, otherwise i could upset the backwards analysis somewhat?
19:24 jnthn Well, usages is the main thing we care for at that point
19:24 jnthn If hou're in the backwards analysis you know we alrady optimized all the dominated children.
19:24 jnthn (We're on our way back up the dom tree)
19:27 timotimo OK
19:36 brrt joined #moarvm
19:37 timotimo well. if i'm going to procrastinate away interesting bugs in perl6, i could do worse than to be hunting performance in moarv.
19:37 timotimo moarvm.
20:11 timotimo so, if we've tossed everything about the dominated children, does that mean i can safely ignore PHI?
20:13 jnthn Well...
20:13 jnthn not really
20:13 jnthn I mean
20:13 jnthn The backwards analysis of unused cares about PHIs.
20:14 timotimo then i'll have to actually figure out what phi exactly does ...
20:14 jnthn But...wait
20:14 jnthn You only really need to do your set cleanup within a basic block no?
20:14 timotimo phi is just ... the first argument is the result of merging all following registers, aye?
20:15 jnthn Yeah
20:15 jnthn You can view it as any other sintruction that writes
20:15 jnthn For the sake of what you're doing here.
20:15 brrt how many registers can be merged in a phi?
20:15 brrt or is that nonsense
20:15 jnthn 8.rotate(90)
20:15 brrt :-)
20:15 brrt i get it
20:15 timotimo well, the trouble is: if i rename a variable by removing a set, i'll have to make sure it ends up with the proper name in the coming BBs
20:15 jnthn But actually really limited to the number of preds the BB has
20:16 timotimo are the usage counts for registers BB-internal?
20:16 brrt i see
20:16 brrt how large can a BB grow? and how large are they in practice?
20:16 timotimo you can construct a BB with a million instructions
20:16 timotimo just don't do anything that branches
20:17 timotimo i think the maximum size is somewhere lower than a completely unrolled infinite loop.
20:17 jnthn Yeah, it's just a span of instructions with no branches
20:18 jnthn So in theory, can be rather long. In reality...in most code, > 20 instructions is unusual.
20:18 jnthn Since you typically end up with a conditional somewhere.
20:19 brrt right
20:23 timotimo jnthn: it would seem like all i have to do is go through all code, find all variables that have just been set to something else where the usage of the source is exactly one and then go through the entire code again, replacing every register that has a re-naming done to it to the target (maybe through even more than one re-name)
20:25 brrt hmm
20:25 jnthn timotimo: oh..hmm
20:25 brrt how do you know when to stop
20:25 jnthn No, I was gonna do it different.
20:25 brrt or - don't you get a rename-DAG
20:25 jnthn I was going to make it so we record in facts the declaring instruction.
20:26 jnthn And then you can just see usages is 1, than the declaring instruction is a set, and then it's relatively easy.
20:26 jnthn In fact you can traverse and kill entire set-chains like that.
20:35 timotimo oh, i don't even have to go backwards
20:35 timotimo right, and i shouldn't - otherwise i may have to go multiple times, right?
20:38 jnthn I think you can just do it as part of the existing usage back-propagation pass, no?
20:40 timotimo hm, i may be able to do that
20:41 timotimo wait, going in reverse?
20:41 timotimo ah, that can work if i always fold it to the "later" of the names
20:44 timotimo hmm. would i have a slot in the facts database for "renamed target" that i can follow until i find a null entry perhaps?
20:44 timotimo hm. at that point i probably need both the register and its version. i wonder if i get into any time-travel trouble :)
20:45 jnthn No
20:45 jnthn You're making it too ocmplicated
20:45 jnthn You just need to update facts so it stores the declaring instruction.
20:46 jnthn Then you can see, for any read, if the thing being read has a usage of 1 (so you're looking at the only read) and if the thing that writes it is a set instruction.
20:46 jnthn Then you can see if the thing that writes that set instruction is in the same situation.
20:46 jnthn Just like traversing a linked list until the pattern doens't hold.
20:47 jnthn Just need to make sure you don't cross BB boundaries
20:47 jnthn And that the register in question doesn't get re-used in the meantime.
20:52 dalek MoarVM/spesh_trace: 32074aa | jonathan++ | src/spesh/facts.c:
20:52 dalek MoarVM/spesh_trace: First pass at turning some logs into fact+guard.
20:52 dalek MoarVM/spesh_trace: review: https://github.com/MoarVM/MoarVM/commit/32074aa056
20:55 jnthn and that patch reveals our deopt ain't up to snuff yet :)
20:55 jnthn wow, my train might actually be about to get me home
20:55 jnthn And home has beer, and a comfortabler coding environment :)
20:56 brrt wow, swedish trains travel so late?
20:56 jnthn brrt: I shoulda been home by now if it wsa on time...
20:57 jnthn printf("guard missed\n");
20:57 jnthn oops :)
20:57 jnthn detrain...home in 10 or so... &
20:58 brrt fair enough
20:59 FROGGS ha! jnthn++ dies alos printf-based debugging! \o/
20:59 FROGGS does*
20:59 FROGGS dang >.<
21:00 FROGGS also*
21:01 brrt is there another way? :-p
21:02 FROGGS not for me... but jnthn seems always to smile when I let some debugging code slip :o)
21:03 brrt i'm kidding though, i'm a big fan of gdb
21:03 brrt knowing not yet 5% of all its features
21:04 FROGGS yes, gdb is awesome
21:05 FROGGS but currently I hack on nqp-j
21:06 brrt i've used jdb, too, and couldn't figure it out
21:06 timotimo hum.
21:06 brrt jdb is ok, but i feel like it hasn't had much attention in favor of graphical / IDE-based debuggers
21:22 timotimo i think i'm brainfarting a bit right now
21:23 timotimo so after the BBs have been removed if they are unreachable
21:23 timotimo hmm, i'm supposed to save the creating operation in the facts
21:24 timotimo hmm. if i turn a creating instruction into a different instruction, it'll stay "at the same place", so i can store a pointer
21:24 timotimo but if it's removed ... hum ...
21:25 timotimo i may have to take care of that then. though if it's removed the usages should be 0 and i shouldn't have to care about the register any more anyway
21:29 jnthn FROGGS: I do it when the most useful thing is a bunch of data to look over, yeah.
21:29 jnthn FROGGS: Which for me is fairly often.
21:30 jnthn FROGGS: If it's a SEGV then it's straight over to another tool for the initial analysis.
21:34 timotimo https://gist.github.com/timo/a8cc59072de640a643c5 ← jnthn, does this look like what you had in mind at all?
21:38 dalek MoarVM: d6a554f | (Timo Paulssen)++ | src/spesh/facts.h:
21:38 dalek MoarVM: remove duplicate words from from comments
21:38 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/d6a554f2cc
21:41 jnthn timotimo: yes, though I'm not sure about the name origin...
21:41 jnthn assigner could work (goes well with ss*a*)
21:42 brrt left #moarvm
21:44 timotimo ah, sure.
21:44 timotimo so, since all we do to "change" all the operations is to assign a different -> info on the instruction, the pointer should be "stable" right?
21:46 jnthn Right
21:46 timotimo that's a good start.
21:47 timotimo i think you said i'm thinking too complicated about this; with the right algorithm, will i have to go through every instruction and rename their operands if they are "out of date"?
21:49 jnthn Hmm
22:23 jnap joined #moarvm
22:26 xiaomiao joined #moarvm
22:29 timotimo i don't like the last word being "hmm" :)
22:30 nwc10 timotimo: he said something (innocent, unrelated) to me privately about 20 minute later
22:31 jnthn timotimo: soryr, bot distracted :)
22:31 timotimo :)
22:32 jnthn uh, got :)
22:32 jnthn hah
22:33 jnthn Oh...we may be able to get some even simpler way out of this
22:33 jnthn If we just want to do this in the case we turn a decont into a set, for example
22:33 jnthn If the decont is the only user of the written thing
22:33 jnthn e.g. it's
22:34 jnthn someinstr r1, r0
22:34 jnthn decont r2, r1
22:34 jnthn And it's that decont we want to eliminate, and r1 has a single usage
22:34 jnthn Then we can simply delete the decont and then change
22:34 jnthn someinstr r2, r0
22:34 jnthn Which I think will actually handle the majority of cases.
22:35 timotimo i think my thinking and planning capabilities are being hampered by the distance between me and my whiteboard
22:35 jnthn Could draw it on your hand?
22:35 timotimo :D
22:35 timotimo my handwriting is terrible even on paper
22:35 timotimo i'd expect the effect to be squared if i handwrite on my hand
22:36 jnthn .oO( why'd you think it's called *hand*writing? :P )
22:37 timotimo clearly, there's some language in which "hand" means "bad"
22:41 cognominal__ joined #moarvm
22:42 timotimo well, that does sound like something i'd want to be doing in a backwards-running process
22:50 timotimo i'll sleep on it
22:50 timotimo (and then have a somewhat long drive)
22:52 jnthn sleep well, drive safely
22:52 * jnthn should have a decent tuit supply over the next days
22:52 jnthn Decided to hack more on things tomorrow when I've more energy, rather than screw stuff up tonight. :)

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