Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2014-04-08

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

All times shown according to UTC.

Time Nick Message
00:00 timo1 joined #moarvm
01:39 timotimo i don't really know how i'd hook it up later, but i think i'll write a function that'll take an MVMString and hash it with the uthash function we're using even if it's a ropey string or an 8 bit string
01:49 jnap joined #moarvm
01:56 btyler joined #moarvm
01:56 timotimo should just be a manner of manually unrolling the loop for 4 iterations and pretend the bytes we got into it were actually MVMint32 rather than MVMuint8
01:57 timotimo that would give three zero bytes that i should be able to manually "partialle evaluate"
01:57 jnap joined #moarvm
01:57 timotimo though ... the compiler could do that for me, too ... and it would be easier to maintain if it'd just be a straight copypaste from the original algo
02:16 raiph joined #moarvm
02:20 timotimo oh, of course the hash function that is used is the one with the largest amount of code ...
02:21 timotimo i'll go to bed before i tackle this
02:37 JimmyZ good night
02:58 jnap joined #moarvm
02:59 woosley joined #moarvm
03:43 hoelzro joined #moarvm
03:58 jnap joined #moarvm
04:31 eternaleye joined #moarvm
04:59 jnap joined #moarvm
05:28 flussence joined #moarvm
06:00 jnap joined #moarvm
06:53 eternaleye joined #moarvm
07:01 jnap joined #moarvm
07:08 zakharyas joined #moarvm
08:38 brrt joined #moarvm
09:02 jnap joined #moarvm
09:48 ilbot3 joined #moarvm
09:48 Topic for #moarvm is now https://github.com/moarvm/moarvm | IRC logs at  http://irclog.perlgeek.de/moarvm/today
09:54 hoelzro joined #moarvm
09:54 yawnt joined #moarvm
09:56 japhb_ joined #moarvm
09:57 bcode joined #moarvm
10:03 zakharyas joined #moarvm
10:03 japhb_ joined #moarvm
10:03 rurban_ joined #moarvm
10:04 woolfy joined #moarvm
10:04 timotimo joined #moarvm
10:06 TimToady joined #moarvm
10:08 sergot joined #moarvm
10:15 tokuhirom joined #moarvm
10:26 masak joined #moarvm
10:27 jnthn joined #moarvm
10:27 vendethiel joined #moarvm
10:27 lue joined #moarvm
10:27 retupmoca joined #moarvm
10:27 colomon joined #moarvm
10:27 FROGGS joined #moarvm
10:27 japhb_ joined #moarvm
10:27 eternaleye joined #moarvm
10:28 japhb_ joined #moarvm
10:28 camelia joined #moarvm
10:28 woosley joined #moarvm
10:29 flussence joined #moarvm
10:30 brother joined #moarvm
10:34 JimmyZ joined #moarvm
10:39 masak_ joined #moarvm
10:39 cxreg joined #moarvm
10:40 daxim_ joined #moarvm
10:40 dalek joined #moarvm
10:45 dagurval joined #moarvm
12:20 tokuhirom joined #moarvm
12:21 zakharyas joined #moarvm
12:21 rurban_ joined #moarvm
12:21 flussence joined #moarvm
12:22 japhb_ joined #moarvm
13:15 raiph joined #moarvm
13:40 benabik joined #moarvm
13:54 btyler joined #moarvm
14:11 jnap joined #moarvm
14:32 jnap joined #moarvm
14:45 chipdude joined #moarvm
14:45 TimToady joined #moarvm
14:49 brrt joined #moarvm
14:50 nwc10 joined #moarvm
16:32 timotimo wval r2(3), liti16(1), liti16(8)
16:32 timotimo eqaddr r3(1), r1(3), r2(3)
16:32 timotimo this should work well, right?
16:33 jnthn yeah, should
16:33 timotimo wval r2(6), liti16(1), liti16(13)
16:33 timotimo getattr_o r5(1), r4(3), r2(6), <nyi(lit)>, liti16(3)
16:34 timotimo got a clue why this getattr doesn't get specialized?
16:34 timotimo oh, in the other case it does get specialized
16:35 timotimo not in the theoretically unreachable block, though
16:35 * timotimo hacks
16:35 jnthn We don't do getattr spesh yet
16:35 jnthn As in, p6opaque doesn't implement doing that yet
16:35 jnthn It's actually a bit tricky 'cus you have to cope wiht attr auto-viv
16:35 timotimo ah
16:36 timotimo eqaddr warrants its own optimize_ function, eh?
16:37 jnthn yeah
16:40 timotimo https://github.com/MoarVM/MoarVM/blob/spesh/src/spesh/optimize.c#L103 ← should this really be operands[1]? i think it should be operands[0] instead
16:41 jnthn ooh!
16:41 jnthn *that's* why it breaks if we uncomment it!
16:41 jnthn timotimo++
16:41 timotimo :D
16:41 * timotimo changes and commits
16:42 dalek MoarVM/spesh: 6b79a76 | (Timo Paulssen)++ | src/spesh/optimize.c:
16:42 dalek MoarVM/spesh: isconcrete spesh used to clobber object values. now it should work
16:42 dalek MoarVM/spesh: review: https://github.com/MoarVM/MoarVM/commit/6b79a76cfd
16:43 timotimo copy&paste programming saves the day %)
16:44 timotimo hmm. Cannot add a null method 'unshift' to class 'NQPArray'
16:46 timotimo apparently that fix was not enough
16:48 * timotimo doesn't see anything else that'd be wrong
16:51 timotimo i'm sad to say i'll still have to comment out isconcrete :\
16:52 dalek MoarVM/spesh: 57010dc | (Timo Paulssen)++ | src/spesh/optimize.c:
16:52 dalek MoarVM/spesh: isconcrete still causes breakage unfortunately.
16:52 dalek MoarVM/spesh: review: https://github.com/MoarVM/MoarVM/commit/57010dc39a
16:53 timotimo how do you feel about adding a "special character" to the spesh log env var to have the file be opened "wa" instead of "w"?
16:57 jnthn hmm
16:57 jnthn feels like a smelly way to do it...
16:58 timotimo i suppose on linux i could mkfifo and drain that into a file to get the same effect
17:07 timotimo aye, eqaddr did not do anything yet
17:17 cognominal joined #moarvm
17:17 timotimo jnthn: could the reason you identified before have to do with decont/cont status?
17:20 timotimo actually ... these are not containered it seems
17:20 timotimo https://gist.github.com/timo/e031ed9cc1ad94b2d092 - this is the before of "method returns" for example
17:20 timotimo you can see in lines 18f the value to compare against gets put into r1
17:21 timotimo then in 28 r2 is filled with the value to compare against (or the other way around?)
17:21 timotimo and they are immediately eqaddr'd
17:21 timotimo oh, oops
17:22 timotimo this is the version that gets an actual value passed %)
17:22 jnthn oh :)
17:22 jnthn no, I think it may have been a phi issue
17:22 timotimo f5 to see the after of a version where a value gets passed
17:23 timotimo do we forget to remove phis from blocks that have shriveled and died?
17:23 timotimo block removal is the last phase of the pipeline at the moment, so that'd be a little problem
17:28 jnthn Well, the thing about PHIs is that they make information propagatoin tricky
17:28 timotimo yeah :\
17:28 jnthn But in this case it is the degenerate case, iirc, where there are two paths and one of them dies.
17:29 timotimo thought so
17:39 timotimo IMO, these getters/setters are kind of juicy targets :)
17:39 timotimo am i wrong?
17:41 jnthn they are
17:57 timotimo jnthn: do you have a clue how to properly make the special string hashing functions (well, defines really) known to uthash?
17:57 timotimo it bothers me quite much that we have to blow up every string to 32bit integers
17:58 jnthn timotimo: I was pondering taking that on in the string re-work...
17:58 jnthn It's...not quite trivial.
17:59 timotimo the obvious way is to make a "key extractor" that does the expansion, but that would be almost as bad as what we have now
17:59 jnthn Well, the trick is not to expand it but pretend you read 3 0s and factor them in per byte
17:59 timotimo the other way would be to re-write the hash function dividing the indices by 4 and if they are not %% 4, they are 0 (to emulate the 32 bit long number)
17:59 timotimo yes
17:59 jnthn whihc means hacking the hash function
17:59 jnthn and WORSE, you gotta do it endian sensitive
17:59 timotimo i've looked at it. it was intimidating at first, but now it seems less threatening
18:00 timotimo that's the part that really gets me
18:00 timotimo the endian sensitiveness
18:00 timotimo i would think we can rely on the compiler to do a lot of work at compile time and only change very little of the actual code
18:02 jnthn oh, it's just if you do the zeros before of after the byte
18:03 timotimo OK, so in theory i could copypaste the hash function we're using
18:03 timotimo replace all key_access[index] with get_byte_at_small_key(index)
18:03 timotimo and depending on the endianness, implement get_byte_at_small_key as return 0 if index %% 4 else return key_access[index / 4]
18:03 timotimo or ... whatever the other thing would be ... i guess index % 4 == 3 or something?
18:05 jnthn guess something like it
18:05 timotimo time to find some documentation on endianness, i suppose?
18:05 timotimo well, actually it'd just be flipped
18:05 timotimo so i suppose that'd be easy to do
18:05 * timotimo goes to the whiteboard
18:07 timotimo since the uthash code is just plopped in in-line, i'm thinking the macros could get an extra parameter that you can set to a local variable (or constant value) to decide whether to use the expanded or the non-expanded hash
18:17 timotimo i'm glad i don't have to hack around with two's complement at all in this case
18:35 timotimo well, i've got *some* code now ...
18:36 dalek MoarVM/uthash_padding: 342ecc2 | (Timo Paulssen)++ | 3rdparty/uthash.h:
18:36 dalek MoarVM/uthash_padding: maybe we can hash uint8 strings with padding like this...
18:36 dalek MoarVM/uthash_padding: review: https://github.com/MoarVM/MoarVM/commit/342ecc2f28
18:43 dalek MoarVM/uthash_padding: 3f1ab87 | (Timo Paulssen)++ | 3rdparty/uthash.h:
18:43 dalek MoarVM/uthash_padding: this is how you C.
18:43 dalek MoarVM/uthash_padding: review: https://github.com/MoarVM/MoarVM/commit/3f1ab87fcc
18:46 cognominal joined #moarvm
19:00 japhb ♪♫ This is how we do it ♪♫
19:09 timotimo so many places to patch >_<
19:09 timotimo this should have suggested to me it's the wrong approach long ago, but whatevs ...
19:12 dalek MoarVM/uthash_padding: 846d59e | (Timo Paulssen)++ | src/ (13 files):
19:12 dalek MoarVM/uthash_padding: this is much work; may be a dead end even.
19:12 dalek MoarVM/uthash_padding: review: https://github.com/MoarVM/MoarVM/commit/846d59e8b2
19:12 brrt joined #moarvm
19:20 dalek MoarVM/uthash_padding: 58a2806 | (Timo Paulssen)++ | / (4 files):
19:20 dalek MoarVM/uthash_padding: the last HASH functions that are used are now guarded.
19:20 dalek MoarVM/uthash_padding: review: https://github.com/MoarVM/MoarVM/commit/58a280670a
19:20 timotimo and of course it immediately explodes :)
19:30 lizmat joined #moarvm
21:13 lizmat joined #moarvm
21:13 woolfy joined #moarvm
21:26 brrt left #moarvm
21:43 woolfy joined #moarvm
22:05 timotimo jnthn: ^ is this the absolute wrong approach?
22:14 odc joined #moarvm
22:15 woolfy joined #moarvm
22:19 lizmat_ joined #moarvm
22:25 lizmat joined #moarvm
22:25 woolfy joined #moarvm
22:26 woolfy left #moarvm
22:52 woolfy joined #moarvm
22:52 woolfy left #moarvm

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