Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2014-08-27

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

All times shown according to UTC.

Time Nick Message
00:39 reactive-nick joined #moarvm
00:40 itz_ joined #moarvm
01:16 FROGGS_ joined #moarvm
01:48 itz joined #moarvm
01:50 dalek MoarVM: dca7f4c | (Timo Paulssen)++ | src/jit/graph.c:
01:50 dalek MoarVM: clearer error message for op_to_func's default case
01:50 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/dca7f4cde3
01:50 dalek MoarVM: 5c3d596 | (Timo Paulssen)++ | src/ (3 files):
01:50 dalek MoarVM: make bigint_div and bigint_mod responsible for allocating
01:50 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/5c3d59689f
01:50 dalek MoarVM: a10dc26 | (Timo Paulssen)++ | src/jit/graph.c:
01:50 dalek MoarVM: jit div_I and mod_I.
01:50 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/a10dc260c9
01:50 timotimo can't sleep? why not code.
01:50 * timotimo disappears into bed ...
01:53 itz joined #moarvm
03:48 cognome joined #moarvm
05:22 sergot hi o/
06:08 brrt joined #moarvm
06:30 brrt \o
06:42 danaj joined #moarvm
06:43 lizmat joined #moarvm
07:15 brrt joined #moarvm
07:30 zakharyas joined #moarvm
08:00 lizmat_ joined #moarvm
08:01 cognome_ joined #moarvm
08:01 nebuchad` joined #moarvm
08:01 ggoebel111111110 joined #moarvm
08:02 pmichaud joined #moarvm
08:03 lee joined #moarvm
08:05 diakopte1 joined #moarvm
08:08 betterwo1ld joined #moarvm
08:11 synopsebot joined #moarvm
08:39 kjs_ joined #moarvm
08:44 Ven joined #moarvm
09:10 itz_ joined #moarvm
09:17 itz joined #moarvm
10:02 ggoebel111111111 joined #moarvm
10:24 Util joined #moarvm
10:33 jnthn evening, #moarvm o/
10:41 mj41 joined #moarvm
10:42 nwc10 good *, jnthn
10:44 nwc10 or altnernatively
10:44 nwc10 good GMT +08:00, jnthn
10:44 nwc10 which really doesn't tell anyone anything useful
10:46 nwc10 jnthn: in the profiler, I can't figure out how to get the call trace for rel2abs
10:48 carlin what should moar do if a {m,c,re}alloc fails? currently it just eventually segfaults/explodes
10:50 rurban it should GC imho
11:03 carlin so do a GC, retry the alloc, and then abort if it still fails?
11:12 jnthn "I should GC" => uh, no, you've absolutely no way of knowing you're at a safepoint.
11:12 jnthn *It
11:12 jnthn So that's infeasible.
11:12 jnthn Except in very specific situations.
11:13 nwc10 I was fearing this
11:13 jnthn Most certainly it doesn't make sense as a general rule.
11:18 jnthn The best general answer is to panic. We can look at specific situations where GC may help later.
11:18 nwc10 it's probably possible to panic to fd 2 including the size requested.
11:19 jnthn Yeah. Just don't try to allocate while doing so :)
11:20 nwc10 what could possibly go wrong?
11:24 Ven joined #moarvm
12:03 jnthn dinner &
12:12 rurban All LISPs do a GC when the internal alloc fails. Usually trapped by libsigsegv, but this might be too difficult. A system malloc fail must panic though.
14:19 ggoebel111116 joined #moarvm
14:25 carlin I did this: https://gist.github.com/carbin/a2662ecad144ac930b76
14:34 jnthn carlin: Why xmalloc?
14:40 carlin xmalloc is usually used for a malloc that aborts on failure
14:40 FROGGS_ because of the exception? :D
14:40 carlin easy enough to make it just malloc though
14:41 FROGGS_ I guess the name MVM_malloc would already imply some sort of extra work/check
14:43 carlin fair enough
14:43 carlin if the patch is good otherwise I can change that
14:43 jnthn Yeah, I think I'd prefer juts MVM_malloc
14:43 jnthn *just
14:44 jnthn Should probably do MVM_realloc and MVM_free while at it.
14:45 ggoebel111116 joined #moarvm
14:50 carlin yip, my plan was to do realloc next if the malloc patch was okay
14:50 jnthn OK :)
14:50 jnthn carlin+
14:50 jnthn uh, carlin++
14:53 ggoebel111116 joined #moarvm
14:54 carlin also I have a few pull requests open that I was hoping someone could look at
15:03 brrt hmm yeah post 'm i'd say
15:03 brrt :-)
15:20 ilbot3 joined #moarvm
15:20 Topic for #moarvm is now https://github.com/moarvm/moarvm | IRC logs at  http://irclog.perlgeek.de/moarvm/today
15:20 ashleydev joined #moarvm
15:22 synopsebot joined #moarvm
15:22 diakopter joined #moarvm
15:22 carlin joined #moarvm
15:22 [Coke] joined #moarvm
15:27 donaldh joined #moarvm
15:29 carlin https://github.com/MoarVM/MoarVM/pull/119 and https://github.com/MoarVM/MoarVM/pull/126
15:29 carlin I also have 2 others where I fixed some warnings but those are the two I care most about
15:29 jnthn OK. I really need to sleep now...so jetlag. :) I'll look at them tomorrow.
15:30 carlin sure, g'night :)
15:30 jnthn 'night o/
15:31 brrt 'night
15:31 brrt left #moarvm
15:40 ggoebel111117 joined #moarvm
15:40 hatseflats joined #moarvm
15:50 woosley joined #moarvm
15:50 moritz joined #moarvm
16:53 colomon joined #moarvm
17:01 kjs_ joined #moarvm
17:11 tgt joined #moarvm
17:13 zakharyas joined #moarvm
17:35 Ven joined #moarvm
17:54 carlin https://github.com/MoarVM/MoarVM/pull/131
17:59 kjs_ joined #moarvm
18:12 FROGGS carlin++
18:31 Ven joined #moarvm
18:53 ggoebel111116 joined #moarvm
18:58 brrt joined #moarvm
18:59 Ven joined #moarvm
19:10 * brrt finally sees that his implementation of div_i is basically wrong
19:12 brrt and ehm
19:12 brrt the same is kind of true about mod_i
19:12 brrt since mod_i with a zero divisor causes SIGFPE just as div_i
19:13 brrt m: nqp::mod_i(4, 0);
19:13 camelia rakudo-moar cb1d0e: OUTPUT«(signal )»
19:26 brrt uhm, is this implementation of div_i for real
19:31 timotimo :S
19:42 brrt seriously.. is there even a quick way to implement that branch
19:42 brrt (i suppose there is, but still)
19:42 timotimo no clue :(
19:43 timotimo jnthn is very busy with daywork things?
19:44 brrt jnthn is in china and understandably has jetlag :-)
19:45 timotimo ah, of coruse
19:49 ggoebel111116 joined #moarvm
19:50 brrt basically
19:50 brrt we decrement the quotient if these conditions are met
19:51 brrt either the denominator or the numerator is negative
19:51 brrt and the remainder is zero
19:51 brrt ok, i can manage that
19:51 brrt it will take all registers i've got, but still
19:57 brrt 't can be done
20:00 ggoebel111117 joined #moarvm
20:04 kjs_ joined #moarvm
20:07 brrt argh much difficult
20:08 timotimo :(
20:08 brrt it is my own fault, of course
20:08 brrt trying to be 'efficient'
20:08 timotimo :)
20:08 timotimo branchless
20:08 timotimo etc
20:09 brrt tsja
20:09 brrt i mean
20:09 brrt yes
20:15 brrt oh, darn, i see what's going wrong
20:19 brrt pls hlp me out
20:20 brrt basically, i'd really need to check if the original numerator was lower than zero, but by the time i've done the division, it is replaced by the quotient because that's just the limitations x86 puts on divison
20:20 brrt however, the rule is: (num < 0) ^ (denom < 0) & (remainder != 0)
20:20 timotimo so branch on the divisor first? :P
20:20 brrt NO BRANCHES FUUU
20:20 brrt :-p
20:21 brrt i'm pretty sure we can replace this with correct branchless code
20:21 brrt i /do/ still have the denominator, since it must be in another register (rcx, that is)
20:22 brrt so.... if the denominator is lower than zero, and the quotient is lower than zero, then the numerator must have been greater than zero
20:22 brrt in which case our thingy holds
20:22 brrt our rule
20:24 brrt in fact....
20:28 brrt if the quotient is negative, then either the denominator or the numerator must've been negative,so the condition holds
20:28 brrt so it is better phrased as: (quotient < 0) & (remainder != 0)
20:30 brrt and... this is correct, it seems
20:30 brrt so yay
20:31 FROGGS much yay? :D
20:32 brrt very
20:35 dalek MoarVM: 5b574f8 | (Bart Wiegmans)++ | src/ (2 files):
20:35 dalek MoarVM: Fix negative division in JIT
20:35 dalek MoarVM:
20:35 dalek MoarVM: Also fix divide-by-zero in mod_i, since mod_i
20:35 dalek MoarVM: is implemented by signed division anyway (and
20:35 dalek MoarVM: n % 0 has no mathematical sense).
20:35 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/5b574f8855
20:35 * brrt afk
20:35 brrt left #moarvm
20:41 colomon joined #moarvm
20:45 rurban joined #moarvm
21:07 Ven joined #moarvm
21:09 kjs_ joined #moarvm
21:44 ggoebel111117 joined #moarvm
21:46 carlin https://github.com/MoarVM/MoarVM/blob/master/src/core/frame.c#L961
21:46 carlin flag is unsigned, so so it can't be -1 and that if will always be true?
22:12 kjs_ joined #moarvm
22:19 FROGGS joined #moarvm
22:25 Ven joined #moarvm
22:41 timotimo hm, i wonder if C will consider -1 to be == to what flag ends up being when you assign -1 to it
22:43 hoelzro doesn't == cast to signed if one of the sides is, or something?
22:44 timotimo good question
22:44 timotimo we could just turn flag into a MVMint16 instead of guessing
22:45 timotimo worst case it's undefined behavior we're relying on ... but probably not
22:58 colomon joined #moarvm
23:23 carlin uint8_t flag = -1 makes flag = 255. and flag == -1 isn't true, flag == 255 is.
23:27 cognome joined #moarvm
23:31 timotimo that's a bug, then
23:31 timotimo would you like to commit it or shall i do it for you?
23:34 cognome joined #moarvm
23:37 Ven joined #moarvm

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