github.com/moarvm/moarvm | IRC logs at irclog.perlgeek.de/moarvm/today
Set by moderator on 1 September 2013.
diakopter erm. the value of this pointer is 0xbaadf00dbaadf00d 00:00
seems legit.
TimToady maybe that's what made you sick earlier 00:14
diakopter *groan* 00:16
TimToady: awesome. I fixed the gc/threads tests. :) 00:41
all's copacetic again.
well, in --no-optimize, anyway 00:42
trying optimize
00:48 FROGGS joined
dalek arVM: 6ea45bb | diakopter++ | / (2 files):
fix remaining two tests in threads.t (in --no-optimize at least), and re-enable tests.
00:50
arVM: d6c977b | diakopter++ | src/io/procops.c:
don't return a value from a void function
00:52
diakopter argh. doesn't fix the hang when --optimize 00:53
and can't meaningfully use the msvc de ugger when optimizer 00:55
optimized
oh wait, maybe we do have --optimize --debug 00:57
not_gerd++ 01:01
01:04 FROGGS joined
JimmyZ diakopter: ping 01:04
diakopter JimmyZ: pong 01:06
JimmyZ diakopter: nm 01:08
diakopter JimmyZ: what? :) 01:11
dalek arVM: 7617c5d | jimmy++ | src/io/fileops.c:
avoids a MVMROOT
01:13
diakopter oic 01:15
ohhhhhhhhhhhhhhhhhhhhhhhhhh 01:30
oh yeah.
forgot that all assignments to libatomic_ops controlled variables should use the libatomic_ops assignment macros
... in the debugger it's showing me a different value for the same memory location in different threads! 01:31
JimmyZ :P 01:34
so... make selftest only fails on x86, at least on windows, with mingw32 or msvc 01:35
works well on x64 01:36
01:38 FROGGS_ joined 02:47 FROGGS joined
dalek arVM: 5dc8527 | diakopter++ | src/ (13 files):
full code audit of all atomics usage

every load/store of every memory location accessed by libatomic_ops needs read/written using its macros...
fixes --optimized threads.t on msvc64
03:21
diakopter JimmyZ: ^^
JimmyZ: test on 32-bit? optimized and not?
..and .... segfault on linux 03:31
that's ok, I like segfaults.
JimmyZ I can test on 32-bit tonight 03:33
diakopter t/nqp/78-shell.t ...................... moarvm(73248) malloc: *** mmap(size=45035996273709056) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
(mac64 clang, optimized) 03:34
JimmyZ diakopter: how about assign it to you? github.com/MoarVM/MoarVM/issues/55 :P
diakopter but I'll close it.. 03:35
it really needs to stay 8bit
JimmyZ :(
diakopter there's no reason to make it 16bit
JimmyZ diakopter: #define NEXT_OP (cur_op += 2, *(MVMuint16 *)(cur_op - 2))
diakopter the compiler wouldn't compile it any differently
it would result in the exact same machine code 03:36
but make it a lot harder and more verbose casts elsewhere in the code
see, that pointer value is updated non-locally by other C routines 03:38
when they swap out which frame is running in the interpreter loop
03:38 ggoebel joined
diakopter they're just raw memory addresses, not indexes into an array 03:39
JimmyZ diakopter: yes, I know
so I'd like to redefine NEXT_OP part code 03:40
diakopter of course, that segfault happened with gcc, but not with clang on linux 03:44
so I can't use address sanitizer to debug.. 03:45
bah.
er, there it went.
04:05 FROGGS joined
JimmyZ diakopter++, threads.t passed with gcc --optimize 04:12
diakopter well.. 04:13
seems to fail rarely now fo rme
for me
04:18 rblackwe joined 04:34 foo_bar_baz joined 04:43 FROGGS joined
diakopter JimmyZ: gist.github.com/diakopter/6459725 04:58
JimmyZ clang? 04:59
diakopter yup, clang-3.4
MVM_gc_gen2_transfer is entirely my creation :) 05:00
so definitely something I need to fix
05:04 FROGGS joined
JimmyZ :) 05:04
I never used clang 05:05
diakopter FROGGS: ping 05:06
05:24 FROGGS joined
dalek arVM: d7c705b | jimmy++ | src/core/interp.c:
Move MVM_panic to 'default:' to help debug when op is not existed.
05:42
jnthn I see GC fixes! :) 06:00
yoleaux 5 Sep 2013 23:34Z <diakopter> jnthn: adding global destruction didn't measurably change the duration of selftest
jnthn diakopter++
diakopter yes, and more coming 06:02
jnthn < diakopter> there's no reason to make it 16bit
JimmyZ diakopter:
not ok 6 - Multiple allocating threads work (large heap usage)
ok 6 - Multiple allocating threads work (large heap usage)
diakopter JimmyZ: yes........ as I said I'm fixing that 06:03
JimmyZ diakopter: not stable :P
diakopter as I said..
JimmyZ oh
jnthn Agree with diakopter on that one.
JimmyZ which one?
uint8?
jnthn The thing i just pasted :)
Yes. There's no benefit to change it that I can see. 06:04
It'd involve changes in a bunch of other places to.
*too
JimmyZ yes, I see problems with string heaps when change to uint16
jnthn And the cur_op++ would compile into += 2 anyways... :)
diakopter as I said :P
jnthn Right :)
JimmyZ so I just pushed a beter cur_op +=2 06:05
diakopter better how :P
faster man_or_boy? :)
JimmyZ not much, only reduced an instruction from op dispatch 06:06
dalek arVM: 9d05749 | jimmy++ | src/gc/orchestrate.c:
reduced a MVM_load
06:08
diakopter JimmyZ: oops, missed one.. line 350 06:09
can you fix?
whew, missed only that one 06:10
JimmyZ diakopter: how? changed to MVM_load(xxxx) or threads var?
diakopter MVM_load(& because it has to re-grab it to CAS it 06:11
also you could change the trycas to a cas, and store the result from that 06:12
JimmyZ diakopter: 06:14
gist.github.com/zhuomingliang/6460150
diakopter watching this now.. www.youtube.com/watch?v=oK-TjPScIEw
JimmyZ diakopter: Does this miss too? 06:15
diakopter all those are fine
06:15 FROGGS joined
diakopter well except line 8 06:15
jnthn diakopter: oh phew, not the Jii advert :P 06:19
commute &
diakopter this is TimToady's band-mate
JimmyZ diakopter: I think I don't know how to fix it :( 06:20
diakopter ok I'll do it :)
06:40 FROGGS[mobile] joined 06:48 FROGGS joined 07:42 jlaire left 08:22 FROGGS joined
dalek arVM: 21032d7 | diakopter++ | src/gc/orchestrate.c:
save another load..
08:27
08:33 lizmat_ joined 08:55 donaldh joined 09:51 cognominal joined 10:07 jnap joined 11:21 benabik joined 12:25 FROGGS joined 12:30 benabik joined 12:35 hoelzro left 12:53 jnap joined
ggoebel how goes the roadmap to self-hosting? what milestones are left? 13:54
jnthn Fix the handful of tests make selftest fails 13:57
:)
odc is there a formal roadmap or todo file somewhere? 13:59
diakopter says 'hi' to odc 14:00
no..
there are a few todos listed on github
a bunch more todos in the sourc marked TODO
github issues
odc hmm right
diakopter but those aren't necessarily on the critical path
14:01 cognominal__ joined
diakopter to self-hosting 14:01
odc oh well, i still need to understand how this thing works first ;) 14:02
diakopter jnthn: seen this? www.jooq.org/
masak: u2
odc: are you interested in contributing? 14:03
diakopter whois's you 14:04
odc diakopter, well, i'm very impatient about this project, but i don't have much time to help. I could send a few patches though, when there is an easy task. 14:05
diakopter odc: there's still a lot of stuff that doesn't seem to do anything; it'll make a lot more sense once nqp is bootstrapped
*smile* impatient? excited I guess you mean :P
odc yeah, it would help to have a document explaining how it works globally 14:06
diakopter I'm curious what interests you about it? just potential to run perl6?
odc yeah. and not having to run a huge vm like parrot
timotimo or the jvm :) 14:07
jnthn diakopter: You gotta be jooqing...
odc heh
diakopter lolz 14:08
jnthn decom &
odc by the way, how come you guys can work on this full time? 14:09
timotimo they are?
diakopter I think all of us have full-time employment elsewhere
so, to answer your question, "we can't" :D 14:10
odc hm, i see, you're just full time on irc
timotimo irc doesn't take any production away. in between lines, there's always a tiny shred of time to go onto irc :P 14:11
diakopter jnthn somehow has the ability to output 80-100 extremely productive hours/week of design/coding/consulting/analysis/planning/community/travel/engagements/teaching
well personally I've been active on irc a lot lately b/c I've been home sick from work 14:12
odc timotimo, well said :D
diakopter timotimo: "lines"?
of... coke??!
oh, code. 14:13
well I don't even code for a living, really
odc: what interests you about perl6? have you been involved in the community the last 13 years? (for all I know you contributed heavily for many years; my memory is terrible) 14:14
what do you want to use perl6 for
odc just for my daily job 14:15
which is mostly mojolicious coding
these days
one thing i'd like to try in perl6 : serving one request per thread, like in Go 14:16
it could make things easier for me
timotimo i'll be interested to know how long it'll take after rakudo gets compiled on moarvm until threading is as ossum as on jvm right now 14:18
odc i though moarvm was supposed to be good at threading from the start?! 14:19
JimmyZ depends on how much money
diakopter heh.
odc -_-
tadzik :D
diakopter odc: well there's "good at threading" meaning actually has shared-memory threads (unlike parrot, perl5, python, javascript) 14:20
JimmyZ money saves time
diakopter and then there's "awesome" at threading meaning supporting all the fancy stuff like threadpools and event queues like jvm 14:21
14:21 FROGGS joined
diakopter timotimo: to be fair, rakudo's collection objects aren't actually threadsafe on jvm yet 14:22
JimmyZ we have event queues, in the libuv , just didn't call it, want contribute ? 14:23
diakopter (nor are NQP's)
JimmyZ: -_-
JimmyZ :P
diakopter yes, I plan on porting Java's Disruptor pattern/library to C/libuv/moarvm for inter-thread messaging and events 14:24
JimmyZ how about actor?
diakopter that's a simple matter of programming
actors can be abstracted at several different layers once you have shared memory threads 14:25
it just depends on what kind of language support you want
JimmyZ e
diakopter (do you want actors to support coroutines like Perl6's gather/take)
JimmyZ oh, libuv has a threadpools too
JimmyZ is not sure
diakopter yes, but there are many millions of lines of java code that make java threadpools incredibly flexible 14:26
JimmyZ I'd like to see compile core.setting in 1s firstly
diakopter ha.
JimmyZ ;)
diakopter that'll be at least a year before we have a jit with a decent optimizer 14:27
JimmyZ e
still not sure , consider rakudo on jvm
diakopter I have grand designs for how to optimize the optimizer 14:28
bouncing around
caching at *many* more layers than you might have expected 14:29
JimmyZ: I'll fix that gc gen2_transfer bug in 10 hours... gotta full day of work today; commute/bbl& 14:30
FROGGS timotimo: the sql-code-alignment is interesting here: www.jooq.org/ 14:31
not sure if it is actually more readable but it is somehow nie
nice
diakopter FROGGS: heh, I linked that above 14:32
really afk&
FROGGS ahh, okay :o)
timotimo: scratch that :o)
JimmyZ diakopter: greate 14:34
14:35 odc left, odc joined 14:36 jnap1 joined
jnthn back 15:00
dalek arVM/validation: 933b810 | (Gerhard R)++ | / (8 files):
Reimplement bytecode validation
16:05
diakopter o_O
jnthn O_o :) 16:06
diakopter what, you didn't likek one big function with lots of variables? ;) 16:07
dalek arVM/validation: d79593b | (Gerhard R)++ | tools/update_ops.p6:
Fix comment fail
16:08
16:09 not_gerd joined
not_gerd o/ 16:09
yoleaux 5 Sep 2013 23:34Z <diakopter> not_gerd: --optimize doesn't recompile the 3rdparty stuf... should it?
not_gerd reconfiguring only leads to a recompile because it touches the config.h 16:12
3rdparty libs don't depend on that
we could just make everything depend on the Makefile if so desired
alternatively, make 'realclean' before building
TimToady imagines a big red button in the Whitehouse with the label: Push This to Rebuild the World...(eventually)... 16:18
diakopter FROGGS: I saw that link in my CodeProject newletter; where'd you see it? 16:34
FROGGS diakopter: in the clogs :o) 16:38
diakopter which clogs 16:39
FROGGS this clogs
you posted that link, remember? 16:40
diakopter ohh 16:41
from me.
not_gerd: I like your validation branch, and I havent even finished reading the diff :)
it's, like, factored like real software and sturff 16:42
not_gerd ;)
I'm not quite sure if we need the complexity
validate_block/sequence might be better hardcoded 16:43
depends on what other interesting op sequences there are
diakopter it feels good to be working inmaster branch again 16:47
not_gerd diakopter: I can probably add something like `make reconfig ADDCONFIG="--optimize"` 16:48
16:51 benabik joined
not_gerd \\o/ 59-nqpop.t fails not only in validation, but also in master 16:52
so there don't seem to be any regressions
diakopter not_gerd: well.. it did start failing with one of your commits the other day.. 16:53
not_gerd diakopter: could also be the merge of serialize, imo 16:55
or did someone already bisect?
diakopter seems unlikely it was serialize; I don't think I touched any in-use codepaths
jnthn not_gerd: I suspect it's a GC-related bug that isn't anything's fault, just memory layout changed.
not_gerd well, I did make thread-contexts 16 byte larger 16:57
I don't remember touching any other structures
(which doesn't necessarily mean anything ;))
diakopter hunh, my user thread destruction isn't always running 17:27
diakopter reluctantly adds debug category flags to the debug logging 17:29
nwc10 has tried to bisect that 59-nqpop.t failure 17:31
fails with about 12 skip revisions
diakopter what's a skip revision 17:33
nwc10 git bisect can treat revisions as "skip", ie neither good nor bad
the script I had written for git bisect run would return "skip" if it couldn't get the build to a point where it could run that test
diakopter ah.
dalek arVM: 467a0c6 | (Gerhard R)++ | / (2 files):
Add reconfig make target
17:34
nwc10 I am a bit surprised that it fell into tarpit of skips
so I am building one manually now
diakopter I'm not... I frequently commit non-building stuff
FROGGS ... which is bad
diakopter well I was yelled at here for not committing more often
which do you want, more often commits or giant commits that build 17:35
not_gerd we want our cake and eat it!
commit often in branches and merge --squash or reset and add -p 17:36
FROGGS diakopter: I WANT BOTH :P
diakopter not_gerd: okay, but for that purpose, git bisect gets more useless 17:38
"it's in this 300,000 line commit"
"thanks biset"
"thanks bisect" 17:39
not_gerd the point is that git allows you to refactor your history to your liking 17:43
merge --squash, reset/add -p, rebase -i, ... 17:44
pusblished history need not reproduce development history
of course it takes additional work
so I don't always bother myself 17:45
the validation branch originally came with commits with the original messages 'XXX', 'YYY', 'ZZZ' ;) 17:46
diakopter interesting; I hadn't considered that possbility 17:47
benabik uses rebase-i constantly. 17:49
diakopter only uses git (well, only uses source control) as much as is evidenced on github 17:50
diakopter feels like an outsider/n00b, and probably will forever 17:51
ingy gist.github.com/ingydotnet/6467346 ;) 17:53
benabik If you never feel out of your depth, you're never learning anything new.
diakopter
.oO( I have followers...? I guess our little cult needs a name.. )
17:55
ingy has had a debilitating headache all week. :( 17:56
heya benabik
benabik o/ ingy 17:57
dalek arVM: cd43ee5 | (Gerhard R)++ | build/ (2 files):
Add switch make target and update help
18:15
diakopter bah 18:19
dalek arVM: 0b053da | diakopter++ | src/gc/ (3 files):
refactor gc debug logging.... "whee..."
18:20
ingy git hub follow diakopter # (cult of 12 disciples ;) 18:22
diakopter eh.
heh.
18:22 jnap joined
diakopter opens threads.c with trepidation 18:55
FROGGS nwc10: any conclusions yet? 18:56
nwc10 No. There is something strange with my bisect script 19:01
FROGGS ../moarvm nqp.moarvm -e 'role r1 { }; class c1 does r1 { }' 19:15
Invalid string index: max 32, got 33
at <unknown>:1 (nqp.moarvm:ENDSTMT:0)
that might be one problem of 56-role.t
../moarvm nqp.moarvm -e 'role r1 { }; class c1 does r1 { };'
Cannot locate an outer frame for the call
at nqp-src/NQP.nqp:251 (nqp.moarvm:ļæ½gLG:137)
there we go
jnthn Ah, I was gonna look into that one... 19:17
jnthn grabs the latest stuff
FROGGS yeah, nobody else seems to be able to hunt that one down :o)
diakopter I'll do it; just haven't gotten there yet 19:18
would get to it today
not_gerd oO 19:22
FROGGS Oo
not_gerd clang now provides windows builds
FROGGS cool
not_gerd and VS integration
dalek arVM: d0b9d61 | (Tobias Leich)++ | nqp-cc/nqp-src/NQP.nqp:
document end is like ENDSTMT
19:24
diakopter jnthn: I hope I didn't break anything in master :) 19:30
..... what in the world was I thinking............... !??! 19:38
this is so janky
jnthn Argh, I go call family and now there's more commits :P 19:55
FROGGS: is d0b9d61 nabbed from the NQP repo?
TimToady keeps hoping one of them will fix one of the Big Five 19:57
jnthn TimToady: You only have 5 tests with failures? 19:58
TimToady 5 test files
been that way for a while now 19:59
jnthn hmm, I got 6
Is 19-file-ops.t one of your failers?
TimToady no
linux vs windows I suppose 20:00
diakopter jnthn: that one hasn't been failing for me
jnthn ok, yeah, it's probably Windows specific then.
diakopter: oh.
t\\nqp\\19-file-ops.t (Wstat: 0 Tests: 40 Failed: 2) Failed tests: 9-10
Not epic failure, just 2 tests.
diakopter all 40 ok here 20:01
TimToady the Big Five all appear to be epic
the other day the JVM actually wedged my machine, which is getting close to apocalyptic, but I couldn't reproduce it 20:03
diakopter heh apopleptic 20:12
20:13 foo_bar_baz joined
dalek arVM: 2c79f1c | jnthn++ | src/6model/reprs/MVMStaticFrame.c:
Some MVMStaticFrame.copy_to fixes.
20:17
jnthn Doesn't fix anything, but less wrong...
diakopter jnthn: dest_body->static_code = NULL; /* XXX ? */ 20:20
seems that should be copied..
(MVM_ASSIGN_REF)
dalek arVM: 56c74ad | jnthn++ | src/ (2 files):
Fix static_code handling in freshcoderef op.
jnthn diakopter: Well, was a bit more than that, which is why I left it until the next patch :) 20:21
Now, lexical_names_list and instr_offsets are all we don't copy
I figure at least the latter one is handled because invoked is 0 and so we re-validate...which is probably wasteful... 20:22
diakopter I don't understand why these things need cloned 20:24
jnthn It relates to dynamic compilation and closures. 20:26
(where dyn comp is about handling BEGIN time stuff)
diakopter bleh
jnthn :) 20:28
(nqp.moarvm:1♄:137)
Where does the love come from...
ingy sendz moar ♄ 20:29
jnthn I think 56-role might just be 'cus compunitmainline returns a frame other than the mainline one... 20:30
hm, but we should see more stuff busted than that... 20:32
FROGGS jnthn: no 20:34
jnthn: I am thinking about committing it to nqp too because a) it can't hurt and b) it works on parrot because its substr is a bit lax opposed to mvm's 20:35
jnthn FROGGS: ok
FROGGS jnthn: what lineendings does t/nqp/CREDITS have? does your git a LF -> CRLF conversion? 20:39
jnthn FROGGS: yes to the latter
FROGGS that explains the t/nqp/19 fails
jnthn FROGGS: and yes, it's in Windows format.
ah, ok
diakopter haha :) 20:40
jnthn I guess I can make the test look for 5 or 6 chars? 20:41
FROGGS jnthn: already hanging
20:41 not_gerd joined
dalek arVM: 7a1daae | (Tobias Leich)++ | nqp-cc/t/nqp/19-file-ops.t:
test file can have LF or CRLF line endings
20:42
FROGGS changing*
not_gerd if we're talking about failing tests: nqpop.t fails for me at the allocation strings/ops.c:381 20:44
it points to a bogus REPR
FROGGS yeah, I tried to debug it but failed 20:45
what the... test 19 passes when running directly, but `no subtests run` when running via make selftest 20:46
diakopter I've seen that
FROGGS if I revert my patch it passes... 20:49
what the heck? how can I have messed it up?
and it passes when I run it via: prove -vv -e "../moarvm nqp.moarvm" t/nqp/19-file-ops.t 20:50
dalek arVM: c0144d7 | jnthn++ | src/6model/reprs/MVMCode.c:
Static frames are GCable now; use MVM_ASSIGN_REF.
20:55
arVM: b9dc298 | jnthn++ | src/mast/driver.c:
One more place to force gen2 allocation.

Avoids risk of things moving under us.
diakopter jnthn: that commit is wrong 20:56
MVM_ASSIGN_REF(tc, dest_body, dest_body->sf, src_body->sf)
MVM_ASSIGN_REF(tc, dest_root, dest_body->sf, src_body->sf)
jnthn How so? 20:57
diakopter ^^ 20:58
jnthn oh...yeah
dalek arVM: e2ac32c | jnthn++ | src/6model/reprs/MVMCode.c:
Correct body/root confusion; diakopter++.
20:59
diakopter jnthn: I'm re-working how the gc orchestration interacts with thread death... it's ... even more complex than I feared last time I muddled through it 21:01
also, the global destruction phase makes it more complex in a sense, but easier in another 21:02
anyway, I'm on the right track. 21:03
probably won't get it before you sleep though
FROGGS huh, the last commits fixed my t/nqp/19 weirdness 21:05
jnthn nice 21:07
b9dc298 could be to thank
21:08 donaldh joined
dalek arVM: 3a9b957 | jnthn++ | src/core/interp.c:
Remove bogus is_static checks.
21:14
arVM: 5241f11 | jnthn++ | src/core/frame.c:
Fix outer location for the freshcoderef case.

Gets 56-role.t through the compile; now fails after a couple of tests.
FROGGS ahh, 5241f112c8 fixes the frame name problem, jnthn++ 21:20
nwc10 ok, something strange here. I can do the bisect manually.
It says that this is the first bad commit
cfdddb378c46a97a8bf9018ea9267718801698dd
Wire up random number generator
from that commit on, ../moarvm nqp.moarvm t/nqp/59-nqpop.t will SEGV
if I have done it correctly 21:21
but I need to go to bed
FROGGS a heisenbug probably... sleep well
jnthn 'night, nwc10 21:22
diakopter nwc10: thanks :) 21:23
21:25 donaldh joined
diakopter not_gerd: can you look into a mostly-portable way to determine the number of cores in C 21:28
jnthn (does libuv know?)
diakopter dunno
(for all I know, there's a perfectly portable way) 21:29
not_gerd diakopter: can do
would have to use the Google oracle, though
FROGGS maybe steal fro parrot 21:30
jnthn
.oO( I thought it was the JVM that was oracle? )
FROGGS from*
not_gerd
.oO( only since the sun has set )
FROGGS it is all procter&gamble, really
not_gerd stackoverflow.com/questions/150355/...-a-machine 21:31
assuming we want a runtime instead of a configure-time 21:33
diakopter yeah runtime I'm sure
not_gerd ...solution
should I add some MVM_platform function for that? 21:34
diakopter please :) 21:35
"(Almost) Platform Independent function in c-code"
looks good
exept for the macosx caveat comment
actually use the windows version from that answer and the rest from the top answer 21:36
oh wait, it's the same windows version. 21:37
just mentions the headers.
not_gerd there's a comment about GetLogicalProcessorInformation() instead if you have >32 cores
diakopter anyway the gc orchestration wants it because we ideally want to run no more gc threads than cores 21:39
not_gerd good night o/ 22:40
22:40 not_gerd left
jnthn diakopter: aye, that makes sense. 22:53
jnthn needs rest
'night
diakopter o/ 22:54
sleep weel
22:56 foo_bar_baz joined 23:49 jnap joined