Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2014-05-22

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

All times shown according to UTC.

Time Nick Message
01:50 FROGGS_ joined #moarvm
02:56 woolfy1 joined #moarvm
02:57 tadzik1 joined #moarvm
02:57 FROGGS__ joined #moarvm
03:57 colomon joined #moarvm
06:47 FROGGS joined #moarvm
07:21 zakharyas joined #moarvm
07:45 colomon joined #moarvm
07:47 donaldh_ joined #moarvm
08:00 woolfy1 left #moarvm
08:07 zakharyas joined #moarvm
10:28 donaldh_ joined #moarvm
11:47 vendethiel joined #moarvm
13:20 zakharyas joined #moarvm
13:26 FROGGS[mobile] joined #moarvm
13:46 btyler joined #moarvm
14:24 FROGGS joined #moarvm
14:32 zakharyas joined #moarvm
14:50 FROGGS[mobile] joined #moarvm
15:34 btyler joined #moarvm
16:25 btyler joined #moarvm
17:05 brrt joined #moarvm
18:35 zakharyas joined #moarvm
18:48 dalek MoarVM: 998e30e | jnthn++ | docs/ChangeLog:
18:48 dalek MoarVM: Mention loop labels in change log.
18:48 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/998e30e4d3
18:49 dalek MoarVM: c38c389 | jnthn++ | VERSION:
18:49 dalek MoarVM: Bump VERSION to 2014.05.
18:49 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/c38c3890b8
18:52 dalek MoarVM: 0f939db | jnthn++ | docs/release_guide.md:
18:52 dalek MoarVM: Correct release guide to mention tagging.
18:52 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/0f939db4aa
19:57 Vendethiel- joined #moarvm
20:22 btyler joined #moarvm
22:01 timotimo refresh my head again, how do i teach the gc about internal pointers again?
22:01 timotimo is adding to the worklist when i get mark'd enough?
22:02 jnthn See MVM_gc_root_add_tc_roots_to_worklist
22:02 jnthn Near the bottom
22:02 jnthn Currently it iterates the native_callback_cache entries
22:02 jnthn You'll just need to change it to walk the linked list hanging off each of them instead
22:02 jnthn That'll be enough.
22:03 timotimo ah, sounds easy enough
22:03 jnthn Yeah, I don't see any traps in this
22:03 timotimo the MVMNativeCallbackCacheHead doesn't actually need to store its cuid inside it, aye?
22:03 timotimo like, it'll really only need the ut_hash handle thing and the link to the MVMNativeCallback?
22:04 jnthn Correct.
22:04 jnthn MVMNativeCallback doesn't have a cuid slot
22:07 timotimo someone i know told me linked lists are never superior to dynamic arrays
22:08 timotimo what does our interpreter loop look like when we go back and forth between callbacks, btw?
22:09 jnthn I guess they didn't consider deletion-in-the-middle, let alone how the two compare if you're considering lock-free design...
22:09 timotimo do we build a "return to C" special frame into our VM stack and just drop back into the interpreter loop we've always been using?
22:09 jnthn Yeah, somethin glike
22:09 jnthn But it's not very robust yet
22:09 timotimo mhm
22:09 jnthn It gets very, very upset about exceptions
22:09 jnthn And don't even think about gather/take-ing over it.
22:09 timotimo it's to get away from the "inferior runloop" thing parrot got which was very unhappy, right?
22:09 jnthn Well, it is an inferior runloop
22:10 jnthn It's the *one* place MoarVM actually lets it happen.
22:10 jnthn Because we don't actually have a choice.
22:10 timotimo an "inferior runloop" is whenever you have an interp_run somewhere in the C stack that's below another interp_run belonging to the same TC?
22:10 jnthn Right.
22:11 jnthn If we've C code on the stack, though, it can't not be something like this.
22:11 jnthn And it has to be a continuation barrier anyway
22:11 jnthn 'cus we can't really co-opt arbitrary C code into that.
22:11 timotimo mhm
22:12 jnthn At least, not without unspeakable evil.
22:12 timotimo is there stuff that has to be done in order for the exceptions/gather-take across callbacks thing to be started working on?
22:13 jnthn You will never be able to gather/take across callback boundaries, I don't think. That's the consequence of it being a continuation barrier.
22:13 jnthn Exceptions we can do something about.
22:13 timotimo oh
22:13 timotimo continuation barrier means exactly that
22:13 jnthn Right.
22:13 jnthn Well, the issue is
22:13 timotimo well, fair enough. as long as we can get a better error than a kernel panic/BSOD out of it :)
22:14 jnthn <moar VM stack frames> <C stack frames unknown to us> <MoarVM stack frames>
22:14 jnthn The nature of the bit in the middle is the problem.
22:15 timotimo right; and we can't just go around inspecting x86, arm, mips, ppc machine code :)
22:16 jnthn right
22:16 FROGGS I could write a slang for it :o)
22:16 timotimo haha, ouch
22:16 jnthn Well, C lets code hold pointers into the stack, which is what makes it a lot more than "just know where the stack boundaries are and memcpy".
22:16 timotimo jnthn: given infinite person-hours we could do it :)
22:16 lizmat joined #moarvm
22:16 timotimo or is it halting-problem-hard?
22:17 jnthn The only way I think you can do it is actually allocate a blob of memory on the heap to serve as the stack
22:17 jnthn And then somehow re-instate it.
22:17 timotimo the pypy people actually have their frames on the heap nowadays
22:17 timotimo so their "continulet" stuff works out
22:17 jnthn You could longjmp out of there but...getting back in there is gonna be fun.
22:17 jnthn I'm not sure you can't do it without dropping to assembly
22:17 jnthn uh, can do it
22:18 jnthn Even if you do that lot, it's still questionable how robust it will be.
22:18 jnthn Wouldn't surprise me if somebody has tried this before.
22:19 timotimo mhm
22:23 timotimo MVMObject *target in MVMNativeCallback is the thing i'll be comparing addresses against, aye?
22:25 jnthn Yeah
22:26 timotimo not really sure if i want to patch the same thing on parrot, too :P
22:26 timotimo but we should probably have a ticket ready for this
22:27 FROGGS timotimo: when you are done, put the links tour commits into a ticket, so somebody who wants to tackle it does not need to do research
22:27 timotimo sounds good
22:28 donaldh_ joined #moarvm
22:34 timotimo jnthn: any hot fix we could add for the upsetness about exception in case callbacks are in play?
22:34 jnthn timotimo: No, it's just tricky. I'll try and get to it soonish
22:35 timotimo fair enough
22:35 timotimo i think i've done most of the linked-list-translation for creation and marking, now to add lookup for finding the right callback to dispatch to
22:35 jnthn OK :)
22:36 jnthn Got landed with some annoying early-morning phone meeting tomorrow. :/
22:37 timotimo oh, lookup and creation are in the same sub
22:37 timotimo so actually if it compiles now i should be done and could start testing
22:37 timotimo d'aaw
22:37 jnthn aye :)
22:37 jnthn OK, good luck...rest time...
22:38 timotimo good night!
22:38 woolfy joined #moarvm
22:38 timotimo thanks for the help
23:00 timotimo time for asan!
23:04 timotimo that stacktrace is useless :\
23:40 timotimo yippie
23:40 timotimo i has a positive result d)
23:40 timotimo :)
23:43 dalek MoarVM: c511cb7 | (Timo Paulssen)++ | src/ (5 files):
23:43 dalek MoarVM: NativeCallback hash is now a hash of lists.
23:43 dalek MoarVM:
23:43 dalek MoarVM: Generating multiple closures of the same code object
23:43 dalek MoarVM: would confuse NativeCall and only one of the callbacks
23:43 dalek MoarVM: would ever be reached. Now we compare addresses as well
23:43 dalek MoarVM: and store and mark all callbacks to all closure-cloned
23:43 dalek MoarVM: versions of the same MVMCode.
23:43 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/c511cb70ba

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