Camelia, the Perl 6 bug

IRC log for #moarvm, 2013-09-03

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

All times shown according to UTC.

Time Nick Message
00:01 colomon joined #moarvm
00:50 diakopter colomon: ping
00:50 colomon pong
00:50 diakopter would you like a (very small) todo in moarvm? it's a math function thing I don't know how to solve..
00:51 colomon sure, I'd be happy to take a look
00:51 colomon though right now I don't have anything like a recent build on my machine.  I've focused on JVM.
00:52 diakopter recent builds are quite different :D
00:52 diakopter but this particular code hasn't changed in more than a year
00:52 * colomon does a git pull that has to grab everything since June.
00:52 diakopter need to git clean dxf reset hard and stuff
00:53 colomon …. I'll just start it over.
00:53 diakopter yeah :)
00:53 diakopter in master branch, src/core/interp.c
00:54 benabik git clone --recursive
00:54 colomon --recursive?
00:54 diakopter there are three todos marked handle  edge cases
00:54 diakopter there are three todos marked  handle edge cases
00:55 diakopter math functions that I *completely* guessed on without doing hardly any research or due diligence
00:55 diakopter (I'm not even sure the main cases are correct)
00:56 colomon you'll have to give me a minute, I just slaughtered my editor by opening too large a directory
00:56 diakopter so basically the task is to identify the edge cases (dividing by zero?? I think??), test them on parrot/jvm, decide what they should do, and make it consistent on all 3 NQPs
00:57 diakopter (and/or fix them entirely)
00:58 diakopter benabik: configure does the submodule things for you now, I think
00:58 diakopter sec, asec, sech
00:59 diakopter (and while you're at it, all the other math functions could use a code review
00:59 diakopter )
00:59 colomon okay, I'll see what I can do.
01:00 diakopter like, even the others that currently abort need to have those cases trapped and exceptions thrown instead, I think
01:03 diakopter colomon: thanks :)
01:03 diakopter colomon: if you dont have a commit bit, just make apull request
01:03 colomon I don't have a commit bit.  :)
01:04 FROGGS_ joined #moarvm
01:11 diakopter colomon: there are three test targets..
01:12 diakopter across two different Makefiles
01:14 colomon hmmm
01:15 colomon switching to #perl6...
01:19 BabsSeed joined #moarvm
01:21 benabik diakopter: I hadn't seen that commit go by.  Fair enough.
01:22 diakopter benabik: did you take a look at the todos in validation.c?
01:23 diakopter .tell moritz I'm sorry I'm holding the nfg code hostage.. I'll try really hard to get it pushed usably this week
01:23 yoleaux diakopter: I'll pass your message to moritz.
01:25 benabik diakopter: I have a branch around with bits to move validation things into the instance, but never completed it.
01:25 diakopter into instance.c?
01:26 benabik Oh, sorry.  Hang caches and such for validation into thread context.
01:26 benabik (Actually looking at what I have now.)
01:26 diakopter well, compunits are now garbage collected so they're less permanent
01:27 diakopter (and their staticframes)
01:27 benabik Was trying to keep around working memory to avoid mallocs.
01:27 colomon diakopter: so how do I throw an exception?
01:27 diakopter search exception there in interp.c
01:28 diakopter it's actually a printf format string with varargs
01:28 diakopter so you can adorn the message with stuff if you want
01:28 colomon MVM_exception_throw_adhoc, you mean?
01:28 diakopter yes
01:29 diakopter (same as parrot's)
01:29 diakopter (though independently discovered, iirc)
01:33 colomon how can I test this?
01:34 diakopter write tests in nqp-cc/t/nqp/88-maths.t or something
01:34 diakopter (or an existing math one)
01:34 diakopter there's not a throws_ though....
01:35 colomon highest number is 76?
01:35 diakopter yeah I was just picking a number
01:35 colomon ah
01:35 diakopter there hsould be an existing math one
01:35 diakopter or trig
01:36 diakopter afk a bit&
01:48 dalek MoarVM: 6947186 | jimmy++ | / (3 files):
01:48 dalek MoarVM: updated libuv to latest version
01:48 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/6947186ea2
02:01 FROGGS_ joined #moarvm
02:18 diakopter 02:14:41 up 175 days, 10:29,  4 users,  load average: 0.00, 0.01, 0.05
02:19 JimmyZ :)
02:34 FROGGS joined #moarvm
02:52 dalek MoarVM: 8166578 | jimmy++ | src/io/procops.c:
02:52 foo_bar_baz joined #moarvm
02:52 dalek MoarVM: Don't added instance->clargs to permanent, it's already in MVM_gc_root_add_instance_roots_to_worklist
02:52 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/8166578df4
03:07 diakopter JimmyZ: actually it should be in the place of creation... it is a permanent since it doesn't change
03:07 diakopter (so remove it from MVM_gc_root_add_instance_roots_to_worklist)
03:09 JimmyZ diakopter: but tc->instance->env_hash is in MVM_gc_root_add_instance_roots_to_worklist also
03:10 JimmyZ diakopter: they are the same thing, for MVM_gc_root_add_instance_roots_to_worklist and MVM_gc_root_add_permanents_to_worklist
03:11 JimmyZ they do the same thing
03:16 diakopter I suppose you're right
03:23 dalek MoarVM: 9890d98 | jimmy++ | src/moarvm.c:
03:23 dalek MoarVM: Don't add instance->compiler_registry and instance->hll_syms to permanent, they are already in MVM_gc_root_add_instance_roots_to_worklist
03:23 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/9890d9879f
03:29 FROGGS joined #moarvm
03:56 ggoebel2 joined #moarvm
03:59 FROGGS joined #moarvm
04:32 FROGGS joined #moarvm
04:58 FROGGS joined #moarvm
05:21 FROGGS joined #moarvm
06:07 JimmyZ http://eli.thegreenplace.net/2012/07/12/co​mputed-goto-for-efficient-dispatch-tables/
06:07 JimmyZ FYI
06:18 ozmq joined #moarvm
06:45 FROGGS joined #moarvm
06:50 JimmyZ not_gerd: cgoto for MSVC: http://abepralle.wordpress.com/2009/01/25/how-not​-to-make-a-virtual-machine-label-based-threading/
06:53 jnthn moarning o/
06:54 FROGGS o/
06:59 FROGGS is it possible that https://github.com/MoarVM/MoarVM/commit/6947186ea2 broke the build?
07:00 FROGGS ahh, no, `git submodule update` helped...
07:02 JimmyZ perl Configure.pl helps too
07:02 JimmyZ morning, jnthn
07:08 JimmyZ .tell not_gerd cgoto for MSVC: http://abepralle.wordpress.com/2009/01/25/how-not​-to-make-a-virtual-machine-label-based-threading/
07:08 yoleaux JimmyZ: I'll pass your message to not_gerd.
07:09 jnthn JimmyZ: That article basically adds up to, "don't do this", right? :)
07:09 dalek MoarVM: 8848992 | (Tobias Leich)++ | nqp-cc/t/nqp/ (14 files):
07:09 dalek MoarVM: sync test with nqp
07:09 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/884899214f
07:12 JimmyZ jnthn: you're right,  3 times slower. it said
07:12 JimmyZ jnthn: you may have an interset: http://www.cs.toronto.edu/sy​slab/pubs/demkea_context.pdf
07:12 JimmyZ *interest
07:14 JimmyZ I have tried to read this, but if is full of english
07:14 JimmyZ s/if/it/
07:14 jnthn oh noes, English?!
07:14 JimmyZ yeah :P
07:14 jnthn Looks interesting, anyways
07:15 jnthn But I should be teaching here in a moment
07:15 jnthn Will read it later :)
07:15 JimmyZ heh, I think it's useful for MoarVM
07:15 jnthn yes, looks relevant
07:16 JimmyZ thank ozmq++ for it :P
07:30 JimmyZ FROGGS: Do we need port the nqp pull request code to MoarVM? https://github.com/perl6/nqp/pull/120
07:33 FROGGS JimmyZ: yeah, looks like, https://github.com/MoarVM/MoarVM/b​lob/master/src/strings/ops.c#L1219
07:35 JimmyZ FROGGS: I don't know whether #L1221 contains it or not
07:40 FROGGS ahh, good question
07:40 FROGGS let's test it...
07:41 not_gerd joined #moarvm
07:41 not_gerd o/
07:41 yoleaux 1 Sep 2013 20:10Z <jnthn> not_gerd: that needs doing, but I think it's can't be that; the call to compunit_coderefs will die before we ever get there 'cus the op it depends on is also NYI
07:41 yoleaux 07:08Z <JimmyZ> not_gerd: cgoto for MSVC: http://abepralle.wordpress.com/2009/01/25/how-not​-to-make-a-virtual-machine-label-based-threading/
07:41 odc joined #moarvm
07:42 not_gerd JimmyZ: MS is moving away from inline asm in favour of compiler intrinsics
07:42 JimmyZ not_gerd: ignore the post
07:42 not_gerd ;)
07:42 FROGGS JimmyZ: it looks like it gets treated as whitespace, but not newline
07:42 JimmyZ not_gerd: yo may have an interest with the pdf one
07:43 JimmyZ not_gerd: http://www.cs.toronto.edu/sy​slab/pubs/demkea_context.pdf
07:43 not_gerd JimmyZ: I actually tried to do something like that before I did cgoto
07:43 not_gerd some toy interpreter with various dispatch strategies: https://gist.github.com/gerdr/6d327799863d9ef88cff
07:44 not_gerd performance when jitting the runloop to sequences of call/ret was underwhelming
07:44 not_gerd perhaps I messed up the asm ;)
07:44 JimmyZ not_gerd: per http://eli.thegreenplace.net/2012/07/12/co​mputed-goto-for-efficient-dispatch-tables/, continue is not needed
07:45 JimmyZ replacing continue with goto *table is better
07:45 not_gerd JimmyZ: needs to be measured
07:45 not_gerd indirect calls are more expensive than direct ones
07:46 JimmyZ not_gerd: yeah, maybe reduce a 'jmp' op
07:46 not_gerd in the cgoto branch, it was worse partly because of the double-indirection
07:46 JimmyZ let's remove the bank
07:46 JimmyZ ;)
07:46 not_gerd JimmyZ: that's the plan
07:47 not_gerd we should wait a bit until opcodes are more stable
07:47 JimmyZ yes
07:47 JimmyZ mostly until bootstrap
07:48 JimmyZ I think with cgoto, we don't need natural number for op, except msvc
07:49 JimmyZ continue natual number ...
07:51 FROGGS JimmyZ: about NEL, maybe we should wait until we have NFG strings?
07:51 JimmyZ FROGGS: yes
07:51 JimmyZ or until unfugde roast
08:00 not_gerd the 80-matches.t failure seems to be just someone forgetting to increment a variable (QRegex.nqp:1106)
08:02 FROGGS not_gerd: that was fixed recently in nqp, do you wanna fix or should I ?
08:03 not_gerd feel free to do so
08:03 FROGGS k
08:05 jnthn Banks can go whenever somebody feels like. Yes, we should do an ops numbering cleanup before we go for bootstrap, 'cus beyond there we have to start keeping backcompat
08:07 jnthn I think killing banks will also simplify mast op name => number resolution in code
08:07 jnthn (in the QAST to MAST code)
08:11 JimmyZ btw: I still thinks dynasm makes jit much easy :). a simple one: http://blog.reverberate.org/2012/12/he​llo-jit-world-joy-of-simple-jits.html
08:12 JimmyZ the more I read, the more I like it
08:15 JimmyZ I can help remove bank if anyone can remove it from compiler.c
08:16 JimmyZ and MAST maybe
08:16 jnthn yes, it needs changes in quite a few places
08:17 JimmyZ I can try remove it from src, nqp-cc maybe needs you!
08:17 jnthn And probably mostly needs doing in one sweep
08:17 jnthn Well, first thing I'd do is fix update_ops.p6
08:18 jnthn The rest of the changes should flow out from that
08:18 JimmyZ yeah
08:20 not_gerd someone also needs to investigate common op sequences so we can skip the break/goto and just fall through to the next op in the common case
08:21 jnthn Um. Really?
08:21 not_gerd might be worth it if it gets branch prediction going
08:21 * jnthn is skeptical that will be a win
08:22 jnthn ah, there is that...
08:22 jnthn But still...feels too clever for its own good.
08:23 not_gerd always jumping back to the top level indirect dispatch is one thing that makes interpreters slow
08:24 jnthn I'm struggling to see an especially good hit rate on common op sequences, fwiw
08:24 jnthn I mean, we can try to analyze actual compiler output, but there's relatively few that spring to mind
08:24 JimmyZ not_gerd: replace contine with goto *table avoids jump to the top
08:25 JimmyZ *continue
08:25 jnthn This is all focusing on stuff we shouldn't focus on at the moment, though. Our problem isn't the interpreter not performing, our problem is that we dont' run Rakudo on MoarVM yet.
08:25 not_gerd ;)
08:25 not_gerd JimmyZ: but it's still an indirect branch
08:26 JimmyZ oh, yes
08:26 not_gerd same applies if we call the same op repeatedly
08:27 not_gerd add if(next_op == push_i) goto PUSH_I; else goto *labels[next_op]; to the end of push_i
08:28 jnthn arg_o is probably a good candidate for that.
08:29 dalek MoarVM: 2ca96e5 | (Tobias Leich)++ | nqp-cc/nqp-src/QRegex.nqp:
08:29 dalek MoarVM: pull in nqp's QRegex/Cursor.pm to pass t/nqp/80, not_gerd++
08:29 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/2ca96e5a1e
08:30 JimmyZ not_gerd: good points, I guess this needs some statistics
08:40 ozmq joined #moarvm
08:56 ozmq left #moarvm
08:58 dalek MoarVM/nobank: ff90219 | jimmy++ | tools/update_ops.p6:
08:58 dalek MoarVM/nobank: start removing banks from update_ops.p6
08:58 dalek MoarVM/nobank: review: https://github.com/MoarVM/MoarVM/commit/ff90219794
09:04 dalek MoarVM: cd591d5 | (Gerhard R)++ | build/Makefile.in:
09:04 dalek MoarVM: Wire up build of (not yet implemented) computed goto dispatch
09:04 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/cd591d583f
09:04 not_gerd ^ just future-proofing the build system
09:06 JimmyZ good
09:15 dalek MoarVM/nobank: a4a4a37 | jimmy++ | tools/update_ops.p6:
09:15 dalek MoarVM/nobank: remove all bank codes from update_ops.p6
09:15 dalek MoarVM/nobank: review: https://github.com/MoarVM/MoarVM/commit/a4a4a374d0
09:16 FROGGS guys, my last commit broke test 9 and 14, I'm currently investigating... https://github.com/MoarVM/MoarVM/commit/​2ca96e5a1e68e6113df425647c07b8bab9fa3a56
09:21 dalek MoarVM/nobank: 3a85767 | jimmy++ | / (2 files):
09:21 dalek MoarVM/nobank: remove banks from oplist
09:21 dalek MoarVM/nobank: review: https://github.com/MoarVM/MoarVM/commit/3a85767e51
09:39 dalek MoarVM/nobank: a3fa0d6 | jimmy++ | / (4 files):
09:39 dalek MoarVM/nobank: updated ops files
09:39 dalek MoarVM/nobank: review: https://github.com/MoarVM/MoarVM/commit/a3fa0d695c
09:42 JimmyZ this also reduced .moarvm file size
09:51 dalek MoarVM/nobank: f560493 | jimmy++ | src/core/interp.c:
09:51 dalek MoarVM/nobank: removed bank from interp.c
09:51 dalek MoarVM/nobank: review: https://github.com/MoarVM/MoarVM/commit/f560493ff2
09:52 JimmyZ argh, some many places to remove
09:58 not_gerd still needs switching from uint8 to uint16?
10:00 JimmyZ yes
10:00 JimmyZ so didn't save size
10:01 JimmyZ not_gerd: how about import stdint and #define MVMint32 int32_t?
10:01 JimmyZ jnthn may like MVMint32?
10:02 not_gerd JimmyZ: I can do that
10:02 JimmyZ may ask jnthn first :)
10:02 jnthn Probably wants to be typedef rather than #define ?
10:02 JimmyZ yes
10:02 jnthn But yes, I want us to carry on using MVMint32 etc in the code
10:02 jnthn But if we define them in terms of int32_t that's fine by me.
10:02 JimmyZ you're ok import stdint?
10:03 JimmyZ if typedef
10:03 * JimmyZ decommute
10:03 not_gerd if that's a go-ahead, I can do it later today
10:03 not_gerd the patch should be minimal
10:04 not_gerd errands&
10:34 dalek MoarVM: 7dfbabf | (Tobias Leich)++ | nqp-cc/nqp-src/QRegex.nqp:
10:34 dalek MoarVM: revert change of ACCEPT's signature, unbreak test 9 and 14
10:34 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/7dfbabf794
10:49 not_gerd joined #moarvm
11:02 JimmyZ not_gerd, it's ago-ahead
11:06 JimmyZ .tell jnthn so you're fine to import https://github.com/MoarVM/MoarVM/​tree/stdtypes/3rdparty/msinttypes with typedef MVMint32 int32_t ?
11:06 yoleaux JimmyZ: I'll pass your message to jnthn.
11:18 diakopter JimmyZ: i think not_gerd was saying he wanted to do that
11:28 JimmyZ diakopter: after removing bank, should label need to changed uint16?
11:29 diakopter label?
11:30 JimmyZ diakopter: see validation.c
11:31 diakopter ...
11:31 diakopter I wrote it; what about it in particular
11:33 JimmyZ about instr_offsets in MVMStaticFrame.h
11:33 JimmyZ and annotations_data
11:34 diakopter no
11:42 dalek MoarVM/nobank: e7948e0 | jimmy++ | src/ (8 files):
11:42 dalek MoarVM/nobank: start removing bank from various c code
11:42 dalek MoarVM/nobank: review: https://github.com/MoarVM/MoarVM/commit/e7948e0441
11:42 JimmyZ diakopter: needs review
11:42 JimmyZ ^^
11:42 JimmyZ .tell jnthn e7948e0441 needs your review
11:42 yoleaux JimmyZ: I'll pass your message to jnthn.
11:44 JimmyZ or diakopter could help join in?
11:46 JimmyZ or just changed *(cur_op++) to *(MVMuint16 *)(cur_op += 2) ?
11:48 not_gerd joined #moarvm
11:48 JimmyZ hello not_gerd
11:48 dalek MoarVM: 556f294 | (Gerhard R)++ | / (6 files):
11:48 dalek MoarVM: Use msinttypes for standard integers but still keep our
11:48 dalek MoarVM: versions via typedef alias.
11:48 dalek MoarVM:
11:48 dalek MoarVM: Formatting patterns like %lli should be replaced with the
11:48 dalek MoarVM: appropriate macros from inttypes.h.
11:48 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/556f294530
11:49 JimmyZ how do you think it?
11:49 JimmyZ I think *(MVMuint16 *)(cur_op += 2) would much better?
11:50 not_gerd cur_op itself could probably be a MVMuint16*
11:50 not_gerd or do we actually read an uint8 somewhere from the stream?
11:51 JimmyZ uint16 means we need rewrite most things
11:51 JimmyZ i.e::cur_op += 6;
11:52 JimmyZ GET_UI32(cur_op, 2);
11:52 JimmyZ and all other places
11:53 JimmyZ *(MVMuint16 *)(cur_op += 2) could be much simpler :P
11:53 JimmyZ only one line I think
11:54 not_gerd won't work like that, though - (cur_op += 2) works like (++cur_op), not (cur_op++)
11:57 JimmyZ oh
11:57 JimmyZ yes
11:58 JimmyZ but we can modify it
12:00 JimmyZ *(MVMuint16 *)(cur_op++++)
12:02 not_gerd that might be illegal - two modifications without sequence point
12:03 JimmyZ well, I ran into a problem that I don't know which uint8 needs to be uint16
12:03 not_gerd (cur_op += 2, ((MVMuint16 *)cur_op)[-1])
12:04 not_gerd couldn't think of anything less ugly right now
12:04 JimmyZ so if changed to uint16, I need help
12:10 jnthn Do the minimum set of changes needed to make it work. Then we can tweak afterwards.
12:10 yoleaux 10:28Z <FROGGS> jnthn: Are the changes to ACCEPTS alright? moarvm doesn't like it: https://github.com/perl6/nqp/commit/0f1be3​1feeeaf43ee4e77d11f57306001b7c93f1#L3L821
12:10 yoleaux 10:36Z <FROGGS> jnthn: So this was needed, and might hurt us later: https://github.com/MoarVM/MoarVM/commit/7dfbabf794
12:10 yoleaux 11:06Z <JimmyZ> jnthn: so you're fine to import https://github.com/MoarVM/MoarVM/​tree/stdtypes/3rdparty/msinttypes with typedef MVMint32 int32_t ?
12:10 yoleaux 11:42Z <JimmyZ> jnthn: e7948e0441 needs your review
12:10 jnthn It really should be no more complicated than
12:11 jnthn MVMint16 op_to_dispatch = *((MVMint16 *)cur_op);
12:11 jnthn cur_op += 2;
12:11 jnthn ...switch...
12:12 not_gerd meah - splitting the line in 2 is cheating ;)
12:12 FROGGS but hey, it is readable :o)
12:12 jnthn Yeah. I hate it when I can read the code easily.
12:13 JimmyZ or switch to cgoto
12:13 JimmyZ give up msvc
12:13 JimmyZ :P
12:13 JimmyZ no need switch
12:13 jnthn *sigh*
12:14 FROGGS or we switch to basic and have line numbers at the left?
12:15 FROGGS it sucks just a bit when inserting lines between 190 and 200
12:15 JimmyZ Be be honest, which one do you prefer? uint8 or uint16?
12:15 JimmyZ jnthn: ^^
12:15 not_gerd uint8 short-term, uint16 long-term
12:15 not_gerd cosmetic changes can wait
12:21 JimmyZ well, change to uint16 is not that hard, for interp.c can use s/cur_op, 2/cur_op, 1/g or similar
12:21 JimmyZ I just need some tips
12:22 JimmyZ i.e: the label
12:24 jnthn < jnthn> Do the minimum set of changes needed to make it work.
12:24 jnthn So uint8.
12:26 JimmyZ ok
12:31 FROGGS jnthn: do you think I need to buy a nice beer and sit on the couch this evening to read something?
12:33 diakopter to read this irclog, yes
12:34 jnthn FROGGS: Buying a nice beer is always a good plan :)
12:34 jnthn Drinking it is an even better one :)
12:35 FROGGS k, I'll make sure I got one :o)
12:36 diakopter jnthn: what should I work on the next few hours
12:36 FROGGS serialization?
12:37 diakopter sshh
12:37 diakopter toward selfhost?
12:38 jnthn diakopter: t\nqp\31-grammar.t segfaults here; I was too exhausted to finish hunting it last night but it looks like the hll config hash doesn't keep the name around/anchored so the hash ends up pointing into heck knows where. Maybe look into that :)
12:41 diakopter jnthn: I thought I saw a patch [from you] that addressed that
12:41 jnthn No, I fixed env_args last night
12:41 jnthn But got another segfault in 31-grammar.t
12:42 jnthn And it was when looking up hll_name
12:43 diakopter jnthn: 31 passes for me
12:45 jnthn bah, same for me...
12:45 jnthn No.
12:45 jnthn *now
12:45 jnthn But t\nqp\14-while.t segfaults now?!
12:46 jnthn hm, in the compiler.c
12:46 jnthn oh...I wonder if it depends on GC not running while it's compiling...
12:46 diakopter not for me
12:47 diakopter passes for me
12:47 diakopter er
12:47 dalek MoarVM/nobank: 487752e | jimmy++ | src/ (7 files):
12:47 dalek MoarVM/nobank: removed all bank code from c codes
12:47 dalek MoarVM/nobank: review: https://github.com/MoarVM/MoarVM/commit/487752e3d3
12:47 JimmyZ ^^ should be done
12:49 jnthn diakopter: t\nqp\78-shell.t is missing nqp::shell
12:49 jnthn diakopter: May be one to look at.
12:49 jnthn Perhaps the t\nqp\19-file-ops.t failures too
12:49 jnthn diakopter: Besides that, t/serialization/ :D
12:50 diakopter prove likes 14-while
12:50 diakopter but... it segfaults
12:50 jnthn make selftest doesn't like it here
12:51 diakopter C:\Users\mwilson\src\MoarVM\nqp-cc>..\moarvm nqp.moarvm t\nqp\14-while.t
12:51 diakopter C:\Users\mwilson\src\MoarVM\nqp-cc>echo %ERRORLEVEL%
12:51 diakopter -1073741819
12:53 diakopter t\nqp\14-while.t ...................... ok
12:53 diakopter something is amiss.
12:54 jnthn weird
12:57 dalek MoarVM/nobank: 9c42170 | jimmy++ | lib/MAST/Nodes.nqp:
12:57 dalek MoarVM/nobank: removed bank from MAST/Nodes.nqp
12:57 dalek MoarVM/nobank: review: https://github.com/MoarVM/MoarVM/commit/9c421702d1
13:00 diakopter JimmyZ: as jnthn said, the op() and push_op() subs in the qast->mast compiler can be vastly improved now with one big hash
13:00 dalek MoarVM/nobank: cd591d5 | (Gerhard R)++ | build/Makefile.in:
13:00 dalek MoarVM/nobank: Wire up build of (not yet implemented) computed goto dispatch
13:00 dalek MoarVM/nobank: review: https://github.com/MoarVM/MoarVM/commit/cd591d583f
13:00 dalek MoarVM/nobank: 7dfbabf | (Tobias Leich)++ | nqp-cc/nqp-src/QRegex.nqp:
13:00 dalek MoarVM/nobank: revert change of ACCEPT's signature, unbreak test 9 and 14
13:00 dalek MoarVM/nobank: review: https://github.com/MoarVM/MoarVM/commit/7dfbabf794
13:00 dalek MoarVM/nobank: 556f294 | (Gerhard R)++ | / (6 files):
13:00 dalek MoarVM/nobank: Use msinttypes for standard integers but still keep our
13:00 dalek MoarVM/nobank: versions via typedef alias.
13:01 dalek MoarVM/nobank:
13:01 dalek MoarVM/nobank: Formatting patterns like %lli should be replaced with the
13:01 dalek MoarVM/nobank: appropriate macros from inttypes.h.
13:01 dalek MoarVM/nobank: review: https://github.com/MoarVM/MoarVM/commit/556f294530
13:01 dalek MoarVM/nobank: 5342bf8 | (Gerhard R)++ | / (8 files):
13:01 not_gerd JimmyZ: ^ merged master + some fixes
13:01 not_gerd the cross-compiler doesn't build yet
13:04 FROGGS diakopter / jnthn: the 14-while fail might due to my patch... (see the yoleaux msgs from almost an hour ago)
13:07 dalek MoarVM/nobank: 2cc4b2f | jimmy++ | nqp-cc/src/ (5 files):
13:07 dalek MoarVM/nobank: removed all bank code from nqp-cc
13:07 dalek MoarVM/nobank: review: https://github.com/MoarVM/MoarVM/commit/2cc4b2fbd0
13:07 jnthn FROGGS: The segfault looks unrelated (as in, coincidental that the ACCEPTS change triggered it)
13:08 FROGGS jnthn: I was thinking the same, just wanted to point on it :o)
13:11 jnthn hm, think I may need a short nap...slept badly last night then got up early to go teach today...
13:11 diakopter http://www.youtube.com/watch?v=TIUUVEojULE
13:12 FROGGS I'd need a nap too, but I have two little problems that prevent me from doing it
13:12 FROGGS diakopter: yeah, but the end is cut off
13:13 diakopter FROGGS: no place to rest your head?
13:14 FROGGS diakopter: well, I could go home but there are $kids that won't let me sleep
13:14 JimmyZ jnthn: MAST::Ops.WHO{'$allops'} is it right?
13:15 FROGGS JimmyZ: I'd say yes: nqp-cc/nqp-src/QASTMoar.nqp:5503:            next if ~$_ eq '$allops';
13:16 diakopter JimmyZ: close enough
13:16 FROGGS it is used that way in several places
13:16 diakopter JimmyZ: or just refactor the Ops.nqp generation script to make it better named
13:18 JimmyZ my @operands := MAST::Ops.WHO{'$allops'}{$moarop}{"operands"};
13:18 JimmyZ I can't get it
13:18 JimmyZ +@operands return 0
13:21 woolfy left #moarvm
13:21 diakopter JimmyZ: some of them have 0 operands
13:22 JimmyZ I know that
13:22 diakopter ok :)
13:25 diakopter FROGGS: when I run prove with -vv, it shows that 14-while.t runs just fine....
13:28 FROGGS O.o
13:28 FROGGS diakopter: so is there an issue with 14 anymore?
13:29 diakopter don't know.
13:29 FROGGS hmmm, now it fails on my box
13:30 diakopter yeah, definitely something is wrong
13:30 FROGGS Program received signal SIGSEGV, Segmentation fault.
13:30 FROGGS 0x0000000000423894 in MVM_hll_get_config_for ()
13:30 diakopter hrm
13:30 * diakopter tries in vs
13:31 diakopter boom
13:31 diakopter erm.
13:31 diakopter not boom.
13:31 diakopter but no output.
13:31 FROGGS 0x000000000043c361 in MVM_hll_get_config_for (tc=0x81a2d0, name=0x0) at src/core/hll.c:8
13:31 FROGGS 8    MVM_HASH_EXTRACT_KEY(tc, &kdata, &klen, name, "get hll config needs concrete string");
13:32 diakopter JimmyZ removed some marking
13:32 diakopter gotta be that
13:33 * diakopter tries
13:34 diakopter hm
13:35 JimmyZ I just removed duplicated part
13:36 diakopter yeah didn't fix
13:48 dalek MoarVM/nobank: bc552ca | jimmy++ | / (5 files):
13:48 dalek MoarVM/nobank: removed left bank code
13:48 dalek MoarVM/nobank: review: https://github.com/MoarVM/MoarVM/commit/bc552ca069
13:53 jnap joined #moarvm
13:54 not_gerd left #moarvm
14:03 JimmyZ diakopter: Could you help take a look at nobank branch? I got a blocker ...
14:17 benabik joined #moarvm
14:33 diakopter JimmyZ: ok
14:35 FROGGS .tell jnthn I think the problem with 14-while is that cu->body->hll_name is overwritten by a gc run: https://gist.github.com/FR​OGGS/c05f3c4d8dec0fa98e00
14:35 yoleaux FROGGS: I'll pass your message to jnthn.
14:36 JimmyZ diakopter: thanks
14:36 dalek MoarVM/nobank: 0faf79b | jimmy++ | nqp-cc/src/QASTOperationsMAST.nqp:
14:36 dalek MoarVM/nobank: small fixes
14:36 dalek MoarVM/nobank: review: https://github.com/MoarVM/MoarVM/commit/0faf79be82
14:37 diakopter JimmyZ: what's the problem
14:38 JimmyZ diakopter: cd nqp-cc && make
14:38 JimmyZ diakopter: you will see it
14:41 diakopter JimmyZ: you removed the thing that verifies whether the op exists
14:41 diakopter so it's not catching the error soon
14:43 JimmyZ I think I just fixed it
14:43 JimmyZ testing
14:44 diakopter why is it not looking in the hash for the op in push_op
14:45 FROGGS .tell jnthn Maybe I'm wrong, since the gc run swaps from- and to-space, right?
14:45 yoleaux FROGGS: I'll pass your message to jnthn.
14:45 dalek MoarVM/nobank: f444698 | jimmy++ | lib/MAST/Nodes.nqp:
14:45 dalek MoarVM/nobank: another small fixes
14:45 dalek MoarVM/nobank: review: https://github.com/MoarVM/MoarVM/commit/f444698f2f
14:45 diakopter it needs to do the MAST::Ops.WHO{'$allops'}{$op} lookup in push_op
14:46 JimmyZ diakopter: feel free to add it
14:47 diakopter no I htink your last patch is ok
14:48 JimmyZ but I got anothter blocker
14:48 diakopter ok ok let me look at it
14:48 JimmyZ thanks
14:51 FROGGS ohh
14:52 FROGGS when it copies the cu to tospace it copies 176 bytes, which might be sizeof MVMCompUnit
14:52 FROGGS but the cu->body points to other stuff (hll_name), which is in mem after there 176 bytes
14:52 FROGGS these*
14:55 benabik JimmyZ++ # cgoto links
14:58 diakopter FROGGS: ohh.
14:59 diakopter but the body is malloc'd
15:01 diakopter JimmyZ: I'm fixing the branch..
15:01 diakopter redoing the .p6 gen script
15:01 JimmyZ diakopter: great
15:01 JimmyZ Is it the .p6 gen script problem?
15:02 jnthn I suspect the p6 gen script gets simpler :)
15:02 yoleaux 14:35Z <FROGGS> jnthn: I think the problem with 14-while is that cu->body->hll_name is overwritten by a gc run: https://gist.github.com/FR​OGGS/c05f3c4d8dec0fa98e00
15:02 yoleaux 14:45Z <FROGGS> jnthn: Maybe I'm wrong, since the gc run swaps from- and to-space, right?
15:02 jnthn So long as it doesn't end up written in p5, it's fine :P
15:02 * JimmyZ is going to sleep
15:02 jnthn 'night, JimmyZ++
15:03 JimmyZ jnthn: I think most work is done, just need some small fixes(which maybe need big debug) :P
15:03 diakopter JimmyZ: no needs much slimplifiatsknadfslidfn
15:04 diakopter erm.
15:04 JimmyZ jnthn: https://github.com/MoarVM/MoarVM/compare/nobank for a quick review, may I lost something
15:04 diakopter simplification.
15:04 diakopter fixing...
15:04 * diakopter claims the branch
15:04 diakopter jnthn: yes, simpler. in p6.
15:04 jnthn :)
15:05 JimmyZ and thanks n_gerd++ for type help
15:05 diakopter baby p6, anyway. ;)
15:05 donaldh joined #moarvm
15:09 JimmyZ err, not_gerd++
15:15 jnap joined #moarvm
15:18 dalek joined #moarvm
16:29 FROGGS joined #moarvm
16:53 not_gerd joined #moarvm
16:53 not_gerd o/
16:53 not_gerd naive op sequence statistics: https://gist.github.com/gerdr/2c16eff066736d181b99
16:54 not_gerd hm...
16:55 not_gerd I probably should have sorted by the first percentage value
16:56 [Coke] not_gerd: if you make that a csv, github will format it nicely for you.
16:57 [Coke] (hurm. maybe not when it's a gist)
17:02 arnsholt not_gerd: Another statistic that might be interesting is conditional probabilities. Given the previous op, which ops are most probable?
17:02 not_gerd now we're getting fancy ;)
17:03 arnsholt Once you have unigram and bigram statistics, not really =)
17:04 arnsholt Just the bigram count divided by the unigram count of the op you're conditioning on
17:26 moritz 'make install' will install MoarVM Cross Compiler.
17:26 moritz moritz@lara:~/p6/MoarVM/nqp-cc>make install
17:26 moritz make: *** No rule to make target `install'.  Stop.
17:28 benabik Well, it will.  Someday.
17:31 jnthn .oO( it depends what the meaning of "will" will be... )
17:37 not_gerd arnsholt: https://gist.github.com/gerdr/77cb5e2c9336aedde466
17:41 arnsholt \o/
18:11 donaldh joined #moarvm
18:28 lizmat joined #moarvm
18:59 not_gerd bye, #moarvm
18:59 not_gerd left #moarvm
19:23 FROGGS diakopter: is there a way to tell the GC that an object should not be moved to tospace because something is modifying it currently?
19:23 jnthn FROGGS: It doesn't work like that.
19:24 jnthn Modification is not the problem, the problem is usually that you have a pointer to an object that the GC doesn't know about.
19:24 jnthn And thus can't update.
19:25 FROGGS jnthn: the problem is that we fetch the obj's pointer, and right after that it gets moved, and ->forwarder is set
19:26 FROGGS and then it sets values to the old obj as it seems
19:26 jnthn That can only happen if something allocates.
19:26 FROGGS it does
19:26 FROGGS it calls a function that allocates strings
19:26 jnthn Right, that's why we have MVMROOT, etc.
19:26 FROGGS (I'm talking about the 14-while prob)
19:27 FROGGS jnthn: so, I just have to wrap it in MVMROOT, right?
19:28 jnthn FROGGS: Yeah, though where is this? In compiler.c?
19:28 FROGGS jnthn: bytecode.c/MVM_bytecode_unpack
19:28 jnthn oh...wow
19:29 jnthn Unpacking bytecode should probably allocate directly to the old generation, like deserialization does.
19:29 jnthn Since those objects are going to live for along time
19:29 jnthn And old generation direct allocations will (a) never trigger GC, and (b) at present never result in objects moving around.
19:30 FROGGS that is called gen2, right?
19:30 jnthn See MVM_gc_allocate_gen2_default_set and MVM_gc_allocate_gen2_default_clear, which you probably want to call before/after bytecode unpacking.
19:30 jnthn aye
19:30 jnthn The penguin
19:31 FROGGS yeah
19:31 FROGGS :o)
19:35 FROGGS it passes \o/
19:36 TimToady ship it!
19:36 FROGGS *g*
19:42 dalek MoarVM: e3ef9d7 | (Tobias Leich)++ | src/core/bytecode.c:
19:42 dalek MoarVM: allocate directly in gen2, fixes 14-while.t
19:42 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/e3ef9d7f8e
19:42 FROGGS jnthn++ # I love ya! I learned much {yester,to}day, and it was super fun :o)
19:42 jnthn Shit pi! That breaks MSVC!
19:43 FROGGS wut?
19:43 jnthn ReaderState *rs = dissect_bytecode(tc, cu);
19:43 jnthn Comes after the MVM_gc_allocate_gen2_default_set(tc); call
19:43 FROGGS ahhh
19:43 FROGGS yeah
19:43 FROGGS I see
19:43 jnthn MSVC doesn't like this :)
19:43 jnthn Otherwise, looks good :)
19:44 FROGGS yeah, I basically know that :o)
19:45 dalek MoarVM: 136a699 | (Tobias Leich)++ | src/core/bytecode.c:
19:45 dalek MoarVM: declaration before code, really
19:45 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/136a699ea8
20:17 diakopter MVM_gc_allocate_gen2_default_set and companion need to atomically increment/decrement an integer
20:18 jnthn Nah
20:18 jnthn They're per-tc
20:18 jnthn Not global
20:19 diakopter ok/ s/atomically//
20:19 jnthn yes, we could do 'em that way, if they ain't already
20:19 jnthn Probably wise :)
20:27 dalek MoarVM: 1de88f0 | (Tobias Leich)++ | nqp-cc/nqp-src/QRegex.nqp:
20:27 dalek MoarVM: revert a revert, we an run this code now
20:27 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/1de88f0a66
20:28 diakopter jnthn: not being able to store stuff in NQP class our serialized hurts speed a lot..
20:34 jnthn diakopter: I think it may be possible...moment...
20:36 jnthn diakopter: https://gist.github.com/jnthn/6429209
20:38 jnthn diakopter: I guess you're doing this for op info to speed startup? :)
20:40 FROGGS $ ../moarvm nqp.moarvm -e 'sub a() { return; }' # Could not locate compile-time value for symbol return
20:40 FROGGS $ ../moarvm nqp.moarvm -e 'sub a() { return }'  # cannot stringify this
20:40 FROGGS (t/nqp/44-try-catch.t)
20:40 donaldh joined #moarvm
20:41 jnthn Curious failure mode
20:41 jnthn I know 44-try-catch depends on missing stuff, so won't work out, but something weird about that way of it failing.
20:42 FROGGS yeah, if that would be fixed it would be blow up because of missing nqp::rethrow
20:43 FROGGS s:2nd[be\s] = ''
20:45 FROGGS token prefix:sym<return> { <sym> \s <O('%list_prefix')> { $*RETURN_USED := 1 } }
20:45 FROGGS how should that match 'return;' ?
20:45 * FROGGS looks at nqp
20:46 jnthn um, it don't o.O
20:46 jnthn *won't
20:47 moritz FROGGS: you actually have to return a value in NQP
20:47 jnthn See #perl6, but yeah, I remember this now...
20:47 jnthn It parses as a type name and apparently on MoarVM gets upset over it being missing...
20:52 diakopter jnthn: aye [to your q[
20:52 diakopter [
20:52 diakopter ]]]
20:53 dalek MoarVM: ab90d7d | (Tobias Leich)++ | nqp-cc/t/nqp/44-try-catch.t:
20:53 dalek MoarVM: return is a list prefix
20:53 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/ab90d7d2f2
20:53 jnthn diakopter: najs
21:53 jnthn 'night all, happy hacking :)
23:07 benabik joined #moarvm
23:09 diakopter .tell JimmyZ I'm still claiming the nobank branch... just a few more hours at the max..
23:09 yoleaux diakopter: I'll pass your message to JimmyZ.
23:10 diakopter .tell not_gerd I'm still claiming the nobank branch... just a few more hours at the max..
23:10 yoleaux diakopter: I'll pass your message to not_gerd.

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