Camelia, the Perl 6 bug

IRC log for #moarvm, 2013-09-05

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

All times shown according to UTC.

Time Nick Message
00:06 * diakopter 's head swims with contexts, frames, statics, and outers
00:07 diakopter it's kindof of a frankenweb of tangled concepts in current rakudo
00:42 jnap joined #moarvm
01:16 dalek MoarVM/serialize: 356cd00 | diakopter++ | src/ (6 files):
01:16 dalek MoarVM/serialize: finish first cut of serialization port.... harumph.
01:16 dalek MoarVM/serialize: review: https://github.com/MoarVM/MoarVM/commit/356cd0020c
01:17 dalek Heuristic branch merge: pushed 44 commits to MoarVM by diakopter
01:17 diakopter merged branch serialize to master
01:17 diakopter *phew*
01:17 diakopter nativecall's next
01:31 dalek Heuristic branch merge: pushed 152 commits to MoarVM/nativecall by diakopter
01:32 benabik serialize?
01:32 diakopter yeah porting serialization from parrot/jvm
01:32 diakopter mostly from parrot
01:32 diakopter untested... :)
01:32 diakopter that's for jnthn to muddle through once he needs it for bootstrapping
01:33 diakopter but at least 90% of it is there.
01:33 benabik Oh.  We relied on Parrot's serialization before.  OIC
01:33 diakopter no
01:33 benabik No?
01:33 diakopter 6model has its own
01:33 benabik Parrot/NQP, I meant.
01:33 benabik NQP/Parrot(?)
01:34 diakopter yes
01:34 benabik diakopter++
01:34 diakopter parrot backend of nqp I meant
01:34 * benabik should go.
01:34 diakopter https://github.com/perl6/nqp/blob/maste​r/src/vm/parrot/6model/serialization.c
01:34 diakopter to this:
01:35 diakopter https://github.com/MoarVM/MoarVM/blo​b/master/src/6model/serialization.c
01:35 diakopter the diff is cute.
01:37 diakopter jnthn ported all the deserialization (2nd half)
01:37 diakopter bbiab
01:45 JimmyZ Good morning
01:46 JimmyZ 38 files changed, 5910 insertions(+), 8728 deletions(-)
01:48 diakopter heh.
01:52 JimmyZ lib/MAST/Ops.nqp
01:52 JimmyZ 530 additions, 4974 deletions not shown
01:53 diakopter did you look at the file? :)
01:53 diakopter JimmyZ: try nmake selftest  in --optimize
01:53 diakopter should be loads faster
01:53 JimmyZ yes, I saw the irclog
01:55 JimmyZ Could be much faster if gmake -j4 selftest
02:32 dalek MoarVM: 8cd5249 | jimmy++ | src/io/procops.c:
02:32 dalek MoarVM: free cwd
02:32 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/8cd52495fa
02:59 colomon diakopter: you have me all worried about how to handle your trig edge cases.  :)
03:07 colomon My first inclination is that, if you're not checking MVM_OP_div_n for division by zero, there's no point in worrying about it in the trig functions.
03:07 colomon but we clearly need more tests
03:15 colomon what's the relationship between nqp-cc and nqp?
03:17 JimmyZ /usr/local/bin/nqp --target=pir src/QASTRegexCompilerMAST.nqp > QASTRegexCompilerMAST.pir
03:17 JimmyZ moarop bindexcategory return arg index out of range
03:17 JimmyZ diakopter: ^^ after perl6 tool/update_ops.pl
03:21 diakopter ok
03:22 diakopter JimmyZ: fixed
03:24 dalek MoarVM: 314f3f5 | diakopter++ | tools/update_ops.p6:
03:24 dalek MoarVM: oopsie
03:24 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/314f3f5be3
03:29 cognominal__ joined #moarvm
03:29 JimmyZ diakopter++
03:30 cognominal joined #moarvm
03:32 JimmyZ colomon: nqp-cc is a cross-compiler
03:32 diakopter it runs in parrot
03:32 colomon written in nqp (parrot?), targeting MoarVM?
03:32 diakopter yes
03:33 diakopter it shares a couple files with the moarvm source, namely Ops.nqp Nodes.nqp and compiler.c
03:33 diakopter er, and ops.c, ops.h
03:33 diakopter (glance at those files and you'll see why)
03:34 colomon So… I'm thinking we need to add tests for the edge cases to the (general) NQP test suite.  How would they get from there to something that we could test on MoarVM?
03:34 JimmyZ nqp-moar-cc.nqp is the main one
03:34 diakopter just put them in the main nqp test suite
03:34 JimmyZ nqp-c/t/nqp/
03:34 diakopter no
03:34 diakopter in nqp/nqp
03:34 diakopter er
03:34 diakopter perl6/nqp
03:35 diakopter not the moarvm repo
03:35 colomon okay.
03:35 colomon I'll try to look at that tomorrow.  :)
03:35 diakopter keep in mind we can test throw/catch yet on moar
03:35 diakopter *can't
03:35 diakopter ... in nqp source anyway
03:35 JimmyZ I think we can
03:36 diakopter might be able to rig something in the native qast test files
03:36 JimmyZ just can't rethrow
03:36 diakopter oh
03:36 JimmyZ the nqp.moarvm already use CATCH
03:36 diakopter oh
03:37 colomon diakopter++ JimmyZ++
03:38 diakopter colomon: I can't remember exactly what, but I seem to recall realizing there were one or two other edge cases we needed to catch other than division by zero
03:39 colomon diakopter: it's definitely possible.  but I doubt we're doing much edge case catching in the other NQP versions.
03:39 colomon At any rate, I'm planning on exploring the problem space, so to speak.  :)
03:39 diakopter yay :(
03:39 diakopter ergh.
03:39 diakopter yay :)
03:40 diakopter t\nqp\56-role.t ....................... Cannot locate an outer frame for the call at nqp-src\NQP.nqp:251  (nqp.moarvm:☻:137)
03:40 diakopter smiley face frame name is smiley
03:48 diakopter maybe I should finish my MVM_ASSIGN_REF and MVM_ROOT audit
04:49 dalek MoarVM: 341d489 | diakopter++ | / (9 files):
04:49 dalek MoarVM: lots of misc cleanup
04:49 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/341d489244
04:53 dalek MoarVM: 9335b9e | diakopter++ | nqp-cc/src/nodes_parrot.h:
04:53 dalek MoarVM: unbreak nqp-cc build
04:53 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/9335b9e5a2
05:05 JimmyZ ˜»
05:05 JimmyZ
05:17 dalek MoarVM: b4c580b | jimmy++ | / (8 files):
05:17 dalek MoarVM: implemented cwd/shell op
05:17 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/b4c580b83b
05:22 dalek MoarVM: 952b5f0 | jimmy++ | src/io/dirops.c:
05:22 dalek MoarVM: small fixes
05:22 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/952b5f05a7
05:45 JimmyZ diakopter: ping
05:48 diakopter JimmyZ: pong
05:50 JimmyZ diakopter: I think it's better to make Ops.nqp codes to multiline, otherwise every update makes git repo increase 21KB
05:53 diakopter oh...
05:53 diakopter ok
06:00 FROGGS joined #moarvm
06:01 FROGGS nr: printf "%d", Inf
06:01 FROGGS ww
06:02 FROGGS morning
06:08 diakopter o/
06:16 tadzik o/
06:19 FROGGS t/serialization/01-basic.t ..... This representation (SCRef) does not support elems
06:19 FROGGS t/serialization/02-types.t ..... This representation (SCRef) does not support elems
06:19 FROGGS t/serialization/03-closures.t .. getstaticcode requires a static coderef
06:19 FROGGS does it make sense to try to hunt these down now?
06:20 FROGGS diakopter++ # btw :o)
06:20 FROGGS ohh, JimmyZ++ # shell.t is doing something \o/
06:21 diakopter FROGGS: no..
06:21 FROGGS k
06:21 diakopter ignore until jnthn applies his practiced hand
06:21 FROGGS yeah
06:21 diakopter I just tried to get him 90%
06:22 FROGGS because I got stuck with 56-role... I'm thinking about working more at nqp::pack/unpack
06:22 diakopter there's a not small number of nuances remaining
06:22 JimmyZ doing segfault P
06:22 diakopter FROGGS: are those even spec'd?
06:22 FROGGS diakopter: there is no spec for nqp stuff
06:23 FROGGS and I dont think there is a perl6/spec for it
06:23 FROGGS so we'd go the same way like we have done with sprintf
06:23 JimmyZ Not Quite Perl6 Spec is the nqp spec
06:23 * diakopter presumes lizmat will have wisdom in this
06:23 diakopter lizmat: PONG
06:23 FROGGS keep it close to Perl 5, but dont reimplement insanity :o)
06:24 diakopter don't reimplement insanity, reinvent insanity instead
06:24 FROGGS JimmyZ: so it is Not Quite Specced? :P
06:24 FROGGS \o/
06:24 FROGGS yes
06:24 JimmyZ why make it nqp::pack?
06:24 FROGGS well, we'll see
06:24 JimmyZ not sub pack in v5?
06:24 FROGGS JimmyZ: rakudo has/needs it too
06:25 JimmyZ rakudo can't 'use v5'? :P
06:25 FROGGS JimmyZ: only if you have installed the module :o)
06:25 diakopter people use pack/unpack for speed
06:25 FROGGS that is another reason
06:25 diakopter they wouldn't want it to run hundreds of thousands of times slower
06:25 FROGGS but masak offered help and guidance so we can get it cope with Buf right
06:26 JimmyZ pack/unpack in c in MoarVM ?
06:26 FROGGS JimmyZ: not at this point
06:26 FROGGS if we have a proper implementation+tests, then we can think about it (after rakudo has landed on moarvm)
06:26 JimmyZ rakudo has no p6pack? o_O
06:27 FROGGS so, I dont expect something like this to happen within the next twelve months
06:27 FROGGS JimmyZ: it has, but incomplete
06:27 JimmyZ oh
06:35 dalek MoarVM/tinymt2: 6cdd904 | (Gerhard R)++ | 3rdparty/tinymt/ (4 files):
06:35 dalek MoarVM/tinymt2: Import TinyMT64
06:35 dalek MoarVM/tinymt2: review: https://github.com/MoarVM/MoarVM/commit/6cdd9041b0
06:35 dalek MoarVM/tinymt2: 258195e | (Gerhard R)++ | build/ (2 files):
06:35 dalek MoarVM/tinymt2: Build TinyMT
06:35 dalek MoarVM/tinymt2: review: https://github.com/MoarVM/MoarVM/commit/258195ef06
06:35 dalek MoarVM/tinymt2: cfdddb3 | (Gerhard R)++ | / (9 files):
06:35 dalek MoarVM/tinymt2: Wire up random number generator
06:35 dalek MoarVM/tinymt2: review: https://github.com/MoarVM/MoarVM/commit/cfdddb378c
06:35 dalek MoarVM/tinymt2: b346c35 | (Gerhard R)++ | src/core/threadcontext.c:
06:35 dalek MoarVM/tinymt2: Initialize random number generator on thread context creation
06:35 dalek MoarVM/tinymt2: review: https://github.com/MoarVM/MoarVM/commit/b346c35b13
06:37 not_gerd joined #moarvm
06:37 not_gerd o/
06:39 JimmyZ good morning, not_gerd
06:39 FROGGS hi not_gerd
06:39 not_gerd tinymt2 should be ready for merge
06:41 not_gerd computed goto doesn't perform any better than switch-based dispatch since nobanks has landed
06:41 diakopter heh.
06:41 diakopter well
06:41 diakopter which things did you use to benchmark
06:41 diakopter should use the man_or_boy tests
06:42 colomon joined #moarvm
06:43 JimmyZ not_gerd: shouldn't as per http://eli.thegreenplace.net/2012/07/12/co​mputed-goto-for-efficient-dispatch-tables/
06:45 JimmyZ Did you forgot --optimize?
06:47 not_gerd actually, I did just now when rebuilding
06:47 not_gerd but not when I did the test ;)
06:53 woosley joined #moarvm
07:06 not_gerd basic fibinacci runs about 8% faster with cgoto
07:06 not_gerd used to be 20% before nobanks
07:06 not_gerd *fibonacci
07:09 JimmyZ not_gerd: got 11.7% here
07:09 JimmyZ faster
07:09 JimmyZ mingw32 on windows
07:09 JimmyZ on linux should be better?
07:12 diakopter hm, adding a global destruction phase adds a not small number of milliseconds
07:13 * diakopter tries with optimize
07:14 diakopter a little better.  ish.
07:14 not_gerd JimmyZ: I don't think it should look significantly different on linux
07:19 JimmyZ 11.7% , still a good win :P
07:29 JimmyZ not_gerd: test bench/dec_if.t, got 20% win!
07:29 JimmyZ about 20% ~ 22% win
07:32 JimmyZ not_gerd: +1 to merge :P
07:33 JimmyZ s/win/faster/
07:35 odc joined #moarvm
07:40 JimmyZ looks like dalek forgot cgoto2 branch
07:44 dalek MoarVM/cgoto2: d7336fc | jimmy++ | tools/update_ops.p6:
07:44 dalek MoarVM/cgoto2: small fixed to update_ops.p6
07:44 dalek MoarVM/cgoto2: review: https://github.com/MoarVM/MoarVM/commit/d7336fc4f1
07:46 dalek MoarVM: b8e39e2 | jimmy++ | tools/update_ops.p6:
07:46 dalek MoarVM: small fixed to update_ops.p6
07:46 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/b8e39e2eaa
07:54 jnthn dec_if.t is extremely biased towards opcode dispatch performance, but is less good as a measure of what normal user code will depend on.
07:55 jnthn If we're looking below 10% for normal code, it's an easy call fro me to make: supporting cgoto as well as switch ain't worth the complexity for now.
07:55 jnthn *for
07:56 JimmyZ dec_if.t is good for test cgoto vs no-cgoto
07:56 foo_bar_baz joined #moarvm
07:56 jnthn If by "good" you mean "unrepresentative", sure. :)
07:57 JimmyZ jnthn: I don't think it add more complexity
07:57 JimmyZ just added a const table
07:58 JimmyZ and the diferent is 'make CGOTO=1' and 'make'
07:59 not_gerd jnthn: I'm adding support for auto-generating the ops table right now
07:59 not_gerd once that's landed, take a look at interp.c before coming to any decisions ;)
08:01 JimmyZ 10% is still good, consider I compile rakudo core.setting needs 10 minute
08:02 jnthn JimmyZ: Note that I'm not arguing "not ever", simply that my priority is development ease over raw speed for the moment.
08:03 JimmyZ jnthn: what not_gerd++ said :P
08:04 * not_gerd needs to comment out all ops from the oplist we don't actually implement
08:04 jnthn not_gerd: You can't just spot the missing label in interp.c? :)
08:05 not_gerd well, the compiler tells me which ones are missing
08:07 dalek MoarVM: ebab1af | jimmy++ | tools/update_ops.p6:
08:07 dalek MoarVM: added indent to update_ops.p6
08:07 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/ebab1afab0
08:09 not_gerd actually implemented are 487 ops
08:09 not_gerd (minus those that throw 'NYI')
08:11 dalek MoarVM/cgoto2: 2e3057b | jimmy++ | src/io/dirops.c:
08:11 dalek MoarVM/cgoto2: small fixes
08:11 dalek MoarVM/cgoto2: review: https://github.com/MoarVM/MoarVM/commit/2e3057bce7
08:11 dalek MoarVM/cgoto2: 372b247 | jimmy++ | tools/update_ops.p6:
08:11 dalek MoarVM/cgoto2: added indent to update_ops.p6
08:11 dalek MoarVM/cgoto2: review: https://github.com/MoarVM/MoarVM/commit/372b247756
08:18 dalek MoarVM: 66aabfa | jimmy++ | src/io/ (2 files):
08:18 dalek MoarVM: remove POOL(tc)
08:18 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/66aabfa934
08:21 dalek MoarVM/cgoto2: 3ed52f7 | (Gerhard R)++ | src/core/oplist:
08:21 dalek MoarVM/cgoto2: Comment out ops we don't actually implement
08:21 dalek MoarVM/cgoto2: review: https://github.com/MoarVM/MoarVM/commit/3ed52f73af
08:21 dalek MoarVM/cgoto2: cb3ba40 | (Gerhard R)++ | / (2 files):
08:21 dalek MoarVM/cgoto2: Auto-generate list of op labels
08:21 dalek MoarVM/cgoto2: review: https://github.com/MoarVM/MoarVM/commit/cb3ba40d40
08:21 dalek MoarVM/cgoto2: f4ddd6a | (Gerhard R)++ | / (4 files):
08:21 dalek MoarVM/cgoto2: Update op files
08:21 dalek MoarVM/cgoto2: review: https://github.com/MoarVM/MoarVM/commit/f4ddd6aec6
08:21 not_gerd jnthn: https://github.com/MoarVM/MoarV​M/blob/cgoto2/src/core/interp.c
08:28 JimmyZ not_gerd++, it's good.
08:28 harrow joined #moarvm
08:30 JimmyZ not_gerd: I think's it'll be better do #include "oplabels.h" after  MVM_interp_run instead of runloop though
08:33 not_gerd JimmyZ: sure, you can put it $wherever
08:33 not_gerd the RUNLOOP scope is just the one that actually uses the labels
08:35 not_gerd perhaps it should also be runloop instead of RUNLOOP to math return_label
08:35 not_gerd (whatever that one is for ;))
08:36 not_gerd s/math/match/
08:36 diakopter there was something there at one point.
08:40 not_gerd diakopter: do you expect something being there again?
08:40 diakopter no
08:41 donaldh joined #moarvm
08:41 diakopter jnthn: I've added STable freeing and a global destruction phase... working out the kinks now
08:42 diakopter someone had removed the vm_destroy call... so unbitrotting that too
08:42 diakopter also fleshed out tc_destroy and vm_destroy
08:42 diakopter and other things
08:48 JimmyZ diakopter: git push origin nfg:nfg
08:49 diakopter yes, by this week
08:49 JimmyZ :P
08:50 dalek MoarVM/cgoto2: a49d2f4 | (Gerhard R)++ | src/core/interp.c:
08:50 dalek MoarVM/cgoto2: Repaint the interp.c bikeshed
08:50 dalek MoarVM/cgoto2: review: https://github.com/MoarVM/MoarVM/commit/a49d2f48e1
08:53 JimmyZ not_gerd: I think you will break nqp
08:53 diakopter :)
08:53 * diakopter anxiously awaits jnthn's comment
08:54 jnthn diakopter: +1 to stable freeing. On global destruction, what's the motivation?
08:54 jnthn diakopter: Embedding friendliness?
08:55 diakopter well, filehandle closing and all that
08:55 jnthn diakopter: We may not want it to be the default thing; any good OS can be relied on to clean up after us at process exit, no doubt more efficiently than we can.
08:55 jnthn ah...yeah
08:55 JimmyZ not_gerd: shoulde break MVM_vm_run_file, since MVM_interp_run can't return
08:55 jnthn We may want to split up stuff we really should do and stuff we shoudl do if we want to leave no trace...
08:56 JimmyZ not_gerd: nerver mind
08:56 JimmyZ not_gerd: my eyes ...
08:56 diakopter jnthn: that's possible with a flag bit methinks
08:56 diakopter on the stable even
08:57 diakopter I don't think the global destruction will add that much.... I think I was getting an extra 40-50ms from the fact it was segfaulting silently
08:58 diakopter I guess my windows/msvc is hosed because it won't intercept segfaults anymore
08:58 diakopter bah.
08:58 diakopter might need to restart.
09:01 nwc10 jnthn: yes, the Perl 5 approach is to default to destroying objects and suchlike
09:01 nwc10 jnthn: and optionally (and for embedders) freeing absolutely everything
09:02 diakopter in moarvm's case the non-object everythings are miniscule
09:02 nwc10 jnthn: with bugs (of omission). specifically one I'm aware of - dynamicly loaded shared objects. (complicated to fix because of ithreads and fork emulation)
09:06 jnthn diakopter: I guess we just need to be really careful to destroy STables last.
09:06 jnthn diakopter: After every other object.
09:06 jnthn diakopter: 'cus we need to st to locate the gc_free. :)
09:06 jnthn Most things don't have a gc_free though
09:07 diakopter jnthn: right, I added another gc phase, ish
09:08 jnthn for the nursery I was just gonna build a list of stables we want to free.
09:08 jnthn And then traverse that afterwards. Guess you got something like that...
09:08 diakopter right; for gen2 it needs to copy them
09:08 jnthn ?
09:09 jnthn That sounds...wrong.
09:09 diakopter because they get overwritten in the freelist
09:09 jnthn Just keep enough info around to add them into the freelist later, sounds much cleaner.
09:09 jnthn If you copy them, the pointers to them will not be updated?
09:10 diakopter hm, I guess that's the problem with updating the freelist at the same time as traversing gen2
09:11 jnthn Well, keep in mind that st freeing is not a common case.
09:11 jnthn Heck, we could even just not put them in the freelist, but flag them.
09:11 jnthn "Died last time"
09:11 jnthn Then actually put them in the freelist in the next run.
09:11 diakopter yeah.
09:11 jnthn That's actually probably a lot less code than any of the other approaches.
09:11 diakopter sounds good..
09:11 diakopter less++ code++
09:12 jnthn I suspect you'd have to have the craziest of mid-life crises to end up with loads of STs in gen2 dying.
09:13 diakopter jnthn: can I puhleaze mangle all the repr op static function names to prepend with repr name? I have a script to do it.. it would help immensely with debugging
09:13 jnthn The debugger don't show the file they come from?
09:13 diakopter nwc10: ID10T p5 n00b question - how do I get File::Slurp's read_file and write_file to preserve line endings on windows?
09:14 jnthn The REPR table has an ID right at the bottom, fwiw. I tend to use that if I want to know what REPR I have...
09:14 diakopter jnthn: well.. if my VS was working, it would
09:14 jnthn But no big objections to what you want to do, anyway...
09:14 diakopter but I was using Process Explorer *hangs head*
09:14 diakopter sigh, too many yaks
09:14 diakopter (.. and yakking)
09:14 jnthn .oO
09:15 nwc10 diakopter: I don't know. I don't use File::Slurp
09:15 diakopter empty thought bubble?
09:18 diakopter jnthn: I merged serialize branch.... should be a good start for you..
09:18 dalek MoarVM/cgoto2: 74be0cb | (Gerhard R)++ | / (6 files):
09:18 dalek MoarVM/cgoto2: Make some unimplemented ops throw to make nqp-cc happy
09:18 dalek MoarVM/cgoto2: review: https://github.com/MoarVM/MoarVM/commit/74be0cb775
09:18 not_gerd ^ that should have made cgoto2 ready to merge
09:21 not_gerd both cgoto2 and tinymt2 are ready, but there's no pressure to merge right now
09:21 not_gerd if we want to do so, it should just be done before the op review before self-host
09:23 JimmyZ I'm +1 to both for merge
09:27 JimmyZ ;)
09:38 diakopter jnthn: actually that way seems problematic
09:38 diakopter eh.
09:38 diakopter maybe.
09:47 diakopter nwc10: I'll give you [another] medal if you can coherently explain what each asterisk does in MVM_gc_collect_free_gen2_unmarked within 1 hour
09:47 diakopter :D
09:52 diakopter [sorry, it just took me a great number of hours to get them right]
10:20 not_gerd diakopter: validating prepargs..invoke - whitelist arg* ops or blacklist control flow ops?
10:25 * not_gerd thinks whitelist and annotations in oplist
10:40 yoleaux joined #moarvm
11:00 FROGGS joined #moarvm
11:25 JimmyZ jnthn: ping
11:26 jnthn JimmyZ: pong
11:26 jnthn (though teaching, so may vanish at any moment :))
11:26 JimmyZ jnthn: https://github.com/MoarVM/MoarV​M/blob/cgoto2/src/core/interp.c if you could take a quick review
11:26 JimmyZ :P
11:27 jnthn JimmyZ: I saw it, I will take care of it this evening.
11:27 JimmyZ jnthn: greate
11:27 JimmyZ *great
11:27 jnthn (reviewing it, that is)
11:27 JimmyZ ok :)
12:05 JimmyZ Good evening
12:17 FROGGS hi JimmyZ
12:26 JimmyZ Hi FROGGS
12:42 woolfy joined #moarvm
13:11 donaldh joined #moarvm
13:19 jnthn Just had chance to look at interp.c from the cgoto branch. Looks fine to me.
13:20 JimmyZ ;)
13:20 JimmyZ +1 to merge?
13:20 jnthn No harder to add new ops than before, at least.
13:20 jnthn If it builds on MSVC and doesn't cause any regressions.
13:20 JimmyZ jnthn: it builds
13:20 JimmyZ I tested on both
13:21 JimmyZ jnthn: how about tinyMT? create a new repo for it or add to 3rd?
13:24 jnthn wow, it's more lines of comments/license than code in that branch :P
13:24 JimmyZ hehe
13:24 jnthn Is there a libtinymt? It seems unlikely, given how, well, tiny it is :)
13:24 JimmyZ tinymt32 didn't added
13:24 JimmyZ only tinymt64
13:25 jnthn Yeah, it';s really tiny. So I guess it's fine to stay in 3rdparty/
13:26 JimmyZ if you create a tinyMT repo, I'd like to add both tinymt 32 and tiny64
13:26 JimmyZ *tinemt64
13:26 JimmyZ tinyMT64
13:26 jnthn JimmyZ: I'm not sure it's worth adding a repo for so little code. This is more on the order of the sha-1 and base-64 code...
13:26 jnthn One file, essentially.
13:27 JimmyZ so we don't need tinyMT32?
13:27 jnthn Compared to libuv, libtommath, etc where in the future we'd like to probe for and use a system one rather than build it...
13:27 jnthn JimmyZ: I dunno, if we'd left it to be we'd have been calling C's rand and be done with it :P
13:28 jnthn I'm assuming somebody has more knowledge than I on good random number generation and can make a decent call on what we need :)
13:28 JimmyZ heh
13:29 dalek MoarVM: a1398e2 | (Gerhard R)++ | src/core/interp.c:
13:29 dalek MoarVM: Add computed goto dispatch
13:29 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/a1398e2f82
13:29 dalek MoarVM: d7336fc | jimmy++ | tools/update_ops.p6:
13:29 dalek MoarVM: small fixed to update_ops.p6
13:29 dalek joined #moarvm
13:52 dalek MoarVM/tinymt2: 952b5f0 | jimmy++ | src/io/dirops.c:
13:52 dalek MoarVM/tinymt2: small fixes
13:52 dalek MoarVM/tinymt2: review: https://github.com/MoarVM/MoarVM/commit/952b5f05a7
13:52 dalek MoarVM/tinymt2: a1398e2 | (Gerhard R)++ | src/core/interp.c:
13:52 dalek MoarVM/tinymt2: Add computed goto dispatch
13:53 dalek joined #moarvm
14:07 jnap joined #moarvm
14:09 dalek MoarVM: 6cdd904 | (Gerhard R)++ | 3rdparty/tinymt/ (4 files):
14:09 dalek MoarVM: Import TinyMT64
14:09 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/6cdd9041b0
14:09 dalek MoarVM: 258195e | (Gerhard R)++ | build/ (2 files):
14:09 dalek MoarVM: Build TinyMT
14:09 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/258195ef06
14:09 dalek MoarVM: cfdddb3 | (Gerhard R)++ | / (9 files):
14:09 dalek MoarVM: Wire up random number generator
14:09 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/cfdddb378c
14:09 dalek MoarVM: b346c35 | (Gerhard R)++ | src/core/threadcontext.c:
14:09 dalek MoarVM: Initialize random number generator on thread context creation
14:09 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/b346c35b13
14:09 dalek MoarVM: 4df6b38 | jimmy++ | / (10 files):
14:09 dalek MoarVM: Merge branch 'master' into tinymt2
14:25 JimmyZ hmm, make selftest failed only on msvc, don't know what's the problem
14:26 JimmyZ msvc win32 x86
14:35 colomon joined #moarvm
14:54 benabik joined #moarvm
15:04 TimToady python standardized on Mersenne Twistor, fwiw, so it could at least serve as a checklist item
15:04 yoleaux 4 Sep 2013 22:10Z <diakopter> TimToady: are the links on the Perl_6 rc page supposed to link to the p6 section anchors?
15:06 TimToady .tell diakopter iiuc the links point to the pages because the script is just written that way; but also there's a slight philosophical bias to point people at the task so they spend more time looking at all the solutions and not just the Best Language's.  :)
15:06 yoleaux TimToady: I'll pass your message to diakopter.
15:40 TimToady on ubuntu64, 59-nqpop now fails (is this expected?), trying reconfig of cc...
15:52 diakopter .tell not_gerd I agree with you - whitelist
15:52 yoleaux 15:06Z <TimToady> diakopter: iiuc the links point to the pages because the script is just written that way; but also there's a slight philosophical bias to point people at the task so they spend more time looking at all the solutions and not just the Best Language's.  :)
15:52 yoleaux diakopter: I'll pass your message to not_gerd.
16:05 jnthn hm, nqpop segv's here...
16:05 diakopter whazzat
16:06 jnthn https://www.youtube.com/watch?v=G8CeP15EAS8
16:06 jnthn oops
16:06 jnthn t\nqp\59-nqpop.t                    (Wstat: 1280 Tests: 0 Failed: 0) Non-zero exit status: 5
16:06 jnthn Explodes before it even runs any tests.
16:06 * diakopter dutifully clicks the mis-paste
16:06 jnthn uh-oh...
16:06 jnthn :)
16:07 jnthn It's SFW, but maybe not safe for your sanity :)
16:07 diakopter everyone needs a USB cigarette ligher
16:10 jnthn Makes me sad I'm not making it to YAPC::Asia this year...
16:14 JimmyZ jnthn:  make selftest all  failed only on msvc, I don't know what's the problem
16:14 JimmyZ msvc win32 x86
16:14 jnthn JimmyZ: msvc passes here
16:14 jnthn JimmyZ: x64 though
16:15 jnthn JimmyZ: Guess, make clean? And maybe try to bisect...
16:15 JimmyZ jnthn: I tried clean and git clean -xdf
16:16 TimToady git clean doesn't fix it for me
16:16 JimmyZ ah... mingw32 also failed, on x86
16:17 JimmyZ some segfault in compile.c
16:17 JimmyZ Good night
16:17 diakopter oh, blame it on not_gerd ;)
16:17 jnthn I'm unclean and most the only thing I see newly failing is the nqpop test...
16:17 not_gerd joined #moarvm
16:18 not_gerd o/
16:18 yoleaux 15:52Z <diakopter> not_gerd: I agree with you - whitelist
16:18 not_gerd note that you might need to do a `make distclean` as git clean doesn't clean submodules
16:18 not_gerd (or make realclean if you don't want to reconfigure)
16:19 * not_gerd feels totally blameless
16:19 not_gerd it's all the other guys who merge my code without sufficient testing ;)
16:54 cognominal joined #moarvm
17:20 colomon joined #moarvm
18:20 FROGGS joined #moarvm
19:13 dalek joined #moarvm
19:29 FROGGS ../moarvm nqp.moarvm t/nqp/59-nqpop.t
19:29 FROGGS Internal error: invalid thread ID in GC work pass
19:29 diakopter augh
19:29 FROGGS that happens when I comment line 116 till the end in the test file
19:29 diakopter that's an interesting one
19:30 jnthn Well, it's just memory corruption.
19:30 FROGGS if I run it like it is I get a segfault in MVM_string_substring
19:30 FROGGS yeah
19:32 FROGGS I guess getting the GC right everywhere is the hardest part
19:33 jnthn Yeah. Though at least by the time we get it into a user's hands, we'll have used it plenty ourselves to run non-small things...
19:33 diakopter If I hadn't mucked with it, it'd be flawless ;)
19:34 jnthn Probably not :P
19:34 * diakopter giggles at jnthn using allison's definition of "user"
19:35 FROGGS what I dont understand is that in bytecode.c for example, there a a bunch of functions that allocate and there is no MVMROOT and no gen2_set...
19:35 diakopter (/me agrees with allison's definition/usage of 'user', 'shipping', 'usable')
19:35 diakopter (in case anyone was wondering)
19:37 FROGGS but at least I think I understand know *why* exactly we need MVMROOT
19:38 diakopter "inform the gc of a pointer it might need to update if it moves the object it points to"
19:38 FROGGS right, and that a gc run is triggered by a malloc for example
19:39 diakopter well, MVM_gc_allocate, but yeah
19:39 FROGGS so having a malloc in the middle of a function that plays with pointers without things like mvmroot is bad
19:39 diakopter right
19:39 FROGGS diakopter: malloc too, no?
19:39 diakopter no
19:39 FROGGS hmmmm
19:39 diakopter mallocs we don't care about
19:39 FROGGS that might explain it
19:40 diakopter can't manage that memory..
19:40 benabik malloc is non-GC memory
19:40 FROGGS ahh, so it is only about MVM_gc_allocate beause that allocates in from- / tospace?
19:40 diakopter until I write the replacement malloc that's tons and tons faster :)
19:40 FROGGS hehe
19:41 diakopter (jnthn, don't worry, I'll fork moarvm for that one) ;)
19:41 diakopter (kidding, just a branch)
19:41 diakopter (until it's proven)
19:41 FROGGS (kidding, doing it in master)
19:41 FROGGS :P
19:42 benabik Re-writing malloc feels so... unnecessary.  Even if you don't like the system malloc for whatever reason there are lots of existent solutions, like dlmalloc
19:43 diakopter well, there are a couple advantages I've thought of
19:43 diakopter one is that you can make the memory slightly more managed, so it can be moved or even resized
19:44 diakopter (while still retaining the same api)
19:45 diakopter it's just extending the gc to be able to handle "memory that shouldn't be moved", unless I say it's ok
19:45 diakopter er, move the " there
19:46 diakopter another benefit is integrating that with the ability to "pin" other "managed" memory
19:46 diakopter (I mean, if we really want to be able to implement C#... </heresy>)
19:46 benabik Extending the GC to handled pinned memory is probably useful.  Replacing malloc with it?  I dunno.
19:47 benabik You'd have to root every single bit of it.
19:47 diakopter the system malloc is usually far from lockless, and most cases of malloc (small allocations) really don't need to be so threadsafe
19:48 diakopter no, because this sort of memory would be where you say "don't worry, I'll manually root any pointers I put in this memory anyway"
19:48 diakopter (just like we do with existing malloc'd regions)
19:49 benabik Asking the GC to handle memory you don't want to garbage collect seems like wasting its time.
19:49 diakopter but what I'm saying is it wouldn't use the gc's time
19:49 diakopter because nothing additional would be done during a gc run
19:50 diakopter we already have a permgen of sorts
19:50 benabik I thought gen2 was just collected infrequently.
19:50 diakopter that memory doesn't really move (well, if it's allocated in the main thread)... until we start compacting
19:50 diakopter it's collected, but not compacted/moved
19:51 benabik Right.  So s/malloc/gen2alloc/ means that gen2 gets a pile of memory it shouldn't traverse and must always mark as used.
19:51 diakopter not always mark as used; it has an inline linked list
19:52 diakopter .. which I think is a very innovative invention... I haven't read about it anywhere else anyway
19:53 diakopter (jnthn's idea of threading linked list pointers through the object slots themselves)
19:53 benabik So you replace free with "remove from GC list and it will be collected eventually"?
19:53 diakopter free()? no
19:54 diakopter has anyone else ever seen that done?
19:54 diakopter benabik? sorear? not_gerd? is this just a common thing I haven't yet learned?
19:54 diakopter (jnthn too)
19:54 * benabik fails to see the point of adding non-swept, non-marked memory to a mark/sweep collector's pools.
19:55 benabik Using object headers to store GC meta-data is pretty old.
19:55 diakopter no..
19:55 diakopter such as.. you have an array of pointers
19:55 diakopter and you interpret pointer values to other slots in the array as having a special meaning different from normal pointers
19:56 diakopter (this slot is free; here's the pointer to the next free slot)
19:56 diakopter you can make a multiple producer, single consumer threadsafe queue that way
19:57 benabik array of pointers being the GC's list of objects?
19:57 diakopter then if your allocation system only locks pools/slabs/lists of particular slot sizes, it limits contention of the locks dramatically
19:57 diakopter no, the actual memory area
19:58 diakopter I'm doing a poor job explaining several things at once
19:58 diakopter probably should abort until I have it better organized
19:59 diakopter Util: my memory is very very poor.. can you remind me, did we meet at austin?
19:59 diakopter Util: I was reading #parrotsketch logs and saw your name there
20:00 Util diakopter: Yes, we met in Austin.
20:00 diakopter can you remind me who you are? :(
20:01 Util diakopter: Pic here: http://www.yapcna.org/yn2013/user/1813
20:01 * Util is Bruce Gray
20:01 diakopter oh, you helped me when I had that anxiety attack
20:02 diakopter or exhaustion, or whatever it was
20:02 Util diakopter: Either my memory fails me, or I did not register it as anxiety attack
20:03 diakopter I over-exerted my shoulder and was .. extremely exhausted
20:03 diakopter the pain hit me very hard
20:04 Util That starts to ring a bell. How did I help?
20:04 diakopter I was resting in the hallway and someone asked you to make sure I made it to someone's car to get to the dinner
20:05 Util Ah, yes. You are correct. I was glad to help.
20:05 diakopter yes, thank you
20:06 diakopter sorry to keep typing so quickly and changing subjects... just I should mention: someone gave a comment to my talk - that I obviously hadn't slept for weeks and it severely detracted from my presentation
20:07 diakopter in case you're here... I wanted to reply - I hadn't been getting full nights of sleep, but I had been sleeping. Also, I didn't think the talk was that bad, and especially that it didn't come through in how I spoke.
20:08 diakopter anyway.. back to debugging this branch.
20:10 diakopter jnthn: well now this is strange... now it seems to be trying to free an STable in a normal GC run
20:14 diakopter not_gerd: ping
20:20 * jnthn back-ish...
20:23 Util diakopter: I am not listed as being in your talk ( http://www.yapcna.org/yn2013/talk/4734 ), but I was there for all but the first 10 minutes.
20:23 Util I just remember trying to soak up the knowledge; no flaws come to mind.
20:23 Util They just started loading the Monday YAPC talks yesterday, so soon you should be able to check your performance for yourself :)
20:23 Util http://www.youtube.com/user/yapcna/videos
20:23 jnthn bytecode.c almost certainly wants to be running with gen2 allocation
20:23 * Util heads to Atlanta.pm meeting (2 hours away)
20:24 jnthn Didn't we fix that the other day? :)
20:26 diakopter jnthn: well you mentioned it
20:27 jnthn I thoght I read a patch but maybe I dreamed it?
20:27 diakopter not from me
20:28 FROGGS jnthn: https://github.com/MoarVM/MoarVM/commit/​e3ef9d7f8e60a88b8f87782bb8936d67774a86f8
20:29 FROGGS jnthn: but create_code_objects might need that too, right?
20:29 diakopter I recommend making it a counter
20:29 jnthn oh, is that not surrounding the whole thingummy?
20:29 jnthn grr, I should just read the code...
20:30 * jnthn is REALLY looking forward to sleeping in on Saturday
20:30 * FROGGS has not seen a thingummy :o)
20:30 jnthn FROGGS: no, it looks correct I think...
20:31 FROGGS k
20:31 jnthn It covers the whole bytecode laoding process I think
20:31 diakopter jnthn: oh lolz. I forgot to check the 'dead' value.
20:31 jnthn Please try to avoid creating undead... :P
20:33 not_gerd joined #moarvm
20:33 not_gerd diakopter: pong
20:35 dalek MoarVM: 44425e9 | diakopter++ | src/6model/reprs/MVMLFA.c:
20:35 dalek MoarVM: shoulda deleted long ago..
20:35 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/44425e97f9
20:35 dalek MoarVM: 90b3b0d | diakopter++ | src/ (9 files):
20:35 dalek MoarVM: stable freeing and global destruction
20:35 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/90b3b0d440
20:35 dalek MoarVM: 98fcc94 | diakopter++ | src/gc/ (2 files):
20:35 dalek MoarVM: gen2 needs a bit different
20:35 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/98fcc94efd
20:35 dalek MoarVM: 8d4a756 | diakopter++ | src/gc/collect.c:
20:35 dalek MoarVM: bugfix.
20:35 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/8d4a756dc4
20:35 diakopter oops, didn't mean to push necessarily
20:40 diakopter jnthn: you saw my note about the serialize branch?
20:41 jnthn diakopter: That it's 90%ish there and needs my TLC?
20:42 diakopter yeah.. your touch was always going to be necessary anyway.. you're much better at debugging from this stage than I am
20:44 jnthn *nod*
20:53 foo_bar_baz joined #moarvm
20:57 diakopter jnthn: oo you did a double free
20:57 jnthn FREEEDOOOOM
20:57 jnthn oops :)
20:58 FROGGS free early - free often
20:58 jnthn Where, ooc? :)
21:00 diakopter well.
21:02 diakopter erm, maybe not
21:02 diakopter thought it fixed it
21:03 dalek MoarVM: 98b2f4e | diakopter++ | src/6model/reprs/P6opaque.c:
21:03 dalek MoarVM: li'l better, ish.
21:03 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/98b2f4e1db
21:05 * not_gerd is working on 'improving' validation.c
21:05 diakopter well lit's definitely *some* free() in a repr.
21:06 diakopter *it's
21:06 diakopter not_gerd: thanks :P
21:06 not_gerd I haven't quite convinced myself that the end result will actually be better
21:06 not_gerd I'm trying to get annotations such as https://gist.github.com/gerdr/8df9c69e83dc3a83b886 to work
21:07 cognominal joined #moarvm
21:13 diakopter not_gerd: what do those mean
21:14 not_gerd we annotate ops with single-char labels - eg .r is just a plain annotation
21:14 not_gerd :j means any .j following it are special
21:14 not_gerd +a and -a delimit a block that may only contain *a
21:15 jnthn Will this end up much more complex than just hardcoding the rules? ;)
21:15 * jnthn sometimes pretends to be an ordinary person who doesn't like abstraction... :)
21:15 not_gerd jnthn: right now, it is because I started from the existing factoring
21:16 not_gerd control flow turned... 'interesting'
21:16 jnthn :)
21:16 not_gerd I believe I know how to make it right, though
21:16 jnthn git diff
21:16 jnthn bother...
21:34 donaldh joined #moarvm
21:57 not_gerd good night
21:59 diakopter NFA!
22:00 jnthn It...has a bug?
22:00 jnthn :)
22:02 diakopter yeah, oh.
22:03 jnthn Not F**king Awesome /o
22:03 jnthn \
22:04 jnthn oh, that reminds me, I'm teaching regexes in the morning and should maybe rest... :)
22:04 diakopter o/
22:06 diakopter we haz global destruction
22:14 diakopter vs really doesn't like it when you pass a non-pointer to free()
22:15 dalek MoarVM: 0c8cf07 | diakopter++ | src/ (8 files):
22:15 dalek MoarVM: various memory cleanup cleanups
22:15 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/0c8cf07db8
22:27 dalek MoarVM: d39e357 | diakopter++ | src/gc/ (3 files):
22:27 dalek MoarVM: free STables in the global destruction...
22:27 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/d39e3574f0
22:29 benabik joined #moarvm
22:53 jnap joined #moarvm
23:01 tadzik joined #moarvm
23:31 dalek MoarVM: 0fa95ec | diakopter++ | / (3 files):
23:31 dalek MoarVM: fix MVMDEBUG dump output capability for nqp-cc make test...
23:31 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/0fa95ec7e6
23:33 diakopter .tell jnthn adding global destruction didn't measurably change the duration of selftest
23:33 yoleaux diakopter: I'll pass your message to jnthn.
23:34 diakopter .tell not_gerd --optimize doesn't recompile the 3rdparty stuf... should it?
23:34 yoleaux diakopter: I'll pass your message to not_gerd.
23:39 diakopter masak: heh, 88 garbage collections in 240ms
23:39 diakopter (unoptimized)
23:40 diakopter 5-thread, even
23:52 diakopter heh, the gc debug log generated a 10-million line debug out file. for 152 gc runs.
23:57 diakopter 800MB.
23:58 masak :)
23:58 * masak sleeps

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