Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2015-07-09

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

All times shown according to UTC.

Time Nick Message
00:02 vendethiel joined #moarvm
01:23 vendethiel joined #moarvm
01:34 colomon joined #moarvm
01:35 Peter_R joined #moarvm
02:00 vendethiel joined #moarvm
02:19 colomon joined #moarvm
02:24 vendethiel joined #moarvm
02:51 TEttinger joined #moarvm
03:06 colomon joined #moarvm
03:10 vendethiel joined #moarvm
03:19 TimToady joined #moarvm
03:42 vendethiel joined #moarvm
04:37 vendethiel joined #moarvm
05:07 dalek MoarVM/free-exception-strings: ac517ce | hoelzro++ | src/ (22 files):
05:07 dalek MoarVM/free-exception-strings: Free strings used for exception formats
05:07 dalek MoarVM/free-exception-strings: review: https://github.com/MoarVM/MoarVM/commit/ac517cec95
05:27 vendethiel joined #moarvm
05:51 vendethiel joined #moarvm
06:00 brrt joined #moarvm
06:26 FROGGS joined #moarvm
06:33 vendethiel joined #moarvm
06:38 btyler joined #moarvm
06:43 brrt joined #moarvm
07:22 vendethiel joined #moarvm
08:36 vendethiel joined #moarvm
08:49 sivoais joined #moarvm
09:06 vendethiel joined #moarvm
10:49 TimToady joined #moarvm
11:19 rurban joined #moarvm
12:25 brrt joined #moarvm
12:26 brrt \o
12:26 JimmyZ o/
12:29 brrt i've learned another lessons today
12:29 brrt the builder pattern is bogus
12:30 brrt the builder pattern presumes (among other things) that you want a immutable 'value' thingy which you need some other mutating thingy to construct
12:31 brrt i guess that makes sense for an URI, but it does not for a graph
12:31 brrt why want a graph that you can't mutate? it's madness
12:31 jnthn I don't think the pattern mandates the resulting object has to be immutable...
12:31 jnthn It's a good fit when it is, but mostly I see it was providing a nice interface to complex construction
12:33 brrt good point
12:33 brrt still
12:33 brrt i want to mutate my graphs, it turns out
12:33 brrt :-)
12:36 brrt oh, and i'm rather controversially (i think) going to add a dynamic array implementation
12:36 brrt based on macros
12:36 brrt i have only one question
12:36 brrt prefer foo_num or num_foo
12:38 jnthn concrete examples?
12:41 hoelzro moarning #moarvm
12:41 brrt ehm, in spesh/graph.h, i think we have... lemmesee
12:41 brrt moarning hoelzro
12:41 brrt spesh_slots, num_spesh_slots, alloc_spesh_slots
12:42 timotimo we have "num used" and "num allocd" struct members all over the place; maybe adapt the names from there?
12:42 timotimo yeah, sounds good
12:42 brrt i have no intention of changing those just now, just want to see how this works for new code :-)
12:42 timotimo did you know we have/had a pullrequest in the past that built a common struct and functions for auto-growing arrays?
12:42 timotimo at least i think i saw something like that
12:42 timotimo i forgot who sent it in, though, and why it wasn't taken in
12:43 brrt did you know it was one of the first things i've said when i started working on moarvm? :-)
12:43 timotimo hehe
12:43 timotimo OK :)
12:43 timotimo BBIAB
12:43 brrt but, macro's are preferable, actually
12:45 brrt hmmm
12:45 brrt in this case, foo_num is preferable
12:45 brrt that works correctly with structs
12:47 brrt because the macro makes foo->bar ## _num into foo->bar_num, and it'd otherwise be num_foo->bar
12:54 hoelzro so I found a lot of instances of MVM_exception_throw_adhoc that use strings from MVMStrings, and I fixed them to use MVM_exception_throw_adhoc_free
12:55 jnthn hoelzro++
12:55 hoelzro would anyone mind looking over the changes to see if I missed anything? https://github.com/MoarVM/MoarVM/pull/231
13:02 brrt the first few files look quite reasonable to me :-)
13:02 brrt oh, in 6model.c you have an // XXX , any particular reason?
13:05 timotimo i think // comments are discouraged in our codebase
13:05 * hoelzro looks
13:05 timotimo and the travis ci error is about clang taking more than 10 minutes for interp.c
13:06 timotimo which ... yeah, clang is slow i guess?
13:06 brrt o.O
13:06 brrt i thought they had that fixed, but it's probably just ELOCALMACHINEISFAST
13:06 timotimo hehe
13:08 timotimo what are those //~ things in nativecall_libffi.c, i wonder
13:08 hoelzro the // XXX is one of the spots I missed
13:10 dalek MoarVM/free-exception-strings: fb89cfe | hoelzro++ | src/ (22 files):
13:10 dalek MoarVM/free-exception-strings: Free strings used for exception formats
13:10 dalek MoarVM/free-exception-strings: review: https://github.com/MoarVM/MoarVM/commit/fb89cfeea2
13:10 timotimo there seems to be at least two // XXX
13:10 hoelzro I just see one
13:10 hoelzro well, saw
13:10 hoelzro ;)
13:10 timotimo only one left in loadbytecode.c
13:10 timotimo except, you probably fixed it now? :)
13:12 hoelzro oh, that one
13:12 hoelzro well, that is something outside my knowledge level
13:12 hoelzro because I don't know to catch a MVM exception and rethrow it after cleanup
13:13 timotimo i think if MVM_cu_map_from_file throws an exception, that longjmps out of the code
13:13 timotimo back into the interpreter
13:13 timotimo I personally would probably go with a flag for cu_map_from_file that says if the string should be freed or not
13:14 timotimo actually, looking at the MVM_exception_throw_adhoc_free implementation to see how it handles the dance around the exception throw may be enlightening
13:14 timotimo (enlightening for me, too)
13:16 timotimo ah, i se
13:16 timotimo see*
13:18 hoelzro "Clear any C stack temporaries that code may have pushed before throwing"
13:18 hoelzro that sounds kind of like mortals in the perl 5 interpreter
13:19 timotimo well, when push comes to throw it's the only thing we can do
13:20 hoelzro is there no way for a C function to clean up if a MoarVM exception is being thrown?
13:20 jnthn C stack temporaries are about GC rooting fwiw
13:20 hoelzro ahhhh
13:20 jnthn It's that the MVMROOT thingy pushes too
13:29 vendethiel joined #moarvm
13:38 brrt hmm
13:41 brrt curious
13:58 vendethiel joined #moarvm
13:58 zakharyas joined #moarvm
14:03 FROGGS joined #moarvm
14:20 brrt aaarggh
14:20 brrt ok, interesting lesson
14:22 brrt if you try and read an operand too many, you'll have an interesting experience
14:25 jnthn ;)
14:33 brrt hmm
14:33 brrt ok, a bit of an issue here
14:34 brrt inc_i says about itself that it has a write operand
14:34 brrt for ... what i assumed to be reasonable reasons, i don't pre-load write operands
14:34 jnthn It's kinda a rw one
14:34 brrt this means that inc_i will try to link to something that isn't there
14:34 jnthn We special case this in a few places...
14:34 brrt yes, my question it
14:35 brrt would it hurt dearly if i added a rw operand rw type
14:35 brrt *is
14:35 brrt btw, sorry to hear about your allergies and medicin problems
14:36 jnthn I don't think it'd hurt at all, just be careful with places doing existing checks
14:36 brrt aye
14:36 jnthn It's mostly that the pain threshold for the special casing wasn't reached.
14:37 brrt that will be another commit, though
14:37 brrt hmm
14:37 colomon joined #moarvm
14:37 brrt i can do special casing too, of course
14:37 brrt i'll just disable inc_i and dec_i for now
14:45 dalek MoarVM/even-moar-jit: 664bb08 | brrt++ | / (7 files):
14:45 dalek MoarVM/even-moar-jit: Use dynamic arrays for the expression tree
14:45 dalek MoarVM/even-moar-jit:
14:45 dalek MoarVM/even-moar-jit: For creating an expression tree, I had used a builder. This
14:45 dalek MoarVM/even-moar-jit: left the expression tree itself pretty much immutable. That is
14:45 dalek MoarVM/even-moar-jit: unsuitable for e.g. constant folding and other optimizations.
14:45 dalek MoarVM/even-moar-jit:
14:45 dalek MoarVM/even-moar-jit: Also disable inc_i and dec_i, because these were not handled
14:45 dalek MoarVM/even-moar-jit: correctly by the template preprocessor because their operands
14:45 dalek MoarVM/even-moar-jit: are rw rather than r.
14:45 dalek MoarVM/even-moar-jit: review: https://github.com/MoarVM/MoarVM/commit/664bb088da
14:45 * brrt actually rather dislikes refactoring
14:46 jnthn Some languages make it more pleasant than others, but code design plays a big part in how easy it is too.
14:46 brrt one refactors usually to make the code more $verb-able, right?
14:46 jnthn Sometimes :)
14:46 jnthn Sometimes it's just to enable another thing you want to do to be more easily possible
14:46 brrt hmm
14:47 brrt i'd call that 'a refactor because i was wrong'
14:47 brrt which is also ok :-)
14:47 brrt anyway, the reason i'm doing all this is really not so much to deal with the expression tree but with the full jit graph
14:48 brrt as in, i need the jit graph to be able to make labels, rather than the jit graph builder
14:49 brrt because the jit graph builder is an internal structure which is nobody else's business, and the jit graph itself needs to be used in expression tree building to get labels
14:50 brrt hence, my initial design of building the jit graph was wrong
15:33 vendethiel joined #moarvm
15:33 hoelzro is that PR I made ok to go, sans the comment before MVM_cu_map_from_file?
15:49 zakharyas joined #moarvm
15:55 FROGGS joined #moarvm
15:59 vendethiel joined #moarvm
16:08 brrt joined #moarvm
16:09 brrt hoelzro: as far as i can tell, yes
16:16 synbot6 joined #moarvm
16:34 vendethiel joined #moarvm
16:55 brrt joined #moarvm
17:18 vendethiel joined #moarvm
17:45 vendethiel joined #moarvm
17:52 rurban joined #moarvm
18:03 dalek MoarVM/even-moar-jit: bf46581 | brrt++ | src/jit/ (3 files):
18:03 dalek MoarVM/even-moar-jit: Make the Jit Graph use dynamic arrays
18:03 dalek MoarVM/even-moar-jit:
18:03 dalek MoarVM/even-moar-jit: This is a large, but not very exciting change; it implies that the
18:03 dalek MoarVM/even-moar-jit: jit graph is now malleable for places that don't have (or are not
18:03 dalek MoarVM/even-moar-jit: interested in) the jit graph builder; specifically the jit graph
18:03 dalek MoarVM/even-moar-jit: can now add and find labels for itself, which I need for the
18:03 dalek MoarVM/even-moar-jit: expression compiler.
18:03 dalek MoarVM/even-moar-jit:
18:03 dalek MoarVM/even-moar-jit: It also leaks tiny amounts of memory, which will be fixed in due
18:03 dalek MoarVM/even-moar-jit: course.
18:03 dalek MoarVM/even-moar-jit: review: https://github.com/MoarVM/MoarVM/commit/bf4658175d
18:03 brrt that change was longer overdue than it should've been
18:25 brrt note to self
18:26 brrt running spectests twice drains your battery rather fast
18:27 [Coke] r: :10(':16<bad.decaf>')
18:27 camelia rakudo-jvm 3bdd0a: OUTPUT«Unhandled exception: Cannot convert string to number: base-10 number must begin with valid digits or '.' in ':10<⏏:16<bad.decaf>>' (indicated by ⏏)␤  in throw (gen/jvm/CORE.setting:15084)␤  in throw (gen/jvm/CORE.setting:17083)␤  in sink (gen/jvm/…»
18:27 camelia ..rakudo-moar 3bdd0a: OUTPUT«Unhandled exception: Cannot convert string to number: base-10 number must begin with valid digits or '.' in ':10<⏏:16<bad.decaf>>' (indicated by ⏏)␤   at <unknown>:1  (/home/camelia/rakudo-inst-2/share/perl6/runtime/CORE.setting.moarvm:throw:42949672…»
18:27 [Coke] ww
18:34 Ven joined #moarvm
18:40 hoelzro during my code dive last night, I noticed a lot of adhoc exceptions used for things like failure to open a file; is there any interest in having more granular exceptions that Rakudo can make sense of?
18:40 brrt jnthn; we consistently increase the usages for the rw ops based on reg.i - 1 ; whereas we use reg.i for the reading-operands
18:41 brrt i think the solution to that would be to catch it in rakudo and rethrow a context-based exception?
18:43 brrt ok, i see why the inc_i style ops have been special-cased
18:48 brrt it's not worth it to generic-case them ^^
18:51 dalek MoarVM/even-moar-jit: fc47c38 | brrt++ | src/jit/expr (2 files):
18:51 dalek MoarVM/even-moar-jit: Special-case inc_i and friends
18:51 dalek MoarVM/even-moar-jit:
18:51 dalek MoarVM/even-moar-jit: These instructions have read-write operands rather than read
18:51 dalek MoarVM/even-moar-jit: operands. Because adding a 'read-write' operand type is rather
18:51 dalek MoarVM/even-moar-jit: involved due to the changes in spesh required, and because
18:51 dalek MoarVM/even-moar-jit: there are only four such opcodes, I've decided to special-case
18:51 dalek MoarVM/even-moar-jit: them here rather than generic-case them throughout the codebase.
18:51 dalek MoarVM/even-moar-jit: review: https://github.com/MoarVM/MoarVM/commit/fc47c380c6
18:53 brrt with that ends tonights entertainment, because i'm going to acquire tea
18:57 pyrimidine joined #moarvm
20:30 zakharyas joined #moarvm
21:27 TEttinger joined #moarvm
21:36 pyrimidine joined #moarvm
22:28 dalek MoarVM: eb0c964 | hoelzro++ | src/ (22 files):
22:28 dalek MoarVM: Free strings used for exception formats
22:28 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/eb0c964c1f

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