github.com/moarvm/moarvm | IRC logs at irclog.perlgeek.de/moarvm/today
Set by moderator on 8 September 2013.
00:39 jnap joined 01:50 colomon joined 02:13 cognominal joined 03:14 Mouq joined 04:22 flussence joined 04:49 foo_bar_baz joined 05:54 johnny5_ joined 06:03 lizmat joined 06:07 FROGGS joined
JimmyZ jnthn: Is there any reason that repr function always needs 'STABLE(obj), obj, OBJECT_BODY(obj)' args? how about reduce to only 'obj'? 08:22
.tell jnthn Is there any reason that repr function always needs 'STABLE(obj), obj, OBJECT_BODY(obj)' args? how about reduce to only 'obj'?
yoleaux JimmyZ: I'll pass your message to jnthn.
jnthn Yes, there's a reason! Why'd I pass 3 things if I could get away with 1? :P 08:23
yoleaux 08:22Z <JimmyZ> jnthn: Is there any reason that repr function always needs 'STABLE(obj), obj, OBJECT_BODY(obj)' args? how about reduce to only 'obj'?
jnthn It's 'cus REPRs can support being inlined into others.
And that means you need at least the first and third 08:24
08:24 woolfy joined
jnthn the second (obj itself) we pass on MoarVM also as you tend to need it for GC rooting in various places. 08:24
There's a bunch of stuff in reprconv.c which is what you probably want to be using in most places, which hides these details 08:25
JimmyZ jnthn: Is it safe to make all 'static this_repr' alloc at comipling time instead of by using malloc()? 08:26
jnthn JimmyZ: Only after we make ->name not be an MVMString. 08:27
I think I saw a not_gerd++ patch flash by that did that...
JimmyZ jnthn: Is MVMContainerSpec->name actually useful? 08:28
08:29 not_gerd joined
not_gerd o/ 08:29
diakopter o/
not_gerd jnthn: not a patch, just an issue so we won't forget about it
JimmyZ I didn't see it be used anyplace
jnthn not_gerd: ah, ok
not_gerd and I'm using it for the C types stuff I'm doing
(which will of course break if you have more than 1 instance)
JimmyZ Is immutable staic this_repr a problem for mutil instance? 08:31
not_gerd JimmyZ: once we've gotten rid of the MVMString, it should be fine 08:33
also note that the code is actully broken in master
we use the static variable this_repr in type_object_for()
creating a 2nd instance will overwrite that static variable and subsequent calls will see the repr with the wrong name 08:35
JimmyZ Ok, I ask about 'Is MVMContainerSpec->name actually useful?' because it's a MVMString too. and if it is not actually used, I'd like to remove it
or s/useful/used/ 08:36
not_gerd: If you I got a patch to make ->name not be an MVMString, I will the left LHF :P 08:41
s/you I/you/
s/will/will do/
jnthn not_gerd: Yes, I added it to fix a bug in your original port of the code. See 354226e6.
um, JimmyZ ^^
So no, don't remove it, I don't want to have to spend another hour re-finding that segfault. :) 08:42
JimmyZ jnthn: not this one, I meant code_pair_spec->name = MVM_string_ascii_decode_nt(tc, tc->instance->VMString, "code_pair");
I greped the rakudo and nqp, lookis it not used. 08:43
jnthn JimmyZ: I thought it was needed sa part of serializing a container spec...
not_gerd JimmyZ: I think you could make the reprs static variables right now
the result will be as broken as master
JimmyZ not_gerd: in master? 08:44
not_gerd JimmyZ: creating multiple instances should already pick up the wrong name
diakopter jnthn: serializing containerspec? :) didn't see that...
JimmyZ I didn't see it too
since there is already a key named code_pair 08:45
and this one look like not be used
08:46 woolfy left
dalek arVM/ctypes: 15132d2 | (Gerhard R)++ | src/native/VMBlob.c:
Make gc_mark() of VMBlob a bit smarter
08:48
arVM/ctypes: 0eaaf2c | (Gerhard R)++ | src/native/ (2 files):
Dispatch CScalar containers via vtable instead of switch
08:52 foo_bar_baz joined
JimmyZ jnthn: nvm, I see it 09:01
jnthn JimmyZ: Sorry, not ignoring you, just packing for Frankfurt... 09:05
JimmyZ: I've a gut feeling it's needed but don't have time to dig at the moment...
dalek arVM/static-repr: 9b4c495 | (Gerhard R)++ | src/6model/reprs. (2 files):
Provide static versions of default REPR sub-vtables
09:37
arVM: 934aa2e | jimmy++ | src/6model/ (3 files):
added Container spec deserialization
09:38
JimmyZ not_gerd: ^^ makes MVMContainerSpec static 09:40
not_gerd JimmyZ: nice 09:52
JimmyZ not_gerd++ for the idea :P 09:53
JimmyZ decommutes 10:00
dalek arVM: 8b5455a | (Gerhard R)++ | src/strings/ascii. (2 files):
Add missing const to MVM_string_ascii_decode*()
10:08
arVM/static-repr: 0439d5e | (Gerhard R)++ | src/strings/ascii. (2 files):
Add missing const to MVM_string_ascii_decode*()
10:51
arVM/static-repr: 522eaae | (Gerhard R)++ | src/ (6 files):
Hack-in char* REPR names

There appear to be no new failures in selftest
not_gerd JimmyZ: ^^
should get you started 10:52
11:23 woolfy joined 11:41 lizmat joined 11:47 BabsSeed joined 12:02 cognominal joined 12:05 cognominal__ joined 12:18 woolfy left
JimmyZ not_gerd: ok :) 12:30
12:33 FROGGS[mobile] joined
JimmyZ not_gerd: why do we need MVMString *repr_names[MVM_REPR_CORE_COUNT]? 12:38
not_gerd JimmyZ: we need to put the MVMString* corresponding to the char* somewhere 12:41
and register that address so they won't be collected
JimmyZ not_gerd: so repr_names is only used in serialization and reprname op? 12:42
not_gerd they are also the keys of the repr_name_to_id_hash 12:43
which we apparently do not use for anything(?) 12:45
JimmyZ I can't follow you ...
for (?) part 12:46
dalek arVM: 04e354a | jimmy++ | src/6model/serialization.c:
version cleans up in serialization.c
12:47
not_gerd JimmyZ: we add repr names to a hash so we can look up their IDs
but I don't see where we actually do that
JimmyZ I didn't too. 12:48
if repr_names is only used in serialization and reprname op, I'd like to remove it too :P
not_gerd it needs to be generalized to support registering reprs at runtime 12:51
for the core reprs, it should indeed not be necessary
JimmyZ not_gerd: it's by repr_name_to_id_hash, not repr_names 12:55
not_gerd JimmyZ: does the hash keep its keys alive on its own?
see github.com/MoarVM/MoarVM/compare/m...epr#L1L196 12:56
12:57 jnap joined
JimmyZ not_gerd: I can't understand the evil hack :( 13:02
not_gerd JimmyZ: we need to put a pointer to the repr name somewhere so we can register it as a permanent gc root 13:06
if it'S a core repr, that's instance->repr_names
if it's not, I'm just allocating a place to stash them that gets leaked ;) 13:07
note that right now, I don't think we have any non-core reprs
so instead, you could just make it throw
if (ID >= MVM_REPR_CORE_COUNT) MVM_exception_throw(...); 13:09
MVM_gc_root_add_permanent(tc, (MVMCollectable **)(tc->instance->repr_names + ID));
JimmyZ not_gerd: I think adding MVMString *name to MVMREPRHashEntry is ok, just like MVMContainerRegistry 13:13
so I'd rename MVMREPRHashEntry to MVMReprRegistry :P 13:14
not_gerd sounds sensible
not sure about the name, but putting the MVMString* there ;) 13:15
diakopter yikes 13:17
need a & in that gc_root_add line
er 13:18
nm
JimmyZ: "if repr_names is only used in serialization and reprname op, I'd like to remove it too :P" why???
JimmyZ diakopter: Thare are already a lot of place to save name 13:24
13:28 crab2313 joined
diakopter there needed to be a lookup by name hash 13:28
JimmyZ diakopter: there are 13:30
diakopter there are what 13:31
JimmyZ HashEntry
a lookup by name hash
diakopter I don't know what you're saying
I said "I added X because we needed it" and you replied "X exists" 13:32
13:34 jnap joined
dalek arVM/static-repr: 6a46815 | jimmy++ | src/ (17 files):
some name renaming
13:57
arVM/static-repr: f457efa | jimmy++ | src/6model/reprs/HashAttrStore.c:
make HashAttrStore this_repr static
not_gerd JimmyZ: you shouldn't initialize attr_funcs, pos_funcs, ... to NULL 14:02
use MVM_REPR_DEFAULT_ATTR_FUNCS, ... instead
(that'S what I added them for) 14:03
14:03 benabik joined
JimmyZ not_gerd: OK 14:07
dalek arVM/static-repr: 4475e4c | jimmy++ | src/6model/reprs/ (4 files):
make some reprs this_repr static
14:08
14:12 cognominal joined 14:18 FROGGS joined
dalek arVM/static-repr: 0d66ad6 | jimmy++ | src/6model/reprs/MVM (4 files):
make some reprs this_repr static
14:23
arVM/static-repr: 03518ea | jimmy++ | src/6model/reprs/MVM (6 files):
make some reprs this_repr static
14:38
JimmyZ good night 14:46
14:52 FROGGS[mobile] joined 15:19 FROGGS[mobile] joined 16:05 benabik joined 16:20 BabsSeed joined 17:52 FROGGS[mobile] joined 18:02 lee_ joined
nwc10 This thing is logged? I don't care. 18:37
OMFG. HP-UX is still not 100% ANSI C89 conformant. 18:38
fflush(NULL) affects stdin. If it's a pipe. WRONG.
maybe next year. For the 25th anniversary. 18:39
19:28 FROGGS[mobile]2 joined 19:51 foo_bar_baz joined 20:53 woolfy joined 20:56 not_gerd joined
jnthn JimmyZ: Stop asking to remove stuff. We're still in the middle of putting things together, ffs. 20:56
yoleaux 12:41Z <nwc10> jnthn: act.useperl.at/apw2013/main # Registration open
jnthn .tell nwc10 Well, I registered at least... 20:58
yoleaux jnthn: I'll pass your message to nwc10.
21:07 FROGGS joined 21:14 lizmat joined
dalek arVM/static-repr: eb6f67f | jimmy++ | src/6model/reprs/HashAttrStore.c:
make HashAttrStore this_repr static
21:31
MoarVM/static-repr: c77b513 | jimmy++ | src/6model/reprs/ (4 files):
MoarVM/static-repr: make some reprs this_repr static
21:32 dalek joined, woolfy left 22:24 japhb joined 22:57 larks joined