<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jan 28, 2014 at 1:08 PM, Colin Putney <span dir="ltr"><<a href="mailto:colin@wiresong.com" target="_blank">colin@wiresong.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im">On Tue, Jan 28, 2014 at 3:54 PM, Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>> wrote:<br>
<br>
> <a href="https://plus.google.com/+KentonVarda/posts/GRJ4h4w2UN9" target="_blank">https://plus.google.com/+KentonVarda/posts/GRJ4h4w2UN9</a>? Or am I being<br>
> cynical?<br>
<br>
</div>Yeah, I think that's what he was talking about. It's hard to see how<br>
dynamic languages could use Cap'n Proto, because they don't tend to<br>
give enough low-level control over memory layout in the heap.<br></blockquote><div><br></div><div>Wouldn't pinning be enough? No, because one needs to intermix binary data and objects. But if one added a ref type, or some object handle type, so there's just one level of indirection from a handle in the protobuf and an object, that might get far enough no?</div>
<div><br></div><div>The alternative would be to add struct support to Spur which might be doable. But it's a lot of work for a rather specific application. Anyway, I'm open to others experimenting on this.</div>
<div><br></div><div>Reminds me of work Tony Mann at Harlequin did or described to me, which again is reminiscent of Digitalk's object layout. The idea is to have the class reference in an object (even if this is an index into a table) not point directly to the class object, but to refer to some intermediate, possibly hidden, structure.</div>
<div><br></div><div>In The Harlequin case this structure included code that would be run by the GC to traverse the object, which is how the system supports heterogenous structures, and saves on a size field (except for variable-sized objects).</div>
</div><div class="gmail_extra"><br></div>In the Digitalk case the structure is a method dictionary, which allows the system to support easily instance-specific behaviours. (Forgive the digression).<br>-- <br>best,<div>Eliot</div>
</div></div>