Tomas Restrepo:
> >
> > We try to be smart about storing it on the object for types that we
> generate, but if it's a .NET object sometimes we have to go through a
> dictionary lookup to find the instance data for a given object.
>
> Is the object itself the key for that dictionary? (If yes, I'm
Hi John,
>
> InstanceData is the per-instance data for Ruby object. For example, instance
> variables (@abc), frozen/tainted flags, etc.
Thanks, good to know. That was my impression from looking at the code,
but wanted to make sure.
>
> We try to be smart about storing it on the object for typ
Tomas Restrepo:
> > > - What's the relationship between what goes around a RubyClass for
> > a > given type (in the case of .net objects) and the whole
> > InstanceData > business?
> >
> > Not sure about this question ... can you clarify?
>
> I was referring to RubyExecutionContext.GetInstance
Hi John,
> So the first time through, the site will examine the method parameters,
> perform the dynamic lookup, and cache the result of that dynamic lookup in
> the site (in addition to invoking the target).
Thanks, that was exactly the answer I was hoping for :)
> Singleton classes in Ruby
Tomas Restrepo:
> The first one is related to RubySites. On the presentation, John shows
> how the shared DynamicSites in RubySites are used, for example, to ask
> if a given object/class supports a method and invoke it if it it does.
> The example in the presentation was to_int() for converting a
Hi Joe,
> Shared DynamicSites don't get initialized for each specific class/object
> and method combination.
I know; that's why I mentioned "initialized" was probably the wrong
term to use. What I meant was that at some point in time, there would
be a rule created for a given class/method combin
Shared DynamicSites don't get initialized for each specific class/object
and method combination. A shared DynamicSite applies to all invocations
of a method like to_int. The DLR validates the context in which the
invocation occurred and then invokes the dynamic site's target (a
delegate) for
If
> so, does calling DynamicSite.RespondTo() potentially setup the site
> for a given target as well?
*Sigh*; I'm an idiot; that happens for not looking again to see I was
really referring to RubySites.RespondTo() which uses yet another
shared dynamic site. The overall question still stands, th
Hi Joe,
> Check out Martin Maly's blog for an explanation of how DynamicSites
> work.
First of all, thanks for answering. I'm aware of Martin's blog and
it's a very nice resource, but honestly, the details still seem a bit
hazy to me. In particular:
Does this mean that a shared DynamicSite get
Tomas Restrepo wrote:
> The first one is related to RubySites. On the presentation, John shows
> how the shared DynamicSites in RubySites are used, for example, to ask
> if a given object/class supports a method and invoke it if it it does.
> The example in the presentation was to_int() for convert
Hi everyone,
I was watching yesterday's John Lam's Lang.NET presentation on
IronRuby (Great presentation, btw, really enjoyed it), and it was
pretty informative (to me, at least). Besides that, I've been looking
at the IronRuby and DLR code trying to become more familiar with how
everything fits
11 matches
Mail list logo