[Vm-dev] Re: adding external plugins to Squeak 4.2 on the Mac

Eliot Miranda eliot.miranda at gmail.com
Sun Jul 17 19:57:44 UTC 2011

Hi David,

On Sun, Jul 17, 2011 at 12:25 PM, David T. Lewis <lewis at mail.msen.com> wrote:
> On Sun, Jul 17, 2011 at 11:57:54AM +0200, Craig Latta wrote:
>> Hi John (and Esteban :) --
>>      Cool, that was it! I'm embarrassed I'd forgotten about that. I
>> still have no idea what the release Mac VM binary has for VM_PROXY_MAJOR
>> and VM_PROXY_MINOR, though, I just removed the check entirely from my
>> plugin. :)
>>      So... clearly there should be some way for plugin authors to be
>> able to check those values on a VM that someone else built? A
>> command-line argument, perhaps? I didn't see one mentioned by running
>> the VM with -help, but I guess I'll check the sources now, to be sure...
>> at any rate it should be mentioned in the help message.
> Craig,
> This seems like a pretty good idea to me. Now that you mention it, I'm
> surprised no one thought to do this before. Attached change set provides
> primitives that answer the VM_PROXY_MAJOR and VM_PROXY_MINOR for the VM,
> as well as for plugins (internal or external). If this looks good, I'll
> add it to VMMaker trunk (it should work for oscog also).

I don't think this meets the usecase.  One may not be able to run an
image of certain plugins cannot be loaded, so providing an accessor
which requires a functional image is insufficient.  Craig asks for a
cmmand-line switch and that's reasonably easy to do, and seems to me
to be the right approach.  On the other hand, adding vm parameters or
system attributes that answer VM_PROXY_MAJOR and VM_PROXY_MINOR seems
reasonable.  Personally I don't like adding endless primitives (those
strings add up in space) when existing query facilities are extensible
and easily extended (such as getSystemAttribute: and vmParameterAt:).
Adding an accessor that wraps the getSystemAttribute:/vmParameterAt:
is fine and overall the extension plus the wrapper requires less space
than adding a long-named primitive (whose name is in the list of
registered internal named primitives, along with the space overhead of
the entry), the symbol name for the primitive in the image plus the
primitive method.

Parsimony is a virtue, or as my grandmother used to say, many a mickle
makes a muckle.


> Dave


More information about the Vm-dev mailing list