[Vm-dev] Cog: A question about: setInterruptCheckChain()

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Wed Sep 29 18:53:54 UTC 2010


Another aspect of the trade-off is releasing creativity.
To change the VM you need advanced skills in both:
- Smalltalk VM internals
- and external libraries you want to use.
That resticts dramatically the list of creators.

Plus, the difficulties for sharing your creation, you shall distribute:
- either a binary version, but this means users cannot have a mixture
of different features if those require a core modification,
- or VMMaker patches but your audience will shrink again.

On the other hand, a VM providing a larger de facto immutable API:
- somehow is more secure (a guaranty we can run very old images in
very new OSes).
- can maintain the illusion that despite the efforts of OS and
hardware designers to make it ever more complex, a single person can
still understand (almost) the whole system.
- avoid the necessity to embed knowledge of dozens of different
variants of different OSes in your image.

Of course, the complexity still exists under the carpet... When I
contemplate all the unecessary complex knowledge from those beautiful
configure/cmake scripts and macros, I'm not convinced all this cruft
will be easier to modify in Smalltalk than it is in C world.

I perfectly understand too the desire of a VM maintainer to lighten
the burden ;) though.

Nicolas

2010/9/29 Eliot Miranda <eliot.miranda at gmail.com>:
>
>
>
> On Wed, Sep 29, 2010 at 10:22 AM, Andreas Raab <andreas.raab at gmx.de> wrote:
>>
>> On 9/29/2010 9:36 AM, Eliot Miranda wrote:
>>>
>>>    See the recordMouseEvent() and its friends (sqNextEventPut,
>>>    eventBuffer[1024] ...) in sqWin32Window, for better understanding my
>>>    point :)
>>>
>>>
>>> Which makes my point well.  These are simply maintaining a queue.  If
>>> one has callbacks then the bulk of the Windows event handling system can
>>> be lifted up into the image.  This is what Vassili Bykov did in Newspeak
>>> above my Alien callbacks.  In Newspeak the Windows MainWndProc is a
>>> callback:
>>
>> Thus losing any level of platform abstraction. A bad trade-off, IMO.
>
> The platform abstraction merely moves from the VM to classes in the image.  But it does mean that one can properly implement Windows event semantics (things like query quit events) that the queue prevents.  And it means that the VM gets simpler and complexity is handled by better facilities (in Smalltalk with its many advantages for creating and maintaining abstractions with concrete variant implementations).
> But you and I have had this discussion a number of times and I take your point about the VM maintaining a black-box abstraction boundary whereas the in-image implementation is in theory porous.  As I've said before this doesn't strike me as that important when Smalltalk has had boundary violators such as instVarAt:[put:] for ever and they are rarely abused.  If one were to implement a native GUI event interface in Smalltalk using callbacks one would have to police the abstraction boundary.  But that's easily done, and there are other benefits
> - the VM, being simpler, gets more longevity since changing the event interface doesn't imply a VM change
> - the system, having native interfaces, can support each platform's facilities in full instead of providing the lowest common denominator
> So IMO it is a good trade-off.
> best
> Eliot
>>
>> Cheers,
>>  - Andreas
>
>
>


More information about the Vm-dev mailing list