<div dir="ltr"><div><div>Hi!<br><br></div>I was under the impression, that new folks, who would be interested in Squeak, could be driven away by a challenge to find the right Squeak VM. To make their life&#39;s easier I thought &quot;that having a &#39;single&#39; VM that can choose an appropriate core at runtime&quot; would be a good thing (especially &quot;if [they] want to be able to run an older image format&quot;).<br>

</div><div><br>Thanks for the clarification and the detailed replies.<br><br></div><div>Alex<br></div>

</div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/2/5 David T. Lewis <span dir="ltr">&lt;<a href="mailto:lewis@mail.msen.com" target="_blank">lewis@mail.msen.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">On Mon, Feb 04, 2013 at 10:08:35PM +0100, Alexander Lazarevi?? wrote:<br>
&gt; Hi!<br>
&gt;<br>
&gt; Just to get myself up to date on the latest. Is it still true, that we got<br>
&gt; three independent VMs?<br>
&gt;<br>
&gt; 1. Interpreter VM<br>
&gt; 2. Stack VM<br>
&gt; 3. Cog<br>
<br>
</div>That&#39;s more or less right for any given operating system.<br>
<div class="im"><br>
&gt;<br>
&gt; So as I recall the Stack VM was planned to replace the Interpreter VM<br>
&gt; entirely.<br>
<br>
</div>Currently the Stack VM (and Cog) is developed in a separate branch of<br>
both the Smalltalk (VMMaker) and the platform support code. Much of the<br>
Smalltalk code for StackInterpreter and related classes has been merged<br>
into the &quot;trunk&quot; VMMaker, but this is not complete and at the present<br>
time a Stack VM cannot be generated from that code base. The platform<br>
support code remains in separate branches at this time.<br>
<div class="im"><br>
&gt; Or are there any cases were one only could use an Interpreter VM<br>
&gt; (or cog)? Or is the Stack VM the all versatile VM by now? What are the<br>
&gt; requirements for cog to run?<br>
<br>
</div>You would use a standard interpreter VM (not stack) if you want to be<br>
able to run an older image format (Squeak 3.6 or 3.8), if you want a VM<br>
compiled in 64 bit mode, if you want to run the experimental 64-bit object<br>
image, or if you need a VM for an architecture not yet supported by Cog.<br>
<br>
You would use Cog for any Intel-like platform, especially if you care<br>
about performance.<br>
<div class="im"><br>
&gt;<br>
&gt;<br>
&gt; It might not come as a surprise, but I haven&#39;t looked into the VM code<br>
&gt; lately. But I recall that the linux VM at least uses the modules framework<br>
&gt; to have different display, sound, etc. plugins for the VM. I don&#39;t know how<br>
&gt; interleaved the VMs from above are, but would it be out of scope to have<br>
&gt; _one_ VM that could have different object engines as VM plugins? So the VM<br>
&gt; could check the architecture it&#39;s running on and the image that should be<br>
&gt; loaded and decide on that what object engine to load/use?<br>
<br>
</div>I&#39;m not sure that I understand the question, but one of the things that<br>
Eliot introduced in Cog is a better separation of the interpreter from<br>
the object memory in VMMaker. If you now look at the &quot;trunk&quot; VMMaker<br>
(for in interpreter VM), you will find that this organization has been<br>
adopted there as well. In principle (if not in practice) different kinds<br>
of object memories might be paired with different kinds of interpreters.<br>
<br>
The VM plugins are Ian Piumarta&#39;s mechanism for loading VM subsystems<br>
in the Unix VM (which would include both Cog and the interpreter VM).<br>
Presumably it would be possible to use this mechanism to load different<br>
variations of object memory or interpreter, although I would not expect<br>
any of this to be a trivial amount of work.<br>
<div class="im"><br>
&gt;<br>
&gt; The obvious benefit for the enduser I see is: *There is only one VM !*<br>
<br>
</div>For unix VMs (and possibly others), by far the simplest way to achive<br>
this for the end user is by means of a shell script that selects an<br>
appropriate VM based on the image format. If you look at Ian&#39;s most<br>
recent start script (usually installed as /usr/local/bin/squeak if<br>
you have installed the interpreter VM) you will find that much of this<br>
is already in place, including hooks for Cog.<br>
<div class="HOEnZb"><div class="h5"><br>
&gt;<br>
&gt; The benefit for VM developers might be that they only need to focus on the<br>
&gt; object engines and they would share a common VM frame.<br>
&gt;<br>
&gt; This might be a &quot;well yes, but too much work&quot; thing, but nevertheless it&#39;s<br>
&gt; something I would like to share.<br>
&gt;<br>
&gt; (If turns out that the energy would better invested into something<br>
&gt; different, there is also the possibility to use the package system on<br>
&gt; debian derived systems, that would take care to install the right VMs on<br>
&gt; such system, so that the enduser wouldn&#39;t need to worry about this. And I<br>
&gt; guess there is a similar mechanism for windows and mac)<br>
&gt;<br>
&gt; Alex<br>
&gt;<br>
<br>
<br>
</div></div></blockquote></div><br></div>