<div dir="ltr">Hi David,<div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 15, 2018 at 9:50 AM, David T. Lewis <span dir="ltr"><<a href="mailto:lewis@mail.msen.com" target="_blank">lewis@mail.msen.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Thu, Feb 15, 2018 at 07:05:26AM -0800, Eliot Miranda wrote:<br>
> Hi David, Hi Casey,<br>
><br>
> > On Feb 15, 2018, at 6:05 AM, David T. Lewis <<a href="mailto:lewis@mail.msen.com">lewis@mail.msen.com</a>> wrote:<br>
> ><br>
> >> On Thu, Feb 15, 2018 at 09:33:59AM +0100, Tobias Pape wrote:<br>
> >><br>
> >>> On 15.02.2018, at 07:46, Marcel Taeumel <<a href="mailto:marcel.taeumel@hpi.de">marcel.taeumel@hpi.de</a>> wrote:<br>
> >>><br>
> >>> For the long term, I would love to have an "Export as..." in the world menu of a regular (trunk) image. :-)<br>
> >><br>
> >> Or even better: have the vm detect whether it loads an image matching its bit-ness (is this a word?)<br>
> >> and if not, convert it (maybe with a "please wait" info). I mean, it works for RSqueak and IIRC SqueakJS???<br>
> >><br>
> >> -t<br>
> ><br>
> > These are great ideas!<br>
> ><br>
> > Does anybody know any smart grad students looking for a challenging project?<br>
><br>
><br>
> My dream conversion would be taking the Smalltalk-80 image I have from the original Xerox tape and replacing its compiler and other relevant methods so that it used closures and Spur, and a conventional file/directory interface, but otherwise remained the simple bitblt based system with some 2000 methods and 200 classes.<br>
><br>
> Such a system is great for learning because it is small enough for one person to learn all of it.  Of course it would be a bit bigger; the closure compiler is more complicated, but not by much.  But projects like replacing repainting windows by windows with a backing store, are afternoon projects in this context.<br>
<br>
</span>That idea is crazy enough that it just might work :-)<br>
<br>
So just to explore the idea: If someone wanted to actually do this, how<br>
might they proceed?<br>
<br>
My guess would be that the fastest path might be to start with a modern<br>
oscog VMMaker image, and write enough new simulator support to handle the<br>
object memory and interpreter of the original Xerox system.<br></blockquote><div><br></div><div>I would definitely go the other way.  The Spur bootstrap used the Simulator to allow using the host to compile methods and inject them into the image.  So I would proceed as follows:</div><div><br></div><div>1. write a loader for the 16-bit Smalltalk-80 v2 image that brought in the objects in their native format. This would involve writing a simple memory manager sufficient for the very simple 16-bit object representation</div><div><br></div><div>2. write a converter that took this loaded image and constructed a Spur format 32- or 64- bit image</div><div><br></div><div>3. using the host compiler, recompile all the methods in the Spur-format image to use the current bytecode set, installing them in the image</div><div><br></div><div>4. excising specific classes (specifically the compiler classes) and replacing them with a clone of the host compiler</div><div><br></div><div>Another way might be to take the Smnalltalk-80 source file, p[roduce an edit that contained the system compiler, and then write a bootstrap (which could use Pavel Krivanek's work for Pharo) from source.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">If the old Xerox image could be hosted in a modern simulator, then it<br>
should be possible to translate the object image into a format that could<br>
be executed directly on a Spur VM.<br></blockquote><div><br></div><div>Right.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
But that is only a piece of the problem, because such an image would be<br>
useless without the updated compiler and file system interface, and I can't<br>
quite picture how those bootstrapping steps might be done.<br></blockquote><div><br></div><div>Once one has an image in the simulator arbitrary manipulations are possible.  So creating a clone of the compiler within the simulator and switching over to it is quite possible.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Dave<br>
<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div></div>