[squeak-dev] Re: The solution of (Was: Creating an image from first principles)

Klaus D. Witzel klaus.witzel at cobss.com
Mon Aug 11 15:51:18 UTC 2008


On Mon, 11 Aug 2008 16:54:07 +0200, K. K. Subramaniam wrote:

> On Saturday 09 Aug 2008 4:03:48 pm Klaus D. Witzel wrote:
>> > I can understand why someone may not wish to go so far into the past  
>> > that they
>> > cross the point of singularity (when the first image came into  
>> > existence).
>>
>> Odds are that you will never achieve this: take an arbitrary computer  
>> system, with nothing on disk and nothing in memory after power on.  
>> You're  
>> allowed to choose one with the most convenient instruction set ever  
>> created on this our planet.
> I have done this on a computer (that looked somewhat like Altair 8800)  
> in the
> early 80s. All it had was a bank of LEDs and toggle switches (for  
> address and
> data input). On power-up, I had to load a small tapeloader program using  
> the
> switch bank to setup the i/o subsystem and then read in the rest of the  
> code
> from a paper-tape. Then I could enter commands on a teletypewriter (tty)  
> to
> bootstrap the rest of the environment. There was no disk, so a power  
> failure
> or brownout would put me back in square one.

I happen know many people who have done that, in my team and at other  
sites. With varying input media (punched film for the Z3).

> I know first hand what Alan Kay means when he avers, 'hardware is  
> software
> frozen too soon'. To me, the most interesting transition is the one  
> where we
> move from a VM to VM+image.

I could email you a spec for a Smalltalk *) system (if you had none or  
want it).

The *first* transformation can be a subroutine of the VM (or of what it  
interprets: boot; boot {; boot} ;) , present as long as you still have  
those bugs ;) Thereafter you no longer need to compile that subroutine  
into the VM. But it can be a very small subroutine, which just reads a  
bytecode method.

For me code is code and VM is VM, for the initial transition, and I cannot  
see much difference when (re-)doing some initial transformation in the  
Smalltalk language itself, instead in any other language. Even in C and  
ASM you can code like you had method dictionaries and oops and #classOf:  
and function pointers -- it's a matter of style and elegance ;)

> Subbu

*) includes compiler and the full object supporting machinery, does GUI  
with primitives, has:

- 52 classes + their meta/dual
- 510 compiled methods
- 510 bytearrays (methods' bytecode)
- 713 arrays (mostly for method collections)
- 595 strings (mostly for class names + selector names)
- 22 character literals #($' $0 $9 $a $z $A $Z $$ $: $. $  $( $) $] $| $-  
$> $^ $[ $< $# $")

Comparing to its source code one can see that the compiler allows many  
more symbols for binary selectors ;)

/Klaus




More information about the Squeak-dev mailing list