Embedded Squeak 1.0 released for Squeak 2.2

Paul Fernhout pdfernhout at kurtz-fernhout.com
Mon Dec 21 05:45:43 UTC 1998


Squeakers -

Thanks to all those who replied to my earlier post (11/25/98) on
Embedded Squeak, as well as those who wrote on this topic over the past
two years.

I've spent the past few weeks since then pondering the issues, 
on top of much earlier thinking/coding in the context of the stalled
memory-constrained, GUI-constrained, debugger-constrained Squeak->Newton
port, and after a weekend of coding (well, mostly de-coding and
testing), here is: Embedded Squeak 1.0 for Squeak 2.2 
downloadable at: http://www.kurtz-fernhout.com/squeak/

Some comments on it taken from part of the readme.txt file:

The current version is built for Windows95, 
and features a text-only console in which you can type 
Smalltalk expressions. There is no image or changes file --
everything is in the EXE. Almost all the i/o primitives 
are stubbed out. This version of the code should compile/run 
on almost all platforms with minimal changes 
(you just need to know how to do character I/O). 

Main features:
* subtracted: most VM i/o functionality 
(including file & GUI support & sound).
* added: one Squeak method to write image as C memory array,
and read that array at program startup. 
* added: EmbeddedSystem class to process serial i/o
as console command lines.
* added: C code to read image from memory array.

Why would one want to use a stripped-down Squeak?
* You might want to embed Squeak in other applications,
devices like cellular phones, headless web servers, 
or even PDAs with native widgets (Pilot/Newton?).
(Andrew Brault's Pocket Smalltalk is inspirational in this regard).
* Embedded Squeak is preparation work for other things.
Now one can work to create an image with just the compiler
and various support classes, and build a totally new
GUI / event system on top of the compiler core.
One can also then come up with a package system
to load packages onto this stripped down Squeak,
to build up to the big Squeak.
* Smalltalk novices can experiment with just the language 
for a day before jumping into the development/GUI system. 

Why would one want a Squeak with the image embedded in the EXE?
* Using it is immediate gratification on ports to new
hardware -- if you can get the console going (via serial),
you at least have the compiler options set correctly.
There is no need to mess with files or display drivers at the start.
* Smalltalk novices may find it easier to get one self-contained EXE 
to run (even if they can't save and reload their image).
* It could become an easily installed Perl/Python alternative.

Things to do (and I'd be grateful for help):
* create an expression to strip the GUI from the image 
and then save the image (maybe reducing the image to 200K?).
* adding exceptions (so GUI isn't launched ever -- 
a top level handler reports to console).
* optionally generating VM without bitblit, sound primitives, other
stuff.
* resolving why some ImageFileInMemory.c files don't load properly 
(probably related to state of image when saved).
* a better command line interface, with macros, 
code filein format reader, and support for multi-line expressions
* better backspace support
* ports (especially to command-line-oriented DOS & UNIX).
* Transcript redirection to the console
* socket support for events to communicate with a headed Squeak 
to browse code and debug processes. I was originally going 
to do this at the VM level, but now I think it's OK (much easier)
to do this in Squeak for a start.
* support for pluggable I/O primitives 
and other dynamically loaded primitives
* generating interp.c as a C++ class (for the Newton).
* getting support for the "image embedding" code changes 
in the mainline Squeak distribution.
  
Enjoy. This work is released under same terms as the Squeak license. 

If anyone can think of a catchy name for Embedded Squeak 
I'll consider renaming it. Right now I'm leaning to
Squeak-e, for Squeak-embedded. But how about 
Squeakette? (ette = Elegant Technology To Embed 
or Embedded Technology Through Elegance)

-Paul Fernhout
Kurtz-Fernhout Software 
=========================================================
Developers of custom software and educational simulations
Creators of PlantStudio(TM) Botanical Illustration Software
http://www.kurtz-fernhout.com





More information about the Squeak-dev mailing list