Introduction

goran.hultgren at bluefish.se goran.hultgren at bluefish.se
Wed Mar 13 09:32:33 UTC 2002


"Dave Hylands" <dhylands at broadcom.com> wrote:
> Hi,
> 
> I'm a squeak newbie. I've been programming in C/C++ since around 1985 and I
> took a Smalltalk course (using DigiTalk on a Mac Plus) many years ago (long
> enough that I've pretty much completely forgotten everything).
> 
> I'm looking to use squeak in robotic applications on embedded micro
> controllers. My current platform has a 25 MHz 68332 with 512K of RAM and
> 512K of flash.

Kindof tight then. I don't know if the image can be shrunk that much...

> Presumably, to access hardware devices, I'll have to add new primitives to
> the language (I've seen a document somewhere which describes this).

That would be plugins I think. Primitives can of course be added too,
but plugins are better.
I think they have been called "named primitives" too. Not really my area
but there are plenty of plugins around to study. Search the swiki and
the mailinglist.

> I also read that Squeak has some ability to convert into C. How exactly does
> this work?

There is a subset of Squeak-Smalltalk that can be autogenerated into C.
The subset matches more or less what you would guess - it does not have
objects etc. The plugins and also class Interpreter and ObjectMemory are
written in this subset and are then "converted" into C by class
CCodeGenerator with friends. The point is that the code can be debugged
and run in Squeak until it "works" and then be converted to C and then
further into a dynamically loaded library.

I think perhaps that Andrew Greenbergs article (included in one of the
Squeak books) is available as pdf on the net somewhere.

> I'd also like to get some guidelines on the process of creating a minimal
> image.

The Swiki has pages on this - it's kindof messy right now. I tried the
other day in the latest 3.2gamma and got down to about 5.5Mb but then I
still had Morphic. I don't know how far you can go. A word of advice:
This stuff might need some experience - but hey, you can always try it.

If nobody else answers and you can't find enough info yourself I might
be able to whip my workspace experiments into a script.

> I'm also curious about what techniques people use for source code

Currently in the Squeak world it's changesets that rule. Learn how to
use them. Learn how to use the dual change sorter. Then we have the
modules coming up in 3.3alpha. But that stuff is not really meant to be
a CM system - more like a "virtual global distributed repository of well
defined modules of Squeak code".

> management. How do you integrate CVS and Smalltalk? I'm sure it's straight
> forward, but I haven't seen anything yet which addresses this.

Nope. It is not really straight forward. There have been two efforts
that I know of to date:

1. CVSTProj (or other names). Martin Kobetic started implementing an
"intelligent mirror" of Smalltalk code into the filesystem in order to
be able to use an external CVS client. It works and the code is used to
maintain itself on SourceForge:
https://sourceforge.net/projects/cvstproj/

2. Sqcvs. This is my little pet which is an almost complete
implementation of the CVS pserver protocol. To my knowledge there are
only two other implementations around - the CVS original in C and one in
Java. Sqcvs should be pluggable beneath CVSTProj but we haven't gotten
to that part yet...

In short - CVSTProj is usable today. I can't say how "nice" it is to
work with though - haven't tried it myself!
Sqcvs is not a tool, it's a library that might be useful to deal with
CVS repositories and it can be used to implement a "pure"
Squeak/Smalltalk CVS client.

regards, Göran



More information about the Squeak-dev mailing list