scripts in squeak

Lex Spoon lex at cc.gatech.edu
Thu Sep 14 08:39:39 UTC 2006


Matej Kosik <kosik at fiit.stuba.sk> writes:
> Perhaps something like this
> ----------------------------------------------------------------------
> Squeak can be used for scripting as well. (Almost) simple script could
> look somehow as follows:
> 
> 	(FileStream fileNamed: '/dev/stdout')
> 		nextPutAll: 'Hello, world';
> 		nextPut: Character lf.
> 
> 	SmalltalkImage current snapshot: false andQuit: true.
> 
> 
> If the above script is placed in /tmp/hello.st, it can be run as follows
> 
> 	squeak -vm display=null -vm sound=null $SQUEAK_IMAGE file:///tmp/hello.st
> ----------------------------------------------------------------------

Looks fine to me.  You might want to be sure and mention how to access
arguments.  Oh, and $SQUEAK_IMAGE is pretty much optional; if the
default squeak.image is not present, the squeak script will create it
for you.

But, even better, improve the scripting system in general!  That last
line is terrible for a user to have to type!  And why do you need a
squeak.image in the current directory, anyway?  A really good
scripting setup mainly requires changes to the main image....



> It is not that nice as the original text but in these days I think more
> up to date. Should I make such changes in the Squeak packages for
> Debian? Shouldn't they be made for other UNIX clones? Can someone
> propose better replacement?

Ian Piumarta is not a very responsive maintainer.  I would go ahead
and make the changes in the Debian packages and then approach him.  If
you get any reply back at all, then go from there, but if not, at
least the Debian people can benefit.

A really motivated person might also maintain a page with unofficial
patches for this unresponsive port of the VM.  That way, non-Debian
people could benefit, too.  However, this does take time and effort,
and maintaining Debian packages is already a large amount of work.
Practically speaking, a patches page is *more* work than what a
maintainer normally does, because you have to dance around what the
official maintainer is doing and track their changes.


-Lex




More information about the Squeak-dev mailing list