Smalltalk scripting (was Re: jpython anyone?)

Lex Spoon lex at cc.gatech.edu
Tue Nov 28 22:12:19 UTC 2000


Aaron J Reichow <reic0024 at d.umn.edu> wrote:
> What I've proposed here before is a Smalltalk server and a C client that
> does little more than pass the contents of the script and arguments to the
> server and manage the returned info (exit value, as well a stdout
> stream). 

A snapshot is an extremely fast way to boot -- it's just that the
typical Squeak snapshots are pretty big.  Stick to images and one VM per script
execution.  Try it -- it's not as bad as people seem to think!  Even
unoptimized Squeak starts in less than a second, if its image is cached.
 It would be better if a script-friendly image was available, but
there's not, so too bad.

(Along those lines, a great thing would seem to be to save script images
as image segments, and then to have separate script-running and
script-development images.  The script-running image would be tiny and
thus would load quickly).


Two more suggestions for anyone working on this:

	1. Don't try to use a text editor.  "Text-file" is not the same as
"script".  Use the regular Smalltalk IDE and make your life nice.  Also,
save an image, not a fileout.

	2. Make sure you have whatever OS-specific extensions are available. 
If you're talking about "scripting", quite frequently you want to access
OS-specific resources.  For Mac guys, there is AppleScript stuff in the
main image.  For Unix and maybe Microsoft guys, there is OSProcess.



-Lex





More information about the Squeak-dev mailing list