Command Line Squeak/Scripting: Status?
Lex Spoon
lex at lexspoon.org
Sat Feb 10 17:38:13 UTC 2007
Brent Fulgham <bfulg at pacbell.net> writes:
> > >>I'm curious about what the status of a Squeak setup for scripting is,
> > >>specifically for Linux? My end goal is being able to tell a user or run
> > >>programmatically from another script a Squeak script by typing something
>
> If one of these functions well enough to run programs from a script, let me know
> and I'll be glad to add Squeak to the "Computer Language Shootout"
> (http://shootout.alioth.debian.org).
Try "man squeak", or on Debian, "man squeakvm". There are
instructions on how to do it down under the "Scripts" section.
The simplest thing is to make a file with the Smalltalk code and then
another script that has:
squeak squeak.image thescript.st
However, you can also make self-contained script files. Here's a
simple example fromthe man page, though I'm sure with some cleverness
you can come up with more ideas.
#!/usr/bin/squeakvm --
Transcript cr; show: ¡ÇHello, world¡Ç.
Now, this basically all works, but be warned that there are a lot of
rough edges. Nobody programs like this, and so nobody has polished
it. For example, the last time I checked, error messages are not
handled gracefully.
-Lex
More information about the Squeak-dev
mailing list
|