scripts in squeak

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

scripts in squeak

Matej Kosik-2
Hi,

I am using Squeak on Debian GNU/Linux.

Isn't SCRIPTS sections inside the manual page out of date? Maybe
elsewhere (or in different times) it had sense. It seems to be positive,
but now it is misleading.

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
----------------------------------------------------------------------
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?

Regards
--
Matej Kosik




signature.asc (260 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: scripts in squeak

Lex Spoon
Matej Kosik <[hidden email]> 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