[Vm-beginners] squeak in batch mode

stes stes at telenet.be
Mon Apr 20 18:20:49 UTC 2020


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256


Hi,

I wonder whether there is a special class or mechanism to use Squeak in
"batch mode".

Suppose for example that you have a script:

bash-4.4$ cat hello.sq 

TranscriptStream redirectToStdOut.
Transcript show:'hello world'.
Smalltalk quitPrimitive


What seems to work - provided that the squeak.image has an open Transcript -
then :

/usr/bin/squeak squeak.image hello.sq > out

or

/usr/bin/squeak -headless squeak.image hello.sq > out

writes 'hello world' to the file 'out'.

It's an expensive way to do that, but it works, it launches squeak,
and in the display one can see the Transcript doing show:'hello world',
and then the image quits (with the 'quitPrimitive').

With the -headless option the image is doing the same thing without display.

Two remarks:

  - this works in Squeak 4.6 4.16.7-3775
  - for some reason this doesn't seem to work in Squeak 5.3 (at least for
me,
  this may be due to my VM in 5.3 not working correctly or some other
oversight)

Is there perhaps a "BatchTranscript" class which is meant to be used for
this?

Or a module "batch" for using Squeak in batch mode ...

Maybe I'm doing something wrong in V5.3 because I think a few days ago,
it was working somehow also in 5.3 for me, not sure.

Anyway if there were would exist some sort of BatchTranscript in SqueakMap
or
Monticello , that would help...

Thanks!
David Stes


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJenefuAAoJEAwpOKXMq1Ma4vwH/AzTf4xhPJiRj91k6n6+NEqu
wRww4qUMfYi6CNMNud068emed/upBEfCLI14BYfYhZJtmbgyxZ7QeC9osQtwa63T
EOAQlNf1fMlCaOVNW54co8IVuvYvvK3SK+NnIVBW1QIac8KJFii7RqIYPXoXn31r
OYNBiqHtr9HGi0P+wITutVwnU9LJ6GtDPt5qzjje5XfXIuR41JbpenjyIahYJKJP
W7Be8KMrn+CtfOMQsA/ZmwouJqercvE79TklS45pUBpesiLh4dc9u4NokVBaRAwY
MBuQugwKLGq1BYU4yeqnpJmicZ+TtK+4U0tn4Mc92vek1KmDAyUsut62NhHMqKo=
=edcJ
-----END PGP SIGNATURE-----




--
Sent from: http://forum.world.st/Smalltalk-VM-Beginners-f3068605.html


More information about the VM-beginners mailing list