squeak in batch mode

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

squeak in batch mode

stes
-----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
_______________________________________________
VM-beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/vm-beginners
Reply | Threaded
Open this post in threaded view
|

Re: squeak in batch mode

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


It is thus possible to run squeak -headless in "headless mode"

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

However it turns out that "GNU smalltalk" is more appropriate,
for this kind of "batch-oriented" work.

Because GNU smalltalk can easily run in batch mode...

David Stes.

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

iQEcBAEBCAAGBQJettNyAAoJEAwpOKXMq1Ma7ZIIAKWvmq8ZS1f3tn3Cn8SUCSkr
2z5nxIkCKJgOfQK0gysSjD+MMJesjpU1uDewaACWJI5g9Ka50Aow5D7aaVSryvI3
zih2gCUjenRtuP0LesbBhS3dMnI6X/sahfv2Zkz6gC+dUhgGDlBzgykfb+BJrhFE
7oFfbBDOrxoLJPkLWuFrBLSiQZPKHjJ8Sy0rd6VotDf2+61O+o6l25DgrlOmWsEB
YlhWN0fJLbbX7K/yW4+lv6p8EUIBdPETG+1dOWE6bhIuEkBx5E8SKoVlyl7ISuPf
Bm2dEm5KQmlValR3nnTAO/AfsP2+aiGdXHmcDFYR7uWYaTQBqZ/lDT2ZS5M89p4=
=4yWo
-----END PGP SIGNATURE-----




--
Sent from: http://forum.world.st/Smalltalk-VM-Beginners-f3068605.html
_______________________________________________
VM-beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/vm-beginners