[squeak-dev] [ANN] DoItFirst command line goodie on SqueakSource

stes@PANDORA.BE stes at telenet.be
Sun Nov 29 15:43:10 UTC 2020


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


Nice utility.  It provides a workaround or solution to Transcript
redirectToStdOut not working (or not working robustly).

$ cat headless-hello.sq 

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

$ squeak -headless squeak.image headless-hello.sq 

For some reason the above prints no output in squeak-4.

I believe that I tested it on older Squeak versions (version 3?) and there,
redirectToStdout worked.  Or perhaps in some versions I notice that it
sometimes seems to print on stdout and sometimes not. 

But anyway the DoItFirst package and its -evaluate on the other hand,
uses "Filestream stdout" and seems to work better; it depends on the asString
message (it sends asString to the argument that is being evaluated).

$ squeak -headless squeak.image -- -evaluate "#'hello world'"
hello world

$ squeak -headless squeak.image -- -evaluate "Smalltalk imageFormatVersion"
6504

In any case this provides a mechanism for batch oriented processing.

Thanks,
David Stes

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

iQEcBAEBCAAGBQJfw8EKAAoJEAwpOKXMq1MaPPMH/Av2+4xVDKutBXZBlfvUbx1c
o6Z9OuVhvtnMdIPU19fIy0o4347V0AqKNrxFJz1MQaF05ZBu7a9hXf3+qsF6pkTY
xfNRRd8sIYajGrad9bjPjPotMFJKn+pYFdg7Tp/IKc4yXv9x+kzPJRCRqtlM94qH
m91zcW1vK6yqNWxeS0FBvpSXpNgxTP0aOw4myzb0VzXB/Tge9BS2QOfQi4NIx/0O
p8Nqumvo0YJA30Fvvrz163Dng8LeH97yfeh1q1DXp987Ys5Sa5pfboy2CWjiWqsS
T9thHiZa0wt2KZoB8m2WUdT2wXKv+uYRmYvx6Wh4d5vfST1Ql774pE+0uRGXBdE=
=quQK
-----END PGP SIGNATURE-----


More information about the Squeak-dev mailing list