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

tim Rowledge tim at rowledge.org
Sun Dec 6 18:50:13 UTC 2020



> On 2020-12-06, at 6:46 AM, stes at PANDORA.BE <stes at telenet.be> wrote:
> 
> First of all the script also uses FileStream stdout, and shows how
> to use nextPutAll to write to stdout.  Also it shows how to time a block.

I hope those are all useful things to learn; the stdout thing may be an issue, at least for the 5.3 release image.

> 
> For me on Squeak VM 4.19.2 I get an error however from the first line:
> 
> bash-4.4$ head -1 FibonacciTestScript.st 
> #!/usr/bin/squeak /home/pi/Squeak/TPR-Squeak5.3-18560.image

Ah, right, now I remember. We had some fascinating discussions about this area  and that line was added because it means you can set the file permissions to executable and simply run the fibonacci file as a unix script; the #!/usr/bin/squeak will actually run the vm, pass it the following words and thus run the system with this script. Neat, eh? Dig into the list archives for May 2019 (which was about 300 years ago IIRC) and subject 'Faster fibonacci' and related stuff. Subbu suggested some extra-neat ways of making Squeak do scripty-things using the unix script-handler.


> 
> I think the error 'Invalid Character' in Squeak 4.6 is from the  #! line.

Yes, sometihng got added for 5.3 to make it able to skip that. I'm not sure what; digging into those emails should reveal it.


tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
"Bother" said Pooh, as the IRS kicked his door in.




More information about the Squeak-dev mailing list