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

stes@PANDORA.BE stes at telenet.be
Thu Dec 10 12:11:11 UTC 2020


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


tim Rowledge wrote:
> I hope those are all useful things to learn;

Yes they are ... thanks for posting the Fibonacci category and script.

> the stdout thing may be an issue, at least for the 5.3 release image. 

My personal impression is that the best way to run the Fibonacci program,
is through the "DoItFirst" package.

For example I tested both with a 5.3 and a 6.0alpha image:

 # pfexec squeak squeak.image InstallDoItFirst.st 
 # pfexec squeak squeak.image -- -e 'Smalltalk version'
   Squeak5.3
 # pfexec squeak squeak.image -- --filein Fibonacci.st --evaluate '100 fibonacci'
   file in /export/home/stes/5.3/Fibonacci.st
   354224848179261915075

but the same result in 6.0alpha:

 # pfexec squeak squeak.image -- --filein Fibonacci.st -e '100 fibonacci'
   file in /export/home/stes/Fibonacci.st
   354224848179261915075
 # pfexec squeak squeak.image -- -e 'Smalltalk version'
   Squeak6.0alpha

This is with a recent Stack VM , version 5.0.2885 (from VMMaker-oscog-eem.2885)

Note that I use a "pfexec" (profile exec) to raise the privilege of the VM,
to be able to set priorities (proc_prioctrl privilege) just to suppress the
warning about pthread_setsched.

In any case as far as I can see the "DoItFirst" package is a convenient way,
to file in small pieces of code like the fibonacci method that you posted,
and then evaluate some code in a batch oriented command-line way.

David Stes

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

iQEcBAEBCAAGBQJf0g/zAAoJEAwpOKXMq1MalvIIAIYz3bgTn5DX+tbUtFze/DyG
xSIHEVlVqvWf0idecCBmog9kufZzyiLE+G7+Ia7WK8bPVkyLMgqD6r1YRe46WeZT
O8a6w8sttMkqiCpbgBR9fUDhpc81ZGbm898e2PENNq/kAJNRBbFkdicA/S3yd6+R
mC75JasFRh+a4pEJsr9e8hc8sZoaCEyBSsE9DYptcxCd5ZHR7OYyO57clkfgVhY1
fnVclQNp5U4026+arthjeIShR0U7AlF5sJUZmlRlT7pUNaY9isVtLQ/jOz30ZL2e
/56soGHphRpTm97G8tV4mOgLAAp7V5rf2nn42fSFtzazHkwlmebsXbh5EdySreo=
=dc5v
-----END PGP SIGNATURE-----


More information about the Squeak-dev mailing list