[squeak-dev] Running Squeak fro ma unix shell script file with #! squeak...

Chris Cunnington brasspen at gmail.com
Mon May 20 21:54:58 UTC 2019


Yea, there’s a lot of nifty going on here. I like how you added code in the script itself that will become part of the image before the command is given at the end. 
I tried it by copying the code into Workspace and loading and then executing. It’s nice to see the WebServer as an easily accessible tool available on demand. I remember installing Kom too many times. 
I haven’t tried it as a script yet. I have Ubuntu 16.04. But how did you install Squeak 5.2? Ian used to have a friendly Install script with each Linux release. I don’t think I’ve seen that for a long time. So for me to try what you’re doing I’d need to wrestle long paths, because the vm is on the Desktop and such. 
How did you install Squeak5.2 so it’s in /usr/bin/squeak? 

Chris 


> On May 20, 2019, at 12:57 AM, tim Rowledge <tim at rowledge.org> wrote:
> 
> 
> 
>> On 2019-05-13, at 7:11 PM, Chris Cunnington <brasspen at gmail.com> wrote:
>> 
>> Pretty cool. If Tim gets this working to his satisfaction I hope he makes a post with an example. 
> 
> It nearly does it.
> 
> Right now you can (with a fully updated trunk image, specifically on Raspbian, maybe other linuxes, no way for me to test) make a .st file executable and add a line of the form 
> #!/usr/bin/squeak /home/pi/Squeak/TPR-Squeak5.3-18560.image
> as the first line. You can run this from a commandline with the usual ./MyAmazing.st
> 
> As an example
> <WebFib.st>
> will open the specified image, install a fast fibonacci method (thanks Nicolas!), add a fibonacci server method to WebServer and fire up Webserver. This is seriously cool. Double-clicking the .st works too, thought in Raspbian you do have to say to execute it or execute it in a terminal (either works, by the way. No idea how to stop the make-a-choice dialogue).
> 
> Of  course, you can do the more manual
> squeak myAmazing.image WebFib.st
> as well
> 
> Note that this is all without making use of Dave's excellent shell stuff, something else to play with. And indeed the amazing suggestion about the /proc/sys/fs/binfmt_misc/register magic from Subbu.
> 
> The bit that I'd like to find a way to improve is having the ability to *not* open any windows. Right now the main window opens (as I've said many times, no window should open until some image code forces it to) and the UI is started up and the filing in etc happens after that. I don't know how we can nicely handle that; after all some legitimate uses of a script file would be to start a GUI application. Others would be of the 'calculate optimal firing solution and quit' variety.
> 
> Two apparent bugs also require some thought and probably solving by someone else
> a) Windows appears to be unable to write to stdout - and probably therefore  unable to read from stdin - despite the code appearing to be in the VM sources.
> b) Ubuntu (at least)  seems to have a problem with stdout etc not being initialised properly unless we reset the StartUpList order. Why Raspbian did not have that problem I can't imagine - they're both Debian based IIRC.
> 
> So all in all, damn cool stuff that could be made coolerer with some help.
> 
> tim
> --
> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
> Bayard(n): a person armed with the self-confidence of ignorance
> 
> 



More information about the Squeak-dev mailing list