[squeak-dev] The Inbox: System-dtl.1164.mcz

David T. Lewis lewis at mail.msen.com
Fri Jun 12 23:31:47 UTC 2020


Oh, sorry, the "run" command is my /usr/local/bin/run script that picks
a suitable VM. The effect is the same as running the VM executable directly,
so run the VM in whatever manner you like. I am in the habit of installing
my user executables (the VM run scripts in this case) in /usr/local/bin/ so
that they will be in my $PATH.

Here is what a -doit looks like on my PC. It evaluates the doIt argument,
and once the image opens you can see the #FOO has been added to the system
dictionary.

$ run squeak -- -doit "Smalltalk at: #FOO put: #BAR"
BAR

Note the ' -- ' before the '-doit'. However you might decide to invoke
the command line, you can put ' -- ' before the arguments and they
should get get passed along to the image.

Note that this hack is doing the evaluations as the very first thing
in the startUp sequence, so if you evaluate something that (for example)
opens an inspector, that inspector is not necessarily going to place
itself properly in the Morphic world. But it does seem to work, and
being able to do something like this before anything else gets screwed
up in the startUp processing might be a handy thing to be able to do.

Dave


On Fri, Jun 12, 2020 at 03:07:43PM -0700, tim Rowledge wrote:
> OK, the DoItFirst-dtl.2.cs filed in ok. It did however make the image save suddenly take a very long time  - but after save/quit and restartin the save no longer takes ages. Weird.
> 
> I had to execute - 
> 
>  time  /home/pi/Documents/Squeak/sqcogspurlinuxhtRPi/squeak /home/pi/Documents/Squeak/CmdLineTests-TPR-Squeak5.3-19682-32bit.image  -- -evaluate "(3 + 4 + Float pi cubed) asScaledDecimal: 20"
> 38.00627668029981975905s20
> 
> real	0m0.393s
> user	0m0.086s
> sys	0m0.283s
> 
> a) no idea what the 'run' command might be and it is not on Raspbian
> b) I'm guessing your 'squeak' script was finding the default named image?
> c) that time was for a Pi 4, which took about 3x as long as what I image is probably a reasonably modern x64 box? The registered user time was less than double though. Not bad for $35.
> 
> I must be doing something wrong when I tried the -doit option though; it faults in CodeLoader>>installSourceFile: Apparently sometihng has lead it to see an HTTPDownloadRequest ... ok, so the ProjectLauncher>>startUpAfterLogin sees that Preferences readDocumentAtStartup is true and that makes the unwarranted assumption that self getSystemAttribute: 2 will provide the document path. Oops. 
> 
> 
> tim
> --
> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
> If you think nobody cares about you, try missing a couple of payments.
> 
> 
> 


More information about the Squeak-dev mailing list