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

Marcel Taeumel marcel.taeumel at hpi.de
Mon Jun 15 07:55:13 UTC 2020

> preferably before anything else happens in the startUp list.

Well, you may have to set up some state in the VM (or the OS) first, which might have to be communicated from within the image. Like the display depth. Since we cannot know in general, we have to rely on the modules we have in Squeak, which are classes in the start up list. "as early as possible" should therefore translate to "are early as meaningful" :-) We can surely not recover from *all* kinds of errors with a DoItFirst mechanism. But maybe from quite a lot.

Am 14.06.2020 23:19:57 schrieb David T. Lewis <lewis at mail.msen.com>:
Hi Marcel,

I added you and Tim and Eliot as developers in the SS repository, and anyone
else is welcome too, though I did not want to make it global writable since
this class is dangerous if you make an error in the wrong place ... ask me how
I know ;-)

The class is lightweight, but I think we should play with it for a while
before considering it for trunk. For now, it's easy enough to load it from
SqueakSource. Here's the shortcut:

Installer ss
project: 'DoItFirst';
install: 'DoItFirst-System-Support'.

It seems quite possible that a more general argument processing approach
may be needed. For example, if I am trying to rescue a broken image, then
I want to be able to process a -doit at the earliest possible opportunity,
preferably before anything else happens in the startUp list. On the other
hand, if I am handling the -filein option, then I might want this to be done
much later in the startUp processing.

So let's just play around with this for a while and see what works :-)


On Sun, Jun 14, 2020 at 07:30:05PM +0200, Marcel Taeumel wrote:
> Hi Dave.
> Thank you! Looks good.
> Here are some thoughts:
> - The small footprint of this is awesome!
> - Since you assume that "FileDirectory startUp" can work in the case of emergency, we should move it further up in the StartUpList.
> - You are likely to need full support of SmallInteger, Delay, Time, and DateAndTime -- so I suggest moving it after those classes in the StartUpList. I am writing this without looking at the current implementation of their #startUp: methods because it should not matter ... conceptionally.
> - So, what about putting this into Trunk and having the following elements first in the startup list:
> 1. SmallInteger
> 2. Delay
> 3. Time
> 4. DateAndTime
> 5. FileDirectory
> 6. DoItFirst
> ...
> Best,
> Marcel
> Am 14.06.2020 19:15:28 schrieb David T. Lewis :
> A few cups of coffee this morning led to some enhancements to my DoItFirst
> utility, so I decided to put in on SqueakSource.
> http://www.squeaksource.com/DoItFirst
> It works more or less like this:
> $ squeak squeak.image -- -help
> DoItFirst image arguments:
> -doit argumentlist "evaluate each argument as a doIt expression"
> -evaluate arg "evaluate arg, print result then exit"
> -filein filelist "file in each file named in fileList"
> -cwd path "set FileDirectory defaultDirectory to path prior to evaluating other options"
> -help "print this message"
> Dave


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200615/8b6356ff/attachment.html>

More information about the Squeak-dev mailing list