[squeak-dev] Process some image options immediately at startup time (was: The Inbox: System-dtl.1164.mcz)

David T. Lewis lewis at mail.msen.com
Tue Jun 9 19:31:24 UTC 2020

Changing the subject line in case any of us remembers to actually follow
up on this good idea.

On Tue, Jun 09, 2020 at 12:06:00PM -0700, tim Rowledge wrote:
> > On 2020-06-09, at 11:52 AM, David T. Lewis <lewis at mail.msen.com> wrote:
> > 
> > Funny you should mention it, that's how I went down this rabbit hole
> > in the first place. I was thinking that it would be an obviously good
> > thing to do if we could evaluate a doIt or named script file immediately
> > on image startup, as opposed to waiting until all of the Etoys script
> > processing comes to life somewhere later in the startUp process.
> Exactly. Note that VW has several commandline switches we might want to learn from
> -filein {some file names}
> -doit {some strings}
> -evaluate {a single string & write result to stdout & quit
> -cli {start a commandline loop}

These all seem like obviously good things to do.

A possible way forward:

1) Locate Ian's GetOpt.st implementation, which according to google might
be included in GST. Otherwise just write it again from scratch.

2) Add a class as the first entry to the startUp list (maybe it would be
class GetOpt). Let the the startUp: method for that class look for arguments
in the Smalltalk arguments list that match the options in the list above
(-fileIn, -diIt, -evaluate, -cli).

3) For each of these options, provide an implementation. D'oh.

4) Proceed with the remainder of the startUp: process, leaving the original
Smalltalk arguments list unmolested.


More information about the Squeak-dev mailing list