[ENH] Command-line argument access in the image

Jeff Sparkes jsparkes at gmail.com
Wed Dec 28 08:12:42 PST 2005


Having this added makes it possible to write slate scripts, which
makes it lot more
practical for me.  I could never do this with Smalltalk, and I think
that was one of
the reasons people rejected it.

I think slate should use environment variables to find the image.  
The debian package
has a shell script called slaterun which uses the enviroment variables
SLATE_IMAGE,
SLATE_LIB and SLATE_HOME.  SLATE_LIB points to the compiled plugins
and SLATE_HOME to the directory containing .slate files.  I'm not sure
that those are the best
names.  I'd probably build a "batteries included" image with
everything loaded to use for
writing scripts.  Similar to the clisp "base" and "full" startup options.

Would this require moving Environment from extprim?  You certainly
wouldn't want to
autoload it.

I'd like to also see a --dump argument so that the bootstrap would then become:
  ./vm --load $(mobiusdir)/init.slate --dump slate.image
The last line of init.slate would call the fullCleanBootStrap method.


On 12/27/05, Brian Rice <water at tunes.org> wrote:
>
> On Dec 27, 2005, at 6:50 PM, Brian Rice wrote:
>
> > Also, boot.c currently processes its arguments in a simplistic way,
> > so that extra arguments that you want to pass to the image must be
> > followed by the image name. E.g.
> >
> > "slate --load src/lib/memoryarea.slate slate.image"
> >
> > Is generally needed; you cannot skip the image name yet. I may
> > write some code that does guess-work in trying to figure out if the
> > last argument is a valid image name, and then have it try the
> > default if that doesn't work.
>
> Another option is to require --image <filename> to specify an image
> file. This is more verbose, but it does keep everything unambiguous.
>
> Does anyone have a problem or preference among these options?
>
> --
> -Brian
> http://tunes.org/~water/brice.vcf
>
>
>
>




More information about the Slate mailing list