[ENH] Command-line argument access in the image

Brian Rice water at tunes.org
Wed Dec 28 10:22:30 PST 2005


On Dec 28, 2005, at 8:12 AM, Jeff Sparkes wrote:

> 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.

Yep, that's a big deal for some purposes.

> 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.

Yeah, it'll be appropriate sometime soon to have varying standard- 
built images, such as one with all data structures and bindings for  
systems work, and one with the UI added onto that.

I'd like to avoid having to ask the user too much for a administrator  
password to get that done, but there's also the ability to have ~/ 
bin/ and ~/lib/ etc. in the path for the "make install" pattern using  
the root as ~/.

I'm CC'ing our Debian package maintainer; maybe he has some ideas  
about this to add.

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

I've already been considering it, and the same for the Time and  
Socket plugins. I think that improving Pidgin is a better strategy  
than waiting for the optimizing compiler to solve the performance  
problems.

However, the Autoloader shouldn't be counted out, since the DB could  
easily just grab from the local area where the source was installed,  
driven by configuration to take /usr/local/src/slate/ as SLATE_SRC or  
whatever.

> 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.

--dump would have to be processed by the bootstrapping code itself. I  
think this needs to be specified better, since there are a lot of  
ways to do this and I'm not sure yet which is best overall. I'll  
think it over, thanks.

Also, don't forget that the bootstrap is actually now just "make  
newboot", followed by "./vm.new <endianness>.new.image". We do have  
some automation.

> 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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : /archives/slate/attachments/20051228/b366b959/PGP.pgp


More information about the Slate mailing list