On May 29, 2009, at 3:46 AM, Derick Eddington wrote:

On Thu, 2009-05-28 at 12:39 +0200, leppie wrote:
I have a an "init.ss" file in IronScheme, which behaves similarly,
with one major exception, it always picks it up from the current
directory, means you can have different init files for different
locations/directories.

What if users want to run from a directory with an init.ss which isn't
an IronScheme init file?

A user may trip over this by having an init.ss that's not intended
for the implementation to execute.  It's hard to say the same about
~/.ikarusrc.  Actually, people would expect the exact opposite: if
there is a ~/.ikarusrc, (unix) people would expect ikarus to run it.

Perhaps this could be useful in Ikarus too.

But then, "init.ss" would be both Ikarus's and IronScheme's?  That
sounds bad.

IKARUS_RC_FILES accomplishes a similar ability:

$ export IKARUS_RC_FILES=init.ss

and now whatever directory you run ikarus in, it will expect an init.ss
in that directory.  Note that ikarus expects it and will error if it's
not there; I prefer this because you told ikarus to use a file but it
can't do what you told it to.

This was intentional of course.

If one doesn't like it, and would like to have "init.ss" if exists,
one can always put

(when (file-exists? "init.ss")
  (load-r6rs-script "init.ss" #f #t))

in their ~/.ikarusrc file and that should do it.

Aziz,,,


Reply via email to