William Harold Newman wrote:
> On Thu, Jan 11, 2001 at 12:13:21AM +0100, Martin Atzmueller wrote:
> > > It may be a week or more before I do anything with the patch. I'd like
> > > to release 0.6.10 soon (maybe this weekend?), and I like to test a
> > > prerelease version for a little while before I release it, without
> > > tweaking it too much. There is an annoying bug in signal handling or
> > > the debugger in my current 0.6.9.23-in-progress, and I want to fix
> > > that, but that may well be the last change in the program before
> > > 0.6.10.
> > Well, ok. You'll see that it is quite a small patch, it kind of
> > emulates sb-ext:*environment-list* behavior to get the current
> > environment, and that is all.
> If you or anyone has a strong interest in having it available in the
> next release, I can do it. I just didn't think it was urgent; and
> thinking that it wasn't urgent, I wanted to warn you so that you
> wouldn't think I'd forgotten it.
Thank you for the clarification. If you got the wrong impression,
that I wanted to push this issue, well, this is my fault. ;)
I think it is not that urgent to include the patch, because it can
be loaded at runtime.
I just thought it might be easy to include it, because it is just
a very localized change.
> > Currently the env parameter that can be passed to #'load-foreign is in
> > the format of CMUCL's *environment-list*, so it is an a-list
> > mapping keywords and simple strings.
> > This is the same thing that can be given to #'run-program as its
> > env-parameter.
> > I think it makes sense to keep this, but nevertheless I have noted that
> > the CMUCL manual, p. 120 talks about a list of strings (not an a-list)
> > in the format of UN*X environment variables, like A=B (key A, value B)
> > as the env-parameter of #'load-foreign
> Probably the Lispiest thing would be an alist, like this
> '(("USER" . "newman")
> ("PAGER" . "less")
> ("PWD" . "/usr/stuff")
> ("_" . "/usr/bin/env"))
> But that's only my second choice of format. My first choice would
> be a plain list of strings like this
> '("USER=newman" "PAGER=less" "PWD=/usr/stuff" "_=/usr/bin/env")
> This format is a little harder to work with, but since "man environ"
> says that the name=value form is only a convention, not a requirement,
> I don't want to make RUN-PROGRAM dependent on the name=value form.
I agree. I just don't like the idea of having two different env
formats in SBCL, one for run-program, and one for load-foreign.
I have looked at the code of run-program:
internally it converts the alist to the "list-of-strings" format.
So, maybe both run-program and load-foreign should accept an alist
like the one you described above, and this would also solve
the information preserving problem pointed out by Dan Barlow