[PRL] Re: "dia" in the gimp?

Joe Marshall prunesquallor at attbi.com
Mon Jun 2 19:42:45 EDT 2003


Better late than never.  I guess my work machine
isn't on this list.  Sigh.

From: "Greg Pettyjohn" <gregp at ccs.neu.edu>

> The problem is that a typical application has the form:
>
> (lambda (env ...)
>   (lambda (x ...)
>      ... body ...))

Would that this were the case.  The problem is that a typical
application is of the form:

(lambda (x ...)
   ... body ... y z )

Where Y and Z are variables shared with *every* other application
you might be using and several that you aren't using, but the
sysadmin thought you might want to.

> To make things worse, the env ... can and
> often are mutated *after* the closure is created, or even when the body is
> running!

Well, you see, it's very important *how* you call that
inner function.  If you `just apply it' (at the command line),
then it gets to see all the current bindings.  But if you
run it from a script, it sees all the current bindings *plus*
some more:  ones that you set up in some RC file, *and* ones
that are set up in `the system' rc file (didn't expect that, eh?)
*BUT* if you run it from a non-interactive script, there is
yet a third set of parameters.....  In theory, all these are
separate, but occasionally someone gets it into his head to
get each one of these init files to call the others.  Well, mostly.
They usually forget one or the other.  Oh, did I mention that
it makes a difference how you call the script, too?  Sometimes
script languages masquerade as other script languages, so they
have to load a different set of init files if you specify
a different name for launching the script.

> > Now, how do I jigger my X server on alnilam so that it will display
> > stuff from darkside (and/or how do I tell darkside to display on
> > alnilam)?
> >
> > I do this just rarely enough that I forget how to do it from one time
> > to the next.

In *theory* there is a mechanism so that when you launch a program
from a remote terminal it is able to figure out where that terminal
is.  (Obviously the prompt got sent back to you, so *someone* knows.)

I have never been able to figure out the magic involved, though,
and ended up writing a script that just asks me each time.

You could just give it as an example of something that simply
cannot be automated in Perl and let some linux weenie code it
up.  It might even work half the time.



More information about the PRL mailing list