I've been looking into Poplog initialisation for a while, trying to make
it a little more Linux-friendly and a lot easier to install.
I've noticed that startup.psv doesn't call $poplib/init.p until after it's
called a number of other things, and that $poplib defaults to $HOME/poplib
It occurs to me that it might be useful to change that setup...
a) If init.p is the first thing that startup.psv calls, then it can do
some useful things, like setting up environment variables (more on which
below).
b) Since $poplib/init.p calls the global init.p, users without a
$HOME/poplib.init.p file (for example, users created before poplog was
installed on a system) won't run either a personalised or default
poplib. Defining $poplib as (say) '/etc/poplib' would mean they got
whatever global defaults were there, and that could then call
$HOME/poplib/init.p
The upshot of those two would be that it becomes possible to define
environment variables in the global init.p, instead during login, which
leaves a lot of environment variables about to scare newbies. (Of course,
it's still possible to define some script for those that want it to have
environment variables defined at login)
Also, since many sets of environment variables will be defined (e.g. for
pop-11, prolog, lisp, etc.), it'd be useful to separate these into
different files - besides anything else, it makes it a lot easier to
uninstall those parts you won't be using.
I've been considering creating a $poplib/env directory, and
trycompile'ing each file in it. Unfortunately, I don't know much about
reading directories in Unix, let alone in pop.
So, can someone tell me:
a) Is there a reason that this setup is used, rather than the opposite?
b) Can someone tell me exactly where init.p gets called? The docs assure
me it's in startup.psv, but I can't find it anywhere in the code :)
c) Can someone think of a better idea that $poplib/env? If so what is it,
and how would it be implemented? If not, how do I read out the list of
files under a directory?
Thanks,
- Andrew
|