Some thoughts about this issue:

Steve Isard wrote:

> > The main difference that your setup makes to me as end user is having to
> > type "poplog pop11" (or ved, or xved or whatever) instead of just "pop11".
> > Of course I can set up aliases or links for myself, but I imagine that you
> > have reasons for doing it this way.

Waldek replied

> Well, if we want this as install for many users then we need to
> look for conflicts.  Currently there is Lisp implementation
> called 'clisp', trying to hijack this name may meet fierce
> resistance from 'clisp' users.  I am not sure about 'prolog',
> but I suspect that in Debian it is used to point to user
> prefferred Prolog system, which may be different from Poplog.
> So some diplomacy may be useful here.  'pop11' and 'xved'
> are probably safe (only used for Poplog).

I have been wondering whether installation of poplog should set up new
commands for invoking poplog prolog and poplog lisp. Possibilities include:

    pop-clisp
    pop-prolog

Such names will avoid clashes, and users can easily define their own
abbreviations if they wish.

The saved images in $popsavelib (currently $usepop/pop/lib/psv) could be

    pop-clisp.psv (currently clisp.psv)
    pop-prolog.psv (currently prolog.psv)

This can be extended to saved images incorporating all three languages,
depending on the order in which compiled (which could make a difference??):

    pop-clisp-prolog    -> clisp-prolog.psv
    pop-prolog-clisp    -> prolog-clisp.psv

I am not proposing that all of these should automatically be created when poplog
is installed, but that appropriate scripts could go in $usepop/pop/com

    mk-pop-clisp
    mk-pop-prolog
    mk-pop-clisp-prolog
    mk-pop-prolog-clisp

(of course users could then copy and edit to set up their own preferred
abbreviatons e.g. pcp.psv ppc.psv or whatever, or perhaps include additional
local utilities in the startup images).

Steve Isard raised this issue:

> >  As far as I can see, using the poplog
> > script means setting up a fresh poplog environment for every pop11 call,
> > rather than the old way of setting up the environment once at each login.

Waldek responded:

> Yes.  This avoid many probles (mentioned by Stephen Leach).
>
> > On a modern machine, I suppose the time taken in defining the poplog
> > variables is negligible and maybe there is something to be gained by not
> > cluttering up the environment between poplog calls.
>
> Performance issues are somewhat tricky here.  You may be surprized
> how expensive is program startup on modern Linux.  Manipulations
> on environment should be very small part of this, unless
> environment is very large.
>...
>...
> The way I did this, namely by using
> a wrapper script is rather expensive: we pay startup costs
> twice, once for shell and second time for Poplog.  This may
> be reduced by using appropriate C program.  Small statically
> linked C program should be able to start up 50-100 times faster
> than largish dynamically linked program like shell or Poplog.
> There is also possiblity of doing equivalent work in Poplog
> itself.  But ATM I want something that works well, if
> startup time matters there is room for improvement.

Out of curiosity I've just tried (re-)creating clisp.psv on my machine (a year
old), suppressing output by redirecting to /dev/null:

% time mkclisp > /dev/null
0.405u 0.021s 0:00.43 97.6%     0+0k 0+5432io 0pf+0w

On a much older machine, bought in 2011:

% time mkclisp > /dev/null
0.458u 0.021s 0:00.48 97.9%     0+0k 0+5432io 0pf+0w

In both cases the mkclisp command presupposes that the startup.psv
saved image (invoked by running the pop11 command) already exists.

Building that takes a bit longer, compiling all the main poplog infrastructure,
to be run on top of the pre-built basepop11, created when Poplog is installed.

Time on new machine is about a second:

% time mkstartup > /dev/null
0.928u 0.043s 0:00.98 97.9%     0+0k 0+4280io 0pf+0w

I can remember a time at sussex university in the 1980s when compiling clisp
(on a vax or sequent symmetry or perhaps both) took about 15 minutes. Steve
Isard may also remember such days.

That's what originally provoked John Gibson (I think, or perhaps John and Steve
Hardy?) to introduce use of saved images when running common lisp.

That was then extended to startup of pop11 and prolog!
(I may have misremembered some details.)

My feeling is that most people who use poplog or systems built on top of poplog
will typically start up then continue an interactive session for some time. So a
delay of an extra second or two in starting up will typically be insignificant.

Of course, there will be older and slower machines (with smaller amounts of
total memory, leading to more garbage collections) on which startup time will be
longer.

Aaron

Reply via email to