Lisp HUG Maillist Archive

A new version of my lw-commands stuff, and a question

In case anyone is interested I put up a new version of my
lw-commands.lisp file which both lets you define new colon commands
for LW and provides a fair slew of them itself.  It's at
http://www.tfeb.org/lisp/implementation-hax#LW-COLON-COMMANDS.  It's
completely undocumented, but the most interesting new things it has
are:

    :& <form> -- makes a new process and runs <form> in it.

    :require <module> -- do elaborate searching for <module>.

The :require command is also available as the function
(org.tfeb.lw-commands:require-module ...), and there is a search list
and a semi-documented (and probably semi-working!) search algorithm. A
typical search list might be:

    ((:host "CLEY-LIB"
      :directory (:absolute "MODULES")
      :name "*-LOADER"
      :type "LISP"))

- this is given in this listy form to avoid issues of logical
hosts not yet existing when images get dumped - CLEY-LIB gets defined
by our site init. The end result is that something like:

    :require :com.cley.weld

or equivalently

    (org.tfeb.lw-commands:require-module "COM.CLEY.WELD")

will find CLEY-LIB:MODULES;COM;CLEY;WELD;WELD-LOADER and load it,
expecting that it will provide the "COM.CLEY.WELD" feature.  It will
also look in a bunch of other places like
CLEY-LIB:MODULES;COM;CLEY;WELD-LOADER - the search algorithm is fairly
hairy.

Anyway, maybe it's useful to someone.

The question is: is there any reliable way of loading a system defined
with DEFSYSTEM, and then forgetting the system definition?  I do this
like this:

    (let ((systems (scm:all-systems)))
      ... define and load new systems ...
      (dolist (new (set-difference (scm:all-systems) systems 
                                   :key #'scm:module-name))
        (lw:delete-system new)))

And this works, but if the system browser is open at the point where
you do this it has a fairly major seizure.

The reason I want to do this is that I have huge things with many
systems in them, which I'm trying to load as libraries, and I don't
want to clutter up the system browser with system definitions which
aren't useful (for instance there are no sources where the library
came from).

Thanks

--tim



Re: A new version of my lw-commands stuff, and a question

Unable to parse email body. Email id is 504

Re: A new version of my lw-commands stuff, and a question

* Kevin Rosenberg wrote:

> May I suggest adding :cd (change dir) and :pwd (print dir) to your
> standard commands?

Yes, can you tell me how to do this? I mean: I can implement the
command, but I'm not sure what I need to change to actually change
LW's idea of the directory.  It doesn't seem to be
*DEFAULT-PATHNAME-DEFAULTS*...

Thanks

--tim


Re: A new version of my lw-commands stuff, and a question

Tim Bradshaw <tfb@cley.com> writes:

> * Kevin Rosenberg wrote:
> 
> > May I suggest adding :cd (change dir) and :pwd (print dir) to your
> > standard commands?
> 
> Yes, can you tell me how to do this? I mean: I can implement the
> command, but I'm not sure what I need to change to actually change
> LW's idea of the directory.  It doesn't seem to be
> *DEFAULT-PATHNAME-DEFAULTS*...

HCL:CD perhaps?

Regards,
-- 
Nils Goesche
"Don't ask for whom the <CTRL-G> tolls."

PGP key ID 0x42B32FC9


Re: A new version of my lw-commands stuff, and a question

* Kevin Rosenberg wrote:

> hcl:change-directory
> hcl:get-working-directory

OK, there's a new version with :cd, :pwd, :pushd, :popd and :dirs.
They may even work.  the directory stack is not thread-local as I
don't think the working directory is (this is as opposed to the
package stack, which is thread-local).

--tim


Re: A new version of my lw-commands stuff, and a question

Unable to parse email body. Email id is 512

Re: A new version of my lw-commands stuff, and a question

Unable to parse email body. Email id is 513

Updated at: 2020-12-10 09:01 UTC