> X-Authentication-Warning: alstadhome.dyndns.org: hakon set sender to
>[EMAIL PROTECTED] using -f
> Cc: John Klein <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
> From: [EMAIL PROTECTED] (=?iso-8859-1?q?H=E5kon?= Alstadheim)
> Date: Sat, 26 Oct 2002 10:56:23 +0200
> X-listar-version: Listar v1.0.0
> Sender: [EMAIL PROTECTED]
> X-original-sender: [EMAIL PROTECTED]
> X-list: cmucl-help
> X-UIDL: ?,2"!mp&#!Nm6!!ZRU!!
>
>
> "Pierre R. Mai" <[EMAIL PROTECTED]> writes:
>
> > John Klein <[EMAIL PROTECTED]> writes:
> >
> >> I have upgraded to 18d, and I am a bit baffled by require.
> >> What is the correct use of require?
> >>
> >> Before 18d, I would do (require 'foo) and
> >> cmucl would load "foo.x86f" in (ext:search-list "modules:")
> >>
> >> Now, 18d has changed it to try to load
> >> "foo-library.x86f" in (ext:search-list "modules:")
> >>
> >> But the CLHS says that my old usage is nonportable and that
> >> require is deprecated.
> >> Following the CLHS, should I define (ext:search-list "mylib:") and do
> >> (require "foo" "mylib:foo") to specify the explicit filename?
> >>
> >> So what the philosophically correct way to use `require', if I want
> >> to ensure compatibility with future cmucl revisions?
> >> Is `require' still meant to be used, given that it is deprecated?
> >
> > Personally I think that you are nearly always better off to either
> > create your own require-like mechanism, or to use one of the defsystem
> > utilities, which take care of compiling and loading code as needed.
>
> This is more or less what I do with require. I make some stubs in
> uncompiled lisp files and stick them in the modules directory. I guess
> I should keep them in a separate place, but /I/ know which is which,
> and the system is only for teaching myself anyway. Here is how
> "modules:clocc-port-library.lisp" looks on my system:
>
> --
> (load "clocc:src;port;port.system")
> (mk:oos "port" :load)
> --
>
> The correct way would not need to load the system file, because my
> lisp would know where to find system files by itself, but I haven't
> looked that closely at defsystem, and I'm thinking of learning some
> other, newer facility anyways, so that keeps getting put off.
MK:DEFSYSTEM 3.3 has a function MK:ADD-REGISTRY-LOCATION which will
allow you to add a pathname to the set of places where DEFSYSTEM looks
for .system definition files. If you stick that in your CL
initialization file, e.g.
(mk:add-registry-location "/foo/systems/")
then issuing
(mk:oos "zut" :load)
will look up "zut.system" in the registry and load it before
OPERATE-ON-SYSTEM is actually executed,
In MK:DEFSYSTEM 4.x (the newest version, still not quite ready for
prime time) this machinery is cleaned up and possibly extended.
Cheers
--
Marco Antoniotti ========================================================
NYU Courant Bioinformatics Group tel. +1 - 212 - 998 3488
715 Broadway 10th Floor fax +1 - 212 - 995 4122
New York, NY 10003, USA http://bioinformatics.cat.nyu.edu
"Hello New York! We'll do what we can!"
Bill Murray in `Ghostbusters'.