From: jonathon
Subject: Question about asdf and require
Date: 
Message-ID: <1121220436.400881.218800@g43g2000cwa.googlegroups.com>
I don't quite understand the relationship between these two.  I
understand that asdf loads a system.  I *think* I understand that
require loads/accesses/interns/includes a package/module in the current
image, but it's clear I don't have a clear grasp on what's going on.
And I've found that some systems I used asdf to load at one time can
now be loaded with require even if they are not in the current image.

Would someone be so kind as to break this down for me?

(I think I should also mention I am running sbcl.)

From: M Jared Finder
Subject: Re: Question about asdf and require
Date: 
Message-ID: <TZednWM7DMsgGknfRVn-3Q@speakeasy.net>
jonathon wrote:
> I don't quite understand the relationship between these two.  I
> understand that asdf loads a system.  I *think* I understand that
> require loads/accesses/interns/includes a package/module in the current
> image, but it's clear I don't have a clear grasp on what's going on.
> And I've found that some systems I used asdf to load at one time can
> now be loaded with require even if they are not in the current image.
> 
> Would someone be so kind as to break this down for me?
> 
> (I think I should also mention I am running sbcl.)

 From the SBCL manual:

    The behaviour of `require' when called with only one argument is
implementation-defined.  In SBCL, `require' behaves in the following
way:

  -- Function: common-lisp:require module-name &optional pathnames
      Loads a module, unless it already has been loaded. `pathnames', if
      supplied,    is a designator for a list of pathnames to be loaded
      if the module    needs to be. If `pathnames' is not supplied,
      functions from the list    `*module-provider-functions*' are
      called in order with `module-name'    as an argument, until one of
      them returns non-NIL.  User code is    responsible for calling
      `provide' to indicate a successful load of the    module.

  -- Variable: sb-ext:*module-provider-functions*
      See function documentation for `require'

If you look at the value of sb-ext:*module-provider-functions*, you'll 
see that it has an ASDF provider:

* sb-ext:*module-provider-functions*
(ASDF::MODULE-PROVIDE-ASDF SB-IMPL::MODULE-PROVIDE-CONTRIB)

   -- MJF
From: Pascal Bourguignon
Subject: Re: Question about asdf and require
Date: 
Message-ID: <87vf3fe9bl.fsf@thalassa.informatimago.com>
"jonathon" <···········@bigfoot.com> writes:

> I don't quite understand the relationship between these two.  I
> understand that asdf loads a system.  

The relationship, if it exists, is implementation dependant.


> I *think* I understand that
> require loads/accesses/interns/includes a package/module in the current
> image, but it's clear I don't have a clear grasp on what's going on.

What's going on is that require/provide are deprecated and mostly
implementation dependant.  Better to avoid them IMO.


> And I've found that some systems I used asdf to load at one time can
> now be loaded with require even if they are not in the current image.

Indeed, with some implementations require is patched to hook out to
asdf automatically.
(require 'xyz) becomes an equivalent for (asdf:oos 'asdf:load-op :xyz)
I would stay with the later as it's what's portable.


> Would someone be so kind as to break this down for me?
>
> (I think I should also mention I am running sbcl.)


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
Until real software engineering is developed, the next best practice
is to develop with a dynamic system that has extreme late binding in
all aspects. The first system to really do this in an important way
is Lisp. -- Alan Kay