Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

list of asdf systems

111 views
Skip to first unread message

Jim Newton

unread,
Sep 20, 2016, 4:36:19 AM9/20/16
to
Does anyone know how to get a list of all the asdf systems which are defined and of those which ones have been loaded?

Pascal J. Bourguignon

unread,
Sep 22, 2016, 3:28:15 PM9/22/16
to
Jim Newton <jimka...@gmail.com> writes:

> Does anyone know how to get a list of all the asdf systems which are
> defined

No, this is not possible. Here, I just defined an asdf on a sheet of
paper next to my keyboard, and you won't be able to get it into the
list!


> and of those which ones have been loaded?

(asdf:already-loaded-systems)


I wonder why you're asking about asdf system, while nowadays, we use
quicklisp to _install_ and load them in general. As you can see from
the answer to your first question, it's quite impractical to work with
asdf systems that are not distributed thru quicklisp, since you won't
have access to them until you're able to install them!

With quicklisp, you can use:

(ql-dist:provided-systems t)

to get the list of all the systems you _could_ download, install, and
load with quicklisp.

--
__Pascal Bourguignon__ http://www.informatimago.com/
“The factory of the future will have only two employees, a man and a
dog. The man will be there to feed the dog. The dog will be there to
keep the man from touching the equipment.” -- Carl Bass CEO Autodesk

Jim Newton

unread,
Sep 23, 2016, 5:24:02 AM9/23/16
to
On Thursday, September 22, 2016 at 9:28:15 PM UTC+2, informatimago wrote:
> > Does anyone know how to get a list of all the asdf systems which are
> > defined
>
> No, this is not possible. Here, I just defined an asdf on a sheet of
> paper next to my keyboard, and you won't be able to get it into the
> list!

When I try to load an asdf system, does it then scan the file system directories to find .asd files and then load them? In most (maybe all) of my .asd file there is a form (asdf:defsystem) which I would assume defines an asdf system. I just was looking for an API to find out which ones have been defined.

Or is it the case that defining a system also loads it?

Jim Newton

unread,
Sep 23, 2016, 5:27:54 AM9/23/16
to
On Thursday, September 22, 2016 at 9:28:15 PM UTC+2, informatimago wrote:
> I wonder why you're asking about asdf system, while nowadays, we use
> quicklisp to _install_ and load them in general. As you can see from
> the answer to your first question, it's quite impractical to work with
> asdf systems that are not distributed thru quicklisp, since you won't
> have access to them until you're able to install them!
>

With reference to your implication that I shouldn't use asdf? Are you
suggesting that I use quicklisp to develop applications which I don't want
released publicly? And also applications which I want to branch locally?

Pascal J. Bourguignon

unread,
Sep 23, 2016, 1:47:51 PM9/23/16
to
Yes.

Now, quicklisp download systems and installs them locally.
Then quicklisp uses asdf to load locally installed systems.

But you can also install asdf system locally yourself, and have
quicklisp load them (with the help of asdf).

So when you will be using quicklisp, you will still be using asdf, but
indirectly. You will still write asd files for your software.


The advantage of using quicklisp for your won applications, is that
quicklisp will automatically download and install the dependencies of
your asdf systems.

Without quicklisp, you will have spend hours roaming the internet to
find Common Lisp software, to filter out those that come with asd files
(or write those asd files yourself), to install them locally, before
your own asdf systems may depend on them.

Pascal J. Bourguignon

unread,
Sep 23, 2016, 1:50:49 PM9/23/16
to
Jim Newton <jimka...@gmail.com> writes:

> On Thursday, September 22, 2016 at 9:28:15 PM UTC+2, informatimago wrote:
>> > Does anyone know how to get a list of all the asdf systems which are
>> > defined
>>
>> No, this is not possible. Here, I just defined an asdf on a sheet of
>> paper next to my keyboard, and you won't be able to get it into the
>> list!
>
> When I try to load an asdf system, does it then scan the file system
> directories to find .asd files and then load them?

Yes.

> In most (maybe all) of my .asd file there is a form (asdf:defsystem)
> which I would assume defines an asdf system. I just was looking for
> an API to find out which ones have been defined.
>
> Or is it the case that defining a system also loads it?

There are various ways asd uses to locate systems.

There's an old, classical way, which is to look in the list
asdf:*central-registry* for pathnames to directories, or functions to
call to resolve system names. There is also a more modern and
sophisticated way using configuration files that can be as simple or as
complex as you want (it's all documented in the asdf user manual).

But asdf doesn't maintain a list of installed systems. (You could add or
remove systems at any time by mutating the file system).

Jim Newton

unread,
Sep 27, 2016, 5:40:55 AM9/27/16
to

> But asdf doesn't maintain a list of installed systems. (You could add or
> remove systems at any time by mutating the file system).

I think I'm still confused. After asdf:defsystem has been evaluated, then the system is defined. Right?
Even if it hasn't yet been loaded.

Does asdf still need to "locate" it?

Potentially what you're saying (unless I misunderstand) is that even if a system has not yet been defined, (defsystem not yet evaluated) asdf-load might still be able to load it by using a complicated and difficult to understand search mechanism.

Did I get it right?

Pascal J. Bourguignon

unread,
Oct 2, 2016, 8:52:32 AM10/2/16
to
Jim Newton <jimka...@gmail.com> writes:

>> But asdf doesn't maintain a list of installed systems. (You could add or
>> remove systems at any time by mutating the file system).
>
> I think I'm still confused. After asdf:defsystem has been evaluated, then the system is defined. Right?
> Even if it hasn't yet been loaded.

Yes.

> Does asdf still need to "locate" it?

AFAIK, it doesn't need to locate it anymore.

> Potentially what you're saying (unless I misunderstand) is that even
> if a system has not yet been defined, (defsystem not yet evaluated)
> asdf-load might still be able to load it by using a complicated and
> difficult to understand search mechanism.
>
> Did I get it right?

This is correct.


The old and simple mechanism is asdf:*central-registry*.

If you have a file named example.asd and containing a
form (asdf:defsystem :example)
in the directory /tmp/, then:

(push #P"/tmp/" asdf:*central-registry*)
(asdf:oos 'asdf:load-op :example)

will load this file, define this system, and load this system.

The new mechanism is documented at:
https://common-lisp.net/project/asdf/asdf.html#Configuring-ASDF-to-find-your-systems



--
__Pascal Bourguignon__

Croire en l'histoire officielle, c'est croire des criminels sur parole.
-- Simone WEIL (1909-1943) philosophe Française.
0 new messages