Trying to figure out ASDF
Re: Trying to figure out ASDF
Aha, cool, thank you.
-
- Posts: 47
- Joined: Fri Jun 03, 2011 5:30 am
- Location: Behind you.
- Contact:
Re: Trying to figure out ASDF
I'm also having a problem. I have created a directory called "Center" in my main Clisp folder.
Then:
And then I am pretty much lost
I have downloaded langutils for example, and now I cannot figure out how to load it
Do I have to do something with those .asd files?
Thanks.
P.s: I am running Windows Vista
Then:
Code: Select all
(require 'asdf)
(push #p"\\Program Files\\clisp-2.49\\Center\\" asdf:*central-registry*)

I have downloaded langutils for example, and now I cannot figure out how to load it

Do I have to do something with those .asd files?
Thanks.
P.s: I am running Windows Vista
Don't take the FUN out of DEFUN !
-
- Posts: 406
- Joined: Sat Mar 07, 2009 6:17 pm
- Location: Brazil
- Contact:
Re: Trying to figure out ASDF
You seem to be using Windows. Since Windows cannot create symbolic links, you will need to push the directory of each library into asdf:*central-registry*. For instance, if you extracted langutils into the directory called "Center", you should do this:
This is not very user-friendly, I know. You should consider using Quicklisp or Lisp Starter Pack, they both run very neatly from Windows, unlike ASDF or clbuild which were designed for Linux and Mac users.
Code: Select all
(require 'asdf)
(push #p"\\Program Files\\clisp-2.49\\Center\\langutils\\" asdf:*central-registry*)
-
- Posts: 47
- Joined: Fri Jun 03, 2011 5:30 am
- Location: Behind you.
- Contact:
Re: Trying to figure out ASDF
Are you using asdf2? Quicklisp is great for replacing asdf-install but asdf is it's own thing.
With asdf2 it's very simple to set up a project directory that will automatically push your projects to the asdf central registry. Then they're easy to load from Quicklisp.
This is what I do on WIndows and it works great:
1. From your home directory create the file .config/common-lisp/source-registry.conf.d/asd-link-farm.conf -- you can call that file whatever you want as long as it has the conf type. So for example, my link-farm is at "C:\Documents and Settings\george\.config\common-lisp\source-registry.conf.d\asd-link-farm.conf". This is on XP, but you just need to find the home directory on your Vista and do the same thing.
2. Create a directory where you'll put your lisp projects. This can be any directory and can include non-lisp things too.
3. In your conf file add
Your Lisp should now scan that directory and its subdirectories. You can add multiple lines for different directories if you wish.
4. When you create a new project put it in one of these directories. Then in your LIsp do (asdf:initialize-source-registry) and the registry will include your new projects loadable via asdf or Quicklisp. Of course if you restart your Lisp it will automatically contain all these projects from the get go (of course you have to load them, but they're accessible).
The creator of Quicklisp has a good post on this topic here, http://xach.livejournal.com/278047.html?thread=674335.
With asdf2 it's very simple to set up a project directory that will automatically push your projects to the asdf central registry. Then they're easy to load from Quicklisp.
This is what I do on WIndows and it works great:
1. From your home directory create the file .config/common-lisp/source-registry.conf.d/asd-link-farm.conf -- you can call that file whatever you want as long as it has the conf type. So for example, my link-farm is at "C:\Documents and Settings\george\.config\common-lisp\source-registry.conf.d\asd-link-farm.conf". This is on XP, but you just need to find the home directory on your Vista and do the same thing.
2. Create a directory where you'll put your lisp projects. This can be any directory and can include non-lisp things too.
3. In your conf file add
Code: Select all
(:tree "full-path-of-your-lisp-project-directory")
4. When you create a new project put it in one of these directories. Then in your LIsp do (asdf:initialize-source-registry) and the registry will include your new projects loadable via asdf or Quicklisp. Of course if you restart your Lisp it will automatically contain all these projects from the get go (of course you have to load them, but they're accessible).
The creator of Quicklisp has a good post on this topic here, http://xach.livejournal.com/278047.html?thread=674335.
-
- Posts: 47
- Joined: Fri Jun 03, 2011 5:30 am
- Location: Behind you.
- Contact:
Re: Trying to figure out ASDF
Thanks
But, by "home directory", do you mean the home lisp implementation directory? Do I have to have another directory named "source-registry.conf.d" which contains the .conf file?
Thanks again.

But, by "home directory", do you mean the home lisp implementation directory? Do I have to have another directory named "source-registry.conf.d" which contains the .conf file?
Thanks again.
Don't take the FUN out of DEFUN !
Re: Trying to figure out ASDF
The home directory is your user home directory. The tricky part is that your Windows OS may not call this a 'home directory', but on my Windows XP, for my user 'george' (me), it looks like:
"C:\Documents and Settings\george\"
So the directory for the .conf file is:
"C:\Documents and Settings\george\.config\common-lisp\source-registry.conf.d\asd-link-farm.conf"
Now another trick is that different applications will not always choose your Windows home as their home directory, but if they don't they usually choose a subdirectory of it. For example Emacs on Windows will use the 'Application Data' subdirectory from the user home as its home. But it's likely that your Lisp will choose your Windows home as the 'home directory'.
ASDF2 actually has many rules for where it finds packages, the one I gave as an example is just the simplest. You can read more about it here:
http://common-lisp.net/project/asdf/asd ... or-systems
But the simple explanation is here
http://common-lisp.net/project/asdf/asd ... uring-ASDF
"C:\Documents and Settings\george\"
So the directory for the .conf file is:
"C:\Documents and Settings\george\.config\common-lisp\source-registry.conf.d\asd-link-farm.conf"
Now another trick is that different applications will not always choose your Windows home as their home directory, but if they don't they usually choose a subdirectory of it. For example Emacs on Windows will use the 'Application Data' subdirectory from the user home as its home. But it's likely that your Lisp will choose your Windows home as the 'home directory'.
ASDF2 actually has many rules for where it finds packages, the one I gave as an example is just the simplest. You can read more about it here:
http://common-lisp.net/project/asdf/asd ... or-systems
But the simple explanation is here
http://common-lisp.net/project/asdf/asd ... uring-ASDF
Re: Trying to figure out ASDF
To find your "home directory", run (user-homedir-pathname) in lisp.
-
- Posts: 47
- Joined: Fri Jun 03, 2011 5:30 am
- Location: Behind you.
- Contact:
Re: Trying to figure out ASDF
Must my ASDF package also be in the home directory?
Don't take the FUN out of DEFUN !
Re: Trying to figure out ASDF
No. ASDF packages can be anywhere on the filesystem. Only the config files must be in one of the pre-specified locations.Indecipherable wrote:Must my ASDF package also be in the home directory?
Note that it should be possible to use shortcuts on windows systems, and even symlinks on Vista or 7; but these are not well supported by ASDF or some CL implementations (i.e. breakage would be unnoticed by the main developers).
ASDF's basic procedure to evaluate (asdf:load-system :foo) is
- look in the config files (or asdf:*central-registry* if non-empty) to find locations for *.asd files
- read each asd file in order until one says (defsystem :foo)
- resolve any symlinks or shortcuts to find the "truename" (actual physical location) of the asd file
- look for source files using paths relative to that truename
- check whether precompiled object files (fasls) exist and load them if current or recompile if stale (timestamp compared to source)
- load in the fasls