Page 2 of 2
Re: Trying to figure out ASDF
Posted: Thu May 05, 2011 1:51 am
by wvxvw
Aha, cool, thank you.
Re: Trying to figure out ASDF
Posted: Sat Jun 11, 2011 10:14 am
by Indecipherable
I'm also having a problem. I have created a directory called "Center" in my main Clisp folder.
Then:
Code: Select all
(require 'asdf)
(push #p"\\Program Files\\clisp-2.49\\Center\\" asdf:*central-registry*)
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
Re: Trying to figure out ASDF
Posted: Sat Jun 11, 2011 1:20 pm
by gugamilare
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:
Code: Select all
(require 'asdf)
(push #p"\\Program Files\\clisp-2.49\\Center\\langutils\\" asdf:*central-registry*)
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.
Re: Trying to figure out ASDF
Posted: Sat Jun 11, 2011 1:22 pm
by Indecipherable
Thanks.
Windows has so many walls

Re: Trying to figure out ASDF
Posted: Sun Jun 12, 2011 8:55 pm
by georgek
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
Code: Select all
(:tree "full-path-of-your-lisp-project-directory")
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.
Re: Trying to figure out ASDF
Posted: Mon Jun 13, 2011 10:32 am
by Indecipherable
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.
Re: Trying to figure out ASDF
Posted: Mon Jun 13, 2011 5:22 pm
by georgek
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
Re: Trying to figure out ASDF
Posted: Mon Jun 13, 2011 6:52 pm
by nuntius
To find your "home directory", run (user-homedir-pathname) in lisp.
Re: Trying to figure out ASDF
Posted: Fri Jun 17, 2011 10:12 am
by Indecipherable
Must my ASDF package also be in the home directory?
Re: Trying to figure out ASDF
Posted: Fri Jun 17, 2011 10:25 am
by nuntius
Indecipherable wrote:Must my ASDF package also be in the home directory?
No. ASDF packages can be anywhere on the filesystem. Only the config files must be in one of the pre-specified locations.
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