opening it up with Common Lisp
Book review: Darwinia
Summer reading: Spin
the Omnivoire's Delimma
the Golem's Eye
I just had the honor of checking in the 100th revision of ASDF. Cool!
The newest feature is the addition of load-preferences and preference-file-for-system/operation. These generic functions can be specialized on the system and the operation.
The out of the box behavior of load-preferences is to do nothing except in the case of a load-op or a load-source-op. For either of those operations, load-preferences calls preference-file-for-system/operation to get a pathname. If the pathname returned exists, load-preferences loads it.
By default, preference-file-for-system/operation returns ~/.asdf/<name-of-system>.lisp. It's been said that an example is worth a 5.19 pictures so here are my preferences for asdf-binary-locations (in /users/gwking/.asdf/asdf-binary-locations.lisp):
(in-package asdf) (setf *default-toplevel-directory* "/users/gwking/temporary/fasls/") (setf *centralize-lisp-binaries* t) ;; force SBCL things to stay in SBCL (setf *source-to-target-mappings* '(("/usr/local/lib/sbcl/" nil) ("/usr/local/lib/sbcl0.9.9" nil) ("/usr/local/lib/sbcl0.9.7" nil)))
These put all of my compiled files into sub-directories of ~/temporary/fasls (except for SBCL stuff which stay where they are expected).
The nice thing about this is that the preferences are loaded after the system whose preferences are being set is loaded. This is nice because it's hard to set preferences for a system that doesn't exist yet (because, for example, the home package of the variables you'd like to set isn't there).
(Thanks to the CCLAN and especially Christophe Rhodes who provided valuable feedback! Any remaining errors are probably the fault of either the Bush or the Clinton administrations. Or both of them together).
Copyright -- Gary Warren King, 2004 - 2006