[uk-lispers] Hello Uk Lispers

Phil Armitage philip.armitage at gmail.com
Mon May 19 05:47:00 PDT 2008


Hi Holly,

2008/5/18 Holly Styles <hollystyles at fastmail.co.uk>:

> My platform is Windows (gasp noooo.) I have managed to get Emacs, SLIME
> and SBCL all talking together and I have done the REPL thing :) sweet.
>
> But, I am struggling with the whole package management thing.

I can help a little with the ASDF side of things, provided you're
willing to pull the packages manually rather than use ASDF-INSTALL
which I never use (I believe it is possible to get this working on
Windows but I don't even use it on Linux at the moment). The tricky
thing is chasing dependencies which needs a little bit of reading and
clicking around.

You're right that the lack of symlinks is an inconvenience on Windows
so I use the following in my lisp's init file when running on Windows
(taken from the ASDF page on CLiki (and I'm sure posting via GMail
will kill the indents, sorry for that)):

(load "c:/systems/asdf")

(in-package #:asdf)

(defvar *subdir-search-registry* '(#p"c:/systems/" #p"c:/src/")
  "List of directories to search subdirectories within.")

(defvar *subdir-search-wildcard* :wild
  "Value of :wild means search only one level of subdirectories; value
of :wild-inferiors
  means search all levels of subdirectories (I don't advise using this
in big directories!)")

(defun sysdef-subdir-search (system)
  (let ((latter-path (make-pathname :name (coerce-name system)
                       :directory (list :relative
                                    *subdir-search-wildcard*)
                       :type "asd"
                       :version :newest
                       :case :local)))
    (dolist (d *subdir-search-registry*)
      (let* ((wild-path (merge-pathnames latter-path d))
             (files (directory wild-path)))
        (when files
          (return (first files)))))))

(pushnew 'sysdef-subdir-search *system-definition-search-functions*)

(setf common-lisp-controller:*redirect-fasl-files-to-cache* nil)

This is basically providing an alternative system lookup mechanism
where it will scan (recursively if required) a directory in which to
look for .asd files. I think with a lot of systems, and/or a lot of
directory nesting, this could be a tiny bit slow but with a web
server, you're unlikely to be loading systems very frequently, except
maybe during development.

As for Hunchentoot, I believe Edi develops on Windows so that's a good
start but he uses Lispworks so I don't know how you'll get along with
SBCL. I believe there's a mailing list for Hunchentoot though where
I'm sure you'll get more informed answers.

Hope that helps a little.

-- 
Phil Armitage
http://phil.nullable.eu/


More information about the uk-lispers mailing list