[cl-debian] Re: clc, asdf-install, slime, fasl paths, etc.

Faré fahree at gmail.com
Mon Aug 22 15:57:22 UTC 2005


Dear Peter, dear cl-debian'ers

concerning common-lisp-controller, there's one function of it that I'd
like to be more extensible:

(defmethod asdf:output-files :around ((op asdf:operation) (c asdf:component))
  "Method to rewrite output files to fasl-path"
  (let ((orig (call-next-method)))
    (cond
      ((beneath-source-path-p c)
       (mapcar #'source-path-to-fasl-path orig))
      (t
       orig))))

In my script cl-launch.sh < http://www.cliki.net/cl-launch >, I reuse
the same trick, but clisp made me realize I was overriding your method
rather than composing with it. Thus, I think we should rather have (1)
a defun for the path translation, so it can be reused in other
contexts (?), (2) an extensible list of path translations that is
looked up by said function, so I can extend it.

Also, it looks like you could use (getenv "LOGNAME") instead of HOME,
to choose your cache directory.

[ François-René ÐVB Rideau | Reflection&Cybernethics | http://fare.tunes.org ]
The only Real Programming Language is that in which the Universe was specified,
God being the only Real Programmer (I thought God was an integer???).
Hey! I would like the source code for the Universe. Let's demand that
God make it free software! (Actually, it is: everyone has the _right_ to
understand how the universe works; opportunity is of course a different matter)


On 17/08/05, Faré <fahree at gmail.com> wrote:
> Hello, CL-debian'ers.
>
> I'm a new subscriber here.
>
> I understand there are many concerns with having a fasl cache under
> $HOME. However, there are times when this is not an option, and it
> would be nice to have some semi-standard packaging system for CL that
> supported but did not require system administrator access and/or that
> could be shared between many machines with same architecture.
>
> * It is evil to have lots of differently named cache directories under
> $HOME, that clutter backups (and/or prevent them from nicely fitting
> in your favorite media). Having everything under ~/.cache/lisp-fasl/
> or ~/.lisp/cache/fasl/ should help. This would be the equivalent of
> the current /var/cache/common-lisp-controller/$USERNAME/
>
> * Since a same implementation (sbcl, ecl, clisp, etc.) can have many
> variants (architectures, fasl or source versions), a proper cache
> subdirectory should distinguish between them. c-l-c could (optionally)
> rm -rf the global (and user?) cache directories when an implementation
> package is removed.
>
> * It would be nice to semi-standardize a string to name the fasl
> format -- and encourage implementations to provide a simple interface
> to such a string, falling back to some gross hack such as the one used
> by SLIME to generate its unique-directory-name. Be careful to make
> this interface user-overridable, so that the user may differentiate
> things that look the same but are not. For instance have it be a
> variable impl-ext:*fasl-format-name* that the user could set in an
> initialization file or command-line argument.
>
> > I could also build in a hook into clc to allow moving the cache
> > directory. Slime could then instruct clc to use the same directory.
> That would be nice.
>
> > You mean from user-homedir-pathname? We just use that as a method to
> > make $USER unique.
> Several users may have the same $HOME -- it's a user variable that can
> be set to anything, and the administrator might share paths in
> /etc/passwd, too. It would be better to use usernames from
> getpwuid(getuid()) -- maybe let the shell script wrapper do that if
> it's too hard to obtain from within all the various lisp
> implementations.
>
> > asdf is only well-described for sbcl, that is one of reasons I make clc.
> > I did not place the fasls in $HOME because I wanted to make life easier
> > for administrators, and /var/cache normally is on the backup exclusion
> > list already :-)
>
> >> Maybe we can think of something that would unify what happens for user
> >> installations for slime, c-l-c and asdf-install?
> >
> > Well. I fear we have a fundamental difference in option: I do not think
> > having fasls in (or beneath) the homedirectory is a good idea.
> >
> I think it's better to have a system cache, too. Sometimes this isn't
> an option. Or sometimes, you want to share that cache between
> machines. In any case, configurability would be nice, here.
>
> [ François-René ÐVB Rideau | Reflection&Cybernethics | http://fare.tunes.org ]
> Wir Mathematiker sind alle ein bisschen meschugge.
> (We mathematicans are all a bit crazy). -- Lev Landau



More information about the Cl-debian mailing list