[slime] swank-loader could use ASDF (#65)

João Távora joaotavora at gmail.com
Mon Jan 6 20:23:53 UTC 2014


> I'm only worried about slow startup time. E.g. (require :asdf) takes
> about 3 seconds in CCL.  if you have ever used ABCL you know that slow
> startups are no fun.

My ultimate use case for this feature is this one in particular.

    emacs -Q
    (require 'package) ;;; unnecessary since emacs 24.1
    M-x install-package
    slime-foo RET

    ;;; third party slime-foo contrib depends on third party
    ;;; slime-bar that depends on slime-repl that depends on slime. They
    ;;; all get installed, in the appropriate ~/.emacs.d/elpa.
    ;;;
    ;;; or using the el-get package manager

    M-x el-get
    slime-foo RET

    ;;; same thing happens but they all end up in ~/.emacs.d/el-get

Now they all the .el files are spread across across the correct places,
having been compiled by the respective package manager. Here is a mock
tree of what the file system looks like now:

    .
    |-- slime-3.0/
    |   |-- slime-autoloads.el
    |   |-- slime.el
    |   |-- slime.elc
    |   |-- swank.asd
    |   |-- asdf.lisp
    |   `-- swank.lisp
    |-- slime-bar-0.5/
    |   |-- slime-bar-autoloads.el
    |   |-- slime-bar.asd
    |   |-- slime-bar.el
    |   |-- slime-bar.elc
    |   `-- slime-bar.lisp
    |-- slime-foo-0.1/
    |   |-- slime-foo-autoloads.el
    |   |-- slime-foo.asd
    |   |-- slime-foo.el
    |   |-- slime-foo.elc
    |   `-- slime-foo.lisp
    `-- slime-repl-3.0/
        |-- slime-repl-autoloads.el
        |-- slime-repl.el
        |-- slime-repl.elc
        |-- slime-repl.asd
        `-- slime-repl.lisp

When the user "M-x slime" the three contribs are setup and loaded. The
supporting lisp files are compiled into fasls and stored somewhere
appropriate. If a user "M-x slime-connect"s to some running lisp where a
swank server is already running, we must attempt to compile any needed
supporting lisp there as well. (this might be problematic and we could
just assume that the target has the same contribs).

Now I think this could be done with or without ASDF. But I think ASDF
would make it much simpler.

According to Francois, startup times are seem OK. M-x slime on sbcl
takes well more than two seconds for me. But

* One could see more numbers across more versions:

* It's true that for a first time M-x slime on a new lisp
  implementation, compiling asdf.lisp into a fasl is going to take some
  time. In those cases I think M-x should show "Compiling ASDF, this
  only happens once".

> The advantage for swank-loader seems marginal to me.

I think with well crafted ASDF systems (and who better than François)
this file could well dissapear.

> A slightly different idea: assume we have a Makefile and a required
> "make install" step.  During that install step we assume that
> quicklisp exists or simply download it.  If we have quicklisp we have
> everything we could wish for.

I don't understand, Quicklisp takes at least as long to load as ASDF,
since it bundles it. I must be missing something. Also, in the ELPA
use-case, the user never "make"s anything. We could package quicklisp,
but I think that's going well beyond the scope of slime.



More information about the slime-devel mailing list