1

the slime manual says this: "Loading Swank faster For SBCL, we recommend that you create a custom core file with socket support and POSIX bindings included because those modules take the most time to load. To create such a core, execute the following steps:

shell$ sbcl
*(mapc ’require ’(sb-bsd-sockets sb-posix sb-introspect sb-cltl2 asdf))
 *(save-lisp-and-die "sbcl.core-for-slime")

After that, add something like this to your ‘.emacs’:

(setq slime-lisp-implementations
’((sbcl ("sbcl" "--core" "sbcl.core-for-slime"))))"

I know how to add stuff to my .emacs file but what exactly do i do for the part below i\e where, exactly, and how do i execute the steps below....i\e where do i type it. "execute the following steps:

shell$ sbcl
* (mapc ’require ’(sb-bsd-sockets sb-posix sb-introspect sb-cltl2 asdf))
* (save-lisp-and-die "sbcl.core-for-slime")"

please be specific ...I'm a noob

danlei
  • 14,121
  • 5
  • 58
  • 82

2 Answers2

0

I know how to add stuff to my .emacs file but what exactly do i do for the part below i\e where, exactly, and how do i execute the steps below....i\e where do i type it. "execute the following steps:

You start up your Lisp implementation in a shell, and enter in its REPL. While Slime is a Common Lisp (and a few languages more) environment for Emacs, the actual CL implementation is not included or part of Emacs. (Emacs itself uses a somewhat similar but different dialect, Emacs Lisp.)

So, you have to install SBCL separately, start it, and then enter the commands above in its REPL.

(mapc #'require '(sb-bsd-sockets sb-posix sb-introspect sb-cltl2 asdf))

Note that you have to use ', not for it to work. This will load the systems in your Lisp image, and:

(save-lisp-and-die "sbcl.core-for-slime")

will save that image into the file sbcl.core-for-slime. When you tell SBCL to use that image (also called core image), you won't have to load the above systems again, because they are already part of the loaded image. That's what the

(setq slime-lisp-implementations
      '((sbcl ("sbcl" "--core" "sbcl.core-for-slime"))))

in your .emacs does – it tells SLIME to use the command sbcl --core sbcl.core-for-slime when starting SBCL.

Also note, that Common Lisp is the name of the language, while CLISP is just an implementation, like SBCL. I'll retag your question accordingly.

danlei
  • 14,121
  • 5
  • 58
  • 82
0

Shell is a command-line interface to your computer. In Emacs, you may get to a shell by entering M-xshell (ie., pressing these keys in sequence: EscxshellEnter). A new window will come up, and in it a shell prompt waiting for your input. Enter sbcl at the prompt to start SBCL; you may then enter the lisp code snippets to create a new core.

For the above to work, you have to have SBCL installed first (eg, by following the instructions at www.sbcl.org).

huaiyuan
  • 26,129
  • 5
  • 57
  • 63