Setting up a working Common Lisp environment for the aspiring Lisp newbie

后端 未结 7 1298
小鲜肉
小鲜肉 2021-01-30 18:52

I\'ve been a UNIX sysadmin for a long time, and aside from automating tasks with shell scripting, some light PHP work, and a few simple C programs, I\'ve never done much in the

相关标签:
7条回答
  • 2021-01-30 19:20

    There are different ways of setting up a Lisp environment, from manual approaches to out-of-the-box installers.

    The following answer is for clbuild, which always downloads brand-new versions of all packages for you:

    Assuming you have Emacs and SBCL already installed, the following gets you up and running with SLIME. (You also need bash, darcs, CVS, etc, but FreeBSD ports include all of these, as far as I know.)

    $ darcs get --set-scripts-executable http://common-lisp.net/project/clbuild/clbuild
    $ ./clbuild/clbuild install slime
    $ ./clbuild/clbuild slime
    

    You don't have to (indeed, should not) modify your .emacs for this. If you have played with a manual installation of SLIME before, clean out the old changes from .emacs. clbuild does the slime setup for you.

    If you like, clbuild can also fetch and build a recent SBCL for you:

    $ ./clbuild/clbuild install sbcl
    $ ./clbuild/clbuild compile-implementation sbcl
    # afterwards you can uninstall the FreeBSD-provided Lisp used for bootstrapping
    

    As for your usage questions:

    • C-x 5 2 gives you the second window to play with
    • C-c C-k compiles & loads the current buffer
    • There is tab completion built-in, but also other completion features. Personally I love the C-c M-i fuzzy completion.
    • jrockway's answer has additional good tips on emacs commands which I won't repeat here
    0 讨论(0)
提交回复
热议问题