How to start programming with SLIME and Steel Bank Common Lisp on Windows 7 x64?
Asked Answered
N

4

5

I'd very much like to start using these tools, but it seems I'm not smart enough :-(

I've spent hours reading docs, moving folders around and editing config files, but I still cannot start Emacs ...

Nashville answered 20/8, 2012 at 15:2 Comment(2)
Have you seen this?Mallorca
Yeah, I've seen it, it's included in the SLIME download. But it doesn't say what file I need to run to start it ...Nashville
H
3

The easiest way to get started is probably by downloading and running either Lispbox or Lisp Cabinet. Both of them integrate Emacs, SLIME, Quicklisp, and a Lisp implementation in a single package, obviating the need to edit any configuration files.

Note that Lispbox supports Clozure CL only; but while Clozure CL isn't SBCL, it's really pretty similar in look, feel, and library support.

Hibachi answered 20/8, 2012 at 18:0 Comment(0)
A
5

Although it took quite some time to figure everything out, I was able to successfully install Steel Bank Common Lisp (SBCL), GNU Emacs, and SLIME onto a Windows 7 64-bit system. Here are the steps I took:

  1. Install Steel Bank Common Lisp. I downloaded it from the SBCL site by clicking the box which intersects "Windows" and "AMD64." It should take you to a Sourceforge page which automatically starts downloading the link. This should download the binary.msi file and not the tar.gx file. (I've learned the hard way that tar.gz files are a pain to deal with on a Windows system.) After downloading the file, clicking it should start an install wizard which should take you through the installation process step-by-step.

    At the time of writing, the SBCL version for 64-bit Windows is 1.1.17, and according to the SBCL website it is a port in progress instead of being fully supported. If you prefer, I imagine you could also download the more stable 1.1.12 version for 32-bit Windows by clicking the box to the left; however, I have yet to run into any serious problems using the 1.1.17 64-bit version of SBCL.

  2. Install GNU Emacs. This can be downloaded from the Emacs mirror site. (I was going to link it for you, but I am limited to posting only two links and I need to save a link for later.) Click the tar.xz file (not the tar.gz file) for the most recent version of Emacs, which will then download a zip file to your computer; at the time of writing, the most recent Emacs version is 24.3. Once downloaded, open the files with WinZip or a similar program and extract the entire contents of the zip file into a folder of your choice on your computer (preferably one that is fairly close path-wise to the C drive and someplace easy for you to remember). You can extract files in WinZip by clicking the "extract" button at the very top of the program; this should create a new folder on your computer with all the individual Emacs files contained inside of it. (Make sure you don't have any individual files selected while clicking the extract button, since WinZip will only extract the file you've selected in that particular case.) Once the files have been extracted, simply click the runemacs.exe file in the bin folder (or the emacs.exe file if you prefer to use the console instead of a GUI) and the program should successfully install.

    Before extracting the entire zip file, it may be beneficial to read the README and README.W32 files contained in the zip download to glean more information, but Emacs should install successfully if the steps above are followed closely. After installation, it will help you greatly to go through the Emacs tutorial included with the program. You can either click the tutorial link that is presented when you first open Emacs, or you can hit [Control-h] then [t] while in Emacs to load the tutorial.

  3. Install SLIME. SLIME can be downloaded from its GitHub page, or you can click the "latest release" link at the main SLIME site; at the time of writing, the latest SLIME release is version 2.5. Again, be sure to click the source code zip button instead of the tar.gz button. Similar to installing Emacs, this will download a zip file, and you can then use WinZip to extract the entire contents of the file to a location of your choice on your computer. However, this time, make sure to extract SLIME into a path location* that does not contain folders with spaces in their name (that is, do not extract SLIME to "C:\Program Files" or "C:\Shared Folder\Programs" or something similar). This will become important in the next step, when we configure Emacs to run SLIME.

    *A path location is simply the list of folders you have to go through to get to a program. For example, a document on your computer may have the path "C:\Users\YourName\MyDocuments\document-title.doc". When choosing a location for SLIME, in addition to avoiding folders with spaces in the name, try to install SLIME to a folder fairly close to the C drive, since you'll have to remember and write out the path location for SLIME in the next step.

  4. Setup SLIME in Emacs. At this point, you should have all the necessary programs successfully installed on your computer. The last step, which tends to be the hardest, is modifying your .emacs file so you can use SLIME with Emacs. (This page explains how to manipulate the .emacs file exceptionally well and also contains generally useful information you'll want to know if you plan on using Emacs on a regular basis.) You can find/create the .emacs file by running Emacs and hitting [Control-x] followed by [Control-f]. This should open a find file command in the bottom buffer; after the colon, type "~/.emacs" (without the quotes), press return/enter, and it should open your .emacs file. At this point, copy the exact text from below into your .emacs file word for word:

    (add-to-list 'load-path "C:\\wherever-you-installed-SLIME\\slime-2.5")
    (require 'slime)
    (add-hook 'lisp-mode-hook (lambda () (slime-mode t)))
    (add-hook 'inferior-lisp-mode-hook (lambda () (inferior-slime-mode t)))
    (setq inferior-lisp-program "sbcl")

    Replace "C:\\wherever-you-installed-SLIME\\slime-2.5" with whatever path location and name you have for your SLIME folder.

    When you are done writing this into the .emacs file, save the file by either using the File-Save options from the menu or by hitting [Control-x] followed by [Control-s]. If a save-as prompt comes up, be sure to name the file .emacs and save it under "C:\Users\YourName\AppData\Roaming\.emacs". (At least, this is where my Windows 7 system automatically saves the .emacs file. If your computer saves it somewhere else, you can search the C drive for the location of the .emacs file if necessary.) Make sure there is only one instance of the .emacs file; if there are multiple copies of the .emacs file, the Emacs program will not necessarily recognize the configuration you just set up.

    Once you have saved the .emacs file with the above code written in it, close out the Emacs program and re-open it. Once reopened, type [Alt-x] followed by [slime] (it will appear as "M-x slime" at the bottom) and hit enter/return. Voila: Emacs should be running SLIME at this point. Congrats, you just installed Emacs with SLIME running SBCL on a Windows 64-bit system!

    Remember when I said not to choose any folders with spaces in the name when extracting SLIME? It has to do with this step; if you choose a folder with a space (such as C:\\Program Files\\slime-2.5), the .emacs file will view it as "C:\\Program" with "Files\\slime-2.5" interpreted as additional information instead of the whole path location. If for some reason you had to extract the SLIME zip file to a folder with a space in the name, there are ways around this issue, but it unnecessarily complicates the process; I find it easiest simply to avoid spaces in the SLIME path location. Also be sure to use double backslashes instead of single backslashes when writing out the path location in the .emacs file, or you will run into problems. (I learned this the hard way.)

If you have any remaining questions, feel free to send me a message via email.

Andreandrea answered 4/5, 2014 at 2:24 Comment(0)
H
3

The easiest way to get started is probably by downloading and running either Lispbox or Lisp Cabinet. Both of them integrate Emacs, SLIME, Quicklisp, and a Lisp implementation in a single package, obviating the need to edit any configuration files.

Note that Lispbox supports Clozure CL only; but while Clozure CL isn't SBCL, it's really pretty similar in look, feel, and library support.

Hibachi answered 20/8, 2012 at 18:0 Comment(0)
C
2

This does not provide a direct answer to the question, but I'd recommend using Linux as your OS if possible. It's pretty easy to install Linux side by side with Windows (I recommend Ubuntu as the Linux distro).

For some open source software and packages, installing on Windows is quite a bit harder. Most of the open source community is on Linux, and many open source developers seem to focus on providing easy to use Linux installation processes first. Web development specifically is an area where it's much easier to use Linux.

I've set up Slime + SBCL on Windows 7, and it was pretty painful. Setting it up on Ubuntu was very easy and quick. This is something to think about if you plan to use other open source software, libraries, etc.

Cist answered 22/8, 2012 at 23:9 Comment(0)
S
1

(let's answer this old question for fellow googlers…)

Since end 2016, we can use Portacle, a portable and multiplatform Common Lisp development environment. It ships Emacs25 (slightly customized), SBCL, Slime, Quicklisp and Git all packaged together, no installation needed: download, extract and run. It's the easiest way !

(and it looks like we have more tools like Lisp Machine, a lisp IDE in a Docker container: https://github.com/CodyReichert/awesome-cl#text-editor-resources)

Scorpion answered 20/4, 2017 at 23:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.