Archive for September, 2011

Juxtaposition

Posted in Uncategorized on September 29, 2011 by jkiparsky

Two articles appeared on the front page of Wednesday’s Times. Each of them is a strong article on its own, but they play particularly nicely together.

The first notes some recent trends regarding what we might call legislative and direct democracy. The second describes a particular case of the same.

Slime: “C-c C-c is undefined”

Posted in Uncategorized on September 17, 2011 by jkiparsky

This stumped me for a little while: trying to get used to the SLIME, I kept getting this error. Finally worked it out: while lisp doesn’t care what you call your files, and most books suggest using .lisp or .cl as the extension, SLIME only detects .lisp files. If you’re editing, say foo.cl (the reasonable name for a common lisp file, I’d think), SLIME won’t figure out that you’re actually dealing with lisp. Call it foo.lisp.

EDIT: I am informed by Zach Beane (see comment below) that slime can be told to recognize the .cl extension. As he says, you need to change your .emacs file to set your auto-mode-alist so it’ll recognize .cl as the exension for “common lisp” and Do the Right Stuff with those files, for example, compile them when you enter C-c C-c.

I find a good start of an explanation of assigning file associations here and a more in-depth and typically GNU-style explanation here

However, the simplest answer is to simply use the .lisp extension and get on with actually trying to learn lisp. There’s something very like Knuth’s Law of Optimizing in effect for EMACS. The first rule is: don’t. You’re here to learn lisp, or to write something, or to use a word processor. Any time you spend customizing your editor is time you’re not spent getting it to do what you need done. The second rule is, if you’ve learned enough about lisp that it’s obvious what you need to do, and you’ve become sufficiently adept at reading the GNU “documentation” that it seems to make sense to you, then go for it.