Posts tagged lisp

Two simple pattern matchers for Common Lisp

:: programming, lisp

I’ve written two pattern matchers for Common Lisp:

  • destructuring-match, or dsm, is a case-style construct which can match destructuring-bind-style lambda lists with a couple of extensions;
  • spam, the simple pattern matcher, does not bind variables but lets you match based on assertions about, for instance, the contents of lists.

Both dsm and spam strive to be simple and correct.

The endless droning

:: lisp, doomed

Someone asked about better Lisp IDEs on reddit. Such things would obviously be desirable. But the comments are entirely full the usual sad endless droning from people who need there always to be something preventing them from doing what they pretend to want to do, and are happy to invent such barriers where none really exist. comp.lang.lisp lives on in spirit if not in fact.

[The rest of this article is a lot ruder than the above and I’ve intentionally censored it from the various feeds. See also corrections and clarifications.]

The proper use of macros in Lisp

:: computer, lisp

People learning Lisp often try to learn how to write macros by taking an existing function they have written and turning it into a macro. This is a mistake: macros and functions serve different purposes and it is almost never useful to turn functions into macros, or macros into functions.