Common Lisp: come for the elegance, stay for the power.

Common Lisp is the large programming language that results from a long-running committee process that tried to, among other things, harmonize several competing commercial Lisp implementations. Scheme, a slimmer and purer language, still has a place in my heart, but the longer I use Common Lisp the more I appreciate its alarmingly large ANSI specification. It's packed with things I actually use.

For years my love of the Lisp family of languages was a quirk good only for customizing Emacs and the source of occasional jokes from friends. But the last few years have seen a welcome growth in Lisp's popularity and the development of great libraries for things the ANSI spec doesn't cover: web programming, web clients, regular expressions, graphics, XML manhandling, text processing, etc. I'm making regular use of even an SNMP library. Code I would only have written in Python not too long ago I can now readily produce in a few lines of Lisp:

(defun apache-server-status (url)
  "construct a plist with a few stats from an Apache HTTP server"
      (ppcre:register-groups-bind (accesses traffic-volume)
          ("(?m).*<dt>Total accesses: (.*) - Total Traffic: (.*?)</dt>$"
           (drakma:http-request url))
        (list :accesses accesses :traffic-volume traffic-volume))
    (usocket:connection-refused-error () (list :error "connection refused"))))

I find myself writing Lisp libraries, now, too. Information about them will go here when they're ready, along with random writings about Lisp and programming as the mood strikes.


Copyright (c) 2006-2022 William S. Annis