My Profile Photo

code ninja . blog


where I show and discuss things I'm working on...


Common Lisp Code

I was going through some of my old GitHub repositories and came across my set of Common Lisp libraries that I made over the course of a few years and have consistenly returned to, always found useful, and kept up-to-date.

This is code that I’m extremely proud of due to its simplicity and that it is still used by myself and others years later…

Each library is loadable with ASDF, very simple (the code is meant to be very understandable at the expense of a little performance), is heavily commented, and has a comprehensive README file that details how to use the code. Most of the libraries build on each other. I use ClozureCL, but almost all of these packages will work as-is with any implementation; I’ve used many of these on SBCL and LispWorks.

Without further adieu, here are the libraries…

  • future - promises and futures (1)
  • lazy - lazy evaluation (memoizing thunks)
  • queue - simple FIFO implementation
  • heap - simple binary heap
  • huffman - huffman encoder/decoder
  • base64 - BASE64 encoder/decoder
  • sha1 - SHA1 digest and HMAC
  • parse - monadic parsing
  • re - Lua-style regular expressions
  • lexer - string token lexer
  • csv - comma separated values encoder/decoder
  • json - JSON encoder/decoder
  • rfc-date - RFC date encoder/decoder
  • markup - XML entity encoder/decoder
  • xml - XML parser and document querying
  • url - URL parser
  • html - HTML renderer
  • http - HTTP client and server with continuations (1)
  • rss - RSS parser and aggregator (1)
  • targa - targa image decoder

Maybe you will find the code in these educational or even useful in your own projects! If you do end up using one of them, please let me know.

Cheers!

fin.

  1. Requires ClozureCL for threading/networking  2 3