Implementing aref Operator in SBCL Common Lisp for a Custom Vector Type

If we would like to derive a custom array type, in Common Lisp, we can not inherit from some of the built-in classes. The standard forbids it: "Attempting to use defclass to define subclasses of a built-in-class signals an error. Calling slot-value on a generalized instance of a built-in class signals an error. Redefining a built-in class or using change-class to change the class of an object to or from a built-in class signals an error." ...

May 5, 2026 · Arthur Miller

Parsing Keywords in Lisp with Speed of C

About I am learning Common Lisp, so I am experimenting and playing around with things. It started with writing a small command-line parsing library, and ended with a trip into a rabbit hole of an experiment. I do not know if someone will find it useful, perhaps not, but it is nice to write things down, it sorts of clean thoughts, at least for me. Command line parsing in C Typically, for parsing program options, we use something like getopt & co in C/C++, or some similar offering. But if you have lots of options and want faster parsing, you will probably use gperf. Gperf is a code generator which can construct perfect hash from a given set of keywords, i.e. our program options. For this experiment, I used keywords of the C language, rather than some imaginary options. ...

April 16, 2026 · Arthur Miller

A Simple Template Library

For the needs of a project, I wrote a little template library some time ago. However, I never really liked it and didn't really finish it. On the good side, I made it flexible with customizable markers, so I was able to use {{ }} or something else as markup. On the bad side, I was using regular expressions and simple search to carve out things in markers to be expanded. Another annoyance is that Emacs already has so many templating and text processing libraries built-in, so I dislike the idea of using yet another one. I am already using org-capture for other purposes, and org-capture has templates. Could I possibly use those templates instead of an extra dependency? ...

January 2, 2026 · Arthur Miller