Making SBCL compliant with the XDG Base Directory specification
The war on dotfiles continues, this time with SBCL. Let's see how we can make it comply with the XDG Base Directory specification.
The war on dotfiles continues, this time with SBCL. Let's see how we can make it comply with the XDG Base Directory specification.
GNU Bash does not comply with the XDG Base Directory specification, it uses
the classical dotfiles approach where it just dumps all its files into the home
directory. It does not even have the courtesy of putting all its files in one
common ~/.bash
directory. Fortunately we can coerce Bash into compliance with
a bit of effort.
I use GNU Guix as a secondary package manager on my system. Previously I have been running Kubuntu, which uses systemd as its init system, but I have since switched to Void, which uses runit. Guix comes with services for systemd and Upstart included, but not for runit. Let's find out how to create a runit service from scratch.
There are two types of people: those who make backups and those who will experience a system breakdown. Fortunately I was in the former category, but it was still a very tedious and stressful experience. Every problem is also an opportunity to grow and throw off dead weight, so I used the opportunity to upgrade the hardware and switch my operating system.
In my previous blog post I presented how I had come up with an embedded domain-specific language for creating web pages in my custom static site generator. I also mentioned the concept of “templates” in passing. Of course it was only logical to follow the page DSL up with a custom template DSL to smooth over the code duplication and pattern repetition.
I got bitten by the Lisp bug recently again, and so I decided to clean up an ugly wart in my static site generator which I use for generating the Workshop. The goal was to create an embedded domain-specific language (DSL) for defining web pages.
Unix has a clever trick for hiding a file from being displayed by the ls
command or other file browsers: just prefix the file name with a period
character. Many applications use this fact in order to place hidden files or
directories in the user's home directory, usually containing settings, cached
files, persistent data and whatever else developers might come up with. This
practice has always struck me as just plain wrong, and I am glad that my
sentiment was confirmed by Rob Pike years ago.
What is the best first language when learning how to program? There have been many opinions over the years, each with their own selling point: BASIC was created for beginners, Python is executable pseudocode, JavaScript runs everywhere on the web, and so on. However, I would argue that the truly best language has been right under our nose the whole time: the Unix shell.
The Unix man
command can open a manual page if you know its name, and the
apropos
command can search through the manuals if you are looking for a
specific word. Let's put the two to work together into a command I like to call
macho
: the man
command on steroids.
I have a number of machines I need to connect to via the secure shell (SSH), and typing in the IP address or host name by hand every time get tedious very quickly. I could use an application for that, but that's bloat. Let's instead see how we can leverage small universal tools to build an elegant solution of our own instead.