Testing Fennel in busted with Lua
Fennel is a Lisp-like language which compiles down to Lua, so it should be possible to test Fennel scripts in busted. Indeed, we can, but there are a few points to note about testing Fennel code in Lua.
Fennel is a Lisp-like language which compiles down to Lua, so it should be possible to test Fennel scripts in busted. Indeed, we can, but there are a few points to note about testing Fennel code in Lua.
A while ago I announced my new pet project HSSG, the hackable static site generator. The final step of generating a web site is writing the actual files to the file system of the operating system. So far this has been a messy affair where information about file paths had to be dragged through the entire chain from start to finish. This was ugly, hard to maintain and it muddied the layers of abstraction. In this post I will explain how I brought order to HSSG through a file system abstraction.
I am glad to announce a new Neovim plugin: nvim-cmp-vlime (GitHub mirror). It is a completion source for nvim-cmp which uses the Vlime plugin to fetch completion candidates from a running Common Lisp process. Vlime is a plugin similar to Slime for Emacs, it lets the editor communicate with a running Lisp process so we can evaluate code at runtime, debug, inspect values, and of course get auto-completion. In fact, Vlime uses the same Backend, Swank, as Slime, so the results should be equally good.
In June of this year I introduced my Common Lisp library cl-cmark (GitHub mirror), which implements parsing [CommonMark] documents and manipulating the resulting document tree. I have been hammering out the last kinks over the past weeks and I am now ready to call it done. Before I officially put the 1.0 stamp on it though I would like if a few more people could take a look at the library and give it a try.
In January 2019 I switched the static site generator for this website from Pelican to a custom one written in GNU Guile. Most (or all?) static site generators out there have an opinion on what a website should be made of. You might have full control over the layout and content of individual pages, but not so much over how the web site itself is composed. Writing my own static site generator freed me from these constraints. Now if I want to have sub-sites and multiple blogs I can do so. However, the custom generator was suffering from the same problem: it had one specific web site composition in mind, it just happened that this time it fit my needs. That is why I have created HSSG: the Hackable Static Site Generator.
For the past few weeks I have been working on a little side project, a library of Common Lisp bindings to cmark, the CommonMark reference implementation: cl-cmark (GitHub mirror). CommonMark is a dialect of Markdown which aims to remove any ambiguity, clean up the language specification and provide a common dialect of Markdown for other projects to use. The cmark library is the reference implementation for parsing CommonMark. It is written in C, so creating bindings for other language is fairly simple.
Quicklisp is a popular systems manager for Common Lisp, it allows users to download, install, update and uninstall Common Lisp systems (what other language call packages, but that term already means something else in Common Lisp). However, Quicklisp has one glaring security issue: it downloads everything through HTTP. This means every time you use Quicklisp to download a system you open yourself up for a man-in-the-middle (MITM) attack. We can use a local proxy server to route all traffic to Quicklisp through HTTPS, and in this blog post I will illustrate how to achieve this using mitmproxy.
The war on dotfiles continues, this time with SBCL. Let's see how we can make it comply with the XDG Base Directory specification.
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.