• Singleton objects in Guile Scheme

    When I wrote guile-messagepack I needed an object to represent the nil value, which embodies the concept of "nothingness" or "no value" in MessagePack. None of the existing objects like #f or '() were adequate, so I decided to make a new one: nothing. It does not make sense for there to be multiple instance of nothing, so it had to be a singleton. In this blog post I will describe a way of creating such a singleton.

    Continue reading…

  • Writing NCM2 sources

    NCM2 is a plugin for Neovim and Vim which provides users with a unified completion menu. By default it displays nothing, users need to add sources for completion. These plugins instruct NCM2 on how to get completion candidates for a particular use-case, such as words in the current buffer, or function names in a programming language. The NCM2 documentation explains how to write the individual pieces of a source, and in this blog post I am going to dive into how to connect those pieces into a working source.

    Continue reading…