Welcome to this small corner of internet that I've claimed for myself;
enjoy your stay.
Using Sidenotes with Hakyll (haskell)
I’ve become quite enamoured with sidenotes recently, and so of course
this website now has them as well! Thankfully, the integration with
pandoc and Hakyll is quite straightforward, because other people have
already done the hard work. Depending on your use-case, however, the
existing libraries might not entirely fit the bill; for example, by
default blocks that are more complicated than just paragraphs of pure
text don’t work. In this post, I’d like to explain an alternative
approach of integrating sidenotes into pandoc, which does enable the use
of these features.
Pygmentising Hakyll's Syntax Highlighting (haskell)
By default, Hakyll uses pandoc to generate syntax highlighting for all
kinds of different programming languages. However, even in simple
examples the HTML this produces is unsatisfactory. Thankfully, the two
programs are almost infinitely customisable, and changing pretty much
any setting doesn’t usually involve a lot of work—this is no exception.
Using pygmentize as an example, I will show you how you can swap out
pandoc’s native syntax highlighting with pretty much any third party
tool that can output HTML.
Immediately Refile Notes with X.P.OrgMode (emacs, haskell, xmonad)
In a previous post I talked about using
XMonad.Prompt.OrgMode to rapidly capture thoughts and ideas into an
Org file. The functionality that the module provides has proven to be
extremely useful to me, and really I couldn’t be happier with it.
However, a user recently contacted me by email and told me that they’re
missing but one feature: the ability to immediately refile notes.
Duality in Monoidal Categories (maths)
I have a new preprint on the arXiv! It is joint work with
Sebastian Halbig, and concerns itself with the interplay of different
structures on monoidal categories that give rise to a notion of
“duality”. At five pages, it is a very short paper; yet I’d still like
to give a little teaser as to what kind of question we sought to answer.
Announcing: vc-use-package (emacs)
I’d like to announce a small package I’ve written: vc-use-package. It
is a first attempt at integrating the new (as of Emacs 29)
package-vc.el with the now built-in use-package. I’ve already talked
about how these two interact in my last post—you can
see this package as automating things juuuust a little more.
Exploring package-vc-install (emacs)
The Emacs 29 release branch was just cut—and it’s chock full of new
features! In this post, I want to talk about the new
package-vc-install function, which allows one to install packages
directly from their respective upstream source; for example, GitHub. It
can be seen as a built-in alternative to things like quelpa or
Adjusting preview.el for vertical monitors (emacs)
Here’s a fun one: when previewing LaTeX fragments via AUCTeX’s
preview.el library (whether it be in a .tex buffer, or—via
org-auctex—in Org) things get really messed up when one or more
monitors are set up in portrait mode.
A Potpourri of Emacs Tweaks (emacs)
Emacs is the “extensible text editor”, and it wouldn’t be fun if one
didn’t at least try to take advantage of that, right? Having just
written a README for my Emacs configuration, I
thought it might be nice to somewhat expand on certain ideas and give a
little context to some snippets that have accumulated over time.
While there is a post about my version of the
query-replace function, most other tidbits have only seen the light of
day in places like the “Weekly Tips, Tricks, &c.” thread on Reddit. In
the spirit of hosting my content somewhere that I actually control,I am aware of the futility of this—Reddit is almost certainly
going to be around longer than my personal site will. And yet,
this feels “more correct” in some way.
I chose to showcase these again here, hoping that other people may also
find some of this stuff useful.
Understanding Weighted Colimits as Tensor Products of Modules (maths)
If you’ve been doing category theory for any amount of time, you’ll
probably have stumbled upon enriched category theory as a way of
expressing categorical ideas internal to some context other than
Set. Reading into it, you might have come across these foreign
sounding concepts like weighted (co)limits and wondered what that was
all about—and then got lost for a few days, trying to decipher what
Kelly is talking about and why symbols resembling tensor
products are suddenly being thrown around. At least that’s what
happened to me.
After scouring the internet for good resources, I found two really
enlightening blog posts: one by Todd Trimble and the
other by John Baez—and they’re too good not to share.
Plus, people always say that you don’t understand a concept unless you
can explain it to someone else, so here’s my shot at it!
XMonad Module Showcase: X.A.TopicSpace (haskell, xmonad)
One of my favourite—and most used—modules is XMonad.Actions.TopicSpace.
However, it seems relatively unknown among the general XMonad community.
I fear this is due to the fact that the module is quite old and formerly
had a rather high barrier to entry. Despite having been given shiny
new documentation, lots of people probably did not bother
revisiting it and thus still don’t really understand why they might be
interested in using topics instead of workspaces. Time to change that!
Rapidly Capture Ideas with XMonad and Emacs (emacs, xmonad)
As I’ve said before, basically my entire digital life happens in either
Emacs or XMonad. Thus, a lot of time spent on my setup either goes
towards working on the two configurations separately, or—as we’ll do
today—bringing them ever closed together.
Specifically, I want to showcase a newIn version 0.17.0, though new features are coming for 0.17.1,
which will drop soon!
XMonad.Prompt.OrgMode. Building on top of XMonad’s prompt—which works
much like dmenu—it is designed to rapidly capture thoughts and ideas
whenever inspiration strikes and, importantly, to do so without
disrupting one’s current workflow. The module recently got support for
Org priorities, so I figured this was as good an excuse as
any to talk about it.
How to query-replace multiple matches! (emacs)
As its name suggests, Emacs’s query-replace function (bound to M-%
by default) can be used to replace occurences of one string with
another. In comparison to other tools that are used for similar
purposes—(a subset of) keyboard macros and multiple-cursors—the whole
process after entering the from and to strings is interactive all
the way through: it’s very fast to step through the individual matches
and decide on the spot whether one would like to replace them or not.
Needless to say, I like query-replace a lot! In true Emacs fashion,
the function also takes way too many arguments: among other things, it
can operate on the current region, backwards, or only on things
surrounded by words boundaries.
However, there is one crucial feature missing from its default
functionality: the ability to create multiple from → to pairs. But
this is Emacs, after all, which means that I can just write that
query-replace-many function I’ve always wanted!
Calling Emacs from XMonad (emacs, haskell, xmonad)
In the post about my research workflow, I briefly mentioned having to
call Emacs—or other external programs—from within XMonad. I figured
that this was perhaps something that could be of use to more people than
just me. After a little bit of deliberation and coming up with a
generic enough API, I decided to turn it into an XMonad module!
Yesterday these changes were merged into xmonad-contrib, and they are
now available for everyone to try out; provided one has the git version
of XMonad installed.If you really want to try this feature but don’t want to bother
installing any unreleased—though stable—version, message me in any
way and maybe we’ll hurry up and cut 0.17.1 soon!
I’d like to use this opportunity to both showcase the module—how and why
one would use it—and talk a little bit about its only redeeming
My PhD Research Workflow (emacs, maths, xmonad)
After reading Gilles Castel’s excellent blog post about his research
workflow, I decided that it was as good a time as any to write about
mine—deeming it novel enough to hopefully contribute something to the
Just like Castel, I’m a new PhD student in mathematics, which means no
lab work and—in my case—no code. Just you and your inability to
understand basic concepts. As such, I often scribble things down on
paper or a blackboard first and, when sufficiently convinced that the
information is worth keeping around, type it up. Typesetting something
is a surprisingly effective way to catch errors in handwritten
As basically my entire digital life happens in either Emacs or
XMonad, my setup is heavily skewed in that direction; I will make use
of these tools almost every step of the way.