DJ Chase’s Blog

My personal blog, mirrored from

In reply to: Alex White

Alex wrote an excellent quick post about using local libraries. It reminded me of when my mother used to take me and my brother to the library almost every day as a child; they really are excellent places with incredible services.

As Alex wrote about the physical benefits and services of libraries, I thought I should share some of the digital ones. I agree that going to a library can be an amazing experience, but it is also useful to know how to get the most out of yours when you can’t go there in person.


It’s been a while since I wrote something. I don’t get a lot of time to write or browse Geminispace as it is, but that’s been exacerbated with back-to-back finals seasons from my schools. Fortunately, it’s summer now, which means I have a day off each week.

In keeping with the ethos of “almost everything here is under construction right now” and “[pushing frequently with little-to-no regard for log-quality] forces me to work on the site because otherwise I have poor-quality files accessible”,¹ ² I decided to let you all know what I’ve been working on and what’s to come.


Links rot. It’s unfortunate, but it’s just a part of the web. Content disappears and links rot; if you don’t host your own images, then you can’t guarantee that your images will always appear. In this situation, alt-text can be the difference between your piece still making sense and it being completely useless. This is because many browsers show the alt-text with the missing image icon, so descriptive alt-text can make sure your audience still gets the necessary information.

If the alt-text doesn’t load for you, try viewing this article on my site.



This step was considerably harder than the last, but the end result turned out to be pretty simple. Here’s how it works:

  • I use matrix-commander on smirkingface to listen for new messages.
  • For each message, I send it to my phone via email, from an address specific to that room.
  • Upon recieving an email from my phone on ~team, I send the body to the Matrix room specified in the to address.

That’s really it. I did encounter some hurdles, though:


Getting MMS working over email was exceedingly easy because all of the work was already done for me; I just used my phone provider’s email gateway. There were a few hiccups, though:

  • I can’t send messages with ~team because it’s blocked by my provider’s email gateway.
  • I can’t just use smirkingface (my server) because my ISP prevents me from running an email server.

To get around the problem, I just use smirkingface to send messages and ~team to receive messages.


I made a friend online while locked-down during COVID who I want to continue communicating with. The problem, though, is that I do not use social media, and chat apps do not work for me no matter how hard I try. So after about a month of back-and-forth discussing possible solutions, we’ve thought of something that we think will work well for both of us: I’m going to run a Matrix to MMS-over-email bridge on my server.

This series will document the process of getting this to work, both because that’s interesting and because it will help me stay on schedule. What follows is a description of how it’s going to work and more detailed posts about it as I go along.



I’ve noticed quite a few shell scripts recently that claim to be POSIX-compliant despite using mktemp, so I wanted to go over a compliant alternative and a few things you should know about writing POSIX shell (#!/bin/sh) scripts.



I’ve always found HTML email to be unpleasant (even before I knew about HTML vs plain-text email), but it’s always been just an annoyance. However, I now use a TUI mail client so HTML emails are downright unreadable.

I solved this by preprocessing HTML mails with lynx -dump -stdin, which turned out to be surprisingly pleasant. Because Lynx behaves like a filter in this mode, it just turns HTML emails into nicely-formatted plain-text emails. I say “nicely formatted” because lynx indents its output according to the document’s structure, which is particularly nice for long newsletters.

For example, the FSF is really good about providing a plain-text alternative to their newsletters. The problem, though, is that their newsletters are really long, so parts of it can easily get buried.

Here’s an example of their plain-text newsletter:


In reply to: Curiouser

Math formulas are especially challenging, not only because they can have so many symbols (such as sigma 'Σ'), but those symbols must be rendered in a certain layout (e.g. Σ used to sum a series has the variable and its starting value, as well as the value its going to, arranged in 2 different rows to the right of the Σ).

As a further example, sigma notation only behaves that way when it’s inline. ‘Block-level’ sigma notation places one row above the sigma and the other below, and makes the sigma like twice as large as the rest of the text. This holds true for a lot of other operations as well, such as integrals (∫), sequential products (∏), and sometimes unions (∪). Limits also follow the same rules, except they’re not extra-large because they don’t have their own symbol.

In fact, text layout of formulas and symbols is such a complicate domain that Donald Knuth literally created TeX, an entire digital typesetting system, while he was writing “The Art of Computer Programming.”

Given all this complexity, I didn't even try to represent math formulas in gemtext.

This is what made me reply to this post. You see, I quite like math, so I envision writing some here at times. So as part of working on the back-end, I needed to think about how to typeset math in Gemtext, and I think I’ve come up with a workable solution.

Basically, we can use preformatted blocks to approximate block-level mathematics and put plaintext math using unicode’s extensive set of math symbols in the alt-text as a accessible fallback.



I’ll be writing a series of posts detailing issues I have while setting up my server and site to serve Gemini and HTTPS without sacrificing the quality of either one. It will be fairly technical, but I’ll try to make it somewhat understandable for nontechnical* people without boring hackers.

For those unaware, Gemini is a newish internet protocol that aims to be simpler, more accessible, and less obtrusive than the web. As such, it lacks many of the features and semantics of HTTPS & HTML (the web’s protocol and document format, respectively), which makes it challenging to serve the same content without sacrificing the user’s experience on at least one protocol.