DJ Chase’s Blog

My personal blog, mirrored from dj-chase.com.

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.

Read more...

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.

Overview

Read more...

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.

Problems

Read more...

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:

Read more...

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.

Examples

Read more...

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.

Read more...

I have a flip phone (it’s much less distracting than a smartphone), so I cannot use an app or a browser to check the weather when getting dressed in the morning. I tried NOAA’s dial-a-forecast, but the number for my state is out of service.

So, I decided to make a script that texts me the weather. This was surprisingly simple. It broke down into three steps:

  1. Get the weather
  2. Text it to myself
  3. Automate that

This post assumes that you have email working on a system-level. Since setting that up is out-of-scope for this post, you can either do it yourself or get an account on a pubnix.

Read more...