Housekeeping

Completed some overdue site maintenance over the past few weeks:

  • RSS feed styling: With help from a template found on GitHub, I created a stylesheet for the RSS feed so that it looks nice when viewed in the browser. Ctrl+F “via RSS” on this page to find the link, or just scroll all the way to the bottom, or maybe try this link.

    I am not a big consumer of RSS feeds myself; I prefer to just bookmark blog URLs and read posts in their original context. But RSS is an important bit of plumbing for the indie web, and probably covers accessibility use cases that I haven’t anticipated.

    (Technically, I am serving an Atom feed rather than RSS, but people use the terms interchangeably.)

  • Upgraded to Jekyll 4: Jekyll is a tool for building a static HTML site out of Markdown files. The built-in GitHub functionality for hosting a Jekyll blog uses an old version of Jekyll which has some end-of-life dependencies, and they are stuck searching for an upgrade path that doesn’t break existing sites.

    I followed this wonderful guide to switch my publication workflow to a GitHub Action that lets me manually manage my Ruby and Jekyll versions. It’s a great tutorial that also helped clear up several misunderstandings about Ruby, Gems, and rbenv.

  • Removed embedded YouTube videos: I replaced embedded YouTube videos with simple links to improve page load times and user privacy.

A handy class of submodular functions

In this post, we will show that functions of the form

f(X)=1iΩX(1pi)iX(1qi)f(X) = 1 - \prod_{i \in \Omega \setminus X} (1 - p_i) \prod_{i \in X} (1 - q_i)

are submodular for pi,qi[0,1]p_i, q_i \in [0, 1] where each piqi,p_i \leq q_i, and examine an application of this small result that demonstrates its practical value.

Read more →

Recent reading

Finished reading, but still thinking about:

  • 정유정, «종의 기원», a thriller.
  • 김연수, «이토록 평범한 미래», a collection of short stories.
  • 권여선, «레몬», a thriller.
  • 신경숙, «엄마를 부탁해», a classic.
  • Cory Doctorow, The Internet Con: How to Seize the Means of Computation, a tinkerer’s manifesto.
  • Paul Abel, “I thought I wanted to be a professor. Then, I served on a hiring committee.”
  • From the September issue of The Sun, “No Small Wonder” (paywall), an interview with psychologist Dacher Keltner, a student of awe. It pairs nicely with Bewilderment below.

Currently reading:

  • Richard Powers, Bewilderment, a novel of astrobiology, biofeedback, and conservationism.
  • 정유정, «내 심장을 쏴라», a thriller.

Guitarix troubleshooting

For the past few updates of Guitarix, I have been having issues where changing the JACK server latency causes the audio output to go crazy. This seems to stem from changes that the developer has been making to the config files, because the following commands usually get things working again:

mv ~/.config/guitarix ~/.config/guitarix.backup
mkdir ~/.config/guitarix
cp -r ~/.config/guitarix.backup/banks ~/.config/guitarix/banks

These commands backup your amp/effects presets from ~/.config/guitarix/banks (which are the hard part to restore manually), and let the default settings take over the next time the application is launched.

fzl.fish

I’ve been using the following fish alias fzl (“fuzzy list”) to run fzf (“fuzzy find”) in the current directory with a bat preview. It’s just a couple of light tweaks to the examples listed in the fzf README.

~/.config/fish/functions/fzl.fish:

function fzl
    # `bat` is aliased to `batcat` on Debian
    if type -q batcat
        set -f bat_command "batcat"
    else
        set -f bat_command "bat"
    end

    # Set the overall width of the `bat` preview to
    # 50% the width of the current terminal
    set -l bat_width $(math ceil $COLUMNS x 0.5)

    # My preferred `bat` options
    set -f bat_command \
        $bat_command \
        --style numbers \
        --color always \
        --italic-text always \
        --wrap auto \
        --terminal-width $bat_width

    fzf \
        --preview "$bat_command {}" \
        --preview-window right,$bat_width,nowrap
end

Example below.

Read more →