Site Backend

June 2, 2024

On Friday I posted a long Site Backend article which explains how the content on this site is managed, speed and security tweaks, Hugo customizations, Apache configuration, and more.

Editing this site with Vim and Firefox.

Editing this site with Vim and Firefox.

dk-sort Browser Extension

June 2, 2024

Last week I released a browser extension for Firefox which sorts entries in Daily Kos live update articles in chronological order and adds a sort toolbar.

Install Firefox Add-On, Git Repository

dk-sort toolbar.

dk-sort toolbar.

Background: Several months ago I created a bookmarklet (available here) which sorts entries in Daily Kos live update articles from oldest to newest. Unfortunately the bookmarklet was difficult for people to use because:

  • Installation required copying minified JavaScript into a text field, and
  • You had to click the bookmarklet after loading a live update article in order to activate it

To address these problems, I converted the bookmarklet into a browser extension. I also added a couple of features during the convdrsion.

Note: The extension isn’t Firefox-specific, but it’s unlikely I will port it to Chrome because I recommend people ditch Chrome.

Time to Ditch Chrome

June 2, 2024

This week Google announced they are moving forward with the plan deprecate Manifest V2. Despite claims by Google, this change has nothing to do with security and everything to do with hobbling ad-blockers.

Last year I switched to Firefox in anticipation of this change and in response to several other user-hostile changes,

At this point I recommend everyone do the following:

  1. Switch to a non-Chrome browser. I recommend Firefox.
  2. Install an ad-blocker. I recommend uBlock Origin.

This recommendation applies even if you don’t care about ads or privacy; the current "don’t be evil" incarnation of Google has been a poor steward of Chrome and it’s only a matter of time before they do something that you do care about.

Vim Books

June 2, 2024

While perusing Vim scripts, I noticed that there are several Vim books. A couple of them piqued my interest:

I bought both books and I’m about 300 pages into Practical Vim. So far it’s great. I have been using Vim for over 20 years but I still learned a few things; for example, I did not know about the \v “very magic” prefix for patterns.

If you buy the books from the publisher instead of Amazon you can download the eBooks as DRM-free PDF, EPUB, and MOBI files. I read the PDFs on my desktop and the EPUBs in the Kindle app on my phone (imported via Send to Kindle).

Unlike many technical books, the EPUBs render very nicely in the Kindle app. Example:

Page from “Practical Vim” rendered by the Kindle app on a Pixel 8 Pro

Update (2024-06-15): I finished both books. Practical Vim is great and I recommend it. Modern Vim is a bit of a tossup:

  • Pros: The introduction to neovim is helpful and so is the section on fzf integration.
  • Cons: Several chapters are a subset of material from Practical Vim (examples: chapters 2 and 4). Also Modern Vim does not cover modern Vim features like the terminal command, which I use regularly.

To be fair, :terminal is mentioned briefly in the “What’s Next for Vim 8” section of Appendix 1, and it was not included in a stable release until after Modern Vim was published.

Site Updates: Dark Mode and About Page Pictures

May 27, 2024

A couple of site updates:

Dark Mode

Dark mode uses a prefers-color-scheme media query to determine the default theme, so it should do the right thing™ for people who have their system configured to prefer a dark color scheme. The theme can also be set explicitly using the “Switch Theme” icon on the right side of the menu bar.

There is a minor refresh bug and probably a few rough edges with older content, but I will get them sorted as time permits.


New dark theme active and "Switch Theme" menu icon highlighted.

New dark theme active and "Switch Theme" menu icon highlighted.

I strongly prefer dark mode and have wanted to add it here for years, so this change is a big victory for me.

About Page Pictures

There’s not much to say here; the About page now has a couple of pictures.

Adding the images in a way that I was satisfied with turned out to be a lot more effort than you might expect… This site is statically generated with Hugo, the theme is a heavily-customized version of Bulma, and blog posts and articles are written in Markdown.

The features that I wanted were:

  • A responsive layout containing a horizontal row of images on desktop which gracefully falls back to a vertical list of scaled thumbnmails on mobile.
  • Multiple image format support (in other words, the <picture> element).
  • Accessibility (title, alt, aria-label, <figcaption>, etc).
  • Ability to specifily all of the above in the article front matter.

In order to support everything above, I ended up copying my existing pe-figure shortcode and modifying it to support image “carousels” in articles.

In any case, it’s done now. Here is the result:

Image carousel at bottom of About page.

Image carousel at bottom of About page.

C11 FIPS 203 IPD v0.6

May 15, 2024

I just released v0.6 of fips203ipd.

fips203ipd is an embeddable, dependency-free, MIT-0 licensed, C11 implementation of the FIPS 203 initial public draft (IPD) with scalar, AVX-512, and Neon backends. The final version of FIPS 203 will become ML-KEM, NIST’s standarized post-quantum key encapsulation mechanism (KEM).

Git Repository, API Documentation, Original Announcement, pqc-forum Announcement

Changes in v0.6

  • Add Neon backend
  • Add MacOS support to test suite (thanks Rod!)
  • Add backend auto-detection, BACKEND command-line build parameter, and fips203ipd_backend() function
  • Add Raspberry Pi 5 (Cortex-A76) benchmarks
  • Add “Backends” documentation section with brief notes about each backend


Here are median cycle count as measured by the included bench tool for each parameter set, function, compiler, and backend from several of my systems.

For context, the results below are competitive with the eBATS results (kyber512, kyber768, kyber1024), although the comparison is inexact because the results were measured with different tools and because Kyber and ML-KEM differ slightly.

Lenovo ThinkPad X1 Carbon, 6th Gen (x86-64 i7-1185G7)

Median cycles by backend, Lenovo ThinkPad X1 Carbon, 6th Gen (i7-1185G7).

Median cycles by backend, Lenovo ThinkPad X1 Carbon, 6th Gen (i7-1185G7).

SetFunctionScalar (GCC)Scalar (Clang)AVX-512 (GCC)

Download CSV

Raspberry Pi 5 (ARM Cortex-A76)

Median cycles by backend, Raspberry Pi 5 (Cortex-A76).

Median cycles by backend, Raspberry Pi 5 (Cortex-A76).

SetFunctionScalar (GCC)Scalar (Clang)Neon (GCC)

Download CSV

Odroid N2L (ARM Cortex-A73)

Median cycles by backend, Odroid N2L (Cortex-A73).

Median cycles by backend, Odroid N2L (Cortex-A73).

SetFunctionScalar (GCC)Scalar (Clang)Neon (GCC)

Download CSV

Update (2024-05-16): Added cycle counts for scalar backend (clang and gcc), added bar charts, added downloadable CSVs. The CSVs and SVGs generated by the Python scripts in the scripts/bench-chart/ directory of the Git repository.

Solar Eclipse: Old Man Shakes Fist at Moon

April 8, 2024

Today’s solar eclipse took a healthy bite out of our solar energy production for the day. According to the details on, the partial eclipse in our area lasted from 2:04 pm until 4:32 pm (Eastern).

Those times line up perfectly with the dip shown on our dashboard:

Solar dashboard with eclipse time highlighted.

Solar dashboard with eclipse time highlighted.


Unfortunately we couldn’t find our solar eclipse glasses, so we had to fall back to ye olde pinhole method.

Update (2024-04-09): Several comments on this Ars Technica article also show dips in solar energy production.

New Releases of C11 SHA-3 and C11 FIPS 203 IPD

March 4, 2024

Two new releases:


Embedable, dependency-free, MIT-0 licensed, C11 implementation of all algorithms from FIPS 202, SP 800-185, and the draft KangarooTwelve and TurboSHAKE specification.

Git Repository, API Documentation, Original Announcement

Changes in v0.6

  • Improve speed of absorb, squeeze, and scalar Keccak permutation.
  • Refactor SHAKE128 and SHAKE256 functions.
  • Add CAVP tests in tests/cavp-tests.
  • Documentation improvements.


Embedable, dependency-free, MIT-0 licensed, C11 implementation of the FIPS 203 initial public draft (IPD). The final version of FIPS 203 will become ML-KEM, NIST’s standarized post-quantum key encapsulation mechanism (KEM).

Git Repository, API Documentation, Original Announcement

Changes in v0.3

  • Add AVX512 polynomial addition, subtraction, and multiplication.
  • Faster scalar Barrett reduction and scalar polynomial multiplication.
  • Upgrade to sha3 v0.6 for faster hash/XOF performance.
  • Add NIST draft ML-KEM test vectors to self tests and as examples/2-nist-tests/.
  • Embed hash/XOF functions, remove sha3.[hc].
  • Documentation improvements.

Solar: One Year

December 29, 2023

Total 2023 energy production and consumption.

Total 2023 energy production and consumption.

Last year we got rooftop solar. The picture above is our Enphase dashboard, which shows how the solar panels performed in 2023.

The blue bars indicate the energy produced by our solar panels and the orange bars indicate the energy consumed by our house, in megawatt-hours (MWh).

The relevant values are:

  • Consumed: Total energy consumed by our house.
  • Produced: Total energy generated by our solar panels.
  • Net Imported: Energy we are actually billed for.

Any excess energy that we produce is exported back to the grid and credited to our account (net metering), so our power bills during the spring and early summer look like this:

Our July power bill with monthly usage and amount due highlighted.

Our July power bill with monthly usage and amount due highlighted.

The sections of the bill highlighted in red show the following, respectively:

  1. Four months of zero net energy use.
  2. A bare minimum power bill.


Here’s a breakdown of the money we saved this year from solar:

DescriptionAmount ($)
Energy Produced (6.2 MWh, $0.14/kWh)$868.00
Fairfax County Solar Energy Equipment Tax Exemption$260.25


The expected lifetime of the solar panels is 20 years. We expect to recoup the initial installation cost in 11-13 years.

That’s longer than usual (most folks try to break even in 5-8 years), but we’re okay with it; our house is partially shaded and our panel placement is deliberately less than optimal for aesthetic reasons.

Firefox Redux

December 2, 2023

This weekend I installed Firefox Nightly from Mozilla’s APT repository and then switched my desktop browser from Chrome to Firefox. Thoughts so far…

Firefox Pros

  • uBlock Origin and other useful extensions will continue to work past June 2024.
  • Importing bookmarks, credentials, and history was seamless.
  • Tab switching and omnibar searches are faster than Chrome.
  • Firefox Sync and Firefox View are great; I prefer them to their Chrome equivalents.
  • Better interface customization.
  • Better bookmark management.
  • Better PDF reader.

Firefox Cons

  • No tab groups. There are several tab management extensions, but none are as elegant as tab groups. (Update: Tab Stash is a passable alternative for me).
  • Occasional screen tearing on complex pages.
  • Chrome has smoother scrolling.

I also worry about Mozilla as an organization; a substantial portion of their revenue comes from their contract with Google and they have made some questionable business decisions in the last couple of years.

Why Ditch Chrome?

Manifest V3 was the final straw; it is a thinly-veiled attempt to hobble ad blockers. Before that there was AMP, FLOC, Web Environment Integrity, Privacy Sandbox, and probably a dozen other anti-competitive and user-hostile changes I have forgotten about (see also: enshittification).

I switched from Firefox to Chrome a decade ago because of the minimalist interface and better performance. Neither reason applies today; the Chrome interface has become cluttered and Firefox performance has improved substantially.

In retrospect it was probably unwise for us to give an effective browser monopoly to an advertising company.

Other De-Googling Recommendations

  1. Search engine: Duck Duck Go. Fast, good results, spartan interface, useful shortcuts, doesn’t feed your search history to Google.
  2. Mobile: Firefox for Android. Fast, great interface, supports uBlock Origin. I’ve used it for years on my phone and tablet.

Update (2023-12-04): Added note about Tab Stash.

Archived Posts...
© 1998-2024 Paul Duncan