Gadgets of the Ages

July 13, 2024

Found while unpacking boxes last night:

Gadgets.

Gadgets.

Shown above, top to bottom, left to right:

Not shown (lost, recycled, or still buried in boxes):

Current gadgets:

  • Google Pixel 8 Pro: Current smartphone and the first one I’ve owned that is waterproof. I’m very happy with it. Great camera. Screen is large enough to read eBooks. Used to take the picture above.
  • Samsung Galaxy Tab S5e (Wi-Fi): Current tablet. Immediately installed LineageOS because I prefer it to One UI. I use it to read eBooks and with the detachable keyboard as a second laptop.
  • PowKiddy RGB10 Max: Current handheld game console. Only used for playing emulated games. Lighter and has a larger screen than the Anbernic RG350m shown in the picture above. Rarely used.
  • Sony WF-1000XM4: Current Bluetooth headphones. I use these daily for meetings and to listen to music and to watch TV shows past my bedtime. Great audio quality, battery life, and charging speed. My only complaint is the phone app tries to railroad you into an unnecessary Sony account during installation.

Update (2024-07-26): I found the Nook, Cliq, both Nexus 7 tablets, an iPaq, and two digital cameras. Everything except the Cliq is shown below:

More gadgets.

More gadgets.

Those are some massive bezels!

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.

Update (2024-06-27): Don’t forget that ad networks regularly serve up malware as well.

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.

Screenshot:

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

Benchmarks

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)
kem512keygen1187337077017448
kem512encaps1261598271321474
kem512decaps1854269772225685
kem768keygen17244611019229334
kem768encaps18461413238532528
kem768decaps23456414842538184
kem1024keygen26832717625639914
kem1024encaps27079320649745268
kem1024decaps37053322468652523

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)
kem512keygen1274037703053667
kem512encaps1324329033561321
kem512decaps17662010786873647
kem768keygen19726811400992471
kem768encaps205189140042104842
kem768decaps265442162514121529
kem1024keygen292543180492140220
kem1024encaps298150212488155127
kem1024decaps376114242303176042

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)
kem512keygen21090012367589625
kem512encaps216750143325101550
kem512decaps298050173550122475
kem768keygen325050179025153525
kem768encaps331725219900173325
kem768decaps444600259350201900
kem1024keygen482625285375234075
kem1024encaps475500335025256650
kem1024decaps619725384825293250

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 timeanddate.com, 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:

sha3

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.

fips203ipd

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.

Savings

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
SRECs$179.52
Total$1307.77

Notes:

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.

Archived Posts...
© 1998-2024 Paul Duncan