Some New Year experiments

Hyvää uuttaa vuottaa! As stated before, my TIL is up and running once more. Some things I’m going to be experimenting with this year: Self-hosted stuff, speficially on the Raspberry Pi. One of those fancy new split keyboards I keep hearing everyone talk about. Coding more, and thinking about coding less.

January 1, 2024

Been quiet - studying Finnish

Hei kaikki. I’m going dark for the rest of the year as I switch my attention to reading a lot of Finnish, since Free Voluntary Reading is the best way to learn a language. Hyvää joulua ja onnellista uutta vuotta!

December 12, 2023

Speed paint videos for software installations

Shell Bling Ubuntu and finstem now have what I’m calling “speed paints” of how someone, starting from scratch on a standard Ubuntu VM, might install the programs. This came out of me realizing ffmpeg makes speeding up a video recording of a VirtualBox session a one-line operation: 1 ffmpeg -i output.webm -filter:v "setpts=0.1*PTS" -an output-fast.webm When I watched them back, I realized it gave me a really good sense of what the installation should feel and look like, even if I hadn’t actually tried it yet....

December 7, 2023

Getting `fzf` to print the preview pane

fzf is an incredibly useful bit of software, if someone shows you how to use it. There’s a lot more to it than just fuzzy-switching directories and fuzzy-searching you shell history – it also comes with a preview pane that updates on every keystroke. Try 1 echo '' | fzf --preview 'echo {q} {q}' and typing something to see how it works. ({q} is the query you type in at the bottom of the screen....

December 6, 2023

Vagrant lets you wrap VDI images

At work I’m currently experimenting with using Vagrant to automate getting an entire local network of our tiny embedded Linux systems running all on my local box. Alas! One of our devices uses a custom Yocto distribution! But wait, we have scripts to run these as VDI images, and apparently that’s enough for Vagrant to get to work! 1 vagrant package --base my-virtual-machine Further reading materials for future me: Creating a Base Box, and the Box File Format....

December 5, 2023

Most 2 digit numbers not divisible by 2, 3, or 5 are prime

There are only four single-digit primes: 2, 3, 5, and 7. So all two-digit numbers are either prime, or divisible by one of these four numbers. Of the four, 2, 3 and 5 are all very easy to spot check whether a number is divisible by them or not (for 3, add the digits first, and see if that sum is divisible by 3). If a given 2-digit number doesn’t fall into this category, 7 times out of 8, it’s prime....

December 4, 2023

Git aliases for fun and profit

haskell-kata’s Quickstart now has this neat little ditty at the start: 1 2 git config --local alias.build '!sh -c \'for file in *.hs; do ghc -o "${file%.hs}-bin" "$file"; done\'' git build Git is the gift that keeps on giving. I was on the hunt for a subdirectory-scoped alias, and I just discovered this incredibly flexible way to create new Git subcommands. History: 2 years ago I read through the 1200 page behemoth Haskell Programming from First Principles....

December 3, 2023

Haskell has a rustup now?

Apparently so.. The resemblence is uncanny. I’ve apparently been out of the FP game too long, I thought Stack was the latest and greatest in abstracting over the toolchain.

December 2, 2023

Outage postmortem: Why didn't SelkoArchive get today's news?

For some reason, my daily archive of Finland’s “clear news” broadcast didn’t work today. Why not? TL;DR: Just a Git snafu. Quick recap of the archive: There are 3 Git repos: selkouutiset-scrape simply scrapes the HTML https://yle.fi/selkouutiset at 6 PM every day via a Github Action. selkouutiset-scrape-cleaned pulls in scrape and turns it into a stack of translated, properly-named Markdown files, by the magic of shell scripts, systemd timers, and a tiny VM in a datacenter somewhere....

December 1, 2023

Things Word has that SSGs, by and large, don't

Recommendations appreciated. Disclaimer: Most of these make little sense in an Internet medium anyway. An index. An index simply lists the terms and topics discussed in a document, along with the pages they are listed on. A glossary. Could be as simple as a CSV file of terms and definitions, or as complex as a whole extra glossary/ folder. Related: A “Acronyms and Abbreviations” section. Even moreso than the last, this could be a simple CSV....

November 30, 2023