blog.8-p.info

I first saw Mitski at Under the Radar magazine on a public library. She was on the cover and her Japanese-sounded name caught my eyes. Yes. She is an American-Japanese songwriter.

I especially like “Nobody”.

I was mindlessly searching about Linux laptops, Pinebook Pro and Dell’s refurbished laptops. After joining AWS, my work is more and more Linux-focused. Several coworkers are even using Linux laptops.

So, I felt that I should have a Linux machine nearby. My closest were public clouds including AWS, but they were not really cheap especially for running Firecracker.

Then I realized that I had an Raspberry Pi 3. I bought that a few years ago to built an baby camera, which I didn’t. While Raspberry Pi 4 is required to use Firecracker, Pi 3 is fine for just playing with Linux.

Raspberry Pi OS and Raspberry Pi Imager

Raspbian is now called “Raspberry Pi OS” and creating the initial SD card is greatly simplified by Raspberry Pi Imager. A little note for “do you really need Electron for that?” folks, the imager is using Qt, not Electron.

I was using Raspberry Pi OS Lite (32-bit) since the Pi will be used as a headless server.

raspi-config

raspi-config command is used to configure locale, time zone and other miscellaneous stuff.

IP addresses

On my home network, a Xfinity router is assigning IP addresses through DHCP. So I changed the range as 10.0.0.20 - 10.0.0.253.

Then I added the below lines on /etc/dhcpcd.conf on the Pi 3.

interface eth0
static ip_address=10.0.0.2/24
static routers=10.0.0.1
static domain_name_servers=1.1.1.1

interface wlan0
static ip_address=10.0.0.3/24
static routers=10.0.0.1
static domain_name_servers=1.1.1.1

But I got DAD detected. Turned out, my wife’s old iPad was holding 10.0.0.3 still. So I had to re-connect the iPad to the Wi-Fi to renew its IP address.

For years, I thought that | (pipe) was a notation which connects the left side’s stdout to the right side’s stdin. For example,

% ls -t | head

ls’s stdout is connected to head’s stdin.

While it is semantically “okay” understanding, technically speaking, that creates a pipe in the first place. Then the pipe is connected to ls’s stdin and head’s stdout.

From pipe(7);

Pipes and FIFOs (also known as named pipes) provide a unidirectional interprocess communication channel.

This misunderstanding also made me really confused about named pipes. I simply didn’t get it. Now I know that a Unix pipe is a thing. Giving a filesystem presence for the thing makes sense.

Creating a Unix domain socket in a deep directory is a bad idea, or at least causes a tricky problem. Because the maximum length of the socket path is around 100 bytes.

On Linux, according to unix(7), it is 108 bytes.

On Linux, sun_path is 108 bytes in size; see also NOTES, below.

On FreeBSD, according to unix(4), it is 104 bytes.

UNIX-domain addresses are variable-length file system pathnames of at most 104 characters.

It is consistent with NetBSD and OpenBSD.

So, it is 2020 and I need to put something in around 100 bytes! That is shorter than the original Tweet length. I realized this limitation recently because of firecracker-containerd. It has a workaround which I copied to another part of the codebase.

It does matter.

I was watching the news way too much last week. There were protests, and then curfews in Seattle. People were maced and tear-gassed.

My wife and I watched 13th on Netflix because Bryan Cantrill recommended that on his blog. It was shocking.