Rubenerd Show 405: The Walkenbach Envelope episode

Rubenerd Show 405

Podcast: Play in new window | Download

34:32 – Making a caffeinated beverage LIVE on the show like I used to, remembering Murni’s Warung in Ubud, the joys of envelope budgeting, John Walkenbach from Whole Wheat Radio helping me through his Excel books all these years later, and why it’s still so difficult for people without IT backgrounds to export data from shut down sites.

Recorded in Sydney, Australia. Licence for this track: Creative Commons Attribution 3.0. Attribution: Ruben Schade.

Released March 2020 on The Overnightscape Underground, an Internet talk radio channel focusing on a freeform monologue style, with diverse and fascinating hosts; this one notwithstanding.

Subscribe with iTunes, Pocket Casts, Overcast or add this feed to your podcast client.


New neighbours

I’m blanking on whether I talked about this on my blog or podcast recently; apologies if I repeat myself here.

Duck!

Our previous neighbours on this floor were, as politely as I can say, problematic. They had vicious, loud arguments long into the night that at one point resulted in a thud hitting our common wall. They chain-smoked on a non-smoking floor to such an extent that it’d seep under their door, through the hallways, and into our apartment. They constantly hurled abuse and profanities at their children. And, in a famous episode I discussed on Twitter at the time, the husband called me a poofter upon meeting me the first time. I took it as a compliment, though I don’t think that was the intended effect.

They were evicted recently, much to our collective delight on this floor. Strata informed us, in as much as they could say, that they’d received sufficient complaints to warrant their swift removal. Clara and I didn’t care about the reasons or circumstances, we were just happy to see the tail end of their moving boxes, vanishing into the sunset in a cloud of smoke and anger.

I mention this because I just met our new neighbours who moved in and… they’re lovely! I gave them a guest network for Wi-Fi while they get their own Internet connection sorted out, and filled them in on how to get deliveries and use the intercom system. At the end the gentleman fistbumped me—it’s what we’re doing in a Corona world—and we went our separate ways.

You instinctively know there are great people in the world, but sometimes it’s nice to be reminded.


Removing characters with tr

In our continuing series of things you already know unless you don’t, today we’re looking at removing characters with the tr command.

tr is used to translate, or subtitute characters in a string. In its simpliest invocation:

$ printf "%s\n" "hXllo" | tr 'X' 'e'
==> hello

But what if you want to just remove X? The temptation is to supply an empty second argument:

$ printf "%s\n" "hXello" | tr 'X' ''
==> tr: empty string2

So admittedly I’d been using sed for that. This will match on every occurance of a string and replace it, which can also be a single character:

$ sed 's/X//g'

But I’ve since learned there’s a -d option:

$ tr -d 'X'

From the FreeBSD manpage(1):

-d Delete characters in string1 from the input.

Done!


Clearing up FreeBSD GCC news

There’s a lot of misinformation and hand-wringing about FreeBSD 13 officially removing the GNU Compiler Collection from the base system. Some of this has come down to poorly-worded article headlines, others are born of longstanding philosophical license differences.

The two key points you need to know:

  • GCC in FreeBSD base was more than a decade old. It was the last version before the switch to the GPLv3, which the BSD projects consider problematic and incompatible.

  • GCC will remain in the ports system. Developers who need GCC had already switched to this for years.

I know the Internet loves a good flare-up, but much like this blog, there isn’t anything new or remarkable about it. Wait, ouch.


CSS didn’t decouple content from presentation

If you’re in your late twenties or early thirties, you probably also grew up during the deprecation and removal of table-based layouts on websites. It was good these were discouraged; it was a clever hack at the time to create layouts, but it broke the original semantic meaning of the HTML table element, like trying to tap dance on one while others are trying to eat.

It also made accessibility way more complicated. One of the most eye opening experiences of my career was having Dave listen to my podcast at the time. He was legally blind, and reading my site through the same software he used let me appreciate how tedious and confusing most of the web was for him to use. I like to think I keep my HTML and web designs simple because I prefer it visually, but it’s also because its the only ethical and responsible position to take. But I digress.

But more than just letting tables be tables again, CSS was billed as decoupling content from presentation. That phrase was repeated everywhere, from how-to guides to presentations.

The first problem was, styled div elements were not a replacement for tables. We now have table-esque attributes and the overengineered flex model, because turns out that while layouts weren’t using tables as originally intended, they conveniently map to the visual model of columns and rows for layout. The 2000s were full of articles explaining how to hack—being the operative word—divs into doing what you wanted.

CSS was hamstrung by the available HTML elements at the time, and inconsistent browser support. But the fact it didn’t ship with convenient and logical ways to declare table-like layouts from the start says all you need to know about the language’s design.

I know, hindsight has 20-20 vision! But even at the time I thought this made no sense.

CSS and JavaScript are also as tightly coupled to their HTML pages as plain HTML was to its inline styling before, albeit now in a separate file. Don’t believe me? Check out the HTML source for a page, and tell me what the semantic meaning and requirement is for hundreds of nested divs with attributes like shadow and h3-hack, if it’s just content. There isn’t any, it all comes down to supporting ever-increasing visual bloat.

CSS saved us from a ton of legacy problems, but let’s not pretend it achieved something it didn’t. This is still very much an unsolved problem.


FreeBSD 12.1 Nvidia desktop

Last weekend I finally got around to dual-booting FreeBSD 12.1 on my home tower. It’d been on the 11.x branch for a long time, and I used the opportunity to start fresh. It was originally built as a budget game machine for world-building, so it has a Skylake i5 and a Nvidia GTX 970.

It was quicker to get a FreeBSD Nvidia desktop going than I expected, but there were still a couple of gotchas.

Optional preparation

The first thing I always do is create a zfs dataset for the ports system, so I can use snapshots to try new software, or troubleshoot updates. You’ll probably also want the latest packages over quarterly for desktop use.

# zfs create zroot/usr/local
# mkdir -p /usr/local/etc/pkg/repos
# cp /etc/pkg/FreeBSD.conf /usr/local/etc/pkg/repos/FreeBSD.conf
# sed -i '' 's/quarterly/latest/' /usr/local/etc/pkg/repos/FreeBSD.conf
# pkg bootstrap
# pkg update

Desktop essentials

These are the drivers and basics for a desktop you need:

# pkg install nvidia-drivers nvidia-settings dbus xorg
# sysrc dbus_enable=YES
# sysrc kld_list="nvidia-modeset linux"

Next, create /usr/local/etc/X11/xorg.conf.d/nvidia-driver.conf to tell Xorg to use the nvidia driver rather than a fallback:

Section "Device"
    Identifier "NVIDIA Card"
    VendorName "NVIDIA Corporation"
    Driver "nvidia"
EndSection

Then reboot to make sure everything comes up cleanly.

Aside: Not using kld_load?

Note that I used kld_list in my /etc/rc.conf above. Most guides suggest you do this instead:

# sysrc kld_load="nvidia-modeset"
# echo 'linux_enable="YES"' >> /boot/loader.conf

This no longer automatically loaded it for me in FreeBSD 12.1, as keleathi has also noticed on the FreeBSD forums. If someone knows why that might be the case, please feel free to tweet me. With both of those in place I still needed to manually load nvidia-modeset after each boot:

# kldload nvidia-modeset
==> nvidia0: <Unknown> on vgapci0
==> vgapci0: child nvidia0 requested pci_enable_io
==> vgapci0: child nvidia0 requested pci_enable_io

Install your desktop

I’m using Lumina on my laptop with Allan Jude’s recommendation—post coming!—but I’ve been a fan of Xfce since almost the beginning of my *nix experience, so it gets pride of place on my desktops:

# pkg install xfce xfce4-goodies xfce4-places-plugin
$ echo ". /usr/local/etc/xdg/xfce4/xinitrc" > ~/.xinitrc
$ ln -s ~/.xinitrc ~/.xession
$ startx

Adwaita themes in FreeBSD

Last week I was trying to find the Adwaita GTK theme for my FreeBSD tower. I used to love tinkering with themes, but thesedays I just want one that looks decent across multiple toolkits, and Adwaita fits the bill.

(Curiously, Xfce’s Appearance pane used to list it as an option, but not as of FreeBSD 12.x. I used to like Bluebird back in the day, but I find Greybird a bit dreary and low contrast).

Finding it in the ports system proved trickier than I expected. If you search for Adwaita you get the iconset and Qt theme, but not the GTK2/3 themes. Fortunately Oliverd@ had this suggestion on his Xfce FAQ:

How can unified themes be used with GTK3 and GTK2?

Install x11-themes/gnome-themes-standard, and change the value of /Net/ThemeName property

This is now gnome-themes-extra instead. Install that, and Adwaita appears as a GTK theme option.


2020–02–29

The 29th of February is always a delightful date, even if it does throw my budgets off by a day. These are the posts that have appeared on Leap Days, in descending order of datage. Datage?

I well and truly messed up what was a nice cadence of off/on again posts by uploading a show yesterday. I should have waited until 2024.

The only thing I remember from Leap Day 2012 was getting my Wikipedia username officially changed to RubenSchade, because I wanted to be more transparent with my edits.


An old domain whitelist text file

I have a text file to track sites that broke with NoScript and cookie blocking, and what additional whitelisted domains are reqired.

Fastmail
fastmail.fm
fastmailusercontent.com

Fastmail hasn’t been on .fm since at least 2017 I think, which dates this file to around that time.

Microsoft’s web services still take the cake for most number of third-party domains that are required to log into their services. I think I even need more than when I first checked.


Rubenerd Show 404: The 29th griddle episode

Rubenerd Show 404

Podcast: Play in new window | Download

44:51 – The second Rubenerd Show to be released on the 29th of February, HTTP 404 status codes, a new griddle, SARS, Phua Chu Kang, bushfire update, why you shouldn’t need a reason not to be a dick, and a nostalgic snack review from Singapore. Recorded early Febuary 2020.

Recorded in Sydney, Australia. Licence for this track: Creative Commons Attribution 3.0. Attribution: Ruben Schade.

Released February 2020 on The Overnightscape Underground, an Internet talk radio channel focusing on a freeform monologue style, with diverse and fascinating hosts; this one notwithstanding.

Subscribe with iTunes, Pocket Casts, Overcast or add this feed to your podcast client.