Things to do in Python 3 when your Unix standard input is badly encoded
Today I had a little adventure with Python 3 . I have aprogram that takes standard input, reads and lightly processes abunch of headers before writing them out, then just copies the body(of an email message, as it happens) from standard input to standardoutput. Normally it gets well formed input, with no illegally encodedUTF-8. Today, there were some stray bytes and the world blew up.Dealing with this was far harder than it should have been, partlybecause the documentation has issues
Why browsers are driven to offer some degree of remote control
Not too long ago I wrote about changes in Firefox's remote controlon Unix , and in that entrymentioned that probably all browsers on all platforms implementsome degree of remote control. You might wonder why Firefox has aremote control feature and why this is probably a general thing.My belief is that there is a lesser and a greater reason, but toget there I'm going to start with a scenario.
Suppose that you're reading email in your mail client, and you hita message with
We're seeing increasingly targeted and dangerous phish spam attempts
In the old days, phish spam was generally pretty crude and generallyeasily recognized. A lot of it still is, but we 're increasingly seeing some prettysophisticated and targeted phish spam. Some of the latest phishspam we've seen uses essentially exact duplicates of university webpages and authentication dialogs, and has relatively convincingpitches in the email to get people to click on the links. To me,this is scary and goes well beyond assuming we can be phished , as I did in 2019
Go 1.18 will embed source version information into binaries
Since Go 1.13, Go has embedded information about the modules usedto build a program into its binary, and has reported them if youused ' go version -m ... ' ( release notes ). This information hashistorically included a variety of things ,including the path and module that the program was built from, anindication of any module replacements being used, and a marker thatthe program was being built from a source tree instead of with 'goinstall ...@..
Vim visual mode and an unfortunate restriction on the filter operation
Since discovering Vim's visual (selection) mode I've found myself using it periodically for various things (whichI may write up some other day, as there are a couple of common caseswhere it comes in handy). However, I recently re-discovered anunfortunate restriction on operators on the visual area , specificallyfiltering. This is that no matter what (as far as I know), theyapply on a line-wise basis even if you made a visual block selection.
Suppose, hypothetically
Your SMART drive database of attribute meanings needs regular updates
A lot of people use the smartmontools tools to monitor their drives, either automatically through smartd (which is often set up by default) or directly through ' smartctl '.If you've ever used ' smartctl -A ' to get the SMART attributes ofyour drives, you know that these attributes have names that oftengive you important information on how to interpret their values.Sadly, these names (and measurement units) mostly aren't standardized;instead, drive vendors come up with whatever they want, including
Companies and their stewardship of open source projects
One of the articles of the time interval is Dustin Moris Gorski's Can we trust Microsoft with Open Source? ,written in the wake of what I will just describe as Microsoftshenanigans around .NET. In the wake of reading that and havingsome general thoughts, I tweeted :
Can we trust Microsoft with open source? No, of course not. Nor canwe trust Google, Apple, or Facebook. Any appearance of open sourcefriendliness is tactical; it's not and has never been a deep seated
Python 2's status in various Linux distributions (October 2021 edition)
One of the slow things happening with Python 2 in its afterlife is that various Linux distributions are sort ofmaybe trying to remove the Python 2 interpreter itself (which we couldcall 'CPython 2'). Their official position is generally that they'llremove it sometime, but the practical result is that no one seems tobe making much gestures in that direction.
Debian's Python page says that"[Python 2] is being removed as of Debian 11 (Bullseye)". Thisinformation is visibly
The easy way to see underneath NFS mount points on Linux
One of the little and generally obscure problems of running NFSclients is that every so often you could wind up in a situationwhere you wanted to peek at what was on the underlying filesystembeneath an NFS mount, and you wanted to do this without the disruptionof actually unmounting the NFS filesystem to expose what was belowit. Sometimes this was because you thought a program might havewritten things to the directory hierarchy before the NFS mount hadbeen made (and those writes were now invisible). Sometimes this wasbecause you
In the beginning, there was no way to expand C's stack size
There are undoubtedly many reasons that C doesn't have any language orAPI concept of your stack size . But I think thatone factor in this is that in C's original world, that of Unix on thePDP-11, running out of stack size was essentially fatal no matter whatyou did. The fundamental problem was that there was no way to actuallyexpand the space available for your stack.
Normal programs on the PDP-11 had a 16-bit address space, giving them