Computers

You’ve got a long way, baby…


Tried out the Fedora 29 beta. I can get past having to reset the screen resolution every time it boots, since it’s running under VMware Fusion and thus may not be Fedora or GNOME’s fault, but this definitely is:

Yes, the Media Size menu is mostly offscreen. At least, the first time I click on it; it’s just plain missing after that, which leads me to believe it’s completely offscreen.

Not shown is the batshit-craziness of having to unlock the printer configuration with your password before you’re allowed to change anything on this screen at all: page orientation, paper size, duplex, tray, anything.

No school like the old school…


Dinking with parody O’Reilly covers reminded me of the one I’m in:

I wasn’t involved at all with the book, and I was, as they say, “just another Perl hacker”, but I did have one thing going for me: I ran tut.

tut.cis.ohio-state.edu was our “big iron” back in the day, a multi-user Unix box that had the dubious distinction of running both BSD and SysV Unix, at the same time. It was one of the few machines that was more for research than instruction, and among its many hats were: Usenet backbone site, GNU mailing list to Usenet gateway, anonymous FTP site, anonymous UUCP site, and (for a while) Compuserve’s tape-based Internet email relay.

[seriously; Karl Kleinpaste would drive 9-track tapes over to their office and back]

In its FTP/UUCP capacity, it hosted all the GNU software, and Perl. Because the official distribution method was Larry posting multi-part shar archives to Usenet, until it got too darn big.

Anyway, my only appearance in the book is my old email address on page xxii, as the UUCP contact address. This was still enough for me to get support email a few times, from people who didn’t want to bother “the big names”.

Fun facts:

“The text of this book is set in Times Roman; headings are in Helvetica®; examples are Courier. Text was prepared using SoftQuad’s sqtroff text formatter. Figures are produced with a Macintosh™. Printing is done on an Apple LaserWriter®.”

You’ve come a long way, baby.

Oh, and when I dug my copy out of a box, I discovered two things: it’s signed by Larry and Randal (something I forgot decades ago), and it still has the original postage-paid mail-in card. I’d be tempted to send it in, but they moved their headquarters sometime after 1991…

-dSAFER considered harmful…


When L. Peter Deutsch first added the file I/O operators to Ghostscript (1992?), I submitted a security patch to disable them by default, requiring you to use -dUNSAFE to enable them. He accepted the patch but reversed the logic, enabling them unless you provided the -dSAFER option. I no longer remember precisely how he handwaved away my concerns in his email, but it doesn’t matter.

I was right then, and I’m still right.

(At the same time, I also submitted a patch to the crude -dASCIIOUT option to make it possible to extract the text correctly and post-process it into a document that preserved formatting pretty well, but he only accepted half of it, because he was concerned that adding a Perl script to the base distribution would impair its portability…)

FFS, Emacs!


I’ve been running a few releases behind on GNU Emacs, because the last time I upgraded, they removed the count-lines-region function, for no apparent reason.

Unfortunately, I recently upgraded with Homebrew, and the latest dumbfuckery to ruin my day is making non-regexp searches match on one or more Unicode whitespace characters when you type a literal space character. This includes newlines.

As a result, out of the box it is no longer possible to find either an errant space, or multiple spaces where there should only be one. You need to Google and discover how to shut it off in your .emacs file:

(setq isearch-lax-whitespace nil)
(setq search-whitespace-regexp nil)

My new favorite programming font


I have a hate/tolerate relationship with so-called “programmer’s fonts”. Let me count the ways they suck, in no particular order:

  1. Not fixed-width. Blech.
  2. Too-narrow set width (ranging between condensed and crushed).
  3. Inconsistent weight/color between alpha, numeric, and punctuation. The creator of Fira Code actually managed to make \ and / different weights!
  4. Twee punctuation.
  5. Failure to adequately distinguish 0O, l1, etc.
  6. Dotted zero instead of slashed (so that 00 is staring at you; Hack takes this one step further, for an Eye-Of-Sauron effect).
  7. Inconsistent centerline for special chars (^>~*+=-})]|\/#$%&@).
  8. Special-char centerline inconsistent with digits.
  9. - not same length as + and = (surprisingly common!).
  10. Five-lobed asterisk, even worse when it’s upside-down.
  11. Poor rendering either on or off high-DPI displays.
  12. Special Dishonorable Mention to Monofur for having lower-case digits, seemingly-random centerlines, twee punctuation, and a generally obnoxious character design.

For a long time, I’ve been using Anonymous Pro, hand-edited to fix its centerline problem, but the new winner is Office Code Pro, which suffers only from a slightly-twee %, a slightly-italic $, a five-lobed *, and an ever-so-slight centerline offset for braces, parens, and the v-bar (most easily seen in the -{| combo).

It is hands-down the cleanest, most usable fixed-width font I’ve ever found, fixing almost every problem with its parent, Adobe’s free Source Code Pro. Pity the repo just has the compiled fonts rather than the source diffs, because I’d love to fork it and fix those last few niggling flaws.

Bash path maintenance


I’m a little OCD about my $PATH

cleanpath () {
    local path p result
    local -A seen
    PATH=${PATH//::/:}
    IFS=":" read -r -a path <<< "$PATH"
    for p in "${path[@]}"; do
        if [ -z "${seen[$p]}" ]; then
            result="$result:$p"
            seen["$p"]=1
        fi
    done
    PATH=${result:1}
}

more...

This… is wrong tool; never use this.


This was more a challenge than a solution to some need:

#!/bin/bash

while read l && read n <&3 ; do
    echo $n "$l"
done 3< <(hexdump -v -e '/4 "%u\n"' < /dev/urandom) | 
    sort -n | cut -d' ' -f2-
exit 0

And, yes, B5 is now on Amazon Prime, and I just watched “War Without End”.

Headline News


“Microsoft saves sinking ship; passengers leap to their deaths.”

“Need a clue, take a clue,
 got a clue, leave a clue”