Chris X Edwards

Funny how "dark theme" is voguish now. I remember when the Jobsian/PARC paper skeuomorph infected everything, even terminals. Good riddance.
2022-01-22 09:43
People become doctors for the money and/or to "help others"; you don't hear much about them doing it for their own longevity or good health.
2022-01-10 10:32
Read about "self hosters" taking back power from centralized big tech monopolies. Heard this song before when mainframes gave the PC its P.
2021-12-16 22:44
There is a Quake CLI option `-nojoy` to disable joystick. The documentation assures us, "the fun factor in the game will remain the same".
2021-12-07 10:14
XSS exploit warnings simply using "C++" in search terms; worst language name ever? Well, C#, Go, and "Java"script put it in perspective.
2021-11-22 08:41
Blah Blah
--------------------------

Snow Finally

2022-01-17 20:26

Thanks to everyone who recently said hi. Hi!

I’ve been kind of annoyed recently that we’re now well into mid January and we still haven’t had a proper snow where I wasn’t tearing up my skis. No snowfall yet this year has been able to completely cover a pencil sized twig. If I lived in San Diego, that’s excusable, but I live in the American suburb of Canada’s largest city (basically). But we can put that annoyance behind us now and concentrate on not dying in a car accident on icy roads because it did finally snow properly. Yay!

I am visiting Erie this weekend and there was finally an impressive snow storm on the Lake Erie shore last night. Quite impressive. All of this fell in about 6 hours.

snow4.jpg

I’m a snow shovelling enthusiast and I spent nearly 2 hours on this lot even with D driving the snow monster.

snow2.jpg

snow1.jpg

Of course, the whole reason I personally want some snow is so that I can ski. And today we went from zero to too much — but there is never too much! But without any groomed (or well traveled) areas, this huge amount of snow can be quite tricky if not impossible to negotiate.

ski_front.jpg

But I’m certainly not complaining about a lot of snow! Huge amounts of snow stand a better chance of surviving the 50F/10C rain that will no doubt be here within days. So I’ll take it!

You can see that I’m finally getting a chance to test the new hand covers I designed and made. These are designed to be completely windproof while not cutting off circulation. These allow you to use ski poles with very thin gloves; here I’m actually not wearing any gloves under these.

ski_back.jpg

For now, skiing in the street actually works fine and I really enjoyed it. This snow should be good for at least a few more days of skiing and that makes me very happy.

Now With Extra Pixie Dust

2022-01-09 15:49

Welcome to 2022!

pixiepoo_120.png

Remember that Sign Painter Problem? That refers to the fact that a bad sign advertising a sign shop is a bad sign. As a computer nerd I take this seriously and have been hard at work recently fixing up my computer nerd stuff. Yes, yes, I know… Still looks like crap, but consider that not only am I not a web artiste but unlike 99% of computer "professionals", I have a basic website. It is really quite a technical achievement under the hood. And this is the season of major improvements!

First up is something quite banal — a new cable. I replaced the CAT5 cable from my ISP to my network with a CAT6 one. But the minor electrical details of ISO/IEC 11801 are not the important thing in this case. Certainly it is dumb to potentially hobble my splendid Verizon Fios connection with a less than optimal cable. But the real improvement was the routing. When it was installed the installer drilled randomly in my office floor and popped out in the basement inside a heating duct. Whoops. Ok, retry that somewhere else, right? Heh heh, oh no! This is a cable installer! He ripped open the heating duct to extract the cable. Yes, and left it sliced open with the cable dangling over the sharp sheet metal (leaking thermally controlled air). I was finally able to drill the hole in the correct place and run the correct cables, correctly. And patch the heating duct. The moral of that story is watching installers like a hawk is not enough! They will do the most awful installations possible and you need to budget for cleanup and repair. (I once had one route a CATV coax line by lying it along the inside of a gutter.)

This cable allowed me to finally set up a nice server area in my basement. I also added a new switch to the network down there to hook up multiple devices. And I also added a new electrical outlet. Now my main server is not on the same circuit as my garage door opener and, sometimes, my chainsaw.

This infrastructure now allows me to set up a new server to replace raven15. Since I first started getting obsessive about fanless hardware in the early 2000s, it has come a long way. I was able to buy this device which is ready to go as a low power silent server. This one specifically overcame the cognitive dissonance of convention and even mentioned Linux specifically by name. I bought it last March and have had it running since then to test it. Finally I was able to make the big switch to it.

This server is my main computer where I do most of my serious stuff. I am composing this post on it now. My raven15 had some very fancy RAID1 and Xen VM setup. That turned out to be useful exactly zero times in 7 years. This time I’m going with a simpler strategy that hopefully will be easier to recover from even if it means I’ll have a slightly greater chance of needing to. So new storage media arranged in a new design.

Another big change is that after at least 17 years of using Gentoo Linux as my main computer, I’m finally trying something different. Gentoo is the most Linuxy Linux distribution and can be really technically interesting. It taught me a lot, but the regular maintenance of it can be a real job. The hardware of raven15 seems fine actually, but my hand is forced because Gentoo today can not compile GCC on this lightweight CPU with very little RAM. I used to have to go to heroics by cross compiling (almost defeating the purpose) or making massive swap partitions on disk (slow!) to get through the process.

Now my server has joined all of my other computers with 100% wholesome, clean Debian Linux.

As I started setting up the new server, I started to run into weird problems. I would get corruption in files I was trying to edit. It turned out that GNU Screen with my escape key (escape ^gg) plus a modern version of Vim causes weird file corruption. Great. Besides the insane default escape key ([ctrl+a]) I’ve always hated the terrible name of screen — go on, do a search for "screen"! In their defense, this was written in 1987. Just like no one today uses Bill Joy vi or Vixie-cron, it might be time to move on. So up to my neck in newness, I took on the jump to tmux which is a very good system for terminal multiplexing. It also has a very sensible name.

Speaking of Vixie-cron, I was probably one of the last people to use original ancient versions of that. If you received an email notification, vixie-cron was probably triggering it. Now I’ve switched to a modern ISC cron like all normal people.

Obviously the biggest work I’ve put into all this has been to write from scratch a replacement for the ancient Python AsciiDoc processor I used to use to turn all of this text into HTML. This new system is Nerdtext. That project turned out well and I’m trying to get all the other pieces back in order so I can start to apply it to my website as planned. Currently the main page and old material may still use ancient asciidoc.py but the post’s individual page should be using Nerdtext now. Which is pretty cool!

Nerdtext

But there is a lot more going on behind the scenes. I actually have a few little scripts that help organize everything and naturally they did not work. They were written around 2015 and used Python2. I just spent some time fixing them to be happy with Python3.

And then we come to the hosting. Since "dynamic" IP numbers seem to be astonishingly stable these days and DynamicDNS is a thing, I’ll probably additionally host my own web server publicly soon. For now it’s just internal. But since 1998, I have used Pair.com as an isolated external web host and email server. Recently I found out that they were offering plans with way more storage than I was getting for about half the cost. The catch was I had to sign up for a new account as a new customer — in other words, they were charging a premium to leave me alone and not force me to do this. So I just finished going through that process and now I have a completely different host machine — formerly BSD, now Ubuntu. They also gave me a new stable IPv4 number which is interesting; aren’t these things a precious commodity? Whatever. Seems to work fine as you can see here: https://66.39.76.49/. I’ll take it!

If you’ve been paying too much attention to the technical details of my acerbic web site, you might notice that my URLs now support the extraneous magical thinking of SSL (or is it TLS?). So a new service protocol. This will be its own post/rant! But enjoy the break from browser warnings.

The email server change was ok. I want to stress that I was able to change email providers (kind of, not really) and you do not need to care! My address did not change because I own my own domain. I highly recommend that! Keep using your goomail or iFruitmail or whatever, but if you own/use your own domain, you can easily jump ship if they piss you off. For me it was just an administrative change and configuring a new modern version of Mutt.

As you can see, I do not think I left any hornets' nests unpoked. If you read this, it will truly be a miracle! Welcome to 2022!

Nerdtext

2021-12-24 16:26

I hope everyone is having a decent holiday. At least a lot of places are closed, giving us the day off from absurd moral quandaries emerging from weird banal questions like "Should I avoid the gym today to stay healthy?"

Speaking of odd quandaries, did you know that holiday gift giving has a deadweight loss between a tenth and a third of the value of the gift? Well, try not to dwell on it. I mention it because I believe that (with certain exceptions) homemade gifts are even worse. But what if there was something you could make for yourself that you really appreciated (at full value by definition) that you could also give away to others with little extra cost or effort? From the perspective of the other people, this would probably be a pretty lame "gift", but I believe (to economists anyway) it technically does beat the normal auto-cannibalism of holiday gifting.

In that spirit I’m putting some effort into a public release of some software I wrote for myself that I’m quite pleased with. The program is called Nerdtext and it is a tool to help people communicate efficiently — using the web (mostly) — and without the spectre of surveillance capitalism abusing them.

Nerdtext

If you don’t feel like reading about the backstory, you can jump right to the Nerdtext Project page. If you’re still with me, cool! Let’s take a deeper look at the making of my website.

Ever wonder how I produce this blog? Of course you haven’t! But consider the question rhetorical and let’s pretend you were interested. Ever wonder why my whole website looks like shit? Sure, that one my regular readers may have briefly entertained. It’s a long story.

In high school the number of times I ever took notes in class is precisely zero. In engineering school, notes were much more critical — still zero. And yet today I personally know nobody to be as serious of a note taker as I am. Good notes are the cornerstone of my professional confidence. So why the radical change?

While most tech nerds today have seen the "profound" transition from last year’s fad framework to this year’s, I experienced the tail end of information technology methods used since Latin was the native language of London. Writing stuff down with a stick is a classic but it suffers very badly in several ways. First, it is difficult to duplicate — the monasteries of Europe were serious operations that barely were able to pass along to us a tiny slice of survivorship bias we call Western Civilization. Second, hand written notes and printed books alike are notoriously hard to organize and recall effectively. If you only have a few super important rules you need to communicate, you can carve them onto a chunk of fancy stone and they’re as available to everyone as that post-it with your password on your monitor. But once everyone realizes how super handy literacy can be, suddenly there are post-it notes all over the place. As with the concept of life itself: how do you organize that messy victim of its own success?

The answer of course is computers. Computers have in my lifetime convincingly solved all traditional problems related to literacy, perhaps to the point of obviating it. Of course… Computers… They are their own universe of new and improved problems. Fortunately for me (maybe) I seem to be preternaturally suited to computerized literacy, which at least goes far to compensate for my horrendous penmanship.

So how do I practice computerized literacy? Well, if you asked an F1 driver to talk about "cars", you’ll get some weird esoteric answers. Mine are in the same spirit. But try to keep in mind F1 tech does find its way into passenger cars. For example: have you ever used Slack or Discord or some chat program like that? Did you know that you can make words you type italicized by surrounding them with underscores? This is precisely how everything (←yes) on my website that has ever been italicized has been made so since about 2006.

And that convention goes back much farther. A lot of text embellishment convention was established and popularized on the Usenet. Some if it goes back to conventions people used with manual typewriters but old typewritten documents are incredibly staid by modern standards. They also used things like red ink ribbons and double printing tricks which are not so transferable to simple computer encoding. That’s why I feel it was Usenet, maybe some email, that really tried to forge new typographic conventions that could be expressed well in efficient text encodings — the only kind at the time.

These conventions were not especially complicated. For example…

  • If you put *asterisks* around something, it seems more serious.

  • As mentioned _underscores_ can, well, underscore a point. The dictionary literally defines underscore’s purpose "…for emphasis or to indicate intent to italicize…".

  • Another similar convention is to put a row of dashes or underscores on the line below a title following the thought process of double printing underlined titles on a typewriter.

  • You might have a list of bullet points that each start with an asterisk. This list is an example of such a thing.

  • When you see a blank line (feed) between blobs of text, you can naturally infer a paragraph break is implied.

If any of that was terrifyingly complex, you probably have not been a literate human for long. These are quite deliberately the simplest text organizing conventions possible. And I mean simple for humans! At the other end of the spectrum is something like this:

The volume of a cone is: $${1\over3} \pi \rho^2 h$$

I had to actually double check what the formula really was because I’m not especially good at cone geometry or Donald Knuth’s TeX syntax for using text characters to describe complex mathematical typesetting (despite having read the entire fascinating and brilliant TeXbook).

Somewhere in between the simplest text conventions you can imagine and TeX is something like HTML. Most people today are familiar with it. You can right click in your browser and ask to "View Page Source" and see the <insane> <jumbled> <mess> of <tags> and <more tags="and all kinds of weird stuff"/>. HTML is actually not hard or complicated, but it sure looks terrible. If you’re reading it directly, someone is probably paying you.

By the late 1990s it was quickly becoming apparent that the web was going to be a lot more powerful and important than even its pioneers could imagine. In a gold rush atmosphere, everybody was clamoring to figure out how to get a web site that would make them rich. Some people, like me, had personal websites just because they seemed very sensible. I immediately realized that tagging up websites was tedious drudgery that I wanted no part of. Little did I suspect that 99% of computer jobs for the next 25 years would be doing exactly that! So much for the robots and space travel I’d been promised as a youth!

In the early 2000’s some other people were getting pretty sick of HTML work too. Programs that generated HTML that humans never had to look at were becoming popular. This gave us things like wikis and web mail and shopping carts, etc. The famous Aaron Schwartz was doing stuff like inventing RSS, Creative Commons, and, importantly, Markdown.

An important protagonist in this story is Stuart Rackham. He seems to be a Kiwi but his existence is shrouded in mystery now — perhaps he has "retired".

In 2002 he seems to have written the program called AsciiDoc. The purpose of AsciiDoc is to translate a disciplined use of those simple obvious conventions I mentioned earlier that were created for and by humans, directly into something more obnoxious like HTML. I learned about this program in 2005 or early 2006 and immediately started using it for my web pages.

I have been using it continuously since then. For the first 5 years or so, it seemed like any other high quality free software program. It released new features and bug fixes and the documentation improved. But while I was busy worrying about other things, I started to get the feeling that the development of AsciiDoc was faltering. Eventually it was clear that it was not being actively developed.

At the same time Markdown was enjoying a surge in popularity thanks to GitHub promoting it as an aid to documenting software. The simplistic Markdown had been completely unknown to me and when I discovered it, I was disappointed that compared to AsciiDoc, it lacked many features I’d come to depend on.

At some point Stu’s website seems to have disappeared. I feel like there has been some confusion about AsciiDoc’s status. Some helpful internet people have done some work to rescue the code from oblivion. Here, here, here. Or maybe they have rewritten it — it’s difficult to say. The old version was in Python 2 and it looks like it wasn’t Stuart Rackham who brought it into the era of Python 3. It’s all rather confusing.

And some people have definitely rewritten it completely, most notably the Asciidoctor project. We know it is completely rewritten because it is no longer in Python at all — their project is in Ruby. That was a fantastic blessing for the Ruby community! Unfortunately I am not interested in becoming a member thereof.

Like Austin Powers, I’m kind of waking up from a deep sleep while my production server had a very long life of flawless production. I never fiddled with my system because it worked. For almost 10 years. The AsciiDoc that will compile this blog post is by Stuart Rackham and has a copyright notice from 2002-2010.

$ head -n7 /usr/bin/asciidoc
#!/usr/bin/env python2.7
"""
asciidoc - converts an AsciiDoc text file to HTML or DocBook

Copyright (C) 2002-2010 Stuart Rackham. Free use of this software is granted
under the terms of the GNU General Public License (GPL).
"""
$ asciidoc --version
asciidoc 8.6.9

But it’s time to replace it. Well it was about 7 years ago! I actually have had a replacement server running for almost a year but have not switched over yet. One big question that remained was how would I process my very large body of AsciiDoc documents on a new modern system? With the Rackham AsciiDoc retired to a remote bach in the New Zealand wilderness with no internet connection, what could replace it?

I am really not keen on Ruby, Java, or JavaScript (Asciidoctor’s three options). I’m a little bit confused and unnerved by the state of the Python projects. I have huge respect for those keeping the code working, but it doesn’t seem like anyone has replaced Rackham to lead a coherent Python AsciiDoc solution.

And finally, ever since I started using AsciiDoc, something has nagged me. I dislike the way it renders. Sure it’s ok enough that I’ve lived with it for 15 years. But I was really hoping that instead of dying, that the AsciiDoc community would start to make it easier to do what needed to be done to get my own look. This is why if you go to http://xed.ch it will look very different than if you go to http://xed.ch/help/asciidoc. The latter has AsciiDoc’s default 2011 styling which practically screams "this was produced by AsciiDoc!" I always found it a bit weird and problematic that I could not figure out how to fix this.

Obviously I could have figured it out, but if the project seems dead and it’s so much work to dig into how to change the back end to be the way I want, well… We’re starting to enter the territory where I may just want to redo it. My way.

And that is what I did. Over the last few weeks, I wrote a new text processing engine from scratch in C++. This is Nerdtext. I’m not calling it something with AsciiDoc in the name just to avoid confusion. I’m going to be simplifying and modernizing the mark up syntax. It will be focused on my applications, at least at first. I have tested it on all my notes and blog posts (some 800,000 words) and it does pretty well. Very few serious errors or problems, so quite compatible with classic AsciiDoc.

This has been a huge project for me. I feel a small bit stupid having known full well going in that it was a quintessential classic Laundry Problem. But it had to be done. The fact that people will look upon this and very wrongly think "Well, that’s easy!" is just a cross I’ll have to carry.

I definitely improved my C++ skills, especially modern flavors which really are a lot better behaved than they were in the 1990s. I still prefer C and Python, but C++ did well and impressed me.

My plan now is to overhaul my entire website. This will involve transitioning to the new hardware, changing my hosting arrangement a bit, and compiling everything with Nerdtext. That itself will be a pretty serious job. Hopefully this will be one of the last posts that uses archaeological AsciiDoc. (By the way, you can see source code for pretty much any of my pages by replacing the .html with .txt in the URL. For example.)

To check out Nerdtext, have a look at its new project page which is the first web page on my site to be produced entirely by Nerdtext.

logonerdtext600.png

C++ Errors: Finally More Funny Than Awful For Me

2021-12-19 16:35

I was getting ready to add a new feature which required a new member attribute variable. I went ahead and added a declaration for it in the class definition. Obviously this sounds like nerd glossolalia to normal humans so don’t worry about the details — just have a look at the shape and colors of this.

class Block {
        ....
        list<string> lines;
        int new_variable= 0; // Trying to add this new variable.

Just to make sure I didn’t make any dumb mistakes, I tried to compile it. It compiled fine. Luckily I tend to automatically run the program when it compiles cleanly. However at runtime I got this bizarre error.

terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_M_construct null not valid
Aborted

Uh huh. That’s super not helpful. I had no idea why it said this. Remember, I’m not even doing anything. I’m adding the simplest declaration possible to a class which works fine. That is frustrating but it then goes from annoying to completely insane. Desperately trying random things attempting to at least get a better error, I try the following (simply the two declarations switched in order).

class Block {
        ....
        int new_variable= 0;
        list<string> lines;

And then it works. Compiles and runs fine. I was under the impression that if the declarations had nothing to do with each other, their order was completely optional. Fun stuff.

Fortunately my programming style is to drop tons of runtime hints about what exactly is going on. I was able to put diagnostics on high alert until I could zero in on exactly where the program stopped working. When I found the line it was dying on, I knew what the problem must be. I was asking for the last item of a container and I suspected the container was empty (perhaps the error message’s "null"). Checking the official documentation, my suspicions were confirmed.

If the container is not empty, the function never throws exceptions (no-throw guarantee). Otherwise, it causes undefined behavior."

I’ll say!

bjarne.png

Skiing Season Starts

2021-12-08 18:45

I was just fooling around when I took out my new skis in a light snowfall last month. Today I got to do some real skiing! I was surprised that the weather defied the forecast, my expectations, and global warming to produce about 3in/8cm of snow in temperatures that were finally below freezing. This morning I went out to shovel the driveway and it was 100% clear (pavement above freezing) so my expectations were low. But by the afternoon, even the paved surfaces were starting to get some accumulation. This is important since our forest trails are paved. I shoveled a decent amount and thought it might be possible and at least worth a try.

And it was great! Which is why the moral of this story is for activities with hardly any downside, give it a try and you might be pleasantly surprised!

I was out for an hour and had one of the best skiing experiences I’ve had on my community trails. I was using my old reliable Rossignol evo XC60 skis which are absolutely perfect for tenuous global warming conditions. You can see that this snow was incredibly sticky with clumps packing into iceballs at every opportunity. I am now planning to put glide wax also on the tops of the skis to keep snow from sticking so tenaciously there.

202112081620-skied.jpg

But the skis performed great. Great glide and kick at the right times. I have a new set of poles too — Salomon R60 Click. These are a huge improvement for me. I love the wrist cages that detach with a press of a button. I skiied the first 20 minutes with a sweatshirt on but was just in a tshirt as shown for the last 40 minutes. But with those poles — click click — and I can take off my sweatshirt or jacket — click click — and I’m back to skiing. No messing around with the straps. The really huge thing though is that the tips are able to dig into the asphalt. If I lived in Sweden this may not be so critical but I don’t. Yet. My other poles would skip off the asphalt through the weak layer of crushed slush. So a huge improvement.

202112081620-skis.jpg

I think the biggest improvement to the whole ensemble was the engine. I’ve been assiduously using my very, very silly NordicTrack every day since last ski season, and guess what — that helps! Not so silly. I don’t do a lot with it, but I do a couple of minutes on it every day just to make sure my body doesn’t forget about this. And at the start of November, I doubled the regime. Still not a lot, but still a lot more than nothing. I definitely am not strong enough to double pole the entire 90km of the Vasaloppet like the winners do. They literally push themselves — quickly — with only poles for 4 to 5 hours straight! But I can do it for a couple of minutes until I feel like my heart is about to explode and I can properly marvel at those pros.

fireplace.jpg

Now after a good day skiing I can sit back and enjoy some calorie negative apple pie by a nice cozy fire. (Yes, that giant pile of logs in the photo of me is an even harder workout!)

Update 2021-12-09 Got up early since yesterday’s snow had a pretty hard freeze (by local standards). Did 50 min on an icy mess and was able to double pole almost all of that! I don’t keep super detailed timed records but I’m pretty sure I just demolished my best previous performance. I am certain that I have skied the same route before taking double the time. I just need to work up to another, uh, 4 hours and I’ll take a more serious look at that Vasaloppet!

--------------------------

For older posts and RSS feed see the blog archives.
Chris X Edwards © 1999-2022