Chris X Edwards

Does inhaling insects count against being a vegetarian?
2022-06-15 06:35
Shakespeare's Romeo and Juliet was written 35 years after Brooke's The Tragical History Of Romeus and Juliet. So, in effect, a reboot.
2022-06-03 08:05
Love the phrase "live off the land" applied to malware strats, using a system's core tools. My work strives for this. No deps is effective!
2022-05-15 09:20
Nervous hearing the "Report suspicious activity" announcements in the NYC subway because I was not staring at a telephone.
2022-05-10 10:24
The standard Silicon Valley coding interview is like hiring authors based on how well they play Scrabble instead of reading their books.
2022-05-03 08:59
Blah Blah

I Like New York

2022-05-15 23:19

Is it just me or is it ironic that this icon of liberty is decorating a crowd control barrier?


Well, let’s not worry about that. I’m just having a bit of fun with New York’s (technically New Jersey’s) famous tourist landmark (visible in the background).

I am presently in New York, the state, but last week I took a business trip to the place people think of when they hear "New York": New York City. The last time I was in New York City it was for an "interviewcation" in the middle of winter. That was around six years ago. The city seems to be changing quickly and I think for the better.

Where I live in Buffalo, NY is pretty nice. While bike riding on the paths along the canals I often think, "This place is so nice, it’s almost Dutch." I was quite surprised to get that same feeling in the City version of New York.

This is me waiting for the subway at just after five in the morning.


That is why there’s nobody around and why I’m not wearing a mask. Although The Plague seems to be lightening up a bit, in the subways of New York City, people are still into masks even though state-wide they’re not required. For every person I saw not wearing one, I saw a person wearing two masks. The apprehension is understandable with a zillion people packed into these tunnels and the memory of one of the worst death tolls from the early months of The Plague. Still, the fact that trains run all over the city is something NYC is famous for, but it is also something quite ordinary in most European countries. Like the Netherlands.

The last time I was in NYC I remember it reeking. The problem is that smoking is not generally allowed in the buildings. So even if a small minority of the population smokes, if they all must come outside to do it then every alley will be filled with smokers 24/7. Since I can smell someone smoking a block away, the whole place was awful. But I didn’t get so much of that this time. Maybe some critical mass of people have quit. But what is funny is that if you walk four or so blocks, one of them will smell very strongly of marijuana smoke. Apparently it is full legal in NYC now. I saw someone rolling one on the train. I’ve never been a smoker of anything but I have to say that if it’s going to be weed or cigarettes, I’ll take weed any day. You know what other city you randomly smell weed smoke in? That’s right, dumb tourists in Amsterdam.

The best thing about the Netherlands is the magnificent scenery. And I have to say, NYC is boasting some excellent scenery of its own. And I’m not talking about skylines here — I’m talking about the people. Dutch people as a whole are far and away the most attractive people in my opinion. But the inhabitants of NYC are really putting in a good effort for second place. (Can they overtake Buenos Aires? I think so!)

What’s the secret to NYC’s attractive people? Well, it’s not this hilarious sign I saw.


New York City has excellent food. How can you have a certain kind of restaurant if it sucks and there are five excellent ones within a few blocks? (Answer: tourists. But you get the idea.) I found a magnificent bakery that was almost Dutch quality. You’d think that all that great eating would not do great things to the attractiveness of the people. But it turns out to not be a problem.

The fact is that humans in general are attractive when there are no pathological physical problems. NYC may have a slight edge over Holland because of their diverse population. But the sad fact is that Dutch people and NYC people are just people — they look so damn good because they haven’t been pummeled so hard with the first world’s most devastating ugly stick: the automobile.

Cars are shit. They ruin almost everything. If you think of a prototypically "nice" place (a beach, Disneyland, the top of a mountain) there are no cars. If you think of a place with a lot of cars (a beach in Texas, Anaheim, parking at a ski resort) it is a dystopian nightmare where you literally must fear for your life at every moment. But cars make people ugly as well as the locale.

And NYC is finally catching on to the truth about cars. Manhattan is an island. There is no possibility of sprawl. The land is very valuable so an amazingly stupid communist plot like free parking is easily seen as the mistake it is. NYC obviously has some city planners and they have finally figured out how induced demand works. They know they can’t build a 26 lane freeway. And I think they’re starting to figure out that they do not want to! All over the city I saw examples of intelligent city planning. Accommodating 8.8 million people driving private cars around a dense city is just not going to be a thing. Other options must be explored. Instead of doing what most cities do as they lose the battle with giving cars literally everything, NYC has focused on alternatives. What a concept! I saw many, many streets/avenues where car lanes have been removed. They have been replaced with dedicated bus lanes, and in a shockingly Dutch turn of events, bike lanes.


And these are not token crap ones. They really seem serious about this. This is a city for people, not cars. I’m thoroughly impressed. Most NYC people do not (yet) bike like Dutch people, but they do walk. I figure they easily walk 15min to their subway stop, down then up some stairs, 15min to their office, up some stairs, and then all that in reverse, maybe some more walking for shopping and daily life. If the average NYC person walks 30 minutes a day, (and I bet it’s more) that’s enough to make a drastic change in the vitality of the population. And I’m not just talking about wealthy Manhattan people. They’re probably worse off because they can afford more car travel!

By avoiding the stroad strip mall monoculture that is, with rare exceptions, every other place in the USA, NYC is a very interesting place. Definitely worth visiting. This visit was the first time the calculus of living there became something I could actually imagine. It’s not a cheap place, but it may be worth it. I like New York!


Do Not Crucify Trees

2022-04-15 16:41


But the dangerous piece of iron hardware in this photo that I want to highlight is actually the nail. My bucking cut was less than an inch away from it. I do not even want to think about hitting that with a chainsaw.

Think twice about putting steel fasteners into trees. They don’t like it and neither does the guy who will clear it away decades from now.

Review - Termination Shock

2022-03-21 18:41

My short review for the impatient: Neal Stephenson’s latest book Termination Shock seems more reserved than some of his well-known works but it is a thoughtful, well-constructed story about a topic that may turn out to be far more important to our species than what nerds usually focus on.

That topic is geoengineering but before looking closer at that, I’ll quickly run through my fiction scoring matrix.

  • Concept - Good and probably some forward thinking about a discussion this planet will soon be having.

  • Style - It’s Neal Stephenson so it reads like my own inner dialog. YMMV.

  • Organization - Good. Neal always sells words in jumbo packs so you have to be good with that.

  • Character names - Excellent and well thought out.

  • Believable characters - Definitely. And from such weird disparate (I hesitate to use the word "diverse" but that too) backgrounds.

  • Natural dialog - Excellent.

  • Plot complexity - I’d say the complexity per page was low. But there were a lot of pages.

  • Plot resolution - Good. Lots of far flung action brought together and no characters you care about left hanging.

  • Erudition - If the thousands of random interesting (true AFAIK) facts in this book were on the same topic, it would be a textbook.

  • Gems - Neal is capable of more here. They were mostly set up slowly. I’d say the gem count per page was low, certainly low for Neal, but again high just on volume.

  • Immersion/world building - I was on Wikipedia quite a bit trying to get a clearer idea of what was really a thing and what Neal had made up. So that’s pretty good.

  • Believable tech - If you can fool me into having nothing to immediately contradict about fake future tech, that’s unusual and impressive.

  • Imagination/creativity - It’s easy to forget how artful this work really is because it is presented with a kind of literary photorealism.

This book is pretty new, from 2021, and on page 351 Covid-19 is mentioned as well as other recent political events. On page 355 Covid is mentioned again and one of the main characters is what the CDC (shyly) and I (boldly) call an "R" ("recovered" in what were formerly uncontroversial epidemiological models). What I found fascinating is that this character has lost his sense of smell even after otherwise recovering; but in the story he gets some slight restoration of his ability to smell things, but only important things that might represent danger, e.g. smoke. What’s strange about that is that I actually had olfactory hallucinations of smoke — specifically — last year for a few months. It seems fine now but very weird for sure. So strong bonus points for covering a detail like that with such eerie accuracy.

On page 158 we learn exactly what genus of billionaire one of the main characters is ("ten billion"). I can’t help but think Neal’s penchant for writing about billionaires comes from some of his fans who make researching that demographic a bit too easy. Or worse, who own the world’s largest bookstore.

But on page 178 the billionaire character changes the mood slightly with, "[Some engineers are] happy working on shit that’s actually getting built, even if it ain’t going to Mars with some fucking billionaire. We gotta terraform Earth before we get distracted by Mars is my philosophy."

I’m wondering if that philosophy might reflect that of the entire book. This certainly has very precisely been my position with respect to all nonsensical Mars colonization chatter. But there did seem to be an emphasis on specifically pursuing tractable feats which can actually be accomplished.

As with most Stephenson books, this one was filled with cultural curiosities from around the globe. The "sport" of gatka is featured and I got to learn what that is. This is on brand because Neal is always very interested in exotic ways people can hit each other with sticks. He’s kind of right in the sense that we’re probably hardwired to take such events pretty seriously.

I think for me what was most interesting was the fact that I personally knew a lot of the book’s locations pretty well. While some of that was nice (the Netherlands, Lago di Como, etc), there was, unfortunately, a lot of Houston, Texas. There was much detail about the rivers, lakes, and bayous of East Texas exactly like ones I’ve canoed, swum, and even scuba dived in. I once lived right next to the White Oak Bayou, a major tributary of the waterway the story spends a lot of time on, and I know that kind of scenery all too well. I also know this kind of scenery described on page 339: "He was an Anglo Texan, but apparently not the sort who hated nonwhite folk — or if he was he did a good job of hiding it…" My first thought when reading that was, ok, that still needs to be spelled out I guess. Noted.

Some of the tech was weirdly personal too. On page 417 a map is mentioned of dots in the ocean that turn out to be "weather buoys". There is a good reason I demonstrate such a map in my SVG notes. As someone who once was in charge of scooping up all of the data from thousands of weather buoys (technically "drifters"), that kind of felt personal too. But Stephenson covers a lot of ground; he probably talks about some coincidentally idiosyncratic thing from your life too.

Finally, let’s look at the big tech topics. First is drone madness. This story features a lot of Deus Ex Drone action. Which is fine. We can vaguely take it as given that drones are neat and do surprisingly clever things. But my feeling about the whole topic is summed up on page 670: "[Important character] was in a quite ambivalent frame of mind about the whole drone thing. On the one hand, this whole operation would have been unthinkable without them. On the other hand, batteries." Exactly.

I think drones are a lot like 3d printers in that people are quite excited for the wrong reasons about the wrong things. (With 3d printers, the real interesting development is cheap motion control.) With drones, I think the amazing development is really the incredible power densities we can get with all portable electric systems today. The complex but obvious integration of a lot of other standard components completes the almost magical-seeming abilities of drones. So a lot of drone magic. Which is fine.

The main tech showcase and really the core of the book’s theme is geoengineering — specifically trying to throw sulfur into the stratosphere to somehow mitigate/neutralize the excess carbon our planet’s climate is struggling with. The idea would be to simulate volcanoes which have done this and cooled the planet. Is this a good idea? The book doesn’t take a clear position on the matter other than it probably should at least be thought about by science fiction authors. Certainly a central theme of the book was that this kind of thing is controversial.

I’m no good with this kind of chemistry but my first thought on hearing the proposed solution was to wonder if sulfur was one of the causes of acid rain — Wikipedia tells me that sulfur dioxide sure is and that seems somehow relevant. But again, I’m no expert.

I have to give Neal credit though for writing a perfectly professional novel about this topic and giving it some attention. As we continue to screw up the climate, we may need some kind of drastic measures while we wait for our species' collapsing fertility to cure the problem.

How Not To Name Files

2022-03-05 07:39

I was doing some quick operations on a couple of images in /tmp/ and I ran this simple ImageMagick command to quickly see exactly what their dimensions were.

$ identify /tmp/*jpg

Simple, right? I was pretty surprised to get this output.

/tmp/image1.jpg JPEG 520x473 520x473+0+0 8-bit sRGB 28564B 0.000u 0:00.000
/tmp/image2.jpg JPEG 446x307 446x307+0+0 8-bit sRGB 43772B 0.000u 0:00.000
identify-im6.q16: unable to open image
Permission denied @ error/blob.c/OpenBlob/2924.

What’s going on there? Well, it seems that this is a flaw in Systemd, the double edged sword of Damocles which tries to make Linux less Linuxy (unfortunately).

In its internal housekeeping, Systemd has created a temporary file in a public temporary file location that ends in a random string. And in this case, luck runs out and today’s file’s random string is 9rFjpg, which of course ends in jpg, just like the well known photography file format.

Although Systemd is both irritating and useful, I don’t mean to single it out. This is really a problem with the unix mktemp command which uses the C mkstemp() function from stdlib.h. So this is a pretty deep problem.

You could argue that I should have done what DOS people were trained to do and specify my shell glob as *.jpg. But why? If we’re going to have extensions be a thing at all (and trigger all kinds of automatic responses), surely we should respect them and not write random strings to the end of filenames. (Especially if we’re delimiting parts of the filename with dashes instead of periods!) That’s certainly my opinion and I’m posting this to encourage others — and my future self — to consider this a mistake and not make it. But given this problem, when doing serious scripting it probably does make sense to be defensive when specifying files by extension and insist on the period too if possible. That may not actually solve all problems of this type but it should cure most issues with default mkstemp() filenames.

Infinite Journeys - Behind The Scene

2022-02-28 13:54

Yesterday I talked about my submission in the Infinite Journey’s event. Today, I’ll cover what is possibly more interesting: how it was done. It may seem like not a lot could possibly have gone into a mere 4 second clip, but as you’ll see, that is not true!

I originally downloaded a free B17 model. This allowed me to investigate if the concept could work at all. Since I needed such a weird and limited piece it, I ended up creating my own model of the aft fuselage myself.

Then I spent quite a bit of effort working out how to best match the Heavy Metal art style which uses hand drawn line hatching to make the very dark interior (dark = historically accurate!).


Once I had something I liked, I then had to sculpt a new fuselage to reflect the plane after becoming damaged.



At first I thought this project should use Blender’s amazing grease pencil tools.’s official Grease Pencil demo film actually features aerial combat so that seemed reasonable.


Unfortunately I continue to have a hard time with grease pencil work. It’s so insanely clever but also kind of bewildering. For example, there are two (at least) major systems for changing your brush colors. I found that I could create nice stills with grease pencil or I could animate something, but not both. I feel like it’s a good platform for a team talented and dedicated to their project enough to draw all of the frames by hand with very little assistance.

In contrast, I wanted a lot of assistance because I’m lazy and can’t draw a thing twice in a way that it looks like the same thing. I tried to get grease pencil to do a lot of interpolation for me and it just didn’t come out well. Here’s what I came up with.



The flak explosion is another interesting example. I was watching the brilliant Blender developer Daniel Lara talking about grease pencil magic and he was demonstrating with this excellent explosion. I thought, dang, that would be perfect! And then he off hand mentioned it was on a Blender site; I hunted around and sure enough, these were grease pencil examples submitted to the public domain and available for use. Great! But then the problem is that grease pencil overwrote Freestyle line art — as in, not even being occluded properly by stuff in the foreground. This was super disappointing. I ended up having to render this explosion separately and import it into my scene as a series of images.

In the end I relied a lot more on Freestyle which is a final render pass that tries to put hand-drawn-looking lines over the 3d modeled scene.

Once I decided I needed to really have a full 3d model of my character, I went ahead and modeled the figure myself. What’s weird is that for reference images, the most perfect thing possible is a series of orthogonal shots and I found this in a set showing off someone else’s high detail model.


Their model was $35 — which is fine — but I didn’t have that kind of budget for this and I needed my own details and art style.



Fun fact — my airman has no thumbs! I’m pretty happy with the character especially since I got very lazy about not vertex painting the rig and my texture painting is comically bad.

Which brings us to… Trackball! This entire project was done completely with a trackball! My next "hand drawn" project will probably not happen until I buy a decent tablet.

I was able to find a free model of a Browning M2 .50 machine gun. Here it is shown with and without Freestyle applied, effectively demonstrating that feature.



That saved me the trouble of modeling the gun but it’s not perfect. It’s really cool and works great, but it bugs me because this was not quite the configuration used in B17s. The sights are different and the ammo feeds are very different. In a B17 there would generally be a big rack next to the waist gun that held 1000 rounds or so and would feed into the gun with a big flexible belt. I really wanted to model that but that was a technical difficulty too many to work out. The ejecting cartridges were another one I actually did artwork for and did some tests, but I didn’t come up with a satisfactory technical trick in time.


The animation of the character was pretty complex as you can see by the rig, but still one of the more enjoyable parts of the project where a bunch of inanimate models actually come to life. I had to rig the machine gun mount too which helped make it behave properly.



I actually studied the interior of B17s a lot. I watched 1940s footage of them being built in factories. I watched videos of modern restoration efforts and videos of still extant specimens. So I totally overdid it on learning the details about this plane. And all that got me is feeling uncomfortable about the terrible — and inaccurate — machine gun mount. I am also annoyed to be missing the overhead control lines. I did what the Heavy Metal art team did too and made the big open window format B17 (though in their exterior shots, they have a continuity error by not sticking with that!). My guy isn’t wearing his oxygen hose or radio cables. Etc. Etc. If any B17 geeks ever see this, suffice it to say that I know a lot more about this aircraft than my artwork would suggest.

That tracer fire turned out so cool that I rearranged the whole scene to highlight it better. If you spend more than 4 seconds thinking about this guy’s firing arc, you’ll see that it makes almost no sense. There is a frame (#46) where it actually renders as a perfect hexagon, which was my substrate geometry.

The way I did that was to hand draw some tracer squiggles (I don’t know why they look like that in actual WW2 gun cameras, but they do) and put that on my substrate. By varying the UV map in one axis they do the right thing and look very cool.


Once the machine gun’s bullets looked cool, I needed to make the machine gun more bouncy like you’d expect a machine gun to be. Note that a real Browning M2 on a B17 was actually quite stable, but the effect for this artwork seemed right (the Heavy Metal artists also felt this way). The key to achieving this effect was Blender’s fantastic noise modifiers. This worked great on the guns but I used them all over the place. In the old days of video games, NPCs would look strange and terrible until game designers realized that real people are constantly slightly moving, shifting their weight, breathing, etc. By throwing in some slight random motion where it could be appropriate, the realism can be greatly enhanced.

The explosion on the ME109 is a Blender "rock" object with a high emission setting. Again I used out of phase noise modifiers to scale it in a way that suggested a big fire getting bigger.

I hand painted the clouds. My cheaty trick for such things is that these days you can find really good artists with really good sensibilities executing the exact concept you want. I found some illustrated clouds formatted like these which showed me how good this approach looks and I just recreated some of my own in that style. Not having to suffer executing dozens of less effective ideas saves a lot of time. Great artists steal and it’s easier than ever to be thusly great.

Here is a lightweight (colors stripped) animation of how the whole scene was put together.


You can see that the antagonist plane — which is much smaller than you were expecting — is actually patiently waiting off camera until the right moment. Its engine fire is even patiently waiting to explode and looking good thanks to those noise modifiers. Also the machine gun never stops firing which is kind of funny. You can see how I swap out the damaged fuselage, hovering above the scene, for the original; I’ve never learned how to properly make things disappear or get substituted like this in recent Blender versions (it changed) without doing something dumb like this. Oh well, it works. (Just figured it out: "Object Properties → Visibility → Viewports/Renders" can take a keyframe if you click the white dot. That will be helpful!)

The moon is the actual artwork from Heavy Metal. My thinking is that my little 4 seconds of homage fan fiction video is what is happening in the other B17s shown in the movie, so being under the same night sky makes sense.

Since it only takes 4 seconds to refresh your memory of how this came out, here is the link to the finished sequence.

Hopefully you found this look at how pure imagination can become slightly more real at least a little bit interesting. Conjuring a convincing scene out ones and zeros is one of the more magical things computers can do.


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