I admit that I find the Lost Cause Narrative compelling…but not in the way that they want. I don’t believe that these people had some valiant principle at stake beyond wanting to own people like cattle. No, I like the idea of calling it a lost cause, because they had no principles to stand up for—other than the aforementioned wanting to raise humans as livestock—no real plan beyond lashing out at people who didn’t support overt white supremacy, and had absolutely worthless leadership.

Case in point, today marks the 160th anniversary of Pickett’s Charge, the day that Robert E. Lee sent troops at a supposed weak point that he thought he created during the Battle of Gettysburg on the previous day. The Confederates used artillery fire to destroy the defense, and three generals attacked that (alleged) weak point. And the Union Army crushed them, sending the remnants of Lee’s troops retreating.

The moral of the story? You can’t testosterone your way to victory.

Seriously, fifty years later, the surviving troops on both sides held a reunion where the battle reenactment ended with the retired Union soldiers shook the hands of the oncoming troops, both a powerful image and hilariously condescending.

An engraving of Pickett's charge at Gettysburg

While we contemplate the ethics of making light of a disaster for people who would have died long ago, either way, let’s take a look at some projects.

Social Media

I still need to work out a few kinks in the system, but I managed to get a post-to-Matrix script—more on that, later—running shockingly quickly. As a result, the blog now has a companion #entropy-arbitrage:matrix.org chatroom on Matrix. Currently, I only have announcements for blog posts since Thursday’s post. But if people drop in, I’ll probably have more to say, so please drop in.

Oh, and I apparently completely forgot about it since signing up, and don’t yet have any repositories, but much like my utterly flubbed attempt to use GitLab regularly, you can find me on Codeberg, too. Like with my GitLab account, I doubt that it’ll lure me away from one of the few services that I regularly use provided by large corporations—I’d love to, but moving a hundred repositories and updating links everywhere feels like a massive time commitment for something so rarely social as hosting code; and at that point, why wouldn’t I self-host everything so that I’d never need to worry about the owner’s behavior in the future?—but I should at least have some presence there, soon.

Entropy Arbitrage

GitHub - jcolag/entropy-arbitrage-codeThe Jekyll blog for https://john.colagioia.net/blog - jcolag/entropy-arbitrage-code

I added a handful of emoji names for my plugin, to prevent unreadable posts. I now include 🤯 exploding head, ☠️ skull and crossbones, 🤦 facepalm, 🎶 musical notes, and 🏴‍☠️ pirate flag, and removed “fireworks” from an emoji where it didn’t make sense, so that I can guarantee that the plugin will actually find 🎆 fireworks instead of the weird white-on-green asterisk.

Now I only need to remember to actually type the emoji plugin name, because I consistently forget and Jekyll gets annoyed…

Also, given that I can no longer guarantee my availability to post on early Friday afternoons for the foreseeable future, I changed the generated time for Friday toots of the week posts in the script that generates the stubs.

Oh, and the publishing script now calls…well, we should probably talk about that separately.

Mastodon Tool Trunk

GitHub - jcolag/tool-trunkTools for (John's) Mastodon workflow. Contribute to jcolag/tool-trunk development by creating an account on GitHub.

I actually did my initial Matrix development, here, for two reasons.

  • I already had a Gemfile in place with a lot of what I already needed.
  • I forgot that I created the Socialite repository specifically for these one-off social media scripts.

Anyway, you can see the earlier history here—if you find the details interesting—because I worked on it here, then deleted the file from the repository.

Speaking of the other repository, though, we finally get to the important small project…

Socialite

GitHub - jcolag/socialiteA collection of small (and probably temporary) tools for interacting with new social networks - jcolag/socialite

As mentioned in the previous section, I moved my Matrix-posting script over here.

In short, if you need to do something like this, Ruby—and probably other languages—has the matrix_sdk gem that simplifies things dramatically. Stripping out the boring administrative parts, my final program looks a lot like this.

require 'matrix_sdk'

client = MatrixSdk::Client.new config['server']
client.login config['user'], config['password']
room = client.find_room config['room']
room.send_text message_to_send

You’ll notice only four steps: You point the client library to your server, log in, connect to a room, and communicate.

I dressed the published version up with some minor error-checking and use of a configuration file, but those four lines do the heavy lifting, assuming that you can afford to hard-code things like your password.

Oh, and while it didn’t end up in a repository, I have a shell script that calls this—used for calling it from the script that rebuilds and publishes this blog, then announces the post to various places—which took some extra work, because I generally use a newer version of Ruby than Jekyll uses.

#!/bin/bash --login
thisruby=$(rvm list 2>&1 | grep '^=' | cut -f2 -d' ')
defruby=$(rvm list 2>&1 | grep '^.\*' | cut -f3 -d' ')
rvm use "${defruby}"
ruby ~/code/socialite/matrix.rb $*
rvm use "${thisruby}"

In the first line, you’ll notice that I run this in a “login shell,” because RVM somehow refuses to run without it.

Then I grab the version of Ruby currently available and the default versions with rvm. I run the Matrix code using the default Ruby, then set the version back, in case I need to do something else.

At some point, I should see if Jekyll has a version that can finally deal with Ruby 3.x, because that would save me quite a few little double-checks like this.

Next

I should probably get back to the Mastodon Tool Trunk Rummager, since I mostly ignored it, last week…


Credits: The header image is General Pickett’s famous charge at Gettysburg by Alfred Swinton after Alfred Waud, long in the public domain due to an expired copyright.