Check those YAML files before I push

In working on cpan-security-advisory I often have a problem being behind master because I have GitHub Actions that update files on a schedule so I can release every Sunday. That’s annoying.

My next big problem is hand-editing a YAML file that turns out to be invalid, screwing up everything. I have tests for those, of course, but do I always run them? Of course I don’t.

So, I broke down and created a pre-push hook, but I also needed some extra features. That is, I iterated with Claude, which is much better than I at bash syntax.

First, I only run this hook when I try to push to GitHub. I also push to at least three other services for redundancy, and I don’t need to run the tests every item. And, even if I do want to do that, I have a bit to store a semaphore under .git that uses the current rev.

Then I run the tests I want, in this case a bunch of Perl files managed by prove. If the tests pass, meaning all the file formats check out, exit with 0, and if they have problems, exit with something that is not zero.


Read More

The Day [Randal] Decided Never to Learn Python

I left this comment on Randal Schwartz’s Medium post

Randal taught me OO by forcing me to use Smalltalk, although once learned, a job he said he could do in 20 minutes since there are only 5 syntatic elements, everything made sense. And, after that, it was a bit depressing looking at the fake OO languages, such as Java and Python, that had painted themselves into corners. For example, Python’s foundational idea about whitespace forecloses so many possibilities. While teaching Perl classes for Randal, I’d make that provocative statement, mostly to goad the Java people, and when someone took the bait, I’d ask them what type of object if was. Yes, there are objects in your language; even C can do that, but most of your language is not objects. It’s just Algol with extra features (or in Python’s case, removed statement terminators, a little hand grenade left over from B and abc).


Read More

tmux cheatsheet

I guess I’m going to start using tmux because I have to work on a system that doesn’t have the xterm package and all sorts of things wonky.


Read More

Skip the first line by using the flip-flop operator

(this was an answer to a StackOverflow question that I didn’t post because it didn’t quite fit, but I use too keen on showing off the flip-flop operator to get rid of it all)

I also put this in Reddit

A few other places:


Read More