Tuesday, October 20, 2026

Archaic to whom?

There are a number of words falling out of the common vocabulary.  They are all, obviously, useful to some degree.  After all, they wouldn’t have become words if nobody found them useful in conversation.  But a few have come to my mind recently, demanding I reminisce about them.  They come in matching sets, and are based on the much more common words of position:  here, there, where, when.

Motion towards:  hither, thither, whither.

Motion from: hence, thence, whence.

Motion away from, already in progress:  Henceforth, thereforth (survives as therefore), whenceforth.

Other European languages have kept some or all of these words.  Motion and position tend to be indicated with the combination of a preposition and a grammatical case.  (Preposition:  a word that goes in front of another as a modifier.  Pre-positioned, as it were.)

Wednesday, October 14, 2026

Disco Inferno

I had a dream.  No, I had weeks of dreams last night.  One was detailed, lasted for days, but was essentially boring and a little awkward.  It involved a multi-family vacation at a big house on a lake, with way too much lettuce.  Lettuce freaking everywhere at the end, and I had to clean it all up.  But the second dream was something special.

I dreamed I was younger and back in Army Counterintelligence.  My background got me recruited into the paranormal branch (which, yes, really existed at one time).  I turned out to be remarkably good at that.

That got me recruited into the weird science, aliens, and superpowers branch of the organization.  I was one of the few full recognizable humans on the team.  It was glorious.  Our best computer hacker was a bunny girl who could telepathically control anything electronic.  With her ears.  From several yards away.

The Chinese had captured several American agents, and were going to show them off at a Communist Party general conference before executing them.  So we infiltrated the giant conference hall, and at the proper moment, turned the whole affair into a giant disco, straight out of the 1970s.  Then we turned the psychedelics up to 11.  Everybody was up and dancing and singing along (badly).

The atmosphere was so wild that it made perfect sense when we crashed the flying saucer with flashing neon lights through the wall to do the extraction.  Everybody cheered, and the dancing went into more of a disco conga line.  We grabbed our agents, danced up the ramp into the saucer to the tune of “Disco Inferno.”  We departed to the thunderous cheers and applause of hundreds of ministers, generals, and functionaries.

My subconscious is a lot more creative than I am.

Friday, October 9, 2026

Polymorphism is sets behind the scenes

Polymorphism in programming is the use of a single name to mean multiple (hopefully related) things. For example, you can generally use the symbol ‘+’ to add two integers, two reals (floats), or even an integer and a real number. Thus, the ‘+’ function is polymorphic over integers and reals. Simple enough in concept. But how do you implement this capability?

You use non-polymorphic functions, and collect them together in a set with the common (polymorphic) name. The ‘+’ function is really a set of related functions: [addInts, addFloats, addIntFloat, addFloatInt]. When the language implementation (whether a compiler or interpreter) encounters the ‘+’ function, it examines the types of the arguments and selects the proper actual function.

This polymorphic function name, which has no actual implementation of its own, is called different things in different programming languages. It might be an interface. It might be an enum. It might be hidden behind multiple definitions of the same function name as a polymorphic function. It might even be hidden in plain sight inside a pattern matching function definition. But the way it works is the same. A common name dispatches to separate definitions depending upon the types of the arguments.  (Object Oriented languages generally dispatch on the type of the first argument.  Some languages, like Julia and Nim, use multiple dispatch, using the types of all the arguments.)

If you know the name of the implementations (assuming they are separate), and you can predict the types of the arguments you will have, you can bypass the types lookup and simply use the proper function definition. This is how compilers work. It’s also how just-in-time compilation works. It can even work in truly polymorphic languages, where there are no separate names, as long as the language can access and recall the identity of the correct underlying implementation. After all, the implementations that share a common name end up being entries in a list, and that list can be accessed by index.

The exact same principle works in type polymorphism, also known as abstract types. You can have a type Number, which is really the set [Int, Float]. So when you have a variable of type Number, it can contain either an Int or a Float, but not both at the same time.  Generic types work in a similar fashion, but the actual type of some argument gets named and used as a specifier for the types of other arguments.

Things get a little more complicated (and noticeably slower) when you have a polymorphic function dispatching (selecting which version to execute) on polymorphic types. But that ends up being a relatively straightforward iteration over possibilities, restricted by the actual types of the arguments.

Thursday, October 1, 2026

Everybody's good at something

Every once in a while, especially when the weather was being unspeakably foul, we'd do PT (physical training = Army speak for morning exercise) in the gym.

I have little upper body strength. I’m just not built that way. At my best, I maxed out at around 120 pounds on the bench press. The gym rats would snicker at me.

And then I’d move over to the back press. I’d take the key, normally somewhere around 100 pounds or so, and move it all the way down to the bottom - 800 pounds. Then I’d strap in and do 100 reps, nonstop.  (To put that in perspective, that's 40 tons of work done in less than four minutes.)

Then I’d switch to the abdominal press and do 100 reps of 600 pounds. (It didn’t hold any more weight.)

And then I'd stretch and rest for a minute, and do it again.  And again.

They stopped snickering.