Thursday, January 8, 2026

I am not an expert, but...

military contractor identified a threat - infrared seeking missiles directed against aircraft (which includes helicopters). Being good little money grubbers, and knowing that most acquisitions officers are rank morons (by longstanding custom and policy), said contractor created an expensive “solution” to this problem. What’s that? We already have a cheap and reasonably effective solution in the form of flares? Ah, but what if dozens of missiles are launched at the aircraft, one after another? (Nature’s way of letting you know you’re operating in the wrong airspace.)

The solution ? Lasers! (Cue Captain Laserbeam!) Not just one, but potentially whole arrays of them! Shining infrared lasers at an infrared seeker will undoubtedly confuse and distract it, and possibly even blind it!

Wait, what? You’re planning on making the missile’s target brighter and more visible to the missile’s seeker head? It’s an idea so ingenious, it’s never been tried before. Silly engineers keep trying to make targets look smaller and less visible to the systems trying to detect and track them.

I’m sure that identifying and tracking relatively small missiles flying in excess of Mach 2 head-on directly towards you will be super easy. Detecting and locking onto a rapidly moving passive seeker head that is less than three inches across at a distance of a mile in less than a second with a laser is a trivial task, I’m sure.

These laser pods (pdf), which must be fully automated and include passive and possibly active sensor systems, will obviously be so small (“only 91mm into the airstream”) and light (“38 kg”) as to not alter the flight characteristics of the aircraft. And I’m certain that the power requirements of this automated detection and engagement system (“1350 W”) will be trivial. Especially if, as the manufacturer suggests, you place at least three of them on each aircraft.

I am curious, though, how one constructs a “multi-band” infrared laser. Lasers are rather notorious for emitting light at a single wavelength, after all.

I’m sure the people making the passive infrared seeker heads would never think to shield them from glare (like the sun) or program them to ignore monospectral sources (like early flares).

Wednesday, January 7, 2026

Addiction treatment centers

One of my additional duties in the military was drug testing administrator, AKA the piss-test guru. I had the benefit of doing this at Fort Meade, Maryland, which is convenient to one of the two testing labs. We visited the lab as part of our training. That was pretty neat, actually. No, you can’t test “hot” after eating a poppy seed bagel. Or even a dozen.

Even better, we took a field trip to the Maryland addiction center. This is one of only two addiction treatment centers in the entire country that successfully treat addictions. 99% of the residents (they don’t like to say inmates) are convicted felons going through the program as rehab from prison. If they complete the program, they get a significant amount of time off their sentences. Every once in a while, they get a volunteer walk-in.

The minimum stay for the felons is 12 months. The minimum stay for volunteers is 6 months.

All those 30 day “rehab” programs you hear about accomplish precisely nothing. It takes 3-6 months for the addict to actually admit they have a problem. That’s after they dry out. Then it takes 3-6 months to actively deal with the problem and resolve the addiction.

Addiction never goes away. You just learn to fight it every hour of every day. Misdirection is important. Willpower has to be taught and exercised.

The long-term addicts then spend 3-6 months learning how to human, followed by 6 months of learning how to adult. Seriously. Some of these people have to be taught how to use a toilet, shower, eat with a fork, or even speak coherently.

Thursday, January 1, 2026

Boys being boys

When I was young, I was tiny. Not just short, but malnourished and puny. Add a not-insignificant dose of what is now called Asperger’s, and you have a recipe for a little boy who will be picked on incessantly for years. Not just by the other kids in school, but by my (many, older, female - never hit girls!) cousins. (Dad died when I was 4, so Mom had to work long hours to keep the house and feed us. I spent a lot of time at the homes of my aunts & uncles.)

When I was young, the farm across the street turned into suburbs and a school for the mentally retarded. I liked to ride my bike around the parking lot and paved walking trails behind the school. (You couldn’t play on the playground equipment because it was normally covered in human feces from all the window-licking mouth-breathers.)

One day, I was riding my bike aimlessly around and around when four boys decided I was intruding on “their” turf. I knew them all. Three were from the third grade like me, and one was a big second grader. I was used to passively accepting abuse, because I knew without a doubt that nobody cared about me, but I would get in even more trouble if I ever hit back. So I took it. They eventually got some clothes line and tied me up. (They did a bad job of it, and one of my favorite “games” was escaping from being tied up by my cousins.) Then they made a huge mistake - they started kicking my bike.

Skin heals. Pain passes. But we were hungry poor, things were expensive, and we couldn’t afford to replace a bike.

So I stopped being passive, slipped free of the cords, and attacked.

Did I mention that each of the four had their pocket knives out, and had already showed they weren’t afraid to cut me? (Shallowly cut, not stab. They weren’t psychos.)

I ended up taking possession of all four knives, along with a length of electric cable they found somewhere to use as a whip on me. They ran home bruised and bleeding, and I walked home with my bike to put the chain back in place.

An hour or so later, after I had cleaned myself up a bit and applied merthiolate to the open wounds, a police officer showed up and talked to Mom. It seems the mothers of the other boys had all called the police to complain about me beating up and threatening their little darlings. Unusually for her, Mom then asked me to explain what had happened. (She had no idea. Why should I tell her, when she never cared about any of the other incidents?)

So I told the officer my story, took off my (fresh) shirt to show all the wounds, showed him the cut and bloody shirt I had been wearing, and handed over all four knives I’d taken from the other boys. He had a thoughtful look, apologized for bothering us, and left. Mom made sure I wasn’t bleeding on the furniture, then went back to ignoring me.

None of the kids that went to my elementary school ever messed with me again.


Have a happy New Year!

Sunday, December 21, 2025

You are the product

When you receive a free online service, you are the product being bought and sold.



Tuesday, December 9, 2025

Thoughts on Concatenative Readability

Concatenative style programming languages are, indeed, powerful and concise. However, they are generally consider to be “read only” languages. The LISP family of languages (including Clojure) shares this same fate, and for much the same reason. The lack of boilerplate verbiage grants power, but hinders readability. Since programmers spend far more time reading code than writing it, this is not a good thing.

The Problem

Compare and contrast the following single line forms:

Concatenative:  
    3 2 > {“3 > 2 is true”} {“3 > 2 is false”} if println
Clojure:  
    (println (if (> 3 2) “3 > 2 is true” “3 > 2 is false”))
Python:  
    print(“3 > 2 is true” if 3 > 2 else “3 > 2 is false”)

Which one is the easiest to read? Now realize that the one-liner isn’t the easiest form of a Python if statement. Let’s split them up across multiple lines and make them as clear as possible.

Concatenative:
    3 2 >
        {“3 > 2 is true” println} 
        {“3 > 2 is false” println} 
    if
Clojure:
    (if (> 3 2) 
        (println “3 > 2 is true” )
        (println “3 > 2 is false”)
    )
Python:
    if 3 > 2:
        print(“3 > 2 is true”)
    else:
        print(“3 > 2 is false”)

The Solution

There are a pair of simple constructs that can make a concatenative language much easier to read. These are the single-word comment and the function-call syntax.

Let’s start with this. It’s not terrible, but could obviously be better.

    3 2 > "3 > 2 is true" "3 > 2 is false" if println

We can visually pick out the conditional in a block. Remember, (blocks) are immediately unpacked for evaluation. {Quotes} and [data] are not. Lines and indentation help, as well.

    (3 2 >) 
        {“3 > 2 is true”} 
        {“3 > 2 is false”} 
    if 
    println

Single word comments: The commenting word is attached to double backslashes. No space between them is allowed, or else it becomes a comment to the end of the line.

\\if (3 2 >)
    \\then {“3 > 2 is true” println} 
    \\else {“3 > 2 is false” println} 
if

Function-call syntax: This is a parser hack. It takes the instruction attached to the front of a block (and only a block) and moves it to the last position inside the block. For example, the following all evaluate to 3.

    1 2 +
    1 (2 +)
    (1) (2 +)
    (1) (2) (+)
    +(1 2)
    1 +(2)
    (1) +(2)
    (1)+(2)

Getting back to our sample program, we can now write it like this:

    if(>(3 2) “3 > 2 is true” “3 > 2 is false”) println
becomes:
    ((3 2 >) "3 > 2 is true" "3 > 2 is false" if) println

Even better, mix these two special forms together for maximum clarity, along with separate lines and indentation. A little code duplication can also help ease readability.

    if( 3 >(2)  \\ This becomes 3 (2 >) which gets evaluated as 3 2 >
        \\then {"3 > 2 is true" println}
        \\else {"3 > 2 is false" println}
    )

There are many occasions when you need to do some complicated computation to base your branching code on. Or the branch might occur based on some factor you don’t know ahead of time, like user input or a database read. That’s fine. Just rewrite your program using the function-call form and indentation to your advantage.

    print("Enter a number: ")
    getNum
    (dup * 100 >) 
        if(
            \\then "The square of your number is greater than 100." 
            \\else "The square of your number is not greater than 100."
        )
    println
    

Partial Application

The last program looks an awful lot like partial application. That’s because it is. Partial application is trivial in a concatenative language. It’s how all the functions work, because they expect to have their arguments waiting for them on the stack.

We can define an increment function like so:

    define(
        {1 +}
        \\as "inc"
    )

    2 inc \\ --> 2 (1 +) --> 3

Want to make a custom adder? That’s only a bit more complicated.

    2  
    {+} curry "addTwo" define

    1 addTwo \\ --> 1 (2 +) --> 3

Want to make a custom adder generator? That requires just a bit more thought.

    \\ expects: #number "name"
    define(
        { { {+} curry} dip  
            \\ the stack is now: {#number +} "name"
            define
        } 
        \\as "adderGenerator"
    )

    3 "addThree" adderGenerator
    1 addTwo addThree \\ --> 1 (2 +) (3 +) --> 6
    "addSix" adderGenerator  \\ 6 is already on top of the stack
    4 addSix \\ --> 4 (6 +) --> 10

    \\[ Without the comments and formatting, this function-defining function definition is just:
            { { {+} curry} dip define} "adderGenerator" define
    \\]

Try doing that in most other language styles.

Multiple Asides

  • The writing of functions without variables is called point free programming.

  • Functional composition is sometimes referred to as railway or pipeline oriented programming.

  • In concatenative programming, it’s easy to associate data with code using quotes and combinators. Language-level closures are largely unnecessary.