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.

Anonymization by Anonymouse.org ~ Adverts
Anonymouse better ad-free, faster and with encryption?
X