Saturday, October 11, 2025

Three programming languages

Here are three lesser known programming languages I like, and you might enjoy exploring. They’re each the creations of one man, who are all very opinionated about how their languages should look and work.

Nim - My current working language. Syntax is similar to Python, but it’s a statically typed, compiled language. It manages memory for you (very, very efficiently), unless you tell it not to. The language embraces generics, both type and procedural polymorphism, multiple dispatch, and meta programming. Has a remarkably diverse collection of packages available.

Odin - Another statically typed, compiled language. Syntax is similar to Go, but without all the hang-ups, and even easier to read and write. (Check out the “or_else” family of error handling keywords.) You have to manage your own memory, but the language makes that fairly easy to do. Has lots of features for games and systems programming, and is ridiculously fast. Ginger Bill’s opinions are worth paying attention to.

Frink - A small language that was designed to be a general-purpose calculator for engineering and science. It attaches units to numbers, and can automatically convert between them. It has a remarkably complete and correct table of constant value and unit conversions, plus historical purchasing power of the US dollar and British pound. It will even correctly compute error bounds and significant digits without any real effort on your part. It runs on the JVM, so it’s quick and flexible. It even has graphics built in.  (Yes, it's named for the mad scientist on The Simpsons.)

Friday, October 10, 2025

How bank loans actually work

I don’t have a problem with a modest rate of interest for loans. The time rate of money is a real thing, and opportunity costs always exist. I have a problem with banks (and that includes credit card companies) charging exorbitant rates of interest for – nothing.

The money (most) banks lend doesn’t cost them anything except their normal operating expenses. They make the money up on the ledger books and credit your account with it. Funds ex nihilo. When you repay your loan, the funds return to nothing – except for the interest you pay, which is profit to the bank. From digital bits the loans were formed, to digital bits the loans are retired. Banks can lend infinite amounts of money, because the reserve ratio (how much they have on hand compared to how much they lend out) is currently 0%. To reiterate, the money the bank lends you doesn’t come from your neighbor’s savings accounts. It is made up out of thin air and keystrokes on a computer. The banks have, in effect, been allowed to print their own digital currency, in unlimited quantities.

“As announced on March 15, 2020, the Board reduced reserve requirement ratios to zero percent effective March 26, 2020. This action eliminated reserve requirements for all depository institutions.” 

When someone defaults on a loan, the banks actually loses nothing but the value of the interest not paid. The bank then writes off the default as a business loss, as if the money had been real. You see, on their books, the money loaned out (which came from nothing and nowhere, remember) becomes an asset, not a liability. So when you default, the value of the asset becomes a loss, the quarterly revenue is reduced on the books, and the bank pays a bit less in taxes.

Yes, this also means that when you pay back your loan, the bank’s assets decrease – except for the interest and fees you paid with real money, which is pure profit.

But what about the money in your savings account? Isn’t that also an asset? Of course it is. The reason it’s not readily available, despite the bank handing out loans from nothing at all, is that the bank uses 90% of your deposit money playing in the stock and bond markets. But that’s a different topic.

Wednesday, October 8, 2025

Data structure taxonomy

There are quite a few standard data structures in programming. I’m not even talking about complicated things like red-black trees. These are basic data structures.

Sequence / Array / Vector
Keys: Numeric. May be fixed or flexible in number.
Values: One per key. May be fixed or flexible in type.
Pick: Any.

Struct / Record
Keys: Named. Fixed in number.
Values: One per key. Type variable per key.
Pick: Any or all.

Tuple
Keys: Numeric. Fixed in number. May be named.
Values: One per key. Type variable per key.
Pick: Any or all.

Table / Dictionary
Keys: Variable in format. Flexible in number (usually).
Values: One per key (generally). May be fixed or flexible in type.
Pick: Any.

Set
Keys: Variable in format. Flexible in number (usually).
Values: None (usually).
Pick: Any.

Enumeration
Keys: Named, fixed in number (usually).
Values: None (usually).
Pick: At most one.

Union / Tagged Union
Keys: Named and/or Enum. Fixed in number.
Values: One per key. Fixed in type per key.
Pick: At most one.

Linked List
Keys: None (usually).
Values: Completely flexible in number. Type may be fixed or flexible.
Pick: Iterate through the elements one value at a time.