Wednesday, November 20, 2024

True Communism

The zealots of the Left always proclaim that "true Communism" hasn't been tried.

Bullshit.

I joined the Army when I was 19 to fight Communism.  I served in West Berlin.  When I got there, they were still killing their own people who were trying to escape.  The Communists killed a dozen Soldiers from my unit in three separate attacks in the three years I was there.  (The Cold War wasn't all that cold in Berlin.)

Communism isn't an economic theory.  It's a religion of total human control.  It is evil distilled down into its most abhorrent form, given teeth, and then told to bite and spread its disease among the innocent.  And its teachings and methods have been wholly embraced by the modern Left, including all the influential powers of the Democrat party.

Read To Shatter Men's Souls if you dare.  It may be fictionalized, but it's all true.  True Communism.

Tuesday, November 19, 2024

Pulpy goodness

I like a double helping of pulpy humor every now and then.  So I listen to The Thrilling Adventure Hour podcast while I'm doing the dishes.  They only update once per month these days, but the WorkJuice Coffee players have been putting on their shows for years.

  • Don your robot fists and strap on your astro-spurs with Sparks Nevada, Marshal on Mars.
  • Combat evil with the power of lasers alongside Captain Laserbeam.
  • Solve supernatural troubles with a martini shaker in a fashionable penthouse apartment in Beyond Belief.
  • Fight for Truth, Justice, and more comfortable shoes with Miss America.
Give them a try.  It's not like it costs anything.

Friday, November 15, 2024

The importance of readability

Software has to meet several goals, some of which may conflict with each other.
  • It has to work.  Performing a function is the entire point.
  • It has to be efficient.  This may involve using less time, memory, power, etc.
  • It has to be maintainable.  80% of programming is debugging and updating.
To be maintainable, your code must be readable.  The trade-off between readability, writability, functionality, and efficiency is why there are so many different programming languages.  Well, that and fashion trends in the industry.

What is readable code?  That's partly opinion, partly experience, but also partly objective fact.  "GOTO considered harmful" isn't just a meme, it was a real wake up call for the industry 56 years ago.

XKCD


Spaghetti code may sound delicious, but it's a toxic mess for others to try to clean up.


That brings me around to one of the main points of my programming language, Listack.  I have been fascinated by stack based languages ever since I read a book on Forth way back when I was a teen.  I even implemented Forth in BASIC.  It was incredibly slow, but it worked.  And then, a few years ago, I discovered Factor.  It's a modern stack-based language.  Factor lead me to Joy about the same time I discovered the False esolang.  Joy has (for a programming language) a relatively large amount of well written theory behind it.  False is an extremely minimal language, but it shares a lot of conceptual space with Joy.  I enjoyed learning a bit about all these languages.  I even implemented a False interpreter in Python.

The problem is that, like Forth, these are all write-only languages.  They're efficient, they're fun, they're concatenative, and they're terrible to try to read a program of any complexity at all.  But hey, at least they're not APL.

And then I started learning to program in Nim.  It's a more-or-less standard high level, compiled language.  It has Python-like syntax with significant whitespace (no curly braces or semicolons needed).  And it has uniform function call syntax.  That was a revelation for me.

That's where I got the idea for Listack.  I could make a more readable stack-based language.  Like most stack based languages, it would be concatenative.  It would make heavy use of first-class functions and combinators.  And it would be my creative contribution to the art of programming.  Note how handy the immediate block (code blob) makes things.

Compare these code snippets.  They all do the same thing.

style                    simple                                complex    
Call:          +(1, 2)     func1(data1, func2(data3, data4))
Prefix:         +: 1 2      func1: data1 (func2: data3 data4)
Infix:          1 + 2       data1 func1 (data2 func2 data3)
Postfix:        1 2 .+      data1 data2 data3 .func2 .func1


Concatenative style aids readability.  It's easier to follow the logic when it's written left to right than when it is inside out.

inside out:      func3(func2(func1(data1), data2), data3)
concatenative:   data1 .func1 data2 .func2 data3 .func3


Then I added one more thing that may be genuinely unique - the single word comment.  One of the major problems with powerful and efficient languages like Factor and Lisp is that they have almost no syntax.  That helps the language designers and talented macro programmers, but it significantly reduces readability.

Compare these code snippets.  They all do the same thing.

(truth test) {good branch} {bad branch} .if
(truth test) if {good branch} {bad branch}
if: (truth test) {good branch} {bad branch}
if: (truth test) #then {good branch} #else {bad branch}

Syntactic sugar is important for code readability.

easier to follow                                  harder to follow
if: (test one)                if: (test one)
#then {if: (test two)             {if: (test two)
    #then {good good}                 {good good}
    #else {bad good}                  {bad good}
    }                             }
#else {if: (test three)           {if: (test three)
    #then {good bad}                  {good bad}
    #else {bad bad}                   {bad bad}
    }                             }




Thursday, November 14, 2024

Less boring content

In an effort to bore "normal" people a little less, I am moving my science rantings over to Substack.


Don't worry.  I'll continue to bore you with my other esoteric hobbies here.

The "no more deficits" amendment, with teeth

Proposed amendment to the US Constitution:

  1.  Any federal deficit spending outside time of war shall result in the confiscation and sale of all assets, tangible and intangible, of every member of Congress who voted to pass the bills authorizing that excessive spending, as well as of their immediate family members, saving three sets of clothing each and a single motor vehicle for the entire family. Two consecutive years of deficit spending outside a time of war shall result in the execution of those members of Congress who voted to pass the spending bills.

  2.  These penalties are to be enforced by the judicial branch, headed by the members of the Supreme Court, within no more than 90 days from the date of the passage of the bill or bills authorizing the excessive spending.

  3.  Failure to enforce said penalties by the legislative branch in a timely manner shall result in the execution of every member of the Supreme Court by the executive branch within a further 7 days.  The executive branch shall then have a further 30 days to enforce the penalties prescribed by paragraph one above.

  4.  If the executive branch fails to enforce the penalties prescribed above in a timely manner, the federal government shall be declared in breach of its collective duties, immediately dissolved of all power and authority, and every elected or appointed member of that government declared to be outside the bounds of the law.  Let any man's hand be raised against them, their immediate families, and their property.

  5.  Within 30 days of such time as described in paragraph four above, the governors of the various States shall meet in conclave to select, by majority vote or random chance, one of their members to assume the role of chief executive for a period of no more than 180 days.  During this period, new elections for all federal Representatives and Senators, as well as for the President and Vice President, shall be arranged and conducted.

  6.  Time of war, for the purposes of this amendment, includes only a period from the date Congress formally declares war against a specific enemy nation or group of nations, through no more than 90 days after the cessation of hostilities in that specific conflict, either by victory, defeat, or stalemate. Any period of six consecutive months during which fewer than 100 US citizens are killed or injured by enemy action in that specific conflict shall count as the cessation of hostilities by stalemate.

Monday, November 11, 2024

The 11th hour, of the 11th day, of the 11th month

1918.  The guns finally dell silent.  Four years of bloodletting finally stumbled to a close.  Half a generation of men had succumbed to the wills of uncaring kings and incompetent aristocrats.




But hey, at least the peace plans unleashed the Socialist menace and guaranteed a new war a generation later.



Sunday, November 10, 2024

Happy birthday, Marines!

I wish a very happy birthday to our nation's second oldest armed service, the United States Marines.  Who are, in fact, older than their "parent" service, the U.S. Navy.  Yes, they really were formed in the back room of a bar.