“Jokes, art projects, or cruel and unusual punishment”

A fun 19-minute video from commonLuke trying to write a short Fibonacci program in increasingly esoteric languages:

Here are the languages:

  • Python, Scratch, and assembly (as control),
  • LOLCODE, a language resembling lolcat memes of yore,
  • Piet, a language whose output looks like Piet Mondrian’s abstract art,
  • Brainfuck, whose programs are made chiefly of punctuation,
  • COW, a version of the above where each of the few instructions is a variant of “moo,”
  • Whitespace, whose code consists only of spaces, tabs, and returns,
  • Chef, where programs resemble cooking recipes.

My favourite was Shakespeare, in which the whole program resembles a play. Believe it or not, but this code outputs “HI”:

A New Beginning.

Hamlet, a literary/storage device.
Juliet, an orator.

Act I: The Only Act.

Scene I: The Prince's Speech.

[Enter Hamlet and Juliet]

Juliet: Thou art the sum of an amazing healthy honest noble peaceful
fine Lord and a lovely sweet golden summer's day. Speak your
mind!

[A pause]

Juliet: Thou art the sum of thyself and a King. Speak your mind!

Thou art the sum of an amazing healthy honest hamster and a golden
chihuahua. Speak your mind!

[Exeunt]

It was interesting for me to see programming languages that intentionally remove some of the niceties and affordances we learned to take for granted. My guess is most of them are just art, or jokes, or a certain one-upmanship. But I couldn’t help but think of Arika Okrent’s excellent book In The Land Of Invented Languages. The book is about “human” languages like Esperanto and Klingon, but it’s much more interesting than I imagined, and maybe even quite a bit sadder: a story of people afflicted with a certain perfectionism who are not willing to accept languages simply cannot be perfect.