Hello world! I’m Song, I’m currently a freshman here at MIT, and I lived in Jenny’s current room during orientation week before the Next House Housing Lottery switched up everyone’s rooms.
In the class Fundamentals of Programming, but the CS department is renumbering classes relatively soon so this might become obsolete in a few months you have to write an thing that compiles and runs code from a particular programming language for a programming language called snek, which is a dialect of LISP. But what if, Adam Hartz (6.009 instructor), this is for you.
All of these are esoteric programming languages (esolangs), which are impractical and usually silly.
LOLCODE is presumably what would happen if you let one of these guys make a programming language:
LOLCODE syntax is more or less comprehensible, assuming you know lolspeak. This is more than can be said about a good number of esolangs.
I’m sort of working on a LOLCODE-to-Python interpreter (when I’m motivated to do so/not hosed), and the fact that LOLCODE relies on English-esque words as commands makes writing this interpreter
than for some of the other languages in this list.
Syntax is also flexible, which makes this worse;
SUM OF 2 2 and
SUM OF 2 AN 2 mean the same thing.
> “Hello world!”
VISIBLE "Hello world!"
rhymes with firetruck – jenny is one of the more (in)famous esolangs. It stores its memory in a one-dimensional list that can be traversed by a pointer (the current position in the list/memory) and has 8 commands:
+adds 1 to the memory at the current position
-subtracts 1 from the memory at the current position
>moves the pointer 1 to the right
<moves the pointer 1 to the left
.prints the character with ASCII value equal to the current position’s memory
,takes a single character as input and stores its ASCII value at the current position in memory
[begins a loop
]ends a loop
Brainf*** is Turing-complete, meaning that it technically can be used to write any program you want… but writing “concise” code in brainf*** is a challenge.
> “Hello world!” – loopless, terrible version:
> “Hello world!” – cleaner version:
There’s also this cool website, which lets you visualize how brainf*** code works.
Because of its small character/command set, brainf*** can be used to create even more esolangs. One that I like is imagef***, where programs are images and each brainf*** command is represented by a different color.
“Hello world!” in also rhymes with duck... and yes, the image is 14x14 px (the little square with different colored pixels):
OREO uses actual English letters, yet somehow manages to be even more cursed than brainf***. It uses exactly 3 commands: O for moving the pointer forward, RE for adding 1 to the current memory location, and &O for printing the current memory location’s contents (in ASCII). The creator of OREO imagined each line of OREO code as a code sandwich, with RE’s enclosed by O’s. Unlike brainf***, OREO has no support for loops, which makes writing OREO programs very sad and long.
In short, OREO is pretty useless. On the flip side, an OREO-to-Python interpreter isn’t too terrible to implement.
“Hello world!” – “it sounds very JoJo” – jenny
Chicken is even worse than OREO in that all commands consist of different quantities of the word “chicken”. Nothing else.
The idea for this language apparently came from this joke paper. If you stare at a given piece of Chicken code for too long, the word “chicken” chicken chicken chicken chicken chicken chicken chicken chicken Cluck cluck.
(Or, depending on age, chirp chirp.)
> “Hello, world!”
Python, which is a “legitimate” language, will yell at you if you use both tabs and spaces in the same program. Whitespace takes this idea to the extreme, and the only characters with intrinsic meaning are whitespace characters. Anything that isn’t a whitespace character is ignored, so if nothing else, commenting is relatively simple. I’m not too familiar with Whitespace, but it appears to function in a roughly similar manner to brainf*** and company.
I’m not going to reproduce Whitespace code here, but you can go to https://vii5ard.github.io/whitespace/ and play inside a “friendly” code-writing environment.
Malebolge (with 2 E’s) is the 8th circle of Hell, according to Dante. That about sums it up.
Malbolge was designed to be as difficult to program in as possible, non-Malbolge-running (aka “normal”, non-quantum) computers use base 2 three different registers, 8 different instructions based on some numbers mod 94, and a “crazy” operation. Oh, also, Malbolge code is encrypted. Maybe not 100% accurate, but close enough.
Apparently, the creator of Malbolge has never written a program in Malbolge, and the first Malbolge program was found programmatically.
Some brave soul somehow managed to make a “Hello World” program:
There are many more esolangs out there, and e.g. <a href="https://qntm.org/suicide">Suicide Linux</a>, <a href="https://www.youtube.com/watch?v=uNjxe8ShM-8">PowerPoint = Turing complete</a>, the entirety of <a href="http://sigtbd.csail.mit.edu/">SIGTBD</a> Good luck, and have fun! :P
- Fundamentals of Programming, but the CS department is renumbering classes relatively soon so this might become obsolete in a few months back to text ↑
- thing that compiles and runs code from a particular programming language back to text ↑
- Adam Hartz (6.009 instructor), this is for you. back to text ↑
- see: OREREREREREREREREREO back to text ↑
- rhymes with firetruck – jenny back to text ↑
- also rhymes with duck... and yes, the image is 14x14 px back to text ↑
- “it sounds very JoJo” – jenny back to text ↑
- chicken chicken chicken chicken chicken chicken chicken chicken back to text ↑
- non-Malbolge-running (aka “normal”, non-quantum) computers use base 2 back to text ↑
- e.g. Suicide Linux, PowerPoint = Turing complete, the entirety of SIGTBD back to text ↑