(Day 3 of 30 Days of Blogging)
I recently stumbled across a toy programming language called Rockstar, in which programs are also heavy metal lyrics. Basically COBOL for metalheads.
The syntax can be almost completely poetic, even with programming features with numeric literals, functions, arrays, and arithmetic hidden in its text.
The grand-daddy of esoteric programming languages is Brainfuck, in which programs have only 8 commands and are almost completely unreadable.
Thanks to copious amounts of Covid-related free time, I present the world’s most useless program: A Rockstar program that interprets and executes a Brainfuck program. The “debug” version tries to be more readable, but here’s the “optimized” version in its 100 lines of glory/horror:
Brainfuck was deceiving a
knife was decorated red
A killer is on every earth
You were I
Life was loneliness
Let freedom be life without you
Rock steadily
Rock the memories
Let my heart be life
Listen to the drums
Let your song be life
Unite steadily into the earth
Heaven takes the virtuous
If the virtuous is a killer
Give back life
Give back the virtuous with you
Hell takes rock
If rock is life
Give back a killer
Give back rock with freedom
My brain takes dreaming and waking
Cast waking into darkness
Give back darkness is dreaming
My search takes your hands
Put your hands into mine
While mine
Let your song be with your hands
Let flight be the drums at your song
If my brain taking flight, brainfuck
Build mine up
If my brain taking flight, knife
Knock mine down
Until nothing
Let drugs be the drums at your song
If drugs ain't right
Break it down
Let time be the memories at my heart
If time is nothing
Let time be life
If my brain taking drugs, brainfuck and time is life
My search taking you
Take it to the top
If my brain taking drugs, knife and time
My search taking freedom
Take it to the top
Dire was bloody battle-cry
If my brain taking drugs, dire
Knock my heart down
Softly was snowed in
If my brain taking drugs, softly
Build my heart up
Forgetting was half way
If my brain taking drugs, forgetting
Let the memories at my heart be Heaven taking time
Terror is this virus
If my brain taking drugs, terror
Let the memories at my heart be Hell taking time
Regretful was your demise
If my brain taking drugs, regretful
Real is a retrospect
If time is real
Scream the earth
Unite steadily into the earth
If time ain't real
Cast time into doubt
Let the earth be with doubt
Build your song up
If the earth ain't nothing
Whisper the earth...
You can paste this monstrosity into the online Rockstar
interpreter, along with any Brainfuck program into the Input field. For example, Hello World:
++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.
In theory it should be compatible with most Brainfuck programs, unlike the last interpreter I wrote. The Brainfuck comma instruction for character input isn’t supported though. It might be possible by buffering a line of text and reading off the first character, but I’ve already spent way too much time on this thing.
Anyways, now I can put “rockstar developer” on my resume and confuse recruiters.