esolang

Goofy Ahh Esolang

A plain stack machine where every instruction plays a meme sound, half a second apart.

Dominicentek, 2023 · Turing complete: unknown · ●○○ easy · esolangs.org

Tested with 2 known programs · Test method

Run it

Expected: 42

The idea

Dominicentek made Goofy Ahh Esolang in 2023. Under the joke it is a small stack machine with one instruction a line. The joke is the sound. add plays raaar, if says huh, pop is the vine boom, 8 is the metal pipe, and the interpreter waits 500 milliseconds between instructions. The Hello World is 91 lines, about 45 seconds of noise.

Read the story

This implementation runs the instructions without the sounds and without the wait.

The machine

InstructionDoes
0 to 9Push that digit
add subtract multiply dividePop A, then B, and push B op A
copy pop reverseDuplicate the top, drop it, turn the stack around
printstr printnumPop and print as a character, or as a number
ifPop, and skip the next line if it was 0
goto nGo to line n, counted from 1

The only numbers a program can write are the ten digits, so bigger ones are built with arithmetic. The Hello World makes 72 as 8 9 multiply and 100 as (9 + 1) × (9 + 1), pushes all 13 codes, reverses the stack and prints 13 times. There is no input. To give the truth machine its bit you change its first line.

Example

The truth machine on 0.

The truth machine on 0. if skips the goto 7 that would loop, the 0 is printed, and goto 999 jumps past the end, which ends the run. With a 1 on the first line it prints 1 forever.

Expected: 0

Patterns it teaches

  • Stack machines: with only digits to push, every constant is a small calculation.

Further

Stack-based

Write your own in Run Convert a program from Goofy Ahh Esolang

Implementation

JavaScript interpreter, source and command line

A JavaScript interpreter, used in the browser and on the command line. Id: goofy-ahh-esolang.

Command line

shib run goofy-ahh-esolang -e '0
copy
if
goto 7
printnum
goto 999
copy
printnum
goto 7'
shib manual goofy-ahh-esolang

Source

Module
langs/wiki/ports.js
Interpreter
langs/wiki/goofy-ahh-esolang.js

Docs: Kernel instructions · The .shib format · Command line · Adding a language

Source esolangs.org (CC0) · Edit on esolangs.org