esolang

Rube Goldberg

Every program prints Rube Goldberg. It was made to end a chain of programs.

Mega Man · Turing complete: no · ●○○ easy · esolangs.org

Tested with 4 known programs · Test method

Run it

Expected: Rube Goldberg

The idea

Mega Man, a user of Code Golf Stack Exchange, made Rube Goldberg for a challenge of the same name. A machine in that challenge is a program in one language that prints a program in another language, which prints a program in a third, and so on, until the last one prints Rube Goldberg. A machine scores its first program's bytes divided by the number of different languages after the first.

Read the story

The language makes the last step free. Its every program is a correct last step, so any text can end the chain.

The machine

There is none. The source is never read and there is no input. Running a program prints the 13 bytes Rube Goldberg.

The specification gives interpreters under 30 headings, from Ada and COBOL to deadfish and Whitespace. Each one is a program that prints the text and so scores infinity in the challenge, with 0 extra languages. Under ///, flag and Text the interpreter is just Rube Goldberg, which makes that text a quine as well.

Example

The third is the specification's interpreter in txeT, which reverses its text.
Expected: Rube Goldberg
Expected: Rube Goldberg

The third is the specification's interpreter in txeT, which reverses its text. It prints the same as every other program.

Patterns it teaches

  • Every text runs: no text is a syntax error, because no text matters.
  • Quine: the program Rube Goldberg is its own output.

Further

Also in Jokes

Write your own in Run Convert a program from Rube Goldberg

Implementation

JavaScript interpreter, source and command line

A JavaScript interpreter, used in the browser and on the command line. Id: rube-goldberg.

Command line

shib run rube-goldberg -e 'Rube Goldberg'
shib manual rube-goldberg

Source

Module
langs/wiki/ports.js
Interpreter
langs/wiki/rube-goldberg.js

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

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