esolang

Spam

Every line tells you which line to read next, and the last one says you are fooled.

None1, 2024 · Turing complete: unknown · ●○○ easy · esolangs.org

Tested with 4 known programs · Test method

Run it

Expected: Hello, World!

The idea

None1 made Spam in 2024 after a kind of chain message that sends your eyes from line to line and ends by telling you that you were fooled. A program is a list of such lines. Each one does one thing and then says please read line 5., so the order of the lines in the specification means nothing. The line I just want to say, you are fooled. ends the program.

The machine

Variables hold integers of any size and start at 0. The line with I want to tell you a secret is where the run starts. The jump at the end of a line can be a number or a variable, which makes it the only branch there is.

CommandDoes
Add A by v, Subtract A by v, Multiply A by v, Set A to vArithmetic
Say v, Speak v, Print "text"Print a number and a newline, a character, a text
Hear A, Listen ARead a number, a character
Mess up AA random number below A

Example

The Hello World from the specification.

The Hello World from the specification.

The A+B program starts on line 2 and jumps to line 1, 4, 6, 5 and 3.

Expected: 7

Further

Ideas it shows

Pseudonatural

Write your own in Run Convert a program from Spam

Implementation

JavaScript interpreter, source and command line

A JavaScript interpreter, used in the browser and on the command line. Id: spam.

Command line

shib run spam -e 'I want to tell you a secret, please read line 2.
Print "Hello, World!", please read line 3.
I just want to say, you are fooled.'
shib manual spam

Source

Module
langs/wiki/ports.js
Interpreter
langs/wiki/spam.js

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

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