esolang

Spain without the S

Spain without the S is pain. So is every program written in it.

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

Tested with 2 known programs · Test method

Run it

Expected: x

The idea

Timothytomato made Spain without the S in 2024. It is also called Pain. Every command is the four words Spain without the and one more, and the last word says what it does. A program works on a wheel of accumulators that starts as a single accumulator holding 0.

Read the story

There is no adding and no way to write a number down. The only arithmetic is p, which takes 1 away and turns 0 into 127. So to print an A a program says Spain without the p 63 times, going from 0 to 127 and then down to 65.

The machine

CommandDoes
Spain without the SMark the start of a loop
Spain without the pTake 1 from the accumulator, or set it to 127 if it is 0
Spain without the aTurn the wheel one place on to the next accumulator
Spain without the nAdd a new accumulator one place on, without moving to it
Spain without the iJump back to the loop's start if the accumulator is not 0
Spain without the SpainPrint the accumulator as a character
Spain without the painRead one character into the accumulator

Commands are separated by spaces or line breaks. Anything else stops the program before it runs.

Example

A one-time cat reads a character and prints it.

A one-time cat reads a character and prints it.

Two p take the accumulator from 0 to 127 and then to 126, a tilde.

Expected: ~

The truth machine reads a character, takes 48 off it, then loops. It prints 48 plus what is left, so the same character, and takes 48 off again. On 0 that leaves 0 and the loop ends. On any other character it prints that character forever.

Further

Pseudonatural

Write your own in Run Convert a program from Spain without the S

Implementation

JavaScript interpreter, source and command line

A JavaScript interpreter, used in the browser and on the command line. Id: spain-without-the-s.

Command line

shib run spain-without-the-s -e 'Spain without the pain Spain without the Spain' --input 'x'
shib manual spain-without-the-s

Source

Module
langs/wiki/ports.js
Interpreter
langs/wiki/spain-without-the-s.js

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

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