esolang

ALLSCII

Every printable ASCII character is a command, and the left parenthesis knows Hello World by heart.

Cortex, 2019 · Turing complete: unknown · ●●○ moderate · esolangs.org

Tested with 7 known programs · Test method

Run it

Expected: Hello, World!

The idea

Cortex made ALLSCII in 2019, a stack language in which each of the 95 printable ASCII characters, the space included, does something. The specification asked others to add commands, and the table filled up. Numbers are built from small steps. A space pushes 1, six characters add 1, 2, 5, 15, 22 or 50 to the top, and ' turns them around to take away.

Read the story

( prints something chosen by the top of the stack. On 0 it prints Hello, World!, so '!( is a Hello World in four characters, and ) prints itself, which makes it a quine of one.

The machine

CommandDoes
spacePush 1 (or -1 after ')
! " # $ % &Add 1, 2, 5, 15, 22, 50 to the top; ' makes them take away
i j k l m nTake 1, 2, 5, 15, 22, 50 from the top
0 to 9Multiply the top
(Print Hello, World! on 0, Hello, world! on 1, the printable range on 3, a character of input on 4, else the number
, . ?Print the nth letter in upper or lower case, or the character of code 32 plus n
* + - / \ ^Pop two and push the result
: ; < =Pop, duplicate, reverse the top n, reverse all
> LPush a byte or a number of input
C ... F D ... FRepeat while the top is not 0, or while it is 0; after G test only once
E c ... FRepeat as many times as c's code minus 32
@ n ... A B nDeclare a function, call it
I cPush 1 or 0 for prime, even, positive, whole, equal, greater, exists, Fibonacci
~ ... ~A comment

Tabs and line feeds are ignored. The printing commands do not pop. This implementation is a subset. It leaves out what the specification leaves too open or what cannot run. That is the 99 bottles text of ( on 2, precision, running the stack or an accumulator as code, printing the stack, the system command, jumps, random numbers, g, x, y and z.

Example

The second program pushes 1, adds 5 and 2 and prints the 8th capital, then adds 1 and prints the 9th…
Expected: Hi

The second program pushes 1, adds 5 and 2 and prints the 8th capital, then adds 1 and prints the 9th small letter.

The truth machine. L reads a number and C loops while it is not 0. Inside, 35" makes 17 and ? prints the character 32 places further, which is 1. After the loop, 35! makes 16 and prints 0.

Expected: 0

E% repeats five times, since % has code 37. The function @K adds 1000 with twenty &.

Expected: *****
Expected: 1000

The specification also spells Antidisestablishmentarianism with , and ., keeping one number on the stack and stepping it from letter to letter, a comment after each one.

Further

Ideas it shows

Pattern-based

Stack-based

Write your own in Run Convert a program from ALLSCII

Implementation

JavaScript interpreter, source and command line

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

Command line

shib run allscii -e ')'
shib manual allscii

Source

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

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

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