esolang

W.W.E

The World's Worst Esolang. Sixteen opcodes, and each one solves a popular problem and nothing else.

TheCanon2, 2024 · Turing complete: no · ●○○ easy · esolangs.org

Tested with 2 known programs · Test method

Run it

Expected: 3.141592653589793 4

The idea

TheCanon2 made W.W.E in 2024. It can do the programs every esolang article shows off, Hello World, 99 bottles, FizzBuzz, a quine, a truth machine, and it can do nothing else. A program is read four bits at a time, so every character up to code 255 is two commands, its high half first.

Read the story

The letters in the specification's table are only names. The program h is not Hello World. Its code is 0110 1000, which prints a line of input and then runs the next line as Deadfish.

The machine

BitsDoes
0000Print Hello, World!
0001Print the 99 bottles of beer song
0010Print the program and stop
0011Print the Fibonacci numbers forever
0100 0101Print the factorial of the input; the even numbers from 0 up to it
0110 0111Print the input; its digital root
1000 1001Run the input as Deadfish; print it in ROT13
1010Print pi
1011A truth machine on the input
1100FizzBuzz from 1 to 100
1101Loop forever
1110Count from 0 to the input
1111Crash

Each command that needs input reads one line. This implementation follows the Python interpreter in the specification, without the prompts that interpreter prints before each line it reads.

Example

The Deadfish interpreter is the single character ¨, hex A8.

The Deadfish interpreter is the single character ¨, hex A8. The A prints pi on the way.

Every character from space to / starts with 0010, so a program that begins with one prints itself, as long as no character in it is above code 255.

Expected: (quine)

R is 0101 0010. It lists the even numbers up to the input and then prints itself.

Expected: 0 2 4 6 R

The other example is ÿ, hex FF, which crashes on its first half.

Patterns it teaches

  • Quine: one opcode prints the program, and the 16 characters from space to / start with it.
  • Encoding tricks: the program is its bits, read in nibbles.

Further

Also in Jokes

Write your own in Run Convert a program from W.W.E

Implementation

JavaScript interpreter, source and command line

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

Command line

shib run w-w-e -e '¨' --input 'iiso'
shib manual w-w-e

Source

Module
langs/wiki/ports.js
Interpreter
langs/wiki/w-w-e.js

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

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