esolang

Help, WarDoq!

Sixteen spellings of hello world at one character each, with an adder and a prime test on the side.

Dennis, 2015 · Turing complete: no · ●○○ easy · esolangs.org

Tested with 8 known programs · Test method

Run it

Expected: Hello, World!

The idea

Dennis, a user of Programming Puzzles & Code Golf, made Help, WarDoq! in 2015. The specification says the language Hello and its relatives have plenty of shortcomings that make them unusable in code golf. Help, WarDoq! answers with a one-character command for each of sixteen spellings of the greeting, with or without the capitals, the comma and the exclamation mark. It adds commands for a sum, a xor, two prime tests and the program's own source, forwards or backwards.

Read the story

It has no loops and no memory, and it is not Turing complete.

The machine

CharGives
H hHello, World! and Hello, World
E eHello, world! and Hello, world
L lHello World! and Hello World
O oHello world! and Hello world
W whello, World! and hello, World
R rhello, world! and hello, world
D dhello World! and hello World
, !hello world! and hello world
AThe sum of two numbers from the input
aTheir bitwise xor
P1 if the number read is a positive prime, else 0
p1 if it is a prime or minus a prime, else 0
Q qThe program, forwards or backwards

Each answer goes on its own line. A space begins a comment that the next command ends, so a space does nothing, and neither does any other character. The reference is one line of CJam that turns every character of the program into its answer with a single transliteration.

Example

Expected: Hello, World! Hello, World Hello, world! Hello, world
Expected: 5
Expected: 1 1 0
Expected: Hello, World! HQq qQH

Patterns it teaches

  • Quine: Q alone is a quine, the cheapest kind.
  • Code golf: a language built so that common challenges cost one byte.

Further

Also in Jokes

Write your own in Run Convert a program from Help, WarDoq!

Implementation

JavaScript interpreter, source and command line

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

Command line

shib run help-wardoq -e 'H'
shib manual help-wardoq

Source

Module
langs/wiki/ports.js
Interpreter
langs/wiki/help-wardoq.js

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

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