esolang

!!

Five two-letter commands, each a whole program, and everything said about it comes out in capitals.

Turing complete: no · ●○○ easy · esolangs.org

Tested with 5 known programs · Test method

Run it

Expected: HELLO WORLD HELLO WORLD

The idea

The specification calls !! a joke language that turns everything written about it into upper case, and its article is all in capitals. Like HQ9+, each command is a finished program. HW greets the world, 99 sings the song, CT is a cat, FB is FizzBuzz and ?? makes an acronym.

Read the story

The specification has an implementation in Common Lisp, and this implementation follows it, quirks and all. The table says HW prints HELLO, WORLD!, but the code prints HELLO WORLD. The cat prints an & before the line, because the code's format string has & where Lisp's ~& would start a new line.

The machine

CommandDoes
HWPrint HELLO WORLD
99Print 99 bottles of beer in capitals
CTPrint CAT PROGRAM: and the line read, in capitals
FBPrint FizzBuzz from 1 to 100, one a line
??Print the first letter of each word of the line read

Spaces, tabs and line feeds between commands are skipped. Any other pair of characters is an error. Every command starts a new line first, unless the output is at the start of one already, as Lisp's ~& does. CT and ?? read one line and drop the rest of the input.

Example

Words for ??
Expected: CAT PROGRAM: &MEOW
Expected: LET US GENERATE AN ACRONYM: PNG

Words for ?? are split at spaces, tabs and -, so a hyphen starts a word too.

Expected: LET US GENERATE AN ACRONYM: RLE

Patterns it teaches

  • Code golf: the joke of HQ9+, where a famous task is a single command.

Further

Also in Jokes

Write your own in Run Convert a program from !!

Implementation

JavaScript interpreter, source and command line

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

Command line

shib run u21-21 -e 'HW'
shib manual u21-21

Source

Module
langs/wiki/ports.js
Interpreter
langs/wiki/u21-21.js

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

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