esolang

Sickfrog

Frog, but the frog is sick. Whatever you ask it to say, it gets five letters out.

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

Tested with 7 known programs · Test method

Run it

Expected: Hello World!

The idea

Stysan made Sickfrog as a remake of Frog, with a syntax after Windows batch files. A program is a list of lines and runs once from top to bottom, with no loops and no jumps, so every program ends. The frog prints only characters 3 to 7 of a line, so longer text has to be cut into pieces of five.

Read the story

The specification's table and examples call the answer check bark, but the original interpreter in the specification only knows ba, be and cl. This implementation follows the interpreter. Like Frog's, its error handling catches its own quit(), so a line it does not know prints ERROR twice.

The machine

LineDoes
cr textPrint the first five characters of the text
nlPrint a line feed
qu textPrint the first five characters and read a line as the answer
ri textSet the right answer, all of it
baPrint True or False
be nPrint a random whole number from 1 to n
cl nSleep n seconds
*textA comment

Example

The quiz cuts its question into pieces of five and asks the last piece with qu.
Expected: Hello

The quiz cuts its question into pieces of five and asks the last piece with qu. Its pieces spell "esesolangs". Then it reaches bark, which the interpreter does not know.

Expected: Quiz!What is the best site about esesolangs?ERROR ERROR

With the interpreter's own ba the check works.

Expected: How oTrue

Patterns it teaches

  • Camouflage: the commands are frog sounds cut short.

Further

Also in Jokes

Write your own in Run Convert a program from Sickfrog

Implementation

JavaScript interpreter, source and command line

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

Command line

shib run sickfrog -e 'nl'
shib manual sickfrog

Source

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

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

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