esolang

Istoriya

A program reads like revision notes for the Ukrainian history exam.

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

Tested with 5 known programs · Test method

Run it

Expected: ПРИВІТ!

The idea

Istoriya is built from the lines Ukrainian pupils learn for the External independent evaluation, the national school exam. Every line of a program is one of those dates or definitions, copied whole, and each one stands for a command or a character. The specification lists 21 command lines and 67 character lines.

Read the story

A program opens with the Main Ukrainian Council of 1 August 1914 and closes with the 31st Independence Day on 24 August 2022. To print, it names the opening of the Ukrainian National Congress in April 1917, then one line per character, then the line about the congress's last day.

The machine

Line beginsDoes
6 (19) квітня 1917 р.Print the character lines that follow
15 (28) червня 1917 р.Read a line into the one variable
27 січня (9 лютого) 1918 р.If the variable is the number that follows
Сторони відмовлялисяElse if
Зобов'язання УНРElse
Наслідок БрестськогоEnd of the if
Грудень 1917 р.Repeat 0 to 9 times
9 (22) січня 1918 р.End of the repeat
18 лютого 1918 р.Break
«Поліська Січ» «Похідні групи»Label, goto
Останній деньClose a list of characters or digits

Most letters come from a line that begins with them, so Помаранчева революція is П and Русинство is Р. Some hide further in, as Андрій Жук gives Ж. Digits are lines too, and 1 is Леонід Кравчук, the first President. The specification also has pause, clear screen, a random character and four file commands. Pause and clear screen print nothing, and the file commands are not built, as the specification never says which file they open.

Example

The Hello! prints ПРИВІТ!

The Hello! prints ПРИВІТ!

The branch reads a number. It answers ТАК (yes) to 12, МАЙЖЕ (almost) to 11 and НІ (no) to anything else. The number 12 is the lines for 1 and 2, closed by the congress's last day.

Expected: МАЙЖЕ

Patterns it teaches

  • Camouflage: the program is a list of facts, and only the exact wording makes it code.

Further

Pseudonatural

Write your own in Run Convert a program from Istoriya

Implementation

JavaScript interpreter, source and command line

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

Command line

shib run istoriya program.txt

The program is long; save it as program.txt first.

shib manual istoriya

Source

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

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

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