esolang

Noida

No idea what to call it, so that is its name. Seven instructions, two tests and two kinds of value.

Saka, 2018 · Turing complete: unknown · ●○○ easy · esolangs.org

Tested with 5 known programs · Test method

Run it

Expected: Hello, World!

The idea

Saka made Noida in 2018 to be simple and easy to write an interpreter for. The name is short for "No idea". Every line is one instruction, and its parts are split by colons, print : [Hello, World!].

Read the story

There are two kinds of value. A string sits in square brackets, [My String], and a number is written after a dot, .3141. Variables are made with new and read with a dollar sign. There is no loop instruction, only repeat, which starts the block it is in over.

The machine

InstructionDoes
new : nMake the variable n
set : $n : valueSet it
print : valuePrint the value and a line feed
input : str : $n input : int : $nRead a line as text or as a number
if : conditionRun the { } block below if the condition holds
repeatStart the block over
doneStop

A value can also be math a o b, with o one of + - * /, or join a b c for strings. The conditions are same a b and greater a b. A { } block with no if above it runs once.

The specification leaves some things open, and this implementation does what its Python interpreter most likely does. print ends its line, / rounds down, and reading a variable that was never made is an error.

Example

The truth machine.

The truth machine. On 0 it prints 0 and stops with done. On 1 its block prints 1 and repeats itself forever.

Expected: 0

Nil is a game against the computer, which always wins. There are 12 things, and each turn you take 1 to 3. The computer takes 4 minus what you took, so every round removes 4. After 1, 2 and 3 it is over.

Expected: Let us play Nil. I take 3 Left 8 I take 2 Left 4 I take 1 Left 0 I won!

That is the Nil with shorter lines and without its two checks for cheating, a number above 3 or below 1.

Patterns it teaches

  • Turing tarpit: a handful of instructions, and repeat as the only way to loop.

Further

Also in Turing tarpits

Write your own in Run Convert a program from Noida

Implementation

JavaScript interpreter, source and command line

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

Command line

shib run noida -e 'print : [Hello, World!]'
shib manual noida

Source

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

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

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