We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.
Toki nanpa ilo
toki nanpa ilo (or tni) is a toki pona-based esolang intended to be easy to use. The goal is to minimise the number of keywords and to create the whole language based on just words from toki pona.
Etymology
tni directly translates to language number tool, or programming language.
Syntax
Any tni program must begin with 'open sitelen' followed by the name of the program. To define a function, do 'pali' followed by the name and a colon. For I/O, use 'toki' to print and 'sitelen' to put input in a variable. To initialise a variable, do 'nanpa/sitelen/lipu' and the variable name to get an integer/character/array. To set a variable to a value, do 'anpa li nanpa'. To start an if-statement, do 'ante lukin' where lukin is the condition. The condition should look like: 'nanpa >= 2'. A while statement is the same, but ante becomes tenpo. Colons are used at the end of conditional/loop/function statements and semi-colons on other lines. The functions are: sin (add), weka (subtract), mute (multiply), tu (divide), noka (square root), and moku (modulo). The format is 'nanpa li sin wan'. Comments begin with double-slashes. The equivalent to return is pini.
Examples
Hello World
open sitelen toki; pali toki: toki "toki, ma!"; pini 0;
FizzBuzz
open sitelen tu lukin;
pali lukin:
nanpa lukin;
lukin li 1;
tenpo lukin < 100:
ante lukin moku 3:
toki "fizz";
ante luki moku 5:
toki "buzz";
ante luki ala moku 3 ala moku 5:
toki lukin;
lukin sin 1;
pini 100;