esolang

NLRNIS

No loops, recursion neither if statements. Only string variables, and a jump back to the start.

Fmbalbuena, 2021 · Turing complete: unknown · ●○○ easy · esolangs.org

Tested with 3 known programs · Test method

Run it

Expected: Hello, World!

The idea

Fmbalbuena made NLRNIS in 2021, and esolangs.org still marks it as a work in progress. The name says what it leaves out. A program is a row of one-character commands, and each command names the variables it works on with the characters that follow it. Every variable holds a string, and most commands are a string operation that the specification writes the way Python would, such as replace, join, reverse and chr.

Read the story

The only way to repeat is @, which goes back to the first character, and the only way to stop early is H, or _ once the input has run out. Three variables are special. Whatever is in # is printed when the run ends, E is 1 once the input has run out, and @ is the program itself, so a program can rewrite what it will run.

The machine

CommandDoes
>aSet a to the text up to " or the end of the line
*a &aPrint a; read a line into a, E is 1 at the end of input
$abcda = b.replace(c, d)
+abc =aba = b.join(c); a = b
/ab ?aba = b reversed; a = the first character of b
.ab !aba = chr(int(b)); keep in a only the characters in b
@ _ HGo to the first character; halt at end of input; halt
: { }Comment to the end of the line; comment between

The specification also has commands that read a file, take a command line argument and list a folder. This implementation leaves those three out.

Example

The two programs.

The two programs. The first sets #, the second reads a line into it.

Expected: NLRNIS

$ replaces with Python's rules. a is the text, b what to find and c what to put in its place.

Expected: Hello, NLRNIS!
Expected: olleH

Since @ holds the program, copying it into # prints the source. That makes a three-character quine.

Expected: =#@

Patterns it teaches

Further

Works-in-Progress

Self-modifying

Write your own in Run Convert a program from NLRNIS

Implementation

JavaScript interpreter, source and command line

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

Command line

shib run nlrnis -e '&#' --input 'NLRNIS'
shib manual nlrnis

Source

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

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

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