esolang

Indirect Regular Gobbledegook

Eight commands, three ways to write them, and arithmetic in reverse Polish.

Maglang, 2026 · Turing complete: yes · ●○○ easy · esolangs.org

Tested with 5 known programs · Test method

Run it

Expected: Hello, World!

The idea

Maglang made Indirect Regular Gobbledegook, or .irg, in 2026. It reads like a small BASIC with labels and jumps, but every argument goes through a resolver. #i is a variable, 1%list an array item, ?#i;0;= a condition in reverse Polish notation, and =(#i - 1) arithmetic written the usual way, which the resolver turns into reverse Polish.

Read the story

One program can be written in three syntaxes. Classic syntax puts arguments in braces, ends every command with a comma and treats any line without two spaces in front as a comment. BASIC-like syntax uses spaces and rem, and function syntax uses parentheses and #. Square brackets hold a comment anywhere.

The machine

CommandDoes
let x vSet the variable x
dim n a vSet item n of the array a, counted from 1
display vPrint v and a line feed
accept xRead a line into x
ig c l otw mGo to label l if c is true, else to label m; otw m is optional
go lGo to label l and remember where from
returnGo back to where the last go came from
endEnd the run
lb lMark a label

Reverse Polish knows + - * / %, the comparisons = != < > <= >=, & and |, ! for not and rnd for a random whole number between two. A comparison gives 1 or 0. In infix the spaces around an operator matter, as the specification warns, so =(#i-1) reads as #i and -1.

Example

The Hello World in classic syntax.

The Hello World in classic syntax. The first line has no indent, so it is a comment, commas and all.

The countdown in BASIC-like syntax. ?#i;0;=;! asks whether i is not 0.

Expected: 5 4 3 2 1

The same countdown in function syntax.

Expected: 5 4 3 2 1

The truth machine, with three lines of comments on top and two in brackets. On 0 it prints 0. On 1 it prints 1 and then stops at go {true}, because the label it means is truel.

Expected: 0

Further

Works-in-Progress

Write your own in Run Convert a program from Indirect Regular Gobbledegook

Implementation

JavaScript interpreter, source and command line

A JavaScript interpreter, used in the browser and on the command line. Id: indirect-regular-gobbledegook.

Command line

shib run indirect-regular-gobbledegook -e 'rem countdown in .irg:
let i 5
lb loop
display #i
let i =(#i - 1)
ig ?#i;0;=;! loop
end:'
shib manual indirect-regular-gobbledegook

Source

Module
langs/wiki/ports.js
Interpreter
langs/wiki/indirect-regular-gobbledegook.js

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

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