esolang

IWANNADIE

Assembly lines with nested calls, where the only way to read a variable is to add 0 to it.

Antikore, 2021 · Turing complete: unknown · ●●○ moderate · esolangs.org

Tested with 4 known programs · Test method

Run it

Expected: Hello, World!

The idea

Antikore wrote IWANNADIE in Python in 2021, after assembly code and bash. The aim was to be as confusing as possible without giving single letters arbitrary jobs. Every program has to end with die.

Read the story

A line is a command and its arguments, split by commas. An argument can be another command in square brackets, so most of the work happens in nested calls such as [int [add #n, 0]]. A variable cannot be read on its own. add stores its sum back into a variable named first and also returns it, so [add #n, 0] is how a program gets at a value.

The machine

CommandDoes
set #v, xStore x
add mul div modFloat arithmetic, stored back into a #variable named first
@nameA marker
goto "name" goif "name", bJump to a marker, always or when b is true
doif bSkip the next line when b is false
comp checkGreater than; equal
not and orLogic
len char text int floor round randomStrings and numbers
input "prompt"Print the prompt, read a line
print xPrint a value and a line feed
dieEnd the program

Numbers are Python floats, so a sum prints as 5.0. The programs in the specification wrap each number in int before they print it.

Example

The factorial keeps 5 in #org, counts #num down and multiplies #res by it each time, until #num is 1.
Expected: 5.0 5

The factorial keeps 5 in #org, counts #num down and multiplies #res by it each time, until #num is 1.

Expected: 5 is 120

The truth-machine reads a line and compares it with "0". A string and a number compare as numbers, so the input 0 jumps to @zero; on 1 it prints 1 forever.

Expected: Number >> 0

The specification also has FizzBuzz up to 100 and 99 bottles of beer, both of which are implemented.

Further

Ideas it shows

Also in Hostile

Write your own in Run Convert a program from IWANNADIE

Implementation

JavaScript interpreter, source and command line

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

Command line

shib run iwannadie -e 'print "Hello, World!"
die'
shib manual iwannadie

Source

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

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

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