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.

NotDeadfish

From Esolang
Jump to navigation Jump to search

NotDeadfish is a deadfish derivative by User:Cordership. The difference between this and Deadfish is the order of operations and the commands.

Commands

Command Meaning
i Increment
d Decrement
s Square
o Output
h Halt.

Why this isn't deadfish

The program

iissso

prints 256 in this language, the program

diissisdo

prints 3 in this language, the program

iissisdddddddddddddddddddddddddddddddddo

prints 256 in this language.

Shortest constants

0   =
1   = i
2   = ii
3   = iii
4   = iis
5   = iisi
6   = iisii
7   = iisiii
8   = iiisd
9   = iiis
10  = iiisi
11  = iiisi
12  = iiisii
13  = iiisii
14  = iiiisdd

Interpreter

Python:

n = input("Input NotDeadfish code: ")
acc = 0
for x in n:
    match x:
        case "i":
            acc += 1
        case "d":
            acc -= 1
        case "s":
            acc **= 2
        case "o":
            print(acc)