Deadfish~

From Esolang
Jump to navigation Jump to search

Deadfish~ is a super-set of the Deadfish programming language made by Jonathan Todd Skinner aka User:Jonskinner in June of 2007. Deadfish~ adds fixed loops, ASCII output, and a few more features to the Deadfish programming language. There are no plans to implement any sort of input feature, though functional or object oriented Deadfish would be quite funny. So, you know, Deadfish~ is pronounced as Deadfish Tilde.

Unlike its predecessor, there is no set standard for interpreters or compilers, so developers have more freedom when implementing. Like its predecessor, the accumulator ranges from 0 to 255 unless it is squared!

Instructions

i Increments the accumulator
d Decrements the accumulator
s Squares the accumulator
o Outputs the accumulator
c Outputs the accumulator as a character
{} Instructions inside the curly braces are repeated 10 times
() If accumulator is 0, then skip the statement inside
h Halt
w Output Hello, world!

Implementation

A Python implementation of Deadfish~ is available on GitHub. A shorter Python implementation of Deadfish~ is also available on GitHub. Unlike the above implementation, this supports files that are >1000 bytes and does not exceed the maximum recursion limit.

There is an interpreter written in C-INTERCAL on the talk page.

Sample Program

A hello world program.

w

Print out the alphabet

>>iisiiiis{ic}{ic}icicicicicic
ABCDEFGHIJKLMNOPQRSTUVWXYZ

Let the world know what you think of Deadfish~

>>iisiiiisiiiiiiiiciiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiciii{c}dddddddddcdddddddciiiiiiiiiicdddddddc
Horrrrrrrrrrible

Compressed version:

>>iisiiiisdd{i}cd{iiii}ciii{c}i{d}ciii{d}c{i}ciii{d}c
Horrrrrrrrrrible

Output A one million times

>>iisiiiisi{{{{{{c}}}}}}
AAAAAA...(999994 characters ommited)