Deadsocket

From Esolang
Jump to navigation Jump to search

Deadsocket is a Deadfish derivative invented by None1. It can open sockets, but not using them.

Commands

Commands in Deadsocket
Command Operation
i increment the accumulator
d decrements the accumulator
s open a socket and discard it
o output the accumulator

Examples

XKCD Random Number

iiiio

Open a socket

s

Interpreter

Python

import socket
c=input()
x=0
for i in c:
    if i=='i':
        x+=1
    if i=='d':
        x-=1
    if i=='s':
        socket.socket()
    if i=='o':
        print(x)
    x%=256