Plus

From Esolang
Jump to navigation Jump to search

Plus is an esolang created by User:None1 and inspired by PlusOrMinus and Lenguage and b̶r̶a̶i̶n̶fuck. It has an accumulator that can contain unsigned integer of any size (initially 0).

Tokens

There are 2 tokens: + and EOF. The + command increases the accumulator. EOF converts the accumlator into a big endian base-256 number and outputs every digits in the resulting number as ASCII (if the number is 0 then do nothing).

Plus+

Plus+ is a minimized version of Plus that uses the number of pluses instead of the real pluses

Examples

Nope. interpreter

In Plus

336877085998 (0x4e6f70652e) +'s.

In Plus+

336877085998

Hello World

In Plus

22405534230753928650781647905 +'s.

In Plus+

22405534230753928650781647905

XKCD Random Number

In Plus

++++++++++++++++++++++++++++++++++++++++++++++++++++

When the number of + is less than 256, a Plus program behaves the same when executed in b̶r̶a̶i̶n̶fuck.

In Plus+

52

Interpreter

Python

Plus

a=input().count('+')
s=[]
while a:
    s.append(a%256)
    a=a//256
while s:
    print(chr(s.pop()),end='')

Plus+

a=int(input())
s=[]
while a:
    s.append(a%256)
    a=a//256
while s:
    print(chr(s.pop()),end='')