100BF

From Esolang
Jump to navigation Jump to search
100BF
Paradigm(s) imperative
Designed by None1
Appeared in 2023
Memory system Cell-based
Dimensions one-dimensional
Computational class Turing complete
Major implementations Python
Influenced by oOo CODE
brainfuck
File extension(s) .100, .1bf, .1b, .hbf

100BF is an oOo CODE inspired, brainfuck equivalent esolang by User:None1, it is named 100BF because he realized this is the 100th esolang he created.

100BF Uses characters 1, l, 0, O, so programs in 100BF will be very obfuscated.

Commands

Commands in 100BF
100BF brainfuck
100 +
10O -
1O0 <
1OO >
l00 ,
l0O .
lO0 [
lOO ]


Examples

These programs are obviously generated by Python because real 100BF programming will be too obfuscated and Python is the most convenient language I can use on my computer.

Hello World

100 100 100 100 100 100 100 100 lO0 1OO 100 100 100 100 lO0 1OO 100 100 1OO 100 100 100 1OO 100 100 100 1OO 100 1O0 1O0 1O0 1O0 10O lOO 1OO 100 1OO 100 1OO 10O 1OO 1OO 100 lO0 1O0 lOO 1O0 10O lOO 1OO 1OO l0O 1OO 10O 10O 10O l0O 100 100 100 100 100 100 100 l0O l0O 100 100 100 l0O 1OO 1OO l0O 1O0 10O l0O 1O0 l0O 100 100 100 l0O 10O 10O 10O 10O 10O 10O l0O 10O 10O 10O 10O 10O 10O 10O 10O l0O 1OO 1OO 100 l0O 1OO 100 100 l0O

Cat Program

l00 lO0 l0O l00 lOO

Truth Machine

1OO 1OO 1OO l00 l0O lO0 lO0 10O 1OO 100 1O0 1O0 100 1OO lOO 1OO 10O lOO 1O0 1O0 1O0 lO0 1O0 1O0 lOO 1OO lO0 l0O lOO

Interpreter

Python

import sys
def ahundred_bf(code):
    s1=[]
    s2=[]
    matches={}
    tape=[0]*1000000
    for i,j in enumerate(code):
        if j=='lO0':
            s1.append(i)
        if j=='lOO':
            m=s1.pop()
            matches[m]=i
            matches[i]=m
    cp=0
    p=0
    while cp<len(code):
        if code[cp]=='100':
            tape[p]=(tape[p]+1)%256
        if code[cp]=='10O':
            tape[p]=(tape[p]-1)%256
        if code[cp]=='l00':
            c=sys.stdin.read(1)
            tape[p]=(ord(c) if c else 0)%256
        if code[cp]=='l0O':
            print(chr(tape[p]),end='')
        if code[cp]=='1O0':
            p-=1
        if code[cp]=='1OO':
            p+=1
        if code[cp]=='lO0':
            if not tape[p]:
                cp=matches[cp]
        if code[cp]=='lOO':
            if tape[p]:
                cp=matches[cp]
        cp+=1
ahundred_bf(input().split())