Byte

From Esolang
Jump to navigation Jump to search

Byte is a esoteric subset by User:Yayimhere. its of Python 3. the name has nothing to do with the subset

commands

allowed commands

  • := the walrus operator
  • = equal to
  • str(x) turn x into a string
  • if x == y: if x is not equal to y
  • if x > y: if x more than y
  • | OR
  • + add together two object
  • x.pop() pop element from x
  • str(x) turn x into a string
  • f = lambda x : a define lambda function f with only a single input(only single input lambda function are allowed)
  • x[i] index i of x
  • eval(x) evaluate x as code
  • for i in len(x): for loop of length x
  • print(x) print x
  • input() take input
  • .append(x) append x to list
  • len(x) length of x
  • break break out of loop
  • while true: infinite loop

symbols

these are the symbol allowed in code(for data):

  • [] empty list
  • "\n" newline

types

only types supported:

  • list
  • string
  • nonetype
  • ints(for index)

explicitly unallowed things

  • the null program
  • 1-9 bytes programs

computational class

Byte is turing complete since it can simulate a Bitwise Cyclic Tag:

datastring=[]
#memory
while true:
    #code
    if (len(datastring) == 0):
        break

and this is the translation(of course must be ordered):

memory:
0
|
V
datastring.append("\n")
1
|
V
datastring.append(str([]))
commands:
0
|
V
datastring.pop(0)
10
|
V
if (datastring[0] == str([])):
    datastring.append("\n")
11
|
V
if (datastring[0] == str([])):
    datastring.append(str([]))

this is the collatz sequence program:

datastring=[]
datastring.append(str([]))
datastring.append("\n")
datastring.append("\n")
while true:
    if (datastring[0] == str([])):
        datastring.append("\n")
    if (datastring[0] == str([])):
        datastring.append(str([]))
    if (datastring[0] == str([])):
        datastring.append("\n")
    if (datastring[0] == str([])):
        datastring.append("\n")
    if (datastring[0] == str([])):
        datastring.append("\n")
    if (datastring[0] == str([])):
        datastring.append(str([]))
    if (datastring[0] == str([])):
        datastring.append(str([]))
    datastring.pop(0)
    if (datastring[0] == str([])):
        datastring.append(str([]))
    if (datastring[0] == str([])):
        datastring.append("\n")
    if (datastring[0] == str([])):
        datastring.append("\n")
    if (datastring[0] == str([])):
        datastring.append(str([]))
    if (datastring[0] == str([])):
        datastring.append("\n")
    if (datastring[0] == str([])):
        datastring.append("\n")
    if (datastring[0] == str([])):
        datastring.append(str([]))
    if (datastring[0] == str([])):
        datastring.append("\n")
    if (datastring[0] == str([])):
       datastring.append("\n")
    if (datastring[0] == str([])):
        datastring.append(str([]))
    if (datastring[0] == str([])):
       datastring.append("\n")
    if (datastring[0] == str([])):
        datastring.append("\n")
    datastring.pop(0)
    datastring.pop(0)
    datastring.pop(0)
    datastring.pop(0)datastring.pop(0)
    if (len(datastring) == 0):
        break

the:

datastring.append(str([]))
datastring.append("\n")
datastring.append("\n")

is the number of times 100 is added to the datastring