The name tells it all.. Binary-Python
A language which is indeed a brother of python, but in BINARY!
There is one Windows executable to run Binpython files.. Which can be found in its Github Repo
The main program file is in fact written in BinPython ITSELF!
The long-form source code is 334kb in size
Let's Teach you some BinPythoning..
There are some basic rules:
- There are only 2 characters.. (0 and 1)
- All characters other than 0 and 1 are ignored
- All codes are Python codes but, in binary (ASCII)
BinPython to Python
def binPythonToPython(s): s = "".join(c for c in s if c in "01") if len(s) & 7: raise SyntaxError("Wrong length") unbin = lambda s: int(s, 2) z = lambda s: tuple(map("".join, zip(*(s[i::8] for i in range(8))))) return "".join(tuple(map(lambda x: chr(unbin(x)), z(s))))
Python to BinPython
def pythonToBinPython(s): return "".join(map(lambda c: bin(ord(c))[2:].rjust(8, "0"), s))