Skip to content

Supercolbat/binarypp

Repository files navigation

Binary++ header image

Code style: black i need another badge

Binary++ is a multi-paradigm, esoteric programming language that is based on binary.

Specifically, Binary++ is an interpreted esoteric, stack-based, imperative, dual-structured programming language.

To clarify on that last one, Binary++ supports both structured and unstructured programs.

Disclaimer: The instruction set may change as Binary++ is still in early development, meaning that code in one version may not work in another.

Features

  • Turing complete
  • Full STDIN/OUT access (mostly)
  • A free, unlimited use "I code in Binary" pass

Examples

To clarify, the examples shown here are in the binary representations of each character. The code itself usually contains unprintable characters which cannot be displayed. Think of it like a hexdump of the file but in binary.

Hello, world!

Raw:

00000101 01001000 01100101 01101100 01101100 01101111 00101100 00100000 01110111 01101111 01110010 01101100 01100100 00100001 00001010 00000000
00001010 00000000

Mnemonics:

PUSH_STRING_STACK Hello, world
WRITE_TO 00000000 (stdout)

Running

You can run any Binary++ program by passing the path directly in the command.

binarypp path/to/your/code

If you have plaintext code, you can compile it down into characters:

binarypp --compile path/to/your/plaintext.raw output.bin
binarypp output.bin

The file extensions .raw and .bin are not required and are only used to highlight the difference between plaintext and compiled.

TODO

An up-to-date TODO list can be found in the Projects tab.

Inspiration

While recreating the CPython VM, I came across the idea of not only just creating my own bytecode, but creating my own language. In VMs, bytecode is generally represented with either hexadecimal or decimal, but I chose the route of representing them in binary because...

who doesnt want to code in binary?