Skip to main content

Constrained writing as an encoding

Project description

MWOT, an esolang

The MWOT Language

MWOT is an esoteric language for writing individual bits as readable text. Or text that is entirely unreadable. The only requirement is that each word have a number of letters equal to the bit it represents, modulo 2. The full rules of the language are:

  • Words are separated by whitespace.
  • A word with an odd number of letters (not including digits or punctuation) generates a 1.
  • A word with an even number of letters generates a 0.
  • A word with no letters is ignored.
  • A shebang (a sequence at the very start of a file starting with "#!" and ending with a newline) is ignored.

MWOT's design allows perfectly valid data to be written as a poem, a story, a manifesto, or a lot of nonsense. Its broad definition of "letter" allows it to work with any written language. And its ability to conceal data in plain text gives it excellent steganographic potential.

Because raw bits aren't very useful, MWOT compiles to two formats: brainfuck and binary.

Brainfuck MWOT

A true esoteric programming language. Every three bits encode a brainfuck instruction.

MWOT bits brainfuck
An Indirect Kiss 000 >
Drop Beat Dad 001 <
Greg the Babysitter 010 +
On the Run 011 -
Super Watermelon Island 100 .
Beach City Drift 101 ,
Story for Steven 110 [
Catch and Release 111 ]

Binary MWOT

Bits are grouped into bytes. Think of it like a really inefficient base64.

MWOT bits byte
I can show you how to be strong / 11011000 \xd8
In the real way / And I know that 01011100 \\
we can be strong / In the real way 01000101 E

Etymology

"MWOT" stands for Massive Wall Of Text, something that is unavoidable when rendering even small amounts of data in this format.

Or maybe it stands for Massive Waste Of Time. Do you know how long it takes to write a massive wall of text that compiles to exactly what you wanted it to?

The mwot Program

mwot can compile or decompile MWOT. It also comes with a brainfuck interpreter built in.

Its options include:

  • Free choice to take source code (also, interpreter input) from standard input, a file, or a string
  • Shebang and executable permission control
  • Multiple decompilers to try
  • Full control of the brainfuck interpreter's implementation details

Usage examples

# Compile `hello.mwot` as brainfuck
mwot -cb hello.mwot -o hello.b

# Decompile `goodbye.txt` as binary data
mwot -dy goodbye.txt -o goodbye.txt.mwot

# Execute brainfuck
mwot -xb hello.b

# Compile `hello.mwot` to an executable brainfuck script
mwot -cbSX hello.mwot -o hello

# Generate a very literal `hello.mwot`, using standard I/O
mwot -db -D basic --vocab 'zero one' < hello.b > hello-literal.mwot

# Execute brainfuck with strict settings and no input
mwot -xb --eof=-1 --wraparound false --no-shebang-in --input '' hello.b

# Execute brainfuck MWOT without compiling to a file
mwot -ib hello.mwot

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mwot-0.1.0.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mwot-0.1.0-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

Details for the file mwot-0.1.0.tar.gz.

File metadata

  • Download URL: mwot-0.1.0.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for mwot-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e13434066606c2c1229c090344220ee188261238e7b2612e5b97f9fa454ac772
MD5 4333917fcf5dfb202b9e63069266c173
BLAKE2b-256 9a719522b0235f8c93ab214963204dea751d46e25f0c4bd95f500e10096b14c6

See more details on using hashes here.

File details

Details for the file mwot-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mwot-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for mwot-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8d6875ebab0dadb9be91619f285e7c6026081605f70653d3221501bbd7a01c89
MD5 88d18d5455743b86bbdc3f52758cd5f2
BLAKE2b-256 d688e936b7116bc809de788fb07c306aebd3e7b76522e29817faef98f22ec210

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page