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.1.tar.gz (17.3 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.1-py3-none-any.whl (19.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mwot-0.1.1.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for mwot-0.1.1.tar.gz
Algorithm Hash digest
SHA256 63639188fd339eb586293551ab4b66c5462856e9494b85c20248826b872215fa
MD5 9f0699898471e7123f8fc403dddd3944
BLAKE2b-256 f441625a170627c09de715a574ed11374170c7149a85550c86ae939c3de5a38f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mwot-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 19.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for mwot-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f22afb1e34fc4185fb78ca0409813da1143b4735593a7e872c57ca3faf045e93
MD5 856f1397f7d03c9e6456495092e26fa4
BLAKE2b-256 07574da077a1f0a46dfb5eb8abbc5d499e5613f50c4ef5c72163e4995bc3dd72

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