esolang reference implementation

Hard

A program is a string of bits, each XORed against a specific bit of π — specifically, the source's Nth bit is hidden under the (N!)th bit of π's binary expansion. The interpreter is correct and complete. It will also never finish.

PrimeScript — hard to execute Square — hard to execute Trapdoor — hard to write Hard — hard to write, hard to execute

Encode

Enter source (interpreted as tinylisp). Each bit of its UTF‑8 encoding is XORed with the (N!)‑th binary digit of π, computed live below using the Bailey–Borwein–Plouffe digit‑extraction formula — no precomputed π table, no shortcuts. Bit 1 needs π's 1st bit. Bit 20 needs π's 2,432,902,008,176,640,000th bit. Watch where it stops being a joke.

Keep this short. One character already asks a great deal of π.

Decode

Paste a Hard program (a string of 0s and 1s). The decoder XORs each bit against the same astronomically-indexed π bit, regroups into bytes, and — if anything at all comes back — hands it to a small tinylisp evaluator. This is the exact same computation as encoding, run in reverse, which is why "decoding" a Hard program is precisely as hard as writing one.