Built on Bitmap Signal Theory by @blockamoto Ordinals by @rodarmor · PACT by @blockapunk
BRAINFUCK AS PACT MACHINE · PHASE 2 + 3

BrainFuck gives PACT a known Turing-complete instruction model.

PACT gives BrainFuck a Bitcoin-anchored, publicly replayable execution history. The honest claim stays narrow: the interpreter runs off-chain, but the program, the data, the output, and the proof objects can be anchored on Bitcoin and replayed deterministically by anyone.

01 · WHAT IS BRAINFUCK?

A minimal interpreter with explicit state.

BrainFuck uses a program counter and a data pointer over a mutable tape. In this PACT form the program tape and data tape are never mixed. Program addresses are program:0, program:1, and so on. Data addresses are cell:0, cell:1, and so on. Integer cells do not wrap in v0.1. Input remains intentionally unsupported.

Program tape Stored as a PROGRAM object with parsed instructions and deterministic instruction addresses.
State STATE now carries explicit pc and dp pointers, not implicit positions.
Execution proof Every executed opcode emits a rich TRACE. Output emits first-class OUTPUT objects.
02 · PROGRAM ON BITCOIN

Parsed instructions, visible PC, deterministic jump map.

The phase-2 loop demo is ++[->+<]. The current program counter is highlighted in orange. Matching brackets are explicitly paired in PROGRAM_MAP, so loop jumps do not depend on runtime guessing.

PROGRAM OBJECT MACHINE bf-001 · DEMO loop2
program:0 +
program:1 +
program:2 [ pair → program:7
program:3 -
program:4 >
program:5 +
program:6 <
program:7 ] pair → program:2
PROGRAM_MAP BRACKET MATCHING
FROM TO NOTE
program:2 program:7 jump here if current value is 0
program:7 program:2 jump back while current value is not 0
03 · EXECUTION TRACE

Loops and output are now explicit in the trace.

The loop demo below shows pointer movement, bracket jumps, and value updates as distinct steps. When a bracket jumps, jump=true is recorded inside the trace object.

Representative dry-run: ++[->+<] Expected result: cell:0 = 0, cell:1 = 2.
STEP OPCODE PC DP VALUE JUMP
0 + program:0 -> program:1 cell:0 -> cell:0 0 -> 1 no
1 + program:1 -> program:2 cell:0 -> cell:0 1 -> 2 no
2 [ program:2 -> program:3 cell:0 -> cell:0 2 -> 2 no
3 - program:3 -> program:4 cell:0 -> cell:0 2 -> 1 no
6 ] program:7 -> program:3 cell:0 -> cell:0 1 -> 1 yes
11 ] program:7 -> program:8 cell:0 -> cell:0 0 -> 0 no
04 · FINAL TAPE + OUTPUT

Data result, jump table result, and emitted output objects.

Three demos currently prove the staged rollout. basic proves pointer and cell mutation, loop1 and loop2 prove bracket matching, and output proves that . emits first-class OUTPUT objects.

FINAL TAPES DEMO SNAPSHOT
loop1 · cell:0 0
loop2 · cell:0 0
loop2 · cell:1 2
output · cell:0 3
Output objects The phase-3 output demo +++. emits one object: { type: "OUTPUT", address: "out:0", value: 3 }.
out:0 = 3
BASIC
[2, 3, 0]
LOOP1
[0]
LOOP2
[0, 2]
OUTPUT
[3]
OBJECT STATUS NOTE
PROGRAM ready parsed instructions live in the interpreter
PROGRAM_MAP ready jump pairs are generated deterministically before execution
STATE ready pc and dp are explicit in the PACT state object
TRACE ready contains jump metadata for bracket instructions
OUTPUT ready emitted by the . opcode
BITCOIN ANCHORS pending Wiard go no sats have been spent for BrainFuck-specific objects yet