Skip to main content

OpenProse Kafka Register

This is a skin layer. It requires prose.md to be loaded first. All execution semantics, state management, and VM behavior are defined there. This file only provides keyword translations.

An alternative register for OpenProse that draws from the works of Franz Kafka—The Trial, The Castle, "In the Penal Colony." Programs become proceedings. Agents become clerks. Everything is a process, and nobody quite knows the rules.

How to Use

  1. Load prose.md first (execution semantics)
  2. Load this file (keyword translations)
  3. When parsing .prose files, accept Kafka keywords as aliases for functional keywords
  4. All execution behavior remains identical—only surface syntax changes

Design constraint: Still aims to be "structured but self-evident" per the language tenets—just self-evident through a bureaucratic lens. (The irony is intentional.)


Complete Translation Map

Core Constructs

FunctionalKafkaReference
agentclerkA functionary in the apparatus
sessionproceedingAn official action taken
paralleldepartmentsMultiple bureaus acting simultaneously
blockregulationA codified procedure

Composition & Binding

FunctionalKafkaReference
userequisitionRequesting from the archives
inputpetitionWhat is submitted for consideration
outputverdictWhat is returned by the apparatus
letfileRecording in the system
conststatuteUnchangeable law
contextdossierThe accumulated file on a case

Control Flow

FunctionalKafkaReference
repeat NN hearingsRepeated appearances before the court
for...infor each...in the matter ofBureaucratic iteration
loopappealEndless re-petition, the process continues
untiluntilUnchanged
whilewhileUnchanged
choicetribunalWhere judgment is rendered
optionrulingOne possible judgment
ifin the event thatBureaucratic conditional
elifor in the event thatContinued conditional
elseotherwiseDefault ruling

Error Handling

FunctionalKafkaReference
trysubmitSubmitting for processing
catchshould it be deniedRejection by the apparatus
finallyregardlessWhat happens no matter the outcome
throwrejectThe system refuses
retryresubmitTry the process again

Session Properties

FunctionalKafkaReference
promptdirectiveOfficial instructions
modelauthorityWhich level of the hierarchy

Unchanged

These keywords already work or are too functional to replace sensibly:

  • **...** discretion markers — the inscrutable judgment of the apparatus
  • until, while — already work
  • map, filter, reduce, pmap — pipeline operators
  • max — constraint modifier
  • as — aliasing
  • Model names: sonnet, opus, haiku — retained (or see "authority" above)

Side-by-Side Comparison

Simple Program

# Functional
use "@alice/research" as research
input topic: "What to investigate"

agent helper:
model: sonnet

let findings = session: helper
prompt: "Research {topic}"

output summary = session "Summarize"
context: findings
# Kafka
requisition "@alice/research" as research
petition topic: "What to investigate"

clerk helper:
authority: sonnet

file findings = proceeding: helper
directive: "Research {topic}"

verdict summary = proceeding "Summarize"
dossier: findings

Parallel Execution

# Functional
parallel:
security = session "Check security"
perf = session "Check performance"
style = session "Check style"

session "Synthesize review"
context: { security, perf, style }
# Kafka
departments:
security = proceeding "Check security"
perf = proceeding "Check performance"
style = proceeding "Check style"

proceeding "Synthesize review"
dossier: { security, perf, style }

Loop with Condition

# Functional
loop until **the code is bug-free** (max: 5):
session "Find and fix bugs"
# Kafka
appeal until **the code is bug-free** (max: 5):
proceeding "Find and fix bugs"

Error Handling

# Functional
try:
session "Risky operation"
catch as err:
session "Handle error"
context: err
finally:
session "Cleanup"
# Kafka
submit:
proceeding "Risky operation"
should it be denied as err:
proceeding "Handle error"
dossier: err
regardless:
proceeding "Cleanup"

Choice Block

# Functional
choice **the severity level**:
option "Critical":
session "Escalate immediately"
option "Minor":
session "Log for later"
# Kafka
tribunal **the severity level**:
ruling "Critical":
proceeding "Escalate immediately"
ruling "Minor":
proceeding "Log for later"

Conditionals

# Functional
if **has security issues**:
session "Fix security"
elif **has performance issues**:
session "Optimize"
else:
session "Approve"
# Kafka
in the event that **has security issues**:
proceeding "Fix security"
or in the event that **has performance issues**:
proceeding "Optimize"
otherwise:
proceeding "Approve"

Reusable Blocks

# Functional
block review(topic):
session "Research {topic}"
session "Analyze {topic}"

do review("quantum computing")
# Kafka
regulation review(topic):
proceeding "Research {topic}"
proceeding "Analyze {topic}"

invoke review("quantum computing")

Fixed Iteration

# Functional
repeat 3:
session "Attempt connection"
# Kafka
3 hearings:
proceeding "Attempt connection"

Immutable Binding

# Functional
const config = { model: "opus", retries: 3 }
# Kafka
statute config = { authority: "opus", resubmit: 3 }

The Case For Kafka

  1. Darkly comic. Programs-as-bureaucracy is funny and relatable.
  2. Surprisingly apt. Software often is an inscrutable apparatus.
  3. Clean mappings. Petition/verdict, file/dossier, clerk/proceeding all work well.
  4. Appeal as loop. The endless appeal process is a perfect metaphor for retry logic.
  5. Cultural resonance. "Kafkaesque" is a widely understood adjective.
  6. Self-aware. Using Kafka for a programming language acknowledges the absurdity.

The Case Against Kafka

  1. Bleak tone. Not everyone wants their programs to feel like The Trial.
  2. Verbose keywords. "In the event that" and "should it be denied" are long.
  3. Anxiety-inducing. May not be fun for users who find bureaucracy stressful.
  4. Irony may not land. Some users might take it literally and find it off-putting.

Key Kafka Concepts

TermMeaningUsed for
The apparatusThe inscrutable systemThe VM itself
K.The protagonist, never fully namedThe user
The TrialProcess without clear rulesProgram execution
The CastleUnreachable authorityHigher-level systems
ClerkFunctionary who processesagentclerk
ProceedingOfficial actionsessionproceeding
DossierAccumulated filecontextdossier

Alternatives Considered

For clerk (agent)

KeywordRejected because
officialToo generic
functionaryHard to spell
bureaucratToo pejorative
advocateToo positive/helpful

For proceeding (session)

KeywordRejected because
caseOverloaded (switch case)
hearingReserved for repeat N hearings
trialUsed in Homeric register
processToo technical

For departments (parallel)

KeywordRejected because
bureausGood alternative, slightly less clear
officesToo mundane
ministriesMore Orwellian than Kafkaesque

For appeal (loop)

KeywordRejected because
recourseToo legal-technical
petitionUsed for input
processToo generic

Verdict

Preserved for benchmarking. The Kafka register offers a darkly comic, self-aware framing that acknowledges the bureaucratic nature of software systems. The irony is the point.

Best suited for:

  • Users with a sense of humor about software complexity
  • Programs that genuinely feel like navigating bureaucracy
  • Contexts where acknowledging absurdity is welcome

Not recommended for:

  • Users who find bureaucratic metaphors stressful
  • Contexts requiring earnest, positive framing
  • Documentation that needs to feel approachable

Closing Note

"Someone must have slandered Josef K., for one morning, without having done anything wrong, he was arrested." — The Trial

In the Kafka register, your program is Josef K. The apparatus will process it. Whether it succeeds or fails, no one can say for certain. But the proceedings will continue.