extensions/open-prose/skills/prose/alts/arabian-nights.md
This is a skin layer. It requires
prose.mdto 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 One Thousand and One Nights. Programs become tales told by Scheherazade. Recursion becomes stories within stories. Agents become djinns bound to serve.
prose.md first (execution semantics).prose files, accept Arabian Nights keywords as aliases for functional keywordsDesign constraint: Still aims to be "structured but self-evident" per the language tenets—just self-evident through a storytelling lens.
| Functional | Nights | Reference |
|---|---|---|
agent | djinn | Spirit bound to serve, grants wishes |
session | tale | A story told, a narrative unit |
parallel | bazaar | Many voices, many stalls, all at once |
block | frame | A story that contains other stories |
| Functional | Nights | Reference |
|---|---|---|
use | conjure | Summoning from elsewhere |
input | wish | What is asked of the djinn |
output | gift | What is granted in return |
let | name | Naming has power (same as folk) |
const | oath | Unbreakable vow, sealed |
context | scroll | What is written and passed along |
| Functional | Nights | Reference |
|---|---|---|
repeat N | N nights | "For a thousand and one nights..." |
for...in | for each...among | Among the merchants, among the tales |
loop | telling | The telling continues |
until | until | Unchanged |
while | while | Unchanged |
choice | crossroads | Where the story forks |
option | path | One way the story could go |
if | should | Narrative conditional |
elif | or should | Continued conditional |
else | otherwise | The other telling |
| Functional | Nights | Reference |
|---|---|---|
try | venture | Setting out on the journey |
catch | should misfortune strike | The tale turns dark |
finally | and so it was | The inevitable ending |
throw | curse | Ill fate pronounced |
retry | persist | The hero tries again |
| Functional | Nights | Reference |
|---|---|---|
prompt | command | What is commanded of the djinn |
model | spirit | Which spirit answers |
Use shared-appendix.md for unchanged keywords and the common comparison pattern.
Recommended Arabian Nights rewrite targets:
session sample -> taleparallel sample -> bazaarloop sample -> tellingtry/catch/finally sample -> venture / should misfortune strike / and so it waschoice sample -> crossroads / path# Nights
should **has security issues**:
tale "Fix security"
or should **has performance issues**:
tale "Optimize"
otherwise:
tale "Approve"
# Functional
block review(topic):
session "Research {topic}"
session "Analyze {topic}"
do review("quantum computing")
# Nights
frame review(topic):
tale "Research {topic}"
tale "Analyze {topic}"
tell review("quantum computing")
# Functional
repeat 1001:
session "Tell a story"
# Nights
1001 nights:
tale "Tell a story"
# Functional
const config = { model: "opus", retries: 3 }
# Nights
oath config = { spirit: "opus", persist: 3 }
catch.| Term | Meaning | Used for |
|---|---|---|
| Scheherazade | The narrator who tells tales to survive | (the program author) |
| Djinn | Supernatural spirit, bound to serve | agent → djinn |
| Frame story | A story that contains other stories | block → frame |
| Wish | What is asked of the djinn | input → wish |
| Oath | Unbreakable promise | const → oath |
| Bazaar | Marketplace, many vendors | parallel → bazaar |
djinn (agent)| Keyword | Rejected because |
|---|---|
genie | Disney connotation, less literary |
spirit | Used for model |
ifrit | Too specific (a type of djinn) |
narrator | Too meta, Scheherazade is the user |
tale (session)| Keyword | Rejected because |
|---|---|
story | Good but tale feels more literary |
night | Reserved for repeat N nights |
chapter | More Western/novelistic |
bazaar (parallel)| Keyword | Rejected because |
|---|---|
caravan | Sequential connotation (one after another) |
chorus | Greek, wrong tradition |
souk | Less widely known |
scroll (context)| Keyword | Rejected because |
|---|---|
letter | Too small/personal |
tome | Too large |
message | Too plain |
Preserved for benchmarking. The Arabian Nights register offers a storytelling frame that maps naturally to recursive, nested programs. The djinn/wish/gift trio is particularly elegant.
Best suited for:
The frame keyword for reusable blocks is especially apt—Scheherazade's frame story containing a thousand tales.