---
id: magic-circle-programming-languages
title: Magic circle programming languages
version: 1
published: '2026-10-27'
updated: '2026-10-27'
author: Hiina
produced-by: Claude deep-research run with citation checking
model: claude-opus-5-5
sources-through: '2026-10-26'
status: current
takeaway: A drawn magic circle can be an executable program if meaning lives in rings,
  angles and containment; prototype Widdershins, a counter-clockwise stack language
  where neatness lowers mana cost, first.
topics:
- programming-languages
- gesture-recognition
- vr
sections: 13
---

Index of everything on this site: https://ai.hiina.space/index.md

# Magic circle programming languages

- Author: Hiina (hiina@hiina.space)
- Produced by: Claude deep-research run with citation checking
- Version: 1 · published 2026-10-27 · updated 2026-10-27 · status: current
- Canonical: https://ai.hiina.space/reports/magic-circle-programming-languages.md (this version as one file: https://ai.hiina.space/reports/magic-circle-programming-languages/v1.md)
- Takeaway: A drawn magic circle can be an executable program if meaning lives in rings, angles and containment; prototype Widdershins, a counter-clockwise stack language where neatness lowers mana cost, first.
- Topics: programming-languages, gesture-recognition, [vr](https://ai.hiina.space/topics/vr.md)
- Model: claude-opus-5-5
- Sources through: 2026-10-26
- Whole report as one file (89 KB; fetch tools may truncate it, so prefer the section pages below or download with curl): https://ai.hiina.space/reports/magic-circle-programming-languages/full.md

Can a programming language have a magic circle as its source code, drawn freehand in VR or photographed from ink on paper, and then executed? This report surveys the prior art (esoteric languages, Minecraft magic mods, gesture-casting games, fiction and medieval combinatorics), reviews what diagram recognisers and vision-language models can and cannot do in 2026, and proposes five circle languages, each with its own model of computation and its own answer to what "drawn well" should mean.

The motivating project is a VR spellcasting prototype that already recognises button-gated strokes and glyphs and computes per-stroke quality metrics; several recommendations below are framed as extensions of a prototype like that.

## Contents

- [1. Summary](https://ai.hiina.space/reports/magic-circle-programming-languages/01-summary.md) (included below)
- [2. Every existing system solves one half of the problem](https://ai.hiina.space/reports/magic-circle-programming-languages/02-every-existing-system-solves-one-half-of.md) (27 KB)
- [3. Recognition in 2026: geometry is cheap, topology is hard, VLMs judge badly](https://ai.hiina.space/reports/magic-circle-programming-languages/03-recognition-in-2026-geometry-is-cheap-topology.md) (5 KB)
- [4. Five designs, five computational models](https://ai.hiina.space/reports/magic-circle-programming-languages/04-five-designs-five-computational-models.md) (3 KB)
- [5. Widdershins: a stack language where neatness is mana](https://ai.hiina.space/reports/magic-circle-programming-languages/05-widdershins-a-stack-language-where-neatness-is.md) (6 KB)
- [6. Covenant: interaction combinators drawn as seals and chords](https://ai.hiina.space/reports/magic-circle-programming-languages/06-covenant-interaction-combinators-drawn-as-seals-and.md) (7 KB)
- [7. Choir: a signal-flow synth whose voices are the circle's symmetry](https://ai.hiina.space/reports/magic-circle-programming-languages/07-choir-a-signal-flow-synth-whose-voices.md) (6 KB)
- [8. Volvelle: a Llull dial where rotation is the value](https://ai.hiina.space/reports/magic-circle-programming-languages/08-volvelle-a-llull-dial-where-rotation-is.md) (5 KB)
- [9. Athanor: membrane chemistry where sloppiness is wild magic](https://ai.hiina.space/reports/magic-circle-programming-languages/09-athanor-membrane-chemistry-where-sloppiness-is-wild.md) (7 KB)
- [10. Widdershins first, Covenant for paper, Choir for sound](https://ai.hiina.space/reports/magic-circle-programming-languages/10-widdershins-first-covenant-for-paper-choir-for.md) (3 KB)
- [11. What this research did not find or did not read](https://ai.hiina.space/reports/magic-circle-programming-languages/11-what-this-research-did-not-find-or.md) (2 KB)
- [12. Conclusion](https://ai.hiina.space/reports/magic-circle-programming-languages/12-conclusion.md) (1 KB)
- [13. Sources](https://ai.hiina.space/reports/magic-circle-programming-languages/13-sources.md) (9 KB)

## 1. Summary

A programming language whose source is a magic circle is buildable, and the hard parts are smaller than they look: rings, angles, containment and vertex counts are cheap to recognise from strokes or a photo, while the things recognisers still get wrong (arbitrary line topology, tiny glyph detail) can be designed out of the notation. The closest prior art splits the problem in two. **Mystical** (Denis Moskowitz, 2025) draws PostScript as magic circles but has "no interpreter that will ingest a Mystical image" ([Mystical README](https://suberic.net/~dmm/projects/mystical/README.html)). The **2026 Witch Hat Atelier fan recognisers**, led by wha-spell-simulator, go the other way: they turn a freehand ring and sigil into a GlyphAST and a SpellIR and run it, with neatness setting duration, but they support one ring and one sigil and record nested rings as unsupported ([wha-spell-simulator](https://github.com/ytnrvdf/wha-spell-simulator)). Hex Casting and Psi prove players will program diegetically, Noita proves a spell list can be an interpreter, and VIPR (1990s) is the one serious language built from nested rings. What nobody has built is a compositional circle language you can draw freehand, or photograph, and execute, with drawing quality wired into the semantics in a principled way. The five designs below fill that gap with five different computational models. **Prototype Widdershins first**: it is a stack language read counter-clockwise around a ring, where neatness lowers mana cost and mana doubles as gas, and it reuses almost all of an existing VR stroke-and-glyph recogniser. The one-evening experiment is to fit a ring to the first closed stroke, place four $Q glyphs around it, and measure whether angular order is a reliable program order.

Next section: https://ai.hiina.space/reports/magic-circle-programming-languages/02-every-existing-system-solves-one-half-of.md

---

Text licensed CC BY 4.0 (attribution: Hiina, ai.hiina.space). Source: https://github.com/hiinaspace/ai-hiina-space
