Error-Lang is a pedagogical programming language where the language itself is intentionally fragile with built-in contradictions and paradoxes. Unlike traditional teaching languages that hide complexity, Error-Lang exposes complexity and makes it explorable.
Students learn systems thinking by experiencing how design decisions ripple through a codebase, making every choice have immediate, visible consequences through computational haptics - visual feedback that lets you feel code quality like a craftsperson feels their materials.
A master carpenter feels the weight of their hammer and adjusts their swing. A skilled cook sees the vortex in boiling water and knows when to add pasta. A sculptor feels stone resistance and knows where it will crack.
If craftspeople can develop this intuition for simple materials, imagine the potential in understanding syntax, semantics, and typing.
Error-Lang makes programming learnable the way crafts are learnable - through direct feedback, exploration, and developing an intuitive feel for the computational substrate.
# Clone the repository
git clone https://github.com/hyperpolymath/error-lang.git
cd error-lang
# Install Deno (if not already installed)
curl -fsSL https://deno.land/install.sh | sh
# Try the runtime
deno run -A cli/runtime.js examples/01-hello-world.err# examples/01-hello-world.err
main
println("Hello, Error-Lang!")
let x = 42
println("Stability score:", stability())
endRun it:
deno run -A cli/runtime.js examples/01-hello-world.errYou’ll see:
Hello, Error-Lang!
Stability score: 100
✨ [████████████████████] 100/100
Stability: EXCELLENT# Positional operator semantics - operators change by location!
main
let a = 5 + 3 # Column 12: Addition → 8
let b = 5 + 3 # Column 12: Addition → 8
let c = 5 + 3 # Column 13: Different! → "53" (concatenation)
println(a, b, c) # 8, 8, "53"
endThe paradox: The + operator behavior depends on its column position in the file!
deno run -A cli/runtime.js examples/02-positional-operators.err
# Watch the stability score drop as you discover the paradox
💫 [█████████████░░░░░░░] 65/100
Stability: FAIR
Factors: positional-semanticsVisual feedback that makes design decisions immediately tangible:
-
Animated stability bar - Real-time updates (0-100 score)
-
Color coding - Green → Yellow → Orange → Red
-
Emoji indicators - ✨ → 💫 →
⚠️ → 🔥 -
Sparkline history - Trend visualization
-
Audio cues (future) - Sonic feedback for instability
Error-Lang has ten core paradoxes that challenge assumptions about programming:
-
Type Quantum Superposition - Variables exist in multiple types until observed
-
Scope Leakage - Variables escape blocks on prime-numbered runs
-
Positional Operator Semantics - Operators change behavior by file position
-
Context-Collapse Keywords -
maybe,sometimes,usuallyaffect semantics -
Temporal Corruption - Previous run history affects current execution
-
Reserved Word Roulette - Keywords shift meaning based on context
-
Arithmetic Drift - Math operations have small, accumulating errors
-
Null Propagation Cascade - Null spreads like a virus
-
Global State Entanglement - Globals affect each other mysteriously
-
Memory Phantom - Freed memory sometimes persists
See Paradoxes.adoc for detailed examples.
Navigate code through five transformation layers:
Grammar ←→ EBNF rules that matched
↓
Parser ←→ Concrete syntax tree
↓
AST ←→ Abstract syntax tree
↓
Semantics ←→ Type-checked, analyzed AST
↓
Runtime ←→ Execution traceThe IDE lets you explore each layer and see exactly where paradoxes emerge.
Automated root cause tracing from symptom to design decision:
SYMPTOM: Stability dropped to 45
WHY 1: Variable 'x' was mutated
WHERE: line 12, mutable assignment
LAYER: Runtime
WHY 2: Mutation affects 3 other locations
WHERE: lines 15, 18, 22 read 'x'
LAYER: Semantics
WHY 3: Shared state creates coupling
WHERE: All readers depend on 'x' stability
LAYER: Semantics
WHY 4: No encapsulation boundaries
WHERE: Global scope, no modules
LAYER: AST
WHY 5: DESIGN TRADEOFF - Mutability chosen over immutability
ALTERNATIVES: Could use immutable data structures
CONSEQUENCE: -55 stability pointserror-lang/
├── compiler/ # ReScript compiler
│ ├── src/
│ │ ├── Types.res # Type definitions
│ │ ├── Stability.res # Stability tracking
│ │ ├── TypeSuperposition.res
│ │ ├── LayerNavigator.res
│ │ └── FiveWhys.res
│ └── rescript.json
│
├── cli/ # Deno runtime
│ ├── runtime.js # Main executable
│ ├── stability-tracker.js
│ ├── visual-feedback.js
│ ├── layer-navigator.js
│ └── five-whys.js
│
├── ide/ # Error-Lang Studio (ReScript-TEA)
│ ├── src/
│ │ ├── Model.res # Application state
│ │ ├── Msg.res # Event messages
│ │ ├── Update.res # State transitions
│ │ ├── View.res # UI rendering
│ │ └── Main.res # Entry point
│ ├── deno.json # Deno configuration
│ └── vite.config.js # Build tool config
│
├── proven/ # Idris2 formal verification
│ └── src/
│ ├── Stability.idr # Proven stability calculation
│ ├── Scope.idr # Proven scope rules
│ └── TypeCollapse.idr
│
├── aspects/ # a2ml aspect definitions
│ ├── positional-operators.a2ml
│ ├── scope-leakage.a2ml
│ └── type-superposition.a2ml
│
├── examples/ # Example programs
│ ├── 01-hello-world.err
│ ├── 02-positional-operators.err
│ ├── 03-context-collapse.err
│ ├── 04-scope-leakage.err
│ └── 06-type-superposition.err
│
├── docs/ # Documentation
│ ├── Design-Philosophy.adoc
│ ├── Educational-Framework.adoc
│ ├── Error-Ecosystem-Vision.adoc
│ └── Paradoxes.adoc
│
├── STATE.scm # Project state
├── META.scm # Architecture decisions
├── ECOSYSTEM.scm # Ecosystem relationships
├── ROADMAP.adoc # Development roadmap
└── README.adoc # This file-
ReScript - Compiler and IDE (type-safe, compiles to JS)
-
Deno - Runtime and build tools (secure, modern JS runtime)
-
Idris2 - Formal verification (dependent types, proofs)
-
Guile Scheme - Metadata files (STATE.scm, META.scm, ECOSYSTEM.scm)
-
a2ml - Aspect definitions (declarative paradoxes)
-
ReScript-TEA - Reactive UI framework (The Elm Architecture)
-
cadre-tea-router - Client-side routing
-
draig-ssg - Static site generation
-
Vite - Build tool and dev server
See ARCHITECTURE.adoc for complete IDE design.
-
Deno 1.40+
-
ReScript compiler (
npm install -g rescriptor via Deno) -
Idris2 (optional, for formal verification)
See CONTRIBUTING.md for contribution guidelines.
Key points:
- All code must have SPDX headers (PMPL-1.0-or-later)
- Follow RSR (Rhodium Standard Repositories) structure
- Use Deno, not Node.js/npm
- Use ReScript, not TypeScript
- Document paradoxes in both code and docs
-
Programming Languages - Type systems, semantics, language design
-
Database Systems - Query optimization, transaction isolation (Error-DB)
-
Data Structures - Algorithm stability, complexity (Error-Struct)
-
Systems Thinking - Consequence propagation, feedback loops
See Educational-Framework.adoc for complete curriculum.
Week 1-2: Introduction to computational haptics Week 3-4: Type quantum superposition Week 5-6: Scope and temporal effects Week 7-8: Five Whys root cause analysis Week 9-10: Design tradeoff exploration Week 11-12: Final project - stabilize fragile code
Error-Lang is the first in a series of pedagogical tools:
-
Error-Lang (this repo) - Fragile programming language
-
Error-DB (planned) - Fragile database with paradoxes
-
Error-Struct (planned) - Data structures with stability tracking
All share: - Computational haptics (visual feedback) - Stability scoring (0-100) - Five Whys analysis (root cause tracing) - Layer navigation (transformation visualization)
See Error-Ecosystem-Vision.adoc for the complete vision.
Error-Lang integrates with the hyperpolymath infrastructure:
-
rsr-template-repo - Standard repository structure
-
Hypatia - Neurosymbolic CI/CD intelligence
-
gitbot-fleet - Automated bot network (rhodibot, echidnabot, etc.)
-
proven - Idris2 formal verification library
-
cadre-tea-router - Client-side routing for TEA apps
-
draig-ssg - Static site generator
See ECOSYSTEM.scm for detailed relationships.
Current Phase: Alpha - Foundation Complete
-
✅ Stability tracking system
-
✅ Paradox detection (context-collapse, positional ops, scope leakage)
-
✅ Five Whys root cause analysis
-
✅ Layer navigation infrastructure
-
✅ Visual haptic feedback system
-
✅ Example programs (5 paradoxes)
-
✅ Complete documentation
-
🔄 IDE implementation (architecture complete, build in progress)
-
🔄 Formal verification (Idris2 proofs designed, not implemented)
-
🔄 Remaining paradoxes (5 more to implement)
See ROADMAP.adoc for complete development plan.
PMPL-1.0-or-later (Palimpsest License)
Copyright (c) 2026 Jonathan D.A. Jewell <jonathan.jewell@open.ac.uk>
See LICENSE for full text.
If you use Error-Lang in research or teaching:
@software{error_lang_2026,
author = {Jewell, Jonathan D.A.},
title = {Error-Lang: Systems Thinking Education Through Computational Haptics},
year = {2026},
url = {https://github.com/hyperpolymath/error-lang},
license = {PMPL-1.0-or-later}
}Jonathan D.A. Jewell
-
Email: jonathan.jewell@open.ac.uk
-
GitHub: https://github.com/hyperpolymath
-
Repository: https://github.com/hyperpolymath/error-lang
Built with the hyperpolymath ecosystem: - ReScript-TEA, cadre-tea-router, draig-ssg - proven (Idris2 verification), a2ml (aspect modeling) - Hypatia (neurosymbolic CI/CD), gitbot-fleet (automation)
Inspired by: - The Elm Architecture (Evan Czaplicki) - Dependent types research (Idris, Agda, Coq) - Systems thinking pedagogy (Donella Meadows, Peter Senge) - Computational haptics research