My: The Language That Grows With You π±
My is a modern, systems-capable programming language designed for progressive complexity. Start with the clarity of Python or Go, and grow into the expressive power of Rust or Zigβwithout the steep learning curve. Whether youβre building CLI tools, web backends, or embedded systems, My lets you scale your mental model as your project scales.
β¨ Why My?
Feature
π§ My
π Python
π¦ Rust
Memory Safety
β GC + Affine Types
β GC (no compile-time checks)
β Ownership (complex)
Concurrency
β M:N Threads + Async/Await
β GIL-limited
β Fearless (steep curve)
Performance
β Native + WASM
β Interpreted
β Zero-cost abstractions
Contracts
β First-Class
β Runtime Assertions
β Debug assertions only
Metaprogramming
β Comptime
β Decorators/Macros
β Procedural macros
Learning Curve
β Progressive
β Low (but no safety)
β Steep
Reversibility
β Checkpoint/Rollback
β Not supported
β Not supported
Cut Operator
β Prolog-style commitment
β Not supported
β Not supported
My is designed to be auditable, composable, and future-proofβideal for systems programming, tooling, and governance platforms.
π§ Modes of Collaboration
My supports three distinct modes of development, each tailored to your preferred balance of human and AI collaboration:
Mode Description Ideal For Status
π§ Solo
Human-first: You write, My assists Craftsmanship, pedagogy, control
β Implemented
π€ Duo
Balanced: You and My co-create Pair programming, prototyping
π§ In Development
π§ Ensemble
AI-first: My leads, you refine Exploration, automation, orchestration
π Planned
Each mode is opt-in and narratableβyour repo can declare its mode, and My adapts its tooling, suggestions, and audit trails accordingly.
π§ Solo Mode Features (Implemented)
The Solo dialect is now fully operational with these cutting-edge features:
Affine Types - Resources that must be used exactly once (no accidental duplication)
Linear Types - Resources that must be consumed (no resource leaks)
Cut Operator (!) - Prolog-style parsing commitment (no backtracking after cut)
Partial Reversibility - Checkpoint and rollback for computation recovery
Pattern Matching - Algebraic data types with exhaustive matching
Async/Await - First-class asynchronous programming
Contracts - Design-by-contract with requires and ensures
Move Semantics - Explicit resource management
π Newtonian Spectrum of Agents
In Ensemble mode, My orchestrates a team of agentic octopusesβeach colored according to Newtonβs sevenfold rainbow. This metaphor reflects decomposed capability, not cultural signaling, and evokes clarity through spectral analysis.
Color Role Symbolism Solo Implementation
π΄ Red
Performance agent (hot path, core) Optimized recursive descent parser
π Orange
Concurrency agent (thread orchestration) Async/await foundations
π‘ Yellow
Contract agent (validation, safety) Affine/linear type tracking
π’ Green
Config agent (schema, hygiene) Structured AST
π΅ Blue
Audit agent (trace, log, narrate) Checkpoint/rollback system
π£ Indigo
Comptime agent (metaprogramming) Compile-time evaluation (planned)
π€ Violet
Governance agent (policy, mode) Mode declaration system
π» The conductor octopus orchestrates this ensembleβeach agent playing its part in harmony, from ledger scrolls to circuit boards.
π¦ Installation
Prerequisites
sudo apt-get install ocaml
sudo dnf install ocaml
brew install ocaml
sudo pacman -S ocaml
Building from Source
git clone https://gitlab.com/your-org/my-lang # Use your GitLab URL cd my-lang ./scripts/build.sh # Builds all dialects
Quick Start (Solo Mode)
cd solo-dialect ./build.sh ./solo # Run the compiler
π Language Examples
Hello World (Solo)
fn main() { let msg = "Hello, My!"; println(msg); return 0; }
Affine Types - Resource Management
fn transfer(affine token: Token) β Result { checkpoint save_state { let result = process(move token); // Must move, canβt copy if !result.is_ok() { rollback save_state; // Partial reversibility } return result; } }
Cut Operator - Parser Commitment
fn parse_expression(input: String) β Expr { match input { "(" β { let expr = parse_nested(); ! // Cut - no backtracking after this expect(")"); return expr; }, _ β parse_simple() } }
Linear Types - Guaranteed Consumption
fn process_data(linear data: SecureData) { let encrypted = encrypt(move data); // data consumed send_to_server(move encrypted); // encrypted consumed // Compile error if data not consumed! }
Reversible Computation
fn distributed_compute() { reverse { let step1 = expensive_operation(); let step2 = transform(step1); if !valid(step2) { // Automatically reverses to start } return step2; } }
ποΈ Architecture
my-lang/ βββ README.md # This file βββ LICENSE # Your license βββ scripts/ β βββ build.sh # Master build script βββ solo-dialect/ # Human-first mode β β βββ solo_compiler.ml # Complete OCaml implementation β βββ README.md # Solo-specific docs β βββ build.sh # Solo build script β βββ examples/ βββ duet-dialect/ # AI-balanced mode π§ β βββ README.md # Design specification βββ ensemble-dialect/ # AI-first mode π βββ README.md # Vision document
π§ͺ Testing
cd solo-dialect ./solo # Runs built-in test suite
echo 'fn main() { return 42; }' > test.my ./solo test.my
π Documentation
Solo Dialect Guide - Complete guide to the implemented features
Language Specification - Formal language specification (coming soon)
Affine Types Tutorial - Learn resource management (coming soon)
Reversibility Patterns - Checkpoint/rollback patterns (coming soon)
π€ Contributing
We welcome contributions that align with Myβs philosophy of progressive complexity and human-AI collaboration.
Fork the repository Create a feature branch (git checkout -b feature/amazing-feature) Commit your changes (git commit -m 'Add amazing feature') Push to the branch (git push origin feature/amazing-feature) Open a Pull Request
Development Principles
Simplicity First - Start simple, grow complex only when needed
Safety by Default - Affine/linear types prevent resource bugs
Reversibility - Support undo/redo at the language level
Progressive Disclosure - Advanced features are opt-in
Narratable Code - Code should tell a story
π Roadmap
β Phase 1: Solo Mode (Complete)
Lexer and Parser with Cut Operator
Affine and Linear Type System
Checkpoint/Rollback Mechanism
Pattern Matching
Async/Await Foundations
π§ Phase 2: Duo Mode (Q1 2025)
LSP Server Implementation
AI Pair Programming Interface
Suggestion Engine
Collaborative Debugging
π Phase 3: Ensemble Mode (Q2 2025)
Multi-Agent Orchestration
Newtonian Spectrum Implementation
Policy Engine
Distributed Compilation
π Security
My takes security seriously with:
Memory safety through affine/linear types No undefined behavior by design Capability-based security model Auditable compilation process
Report security vulnerabilities to: security@my-lang.org
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Acknowledgments
The Rust community for proving memory safety matters The OCaml community for the implementation language Prolog for inspiring the cut operator The reversible computing research community
π¬ Community
Discord: discord.gg/my-lang
Forum: forum.my-lang.org
Twitter: @MyLangOfficial
"A language that grows with you, from solo craftsmanship to ensemble orchestration." π±π»