Skip to content

My is a modern, first class AI programming language designed with progressive complexity. Start with the clarity of Python or Go, and grow into the expressive power of Ada, Rust, or Zig - without the steep learning curve. My is the language that grows with you.

Notifications You must be signed in to change notification settings

hyperpolymath/my-lang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

15 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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

Ubuntu/Debian

sudo apt-get install ocaml

Fedora/RHEL

sudo dnf install ocaml

macOS

brew install ocaml

Arch Linux

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

Run Solo compiler tests

cd solo-dialect ./solo # Runs built-in test suite

Test your own My program

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." 🌱🎻

About

My is a modern, first class AI programming language designed with progressive complexity. Start with the clarity of Python or Go, and grow into the expressive power of Ada, Rust, or Zig - without the steep learning curve. My is the language that grows with you.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published