ponylang
v1.0.2
Published
Hi!
Maintainers
Readme
PonyLang 🦄✨
A magical programming language that brings friendship and joy to coding!
⭐ Features
- Simple and friendly syntax inspired by ponies
- Built-in string interpolation with sparkles ✨
- Fun keywords like FRIENDSHIP and MAGIC
- Full Unicode support including emojis 🌈
- Array operations with HERD type
- Built-in color support for terminal output
🚀 Installation
Via NPM (recommended)
Global installation: npm install -g ponylang
Verify installation: ponylang --version
From Source
Clone the repository: git clone https://github.com/bronymiau/ponylang.git cd ponylang
Install dependencies: npm install
Build and link locally: npm link
Requirements
- Node.js v12.0.0 or higher
- npm v6.0.0 or higher
🎮 Quick Start
- Create a file
hello.pony:
FRIENDSHIP "Hello, Pony World!"
MAGIC number = 42 FRIENDSHIP 🦄The magic number is {number}🦄
** Create an array (HERD) ** MAGIC scores = HERD[10, 20, 30] RAINBOW score IN scores { FRIENDSHIP 🦄Score: {score}🦄 }
- Run it: ponylang hello.pony
📚 Language Basics
Keywords
FRIENDSHIP- Print to consoleMAGIC- Variable declarationRAINBOW- Loop constructHERD- Array typeHARMONY- Function declarationCASTLE- Object declarationPINKIE- Return statement
String Interpolation
Use 🦄 for string interpolation:
MAGIC name = "Rainbow Dash" FRIENDSHIP 🦄Hello, {name}!🦄
Functions
HARMONY addNumbers(a, b) { PINKIE a PLUS_PLUS b }
Objects
CASTLE pony { name: "Twilight Sparkle", power: 100 }
🛠️ Development
Running Tests
npm test
Starting REPL
npm run repl
📖 Documentation
For detailed documentation, visit our Wiki
🤝 Contributing
Contributions are welcome! Please read our Contributing Guide
📜 License
This project is licensed under the MIT License - see the LICENSE file for details
🌟 Examples
Check out the examples/ directory for more sample code:
- Basic syntax:
examples/basic.pony - Functions:
examples/functions.pony - Arrays:
examples/arrays.pony - Advanced game:
examples/advanced/game.pony
🐛 Bug Reports
Found a bug? Please open an issue on our GitHub Issues page.
✨ Credits
Created with love by bronymiau and the PonyLang community.
