1.0.2 โ€ข Published 11 months ago

ponylang v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

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

  1. Clone the repository: git clone https://github.com/bronymiau/ponylang.git cd ponylang

  2. Install dependencies: npm install

  3. Build and link locally: npm link

Requirements

  • Node.js v12.0.0 or higher
  • npm v6.0.0 or higher

๐ŸŽฎ Quick Start

  1. Create a file hello.pony:

FRIENDSHIP "Hello, Pony World!"

MAGIC number = 42 FRIENDSHIP ๐Ÿฆ„The magic number is {number}๐Ÿฆ„

Create an array (HERD) MAGIC scores = HERD10, 20, 30 RAINBOW score IN scores { FRIENDSHIP ๐Ÿฆ„Score: {score}๐Ÿฆ„ }

  1. Run it: ponylang hello.pony

๐Ÿ“š Language Basics

Keywords

  • FRIENDSHIP - Print to console
  • MAGIC - Variable declaration
  • RAINBOW - Loop construct
  • HERD - Array type
  • HARMONY - Function declaration
  • CASTLE - Object declaration
  • PINKIE - 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.

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago