{"id":22513341,"url":"https://github.com/shayyz-code/poolang","last_synced_at":"2026-04-26T12:02:23.143Z","repository":{"id":265045840,"uuid":"889905409","full_name":"shayyz-code/poolang","owner":"shayyz-code","description":"A tiny interpreted language written in Rust. This language is named `Poo ပူး`, taken from the Burmese word for Guinea Pig.","archived":false,"fork":false,"pushed_at":"2026-04-25T18:59:19.000Z","size":100,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-25T20:14:47.187Z","etag":null,"topics":["programming-language","rust-lang"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shayyz-code.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-17T14:43:49.000Z","updated_at":"2026-04-25T18:59:26.000Z","dependencies_parsed_at":"2024-11-27T20:11:45.250Z","dependency_job_id":null,"html_url":"https://github.com/shayyz-code/poolang","commit_stats":null,"previous_names":["shayyz-code/poolang"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shayyz-code/poolang","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shayyz-code%2Fpoolang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shayyz-code%2Fpoolang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shayyz-code%2Fpoolang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shayyz-code%2Fpoolang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shayyz-code","download_url":"https://codeload.github.com/shayyz-code/poolang/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shayyz-code%2Fpoolang/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32296259,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T09:34:17.070Z","status":"ssl_error","status_checked_at":"2026-04-26T09:34:00.993Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["programming-language","rust-lang"],"created_at":"2024-12-07T03:11:30.591Z","updated_at":"2026-04-26T12:02:23.133Z","avatar_url":"https://github.com/shayyz-code.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Rust](https://img.shields.io/badge/rust-1.75%2B-orange.svg?style=for-the-badge\u0026logo=rust)](https://www.rust-lang.org)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=for-the-badge)](CONTRIBUTING.md)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"500\" height=\"281\" alt=\"poo-banner-transparent\" src=\"https://github.com/user-attachments/assets/70181432-f458-4949-beb2-51e6e9eb8549\" /\u003e\n\u003c/p\u003e\n\n# About PooLang\n\nA Tiny Interpreted language written in Rust, featuring variable declarations, arithmetic operations, conditional statements, and control flow. This project includes a lexer, parser, and interpreter. The name `Poo` originates from Guinea Pig translated from `Burmese`.\n\n## Table of Contents\n\n- [Features](#features)\n- [Get Started](#get-started)\n- [Installation](#installation)\n- [Release](#release)\n- [Usage](#usage)\n- [Syntax Overview](#syntax-overview)\n- [Example Code](#example-code)\n- [Development](#development)\n- [Contributing](#contributing)\n\n## Features\n\n- **Arithmetic Expressions**: Supports addition, subtraction, multiplication, and division with correct operator precedence.\n- **Variable Declarations**: Uses `poo` keyword for variable declarations.\n- **Mutable Variables**: Like in Rust, all variables are immutable by default. Uses `mut` for mutable variables.\n- **Conditional Statements**: Includes `if`, `else`, and `elif` for branching.\n- **Control Flow**: Supports `while` and `for in` loops and `return` statements.\n- **Custom Operators**:\n  - Assignment operator: `\u003c\u003c`\n  - Arrow operator: `\u003e\u003e`\n- **Lexer, Parser, and Interpreter**: A full pipeline from tokenizing source code to executing it.\n\n## Get Started\n\nChoose the fastest install path for your platform:\n\n### Linux / macOS (Universal Shell Installer)\n\n```bash\ncurl --proto '=https' --tlsv1.2 -LsSf https://github.com/shayyz-code/poolang/releases/latest/download/poo-installer.sh | sh\n```\n\n### Windows (PowerShell Installer)\n\n```powershell\npowershell -c \"irm https://github.com/shayyz-code/poolang/releases/latest/download/poo-installer.ps1 | iex\"\n```\n\n### macOS (Homebrew)\n\n```bash\nbrew install shayyz-code/tap/poo\n```\n\n### Windows (Scoop)\n\n```powershell\nscoop bucket add shayyz-code https://github.com/shayyz-code/scoop-bucket\nscoop install poo\n```\n\n### Verify Installation\n\n```bash\npoo --help\n```\n\n## Installation\n\n### Prerequisites\n\n- Rust and Cargo installed. If you don't have them installed, follow the [Rust installation guide](https://www.rust-lang.org/tools/install).\n\n### Steps\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/shayyz-code/poolang.git\n   cd poolang\n   ```\n\n2. Build the project:\n\n   ```bash\n   cargo build\n   ```\n\n3. Run tests:\n   ```bash\n   cargo test\n   ```\n\n## Usage\n\nYou can use the interpreter to run files containing your custom language code.\n\n### Running the Interpreter\n\nTo run the interpreter on a source file:\n\n```bash\ncargo run \u003cpath_to_your_source_file\u003e\n```\n\nExample:\n\n```bash\ncargo run app.poo\n```\n\nThe CLI uses typed checked execution (`run_file_checked`) and prints structured error kinds (`Io`, `Parse`, `Runtime`) with a non-zero exit code on failure.\n\n## Release\n\nReleases are automated with GitHub Actions + [cargo-dist](https://opensource.axo.dev/cargo-dist/) and publish:\n\n- Multi-platform binaries (Linux, macOS, Windows)\n- Optimized installers (Shell, PowerShell)\n- Homebrew formula updates to `shayyz-code/tap` (`shayyz-code/homebrew-tap`)\n- Scoop manifest updates to `shayyz-code/scoop-bucket`\n\nRelease flow:\n\n1. Update version in `Cargo.toml`.\n2. Create and push a version tag (example: `v0.1.5`).\n3. The `Release` workflow builds all artifacts, creates a GitHub Release, and handles downstream publishing.\n\nCI checks:\n\n- Pull requests and pushes to `main` run build + tests on Linux, macOS, and Windows.\n- Unix runners also validate installer script syntax (`sh -n install.sh`).\n\n## Syntax Overview\n\nThe language features basic syntax for arithmetic, variable declarations, and control flow:\n\n### **Variable Declarations**\n\n```poo\npoo x \u003c\u003c 10;\npoo mut y \u003c\u003c 5 + 2 * 3;\n```\n\n### **Arithmetic Operations**\n\n```poo\npoo result \u003c\u003c x + y * 2 - 10 / 2;\n```\n\n### **Conditional Statements**\n\n```poo\nif x \u003e y {\n    return x;\n} else {\n    return y;\n}\n```\n\n### **Loops**\n\n```poo\nuse std::pout;\n\npoo mut count \u003c\u003c 0;\n\nwhile count \u003c 10 {\n    count \u003c\u003c count + 1;\n}\n\nfor i in 0..3 {\n    pout(\"Hello, World \", i);\n}\n```\n\n### **Functions**\n\n```poo\nuse std::pout;\n\npoof getName () \u003e\u003e string {\n    poo name \u003c\u003c \"Shayy\";\n    return name;\n}\n\npout(getName());\n```\n\n## Example Code\n\nHere is a sample program in my PooLang:\n\n```poo\nuse std::pout;\n\npoo a \u003c\u003c 5.0 * 1.0 - 1.0 * 3.0;\npoo b \u003c\u003c 2 / 2;\npoo mut d \u003c\u003c true;\nd \u003c\u003c false;\n\npoof getHelloWorld () \u003e\u003e string {\n    return \"Hello, World!\";\n}\n\nfor i in 0..2 {\n    pout(\"Hello, Poo!\", i);\n}\n\npout(getHelloWorld());\n```\n\nExpected Output:\n\n```poo\nHello, Poo!0\nHello, Poo!1\nHello, World!\n```\n\n## Development\n\n### TDD Specs\n\nCurrent executable specs live in `tests/language_specs.rs`:\n\n- `spec_lexer_skips_inline_comment_block`\n- `spec_parser_respects_multiplication_precedence`\n- `spec_interpreter_executes_program_to_return_value`\n- `spec_checked_api_returns_typed_error_on_parse_failure`\n- `spec_checked_api_returns_typed_error_on_runtime_failure`\n- `spec_checked_file_api_returns_io_error_for_missing_file`\n- `spec_checked_file_api_executes_valid_file`\n- loop coverage (`for` range, `for` range with `step`, `for` vector, `while`)\n- control-flow coverage (`if` / `elif` / `else`)\n- struct coverage (instance methods, inheritance method lookup)\n\nRun them with:\n\n```bash\ncargo test\n```\n\n### Refactor TODOs\n\n- [x] Expose core modules as a reusable library API (`src/lib.rs`).\n- [x] Keep CLI thin by delegating execution to library entrypoints.\n- [x] Upgrade crate to Rust Edition 2024.\n- [x] Introduce checked execution APIs with typed error kinds (`Io`, `Parse`, `Runtime`).\n- [ ] Replace panic-driven parser/interpreter internals with native `Result` propagation.\n- [ ] Split large parser and interpreter files into focused submodules.\n- [x] Add integration specs for structs, methods, inheritance, and loops.\n\n### Project Structure\n\n```\n.\n├── src\n│   ├── lib.rs           # Reusable library API\n│   ├── lexer.rs         # Lexical analysis (tokenizer)\n│   ├── parser.rs        # Parsing logic\n│   ├── interpreter.rs   # Interpreter for executing code\n│   ├── ast.rs           # Abstract Syntax Tree (AST) definitions\n│   ├── errors.rs        # Typed error definitions\n│   └── main.rs          # Entry point\n├── examples             # Sample code\n│   ├── donut.poo\n│   └── app.poo\n├── tests\n│   └── language_specs.rs # TDD integration specs\n└── Cargo.toml           # Project configuration\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request or open an Issue if you find a bug or have a feature request.\n\n### Steps to Contribute\n\n1. Fork the repository.\n2. Create a new branch:\n   ```bash\n   git checkout -b feature/your-feature-name\n   ```\n3. Make your changes and commit them:\n\n   ```bash\n   feat: Allow provided config object to extend other configs by \u003cyour-username\u003e\n\n   BREAKING CHANGE: `extends` key in config file is now used for extending other config files.\n   ```\n\n4. Push to the branch:\n   ```bash\n   git push origin feature/your-feature-name\n   ```\n5. Open a Pull Request.\n\n## Feedback\n\nIf you have any questions or feedback, feel free to reach out or open an issue in the repository.\n\n\u003cp align=\"center\"\u003eHand-Crafted by \u003cem\u003e\u003cb\u003e\u003ca href=\"https://github.com/shayyz-code\"\u003eShayy\u003c/a\u003e\u003c/b\u003e\u003c/em\u003e\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshayyz-code%2Fpoolang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshayyz-code%2Fpoolang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshayyz-code%2Fpoolang/lists"}