{"id":29614838,"url":"https://github.com/ianfhunter/gnoll","last_synced_at":"2026-02-27T06:22:01.109Z","repository":{"id":39792189,"uuid":"184621412","full_name":"ianfhunter/GNOLL","owner":"ianfhunter","description":"GNOLL is an efficient dice notation parser for multiple programming languages that supports a wide set of dice notation","archived":false,"fork":false,"pushed_at":"2025-07-12T17:30:02.000Z","size":2843,"stargazers_count":44,"open_issues_count":57,"forks_count":24,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-15T13:21:35.329Z","etag":null,"topics":["board-game","c","cpp","dice","dice-notation","dice-roller","dice-rolls","go","golang","haskell","java","javascript","js","julia","perl","python","r","roleplaying-games","rpg-dice-roller","ttrpg"],"latest_commit_sha":null,"homepage":"https://www.ianhunter.ie/GNOLL/","language":"Yacc","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ianfhunter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"ianfhunter","patreon":null,"open_collective":null,"ko_fi":"ianfhunter","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":"https://paypal.me/ianfhunter"}},"created_at":"2019-05-02T17:16:19.000Z","updated_at":"2025-07-12T17:30:05.000Z","dependencies_parsed_at":"2023-02-10T23:31:15.638Z","dependency_job_id":"e46cecc7-78d4-436d-b0d3-cdfc5bc2eb41","html_url":"https://github.com/ianfhunter/GNOLL","commit_stats":{"total_commits":1680,"total_committers":21,"mean_commits":80.0,"dds":0.2142857142857143,"last_synced_commit":"8e9cac17f745b8c4128ae66650571c9d072762b9"},"previous_names":["ianfhunter/dice-tower"],"tags_count":89,"template":false,"template_full_name":null,"purl":"pkg:github/ianfhunter/GNOLL","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ianfhunter%2FGNOLL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ianfhunter%2FGNOLL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ianfhunter%2FGNOLL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ianfhunter%2FGNOLL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ianfhunter","download_url":"https://codeload.github.com/ianfhunter/GNOLL/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ianfhunter%2FGNOLL/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266211932,"owners_count":23893379,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["board-game","c","cpp","dice","dice-notation","dice-roller","dice-rolls","go","golang","haskell","java","javascript","js","julia","perl","python","r","roleplaying-games","rpg-dice-roller","ttrpg"],"created_at":"2025-07-21T00:01:14.082Z","updated_at":"2026-02-27T06:22:01.076Z","avatar_url":"https://github.com/ianfhunter.png","language":"Yacc","readme":"# GNOLL\n[![Downloads](https://static.pepy.tech/badge/gnoll)](https://pepy.tech/project/gnoll)\n\n[![Test: Functionality](https://github.com/ianfhunter/GNOLL/actions/workflows/test_core.yml/badge.svg)](https://github.com/ianfhunter/GNOLL/actions/workflows/test_core.yml)\n[![Test: Language Bindings](https://github.com/ianfhunter/GNOLL/actions/workflows/test_language_bindings.yml/badge.svg)](https://github.com/ianfhunter/GNOLL/actions/workflows/test_language_bindings.yml)\n[![Test: OS Support](https://github.com/ianfhunter/GNOLL/actions/workflows/test_OS.yml/badge.svg)](https://github.com/ianfhunter/GNOLL/actions/workflows/test_OS.yml)\n\n[![CodeFactor](https://www.codefactor.io/repository/github/ianfhunter/gnoll/badge)](https://www.codefactor.io/repository/github/ianfhunter/gnoll)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/90add1388135474a928b715ddbb071b4)](https://www.codacy.com/gh/ianfhunter/GNOLL/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=ianfhunter/GNOLL\u0026amp;utm_campaign=Badge_Grade)\n\n[![status](https://joss.theoj.org/papers/c704c5148e622d32403948320c5e96a1/status.svg)](https://joss.theoj.org/papers/c704c5148e622d32403948320c5e96a1)\n[![TTRPG compatibility rate](https://img.shields.io/badge/Popular%20TTRPG%20compatibility-98.66%25-green)](https://img.shields.io/badge/Popular%20TTRPG%20compatibility-96.875%25-green)\n[![GitHub license](https://img.shields.io/github/license/ianfhunter/GNOLL.svg)](https://github.com/ianfhunter/GNOLL/blob/master/LICENSE)\n![GitHub last commit](https://img.shields.io/github/last-commit/ianfhunter/GNOLL.svg)  [![Donate](https://img.shields.io/badge/Donate-Paypal-yellow.svg)](https://paypal.me/ianfhunter)\n\n\u003cp align=\"center\"\u003e\n \u003cimg src=\"https://raw.githubusercontent.com/ianfhunter/GNOLL/main/media/gnoll.png\" height=\"200\"\u003e\n\u003c/p\u003e\n\nAn easy to integrate [dice notation](https://en.wikipedia.org/wiki/Dice_notation) library for multiple programming languages.\nUse for instant support of common syntax and a library that can scale with your demands, rather than a sticky taped monstrousity of regular expressions and tears.\n\nHere's an example of how you might use GNOLL:\n```markdown\n**Grindon The Brave**: I want to steal from the goblin sitting at the bar.\n**Dungeon Master**: Okay, give me a stealth check!\n**Grindon The Brave**: Okay, that's a \u003c1d20+5\u003e\n[GNOLL]: 21\n**Dungeon Master**: Hurrah! You successfully pickpocket the goblin! However, all he had in there were some crummy dice...\n```\n\n[You can follow Grindon's full adventure through the world of dice notation in our Documentation](https://www.ianhunter.ie/GNOLL).\n\nMany of our notation design decisions are explained in the documentation and compared to other dice notation parsers.\n\n## Play around\n\nTry out our [web demo](https://www.ianhunter.ie/GNOLL/demo/)! ✨\n\n## Current Status\n### 🧑‍💻 Language Support\n\nGNOLL was written to be the definitive solution to dice notation. The core has been written in C, but fear not! You can use GNOLL in many other programming languages too. Here are some we have examples for:\n\n![C](https://img.shields.io/badge/c-%2300599C.svg?style=for-the-badge\u0026logo=c\u0026logoColor=white)\n![C++](https://img.shields.io/badge/c++-%2300599C.svg?style=for-the-badge\u0026logo=c%2B%2B\u0026logoColor=white)\n![C#](https://img.shields.io/badge/c%23-%23239120.svg?style=for-the-badge\u0026logo=c-sharp\u0026logoColor=white)\n![Go](https://img.shields.io/badge/go-%2300ADD8.svg?style=for-the-badge\u0026logo=go\u0026logoColor=white)\n![Haskell](https://img.shields.io/badge/Haskell-5e5086?style=for-the-badge\u0026logo=haskell\u0026logoColor=white)\n![Java](https://img.shields.io/badge/java-%23ED8B00.svg?style=for-the-badge\u0026logo=java\u0026logoColor=white)\n![JavaScript](https://img.shields.io/badge/javascript-%23323330.svg?style=for-the-badge\u0026logo=javascript\u0026logoColor=%23F7DF1E)\n![Julia](https://img.shields.io/badge/-Julia-9558B2?style=for-the-badge\u0026logo=julia\u0026logoColor=white)\n![Lua](https://img.shields.io/badge/lua-%232C2D72.svg?style=for-the-badge\u0026logo=lua\u0026logoColor=white)\n![Perl](https://img.shields.io/badge/perl-%2339457E.svg?style=for-the-badge\u0026logo=perl\u0026logoColor=white)\n![PHP](https://img.shields.io/badge/php-%23777BB4.svg?style=for-the-badge\u0026logo=php\u0026logoColor=white)\n![Python](https://img.shields.io/badge/python-3670A0?style=for-the-badge\u0026logo=python\u0026logoColor=ffdd54)\n![R](https://img.shields.io/badge/r-%23276DC3.svg?style=for-the-badge\u0026logo=r\u0026logoColor=white)\n![Ruby](https://img.shields.io/badge/ruby-%23CC342D.svg?style=for-the-badge\u0026logo=ruby\u0026logoColor=white)\n![Rust](https://img.shields.io/badge/rust-%23000000.svg?style=for-the-badge\u0026logo=rust\u0026logoColor=white)\n\nPrimarily tested on Linux (Ubuntu), but functional in various forms on Windows (10, WSL) and Mac.\n\n### 🎲 Dice Notation\n- XdY notation\n- Arithmetic\n- Fate Dice\n- Miscellaneous Symbolic Dice\n- Shorthands \u0026 Macros\n- Alternate Syntax\n- Explosions\n- Drop/Keep\n- Rerolling\n- Filtering\n- Functions\n\nThere's so many different things, we'd bore you to list them all here. For the specific details of supported notation, [check out our documentation](https://www.ianhunter.ie/GNOLL).\n\n## Getting Started\n### Usage from a package manager\n#### Python\n```bash\npip3 install GNOLL\n```\n\nThen, in your code:\n```python\nfrom gnoll import roll\nroll(\"1d20\")\n\u003e\u003e (0, [[12]], None)\n# (return code, final result, dice breakdown (if enabled))\n```\n\nOr, use the command-line interface (see `--help`):\n```sh\n$ python3 -m gnoll 2d4\n6\n$ function gnoll() { python3 -m gnoll --breakdown \"$@\" ; }\n$ gnoll 3d6 + 10\n[5, 5, 4] --\u003e 24\n```\n\n### 🛠️ Installing From Source\n#### Basic Requirements\n```bash\nsudo apt-get install bison flex make python3-pip -y\npip install -r reqs/requirements.txt\nmake all\n```\n\nTo verify your setup, try our tests:\n```bash\nmake test\n```\nOr, just try some commands yourself!\n\n```bash\n$ ./build/dice 1d20\n20\n```\nIf you would like to run the 'dice' command from anywhere, use `make install` to add the executable to your path.\n\n(Note that not all commands may not be able to be used this way as some symbols are reserved for use by different terminal interfaces (e.g. bash uses ! and #))\n\nFor languages other than Python/C/C++ call the corresponding make target after the commands above.\n\n## 🐛 Issues / Bugs / FAQs / Feature Requests\n\nIf you encounter any issues or have any ideas, please file them in our [Issue Tracker](https://github.com/ianfhunter/GNOLL/issues).\n\n## ✋ Contributing\n\nPlease read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.\n\n## 🔢 Versioning\n\nWe use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/ianfhunter/gnoll/tags).\n\n## 🤹 Authors / Contributers / Attributions\n\n  - **Ian Hunter** - *Main Developer* - [Ianfhunter](https://github.com/ianfhunter/)\n\nSee also the list of [contributors](https://github.com/ianfhunter/gnoll/contributors) who participated in this project.\n\n## 📃 License\n\nThis project is licensed under the GNU General Public License v3.0 - see the [LICENSE.md](LICENSE.md) file for details.\n\nIndividual licensing arrangements can be made if this is an issue for your project - Contact Me at [LinkedIn](https://www.linkedin.com/in/ianfhunter) to discuss.\n\n## 👏 Acknowledgments\n\n  - **Billie Thompson** - *README \u0026 Contribution Templates* - [PurpleBooth](https://github.com/PurpleBooth)\n  - [Markdown Badges](https://github.com/Ileriayo/markdown-badges)\n\n## 🏗️ Built With\n\n  - [Flex \u0026 Bison](https://aquamentus.com/flex_bison.html) - Grammar Lexing \u0026 Parsing\n  - [uthash](https://troydhanson.github.io/uthash/userguide.html) - C hashtable lib\n  - [PCG](https://www.pcg-random.org/) - Random Number Generation\n  - [Arc4Random](https://www.freebsd.org/cgi/man.cgi?query=arc4random) - Random Number Generation (Cryptographically secure)\n  - Love! 💖\n\n## 💰 Donate\n\n[Keep this project alive](https://ko-fi.com/ianfhunter)\n","funding_links":["https://github.com/sponsors/ianfhunter","https://ko-fi.com/ianfhunter","https://paypal.me/ianfhunter"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fianfhunter%2Fgnoll","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fianfhunter%2Fgnoll","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fianfhunter%2Fgnoll/lists"}