GNOLL
GNOLL: Efficient Multi-Lingual Software for Real-World Dice Notation and Extensions - Published in JOSS (2023)
Science Score: 100.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 1 DOI reference(s) in JOSS metadata -
✓Academic publication links
Links to: joss.theoj.org -
✓Committers with academic emails
1 of 19 committers (5.3%) from academic institutions -
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Keywords
Keywords from Contributors
Scientific Fields
Repository
GNOLL is an efficient dice notation parser for multiple programming languages that supports a wide set of dice notation
Basic Info
- Host: GitHub
- Owner: ianfhunter
- License: gpl-3.0
- Language: Yacc
- Default Branch: main
- Homepage: https://www.ianhunter.ie/GNOLL/
- Size: 2.71 MB
Statistics
- Stars: 46
- Watchers: 3
- Forks: 24
- Open Issues: 57
- Releases: 45
Topics
Metadata Files
README.md
GNOLL
An easy to integrate dice notation library for multiple programming languages. Use 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.
Here's an example of how you might use GNOLL: ```markdown Grindon The Brave: I want to steal from the goblin sitting at the bar. Dungeon Master: Okay, give me a stealth check! Grindon The Brave: Okay, that's a <1d20+5>
Dungeon Master: Hurrah! You successfully pickpocket the goblin! However, all he had in there were some crummy dice... ```
You can follow Grindon's full adventure through the world of dice notation in our Documentation.
Many of our notation design decisions are explained in the documentation and compared to other dice notation parsers.
Play around
Try out our web demo! ✨
Current Status
🧑💻 Language Support
GNOLL 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:
Primarily tested on Linux (Ubuntu), but functional in various forms on Windows (10, WSL) and Mac.
🎲 Dice Notation
- XdY notation
- Arithmetic
- Fate Dice
- Miscellaneous Symbolic Dice
- Shorthands & Macros
- Alternate Syntax
- Explosions
- Drop/Keep
- Rerolling
- Filtering
- Functions
There'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.
Getting Started
Usage from a package manager
Python
bash
pip3 install GNOLL
Then, in your code: ```python from gnoll import roll roll("1d20")
(0, [[12]], None)
(return code, final result, dice breakdown (if enabled))
```
Or, use the command-line interface (see --help):
sh
$ python3 -m gnoll 2d4
6
$ function gnoll() { python3 -m gnoll --breakdown "$@" ; }
$ gnoll 3d6 + 10
[5, 5, 4] --> 24
🛠️ Installing From Source
Basic Requirements
bash
sudo apt-get install bison flex make python3-pip -y
pip install -r reqs/requirements.txt
make all
To verify your setup, try our tests:
bash
make test
Or, just try some commands yourself!
bash
$ ./build/dice 1d20
20
If you would like to run the 'dice' command from anywhere, use make install to add the executable to your path.
(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 #))
For languages other than Python/C/C++ call the corresponding make target after the commands above.
🐛 Issues / Bugs / FAQs / Feature Requests
If you encounter any issues or have any ideas, please file them in our Issue Tracker.
✋ Contributing
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
🔢 Versioning
We use SemVer for versioning. For the versions available, see the tags on this repository.
🤹 Authors / Contributers / Attributions
- Ian Hunter - Main Developer - Ianfhunter
See also the list of contributors who participated in this project.
📃 License
This project is licensed under the GNU General Public License v3.0 - see the LICENSE.md file for details.
Individual licensing arrangements can be made if this is an issue for your project - Contact Me at LinkedIn to discuss.
👏 Acknowledgments
- Billie Thompson - README & Contribution Templates - PurpleBooth
- Markdown Badges
🏗️ Built With
- Flex & Bison - Grammar Lexing & Parsing
- uthash - C hashtable lib
- PCG - Random Number Generation
- Arc4Random - Random Number Generation (Cryptographically secure)
- Love! 💖
💰 Donate
Owner
- Name: Ian Hunter
- Login: ianfhunter
- Kind: user
- Location: Meath/Cavan, Ireland
- Company: AMD
- Website: http://ianhunter.ie
- Repositories: 110
- Profile: https://github.com/ianfhunter
AI Engine Software Engineer @ AMD/Xilinx. Ex-Intel/Movidius
JOSS Publication
GNOLL: Efficient Multi-Lingual Software for Real-World Dice Notation and Extensions
Tags
Perl C Go R Java Julia statistics board games ttrpgs game designCitation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: >-
GNOLL: Efficient Multi-Lingual Software for Real-World
Dice Notation and Extensions
message: 'If you use this software, please cite it using the following metadata'
type: software
authors:
- given-names: Ian Frederick Vigogne Goodbody
family-names: Hunter
email: ianfhunter@gmail.com
name-particle: Ian
orcid: 'https://orcid.org/0000-0003-3408-8138'
identifiers:
- type: doi
value: 10.21105/joss.04816
description: JOSS Paper
repository-code: 'https://github.com/ianfhunter/GNOLL'
url: 'https://www.ianhunter.ie/GNOLL/'
abstract: >-
GNOLL is an open-source library for parsing commonly used
dice notations in gaming system
research and/or software development. GNOLL is performant,
supports most popular and obscure
notations, has permissive licensing, and is integratable
into many other systems due to it being
written in C
keywords:
- dice notation
- dice
- board games
- tabletop roleplaying games
license: GPL-3.0
commit: 3bd126678e4c87b652eabe535701faec8d0fab04
version: v4.3.2
date-released: '2023-01-17'
GitHub Events
Total
- Issues event: 2
- Watch event: 5
- Delete event: 7
- Issue comment event: 25
- Push event: 29
- Pull request event: 16
- Fork event: 1
- Create event: 8
Last Year
- Issues event: 2
- Watch event: 5
- Delete event: 7
- Issue comment event: 25
- Push event: 29
- Pull request event: 16
- Fork event: 1
- Create event: 8
Committers
Last synced: 5 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Ian Hunter | i****r@g****m | 1,659 |
| deepsource-autofix[bot] | 6****] | 46 |
| Kineolyan | k****n@p****m | 22 |
| CodeWAdi | 1****i | 12 |
| infiniteverma | v****5@g****m | 7 |
| Matthew Fernandez | m****z@g****m | 3 |
| Snyk bot | s****t@s****o | 3 |
| Frey | t****7@g****m | 2 |
| Kodi Arfer | K****t | 2 |
| Will Jones | f****1@g****m | 2 |
| oliviacarino | o****o@g****m | 2 |
| Daniel S. Katz | d****z@i****g | 1 |
| DeepSource Bot | b****t@d****o | 1 |
| Michael McDermott | m****d | 1 |
| Pyr0x1 | P****1 | 1 |
| aswarth | m****y@g****m | 1 |
| itsagift | 3****t | 1 |
| kai | k****4@g****m | 1 |
| whitesource-bolt-for-github[bot] | w****] | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 63
- Total pull requests: 124
- Average time to close issues: 6 months
- Average time to close pull requests: 8 days
- Total issue authors: 7
- Total pull request authors: 7
- Average comments per issue: 1.32
- Average comments per pull request: 1.18
- Merged pull requests: 102
- Bot issues: 0
- Bot pull requests: 14
Past Year
- Issues: 4
- Pull requests: 18
- Average time to close issues: N/A
- Average time to close pull requests: 4 days
- Issue authors: 3
- Pull request authors: 1
- Average comments per issue: 0.5
- Average comments per pull request: 1.5
- Merged pull requests: 15
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- ianfhunter (53)
- steven-murray (4)
- Kodiologist (2)
- defunky (1)
- K900 (1)
- JuliaTagBot (1)
Pull Request Authors
- ianfhunter (147)
- deepsource-autofix[bot] (14)
- snyk-bot (3)
- michaeljmcd (2)
- Kodiologist (2)
- danielskatz (1)
- InfiniteVerma (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 4
-
Total downloads:
- pypi 294 last-month
-
Total dependent packages: 0
(may contain duplicates) -
Total dependent repositories: 0
(may contain duplicates) - Total versions: 105
- Total maintainers: 1
proxy.golang.org: github.com/ianfhunter/gnoll
- Homepage: https://github.com/ianfhunter/gnoll
- Documentation: https://pkg.go.dev/github.com/ianfhunter/gnoll#section-documentation
- License: GPL-3.0
-
Latest release: v4.5.3+incompatible
published over 1 year ago
Rankings
pypi.org: gnoll
An efficient dice notation parser with extended notation
- Homepage: https://github.com/ianfhunter/gnoll
- Documentation: https://gnoll.readthedocs.io/
- License: GNU General Public License v3 (GPLv3),MIT License
-
Latest release: 4.5.5
published 8 months ago
Rankings
Maintainers (1)
pypi.org: dice-tower
a comprehensive dice notation parser
- Homepage: https://github.com/ianfhunter/gnoll
- Documentation: https://dice-tower.readthedocs.io/
- License: GNU General Public License v3 (GPLv3),MIT License
-
Latest release: 2.3.6
published over 3 years ago
Rankings
juliahub.com: GnollDiceNotation
GNOLL is an efficient dice notation parser for multiple programming languages that supports a wide set of dice notation
- Homepage: https://www.ianhunter.ie/GNOLL/
- Documentation: https://docs.juliahub.com/General/GnollDiceNotation/stable/
- License: MIT
-
Latest release: 4.2.0
published about 3 years ago
Rankings
Dependencies
- bison *
- flex *
- build *
- cppyy *
- pytest *
- twine *
- actions/checkout v3 composite
- github/codeql-action/analyze v2 composite
- github/codeql-action/autobuild v2 composite
- github/codeql-action/init v2 composite
- SonarSource/sonarcloud-github-action master composite
- actions/checkout v2 composite
- actions/checkout v3 composite
- actions/upload-artifact v1 composite
- actions/checkout v3 composite
- actions/checkout v3 composite
- actions/upload-artifact v1 composite
- openjournals/openjournals-draft-action master composite
- Vampire/setup-wsl v1 composite
- actions/checkout v3 composite
- actions/setup-python v3 composite
- pypa/gh-action-pypi-publish 27b31702a0e7fc50959f5ad993c78deac1bdfc29 composite
- actions/checkout v3 composite
- actions/configure-pages v2 composite
- actions/deploy-pages v1 composite
- actions/jekyll-build-pages v1 composite
- actions/upload-pages-artifact v1 composite
- Vampire/setup-wsl v1 composite
- actions/checkout v3 composite
- actions/setup-python v3 composite
- actions/checkout v3 composite
- actions/setup-python v3 composite
- KyleMayes/install-llvm-action v1 composite
- actions/checkout v3 composite
- r-lib/actions/setup-r v2 composite
- shivammathur/setup-php v2 composite
- Vampire/setup-wsl v1 composite
- actions/checkout v2 composite
- actions/checkout v3 composite
- actions/setup-python v3 composite
- actions/first-interaction v1 composite
- actions/labeler v4 composite
- JuliaRegistries/TagBot v1 composite
- d20 *
- dice *
- func_timeout *
- matplotlib *
- numpy >=1.22.2
- python-dice *
- rpg-dice *
- setuptools >=65.5.1
- matplotlib *
- numpy >=1.22.2
- scipy *
