Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dice stats #105

Merged
merged 75 commits into from
Feb 6, 2022
Merged

Dice stats #105

merged 75 commits into from
Feb 6, 2022

Conversation

L0neGamer
Copy link
Collaborator

@L0neGamer L0neGamer commented Jan 4, 2022

adds a subcommand to roll that performs statistics on the given expression
the statistics are turned into a graph which is uploaded to discord

This is feature complete, allowing any expression to be turned into a distribution, which can then be analysed and prettified (ie turned into a graph and means and modal values extracted).

Other notable changes are additions to the docs, removal of the parameterised monad in funcinfobase, modifications to the expression parser to try and get better error messages (that failed, but keeping the changes), changes to the command parser to give better errors as well.

finnbar and others added 24 commits December 6, 2021 10:09
… to have half implemented keep/drop, onto rerolls and integration
@L0neGamer
Copy link
Collaborator Author

#66 is the issue related to this branch and PR

Copy link
Collaborator

@finnbar finnbar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First off, this is all very cool and seems to generally hold up to testing - my comments are mainly documentation-related. I also have a few comments from my testing, which I reported to you on Discord but I'm repeating here:

  • !r 6d reports two different errors, one with "couldn't" and another with "could not". Probably should be standardised, and maybe report one error if possible.
  • Missing bracket errors (e.g. !r maximum({d2, d2) and !r maximum({d2, d2}) report the parent WithError rather than a more useful child error. Use <??> if you ever want to escape out of the WithError's error. (Maybe comment on <??> with that?)
  • !r 2d(d6) is incorrectly flagged as an error.

Otherwise, looks amazing!

docs/Roll.md Outdated Show resolved Hide resolved
src/Tablebot/Plugins/Roll/Dice/DiceData.hs Outdated Show resolved Hide resolved
- monoid-extras-0.6.1
- statestack-0.3
- diagrams-rasterific-1.4.2.2
- git: https://github.com/L0neGamer/haskell-distribution.git
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as discussed on Discord this is absolutely fine - something to consider when we next update packages

src/Tablebot/Plugins/Roll/Dice/DiceStats.hs Show resolved Hide resolved
src/Tablebot/Plugins/Roll/Dice/DiceStats.hs Outdated Show resolved Hide resolved
src/Tablebot/Plugins/Roll/Dice/DiceStats.hs Outdated Show resolved Hide resolved
src/Tablebot/Plugins/Roll/Dice/DiceStats.hs Outdated Show resolved Hide resolved
src/Tablebot/Plugins/Roll/Plugin.hs Outdated Show resolved Hide resolved
Copy link
Collaborator

@finnbar finnbar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with changes made.

@finnbar finnbar merged commit adba846 into WarwickTabletop:main Feb 6, 2022
@L0neGamer L0neGamer deleted the dice-stats branch February 10, 2022 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants