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

fend-web does not support rendering ASCII graphs for dice probability distributions #283

Open
ThibaultLemaire opened this issue Mar 15, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@ThibaultLemaire
Copy link

ThibaultLemaire commented Mar 15, 2024

Hi,

What an awesome project, I love it.

I've noticed the web version does not produce the same output as the documentation when inputting

> 2d6
{ 2: 2.78%, 3: 5.56%, 4: 8.33%, 5: 11.11%, 6: 13.89%, 7: 16.67%, 8: 13.89%, 9: 11.11%, 10: 8.33%, 11: 5.56%, 12: 2.78% }
> version
1.4.5

and that made me a bit sad.

So I ran the nixpkgs version, and there it worked as expected!

> 2d6
  2:  2.78%  #####
  3:  5.56%  ##########
  4:  8.33%  ###############
  5: 11.11%  ####################
  6: 13.89%  #########################
  7: 16.67%  ##############################
  8: 13.89%  #########################
  9: 11.11%  ####################
 10:  8.33%  ###############
 11:  5.56%  ##########
 12:  2.78%  #####
> version
1.4.3

I didn't see anything about that in the changelog, so I'm filing it as a "regression"

@printfn
Copy link
Owner

printfn commented Mar 15, 2024

This is a known limitation of the web version currently. fend-core has the function Context::set_output_mode_terminal() which enables the fancier terminal output, but fend-wasm does not currently support setting that. This is mainly so that other web-based projects that integrate fend (like MicroPad or the Telegram bot) with more space-limited output don't get large graphs like that. It could definitely be fixed though, it would just need to be added as an optional flag in fend-wasm and then used in the web UI.

@printfn printfn changed the title Regression on dice probability distribution print fend-web does not support rendering ASCII graphs for dice probability distributions Mar 15, 2024
@printfn printfn added the enhancement New feature or request label Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants