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

DND in breaks on large numbers. #13

Closed
zamicol opened this issue Jun 27, 2022 · 7 comments
Closed

DND in breaks on large numbers. #13

zamicol opened this issue Jun 27, 2022 · 7 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@zamicol
Copy link
Owner

zamicol commented Jun 27, 2022

Probably needs to use a big int library.

https://convert.zamicol.com/?inAlph=DND%3A20&in=2020202020202020202020202020202020&outAlph=01

@zamicol zamicol added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers labels Jun 27, 2022
@zamicol
Copy link
Owner Author

zamicol commented Jun 28, 2022 via email

@yaki3355
Copy link
Contributor

Thank you for your help! Looking forward to a pr.

-Zach
On Tue, Jun 28, 2022 at 10:23 AM yaki3355 @.> wrote: Hi, ignore my pr not working for 20202020202020202020202020202020 — Reply to this email directly, view it on GitHub <#13 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABH5SRPVK2AR5IKJMKS4EKLVRMRIZANCNFSM5Z6YDTWQ . You are receiving this because you authored the thread.Message ID: @.>

Hey @zamicol
#14 is waiting for merge

@zamicol
Copy link
Owner Author

zamicol commented Jun 28, 2022

Thanks for the help!

@zamicol zamicol closed this as completed Jun 28, 2022
@zamicol
Copy link
Owner Author

zamicol commented Jun 28, 2022

BigInt's still has a max size. On my browser that limit appears to be 1024 bits. I think we might need to use something like https://github.com/Yaffle/BigInteger for integers of arbitrary size.

There might be better ways to write it as well. One of the considerations was substitution of the input string into characters so that the main conversion algorithm could be employed. Since Javascript is UTF-16, that's enough space for dice of very many sides.

For now, 1024 is good enough! If we decided to revisit this in the future I wanted to keep some notes.

@zamicol
Copy link
Owner Author

zamicol commented Nov 30, 2022

I'm reopening this issue because it appears to be broken?

https://convert.zamicol.com/#?inAlph=Hex&in=2BA34AED308AEA3427915F3E81887BC72CF5B5EA50AA89682052977C3773B925&outAlph=DND:20

Flip in and out, output is not the same.

@zamicol zamicol reopened this Nov 30, 2022
@zamicol
Copy link
Owner Author

zamicol commented Nov 30, 2022

Appears to be something with decimal: #?inAlph=0123456789&in=19737965684488488330219457478821781329850879392429569589875235152337186062336&outAlph=Hex

@zamicol zamicol closed this as completed Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants