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

OverFlow Error #272

Closed
bquinn17 opened this issue Apr 3, 2018 · 3 comments
Closed

OverFlow Error #272

bquinn17 opened this issue Apr 3, 2018 · 3 comments

Comments

@bquinn17
Copy link

bquinn17 commented Apr 3, 2018

I was wondering if I could get some more information on issue #169 that was closed before, and why it was decided to be handled that way. The value FFFF is equivalent to 65535 in decimal, not 32767 so I'm not sure why the error is thrown at that value. Also, the original MARIE implementation would not throw an error when the value FFFF was passed. It would simply wrap around to a negative number, and continue to be incremented from there. This is also the same way overflows of primitive types work in most programming languages.

@bquinn17
Copy link
Author

bquinn17 commented Apr 3, 2018

I just realized the value 32767 is used because you're using a signed decimal representation.

@ericjiang97
Copy link
Member

Hi,

Thanks for submitting an issue!

While, we do agree that we shouldn't handle Overflow Errors. We have encountered with end-users that when it goes beyond the range -32767 to 32767, it slows down their browser and may cause crashes (especially on low end devices), to make it more crash 'gracefully' we decided to make it throw an error when it goes beyond the range.

If you have have a better solution, feel free to fork this project and make a Pull Request.

@auroranil
Copy link
Member

PR #328 has been merged. It should fix this issue.

@auroranil auroranil removed the wontfix label Feb 18, 2024
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

No branches or pull requests

3 participants