-
Notifications
You must be signed in to change notification settings - Fork 3
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
Improve stdin character generation #34
Comments
Currently I believe the min and Max can be set to cover the entire ascii range of 0-255. The issue with the new line I believe is that we forcefully close stdin to prevent waiting on input. Also the test case I believe doesn't check the last character anyways so it wouldn't show up as new line unless we don't close stdin like it does now. |
The default constructor is set to the ascii range of 0x20-0x75. Which does include \n it's just a byproduct of the way it's being run that the binary isn't effected by the last character. |
Isn't |
Ah yeah, the stdin generator constructor currently had fields to set a min and max. You could try setting it lower on the test case but I believe it won't make a difference unless we risk a program hanging on stdin. |
It might be nice to be able to support multiple separate ranges in this case I guess |
Yeah ok I see what you mean, I think I misread the initial issue. I don't think it will fix the test case output however. Just a heads up null bytes may effect strlen and cause issues. |
The range implementation was to prevent null bytes causing short strings to be larger outliers than correct results. This could be replaced with a alternative constructor taking a |
Currently,
StdinCharGenerator
can only generate characters within a specified range. It would be useful to be able to specify additional characters outside of that range (e.g.\n
), to allow properly solvingtests/wyvern
The text was updated successfully, but these errors were encountered: