-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
grains exercise: test against integer values as strings. #326
Conversation
has been created to expect the integral values as strings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One change to not mistakenly suggest that it will only handle large numbers.
Otherwise, I think this is looking good!
Thank you for this @glennj a lot of work when into this to not deviate too far from story, and I think it provides opportunity for learners to stretch their problem solving skills! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small typo in instructions.append.md: "beyond the integer size limitation ov Vimscript." As a nitpick, I think that "limit" fits better than "limitation".
Very nice solution. Thanks! |
There is a typo, but it is likely the change to "of" from "ov". The "limitation" word is correct, since is a language limitation, not an arbitrary limit. |
@blakelewis I would accept a patch for this, if you want to correct the "of" word that should be here. |
Sorry, I had two comments. First, change "ov" to "of". Second, I think that the use of strings lets you go past the integer limit. I am not really sure what it means to go "beyond the limitation." One might interpret that as going to even greater limitations! But it is an arguable point and I won't press it. I can make a patch to fix the typo later today |
This is the patch that I would accept for sure.
The limitation of Vimscript in terms of Integers is the reason for the example solution being what it is as a "prove we can solve the exercise as given." You are, of course, right that we by pass the limitation by using strings, but we will hit another limitation in terms of strings, which we do not even hint here (and it is not important to address for this exercise).
Sounds good. Usually we would discuss it in the forums first, but this patch is very small and discussed here instead, so it will be no problem. |
To work around Vimscripts 2^63 limit for integers, the tests have been created to expect the integral values as strings.
Following #322