-
-
Notifications
You must be signed in to change notification settings - Fork 195
all-your-base: Add exercise to allow deprecation of binary, trinary, octal and hexadecimal. #167
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
Comments
Depending on how much demand there is, perhaps it would be appropriate to make the tests flexible such that either Of course, there would be questions such as "So, if we accept either I have not thought about this deeply enough to say that this above is indeed what I will recommend, but I'll put it as a suggestion in case someone else wishes to take it. |
I didn't find an easy way to accept multiple answers, so I have not implemented this feature. One of the major problems is how to keep reasonably descriptive error messages from I inserted this exercise just after Any ideas? |
Oof, good question. I also baked my own when implementing https://github.com/exercism/xhaskell/pull/107/files . I don't remember how hard I looked in |
I miss some extra functionality in I was playing with tasty and criterion and started wondering if in the future we could provide more flexible tests and some optional benchmarks... tasty-fail-fast could be useful for exercism, but I'm still trying to find a way to enable it by default. I have no idea about if it can allow multiple answers. |
It was decided in exercism/problem-specifications#276 that
all-your-base
will eventually replace the four base conversion exercises we currently have:binary
,trinary
,octal
,hexadecimal
. But, before deprecating them, we need to implementall-your-base
in this track.This exercise's interface could be something like this:
Where
b1
is the the input's base andb2
the output's base.There was a long discussion in the PR exercism/problem-specifications#280 that added
all-your-base
about how the corner cases should be handled, and it was decided that each track will have to choose the most idiomatic solution.IMHO, we should follow most of the semantics used by the package digits, but also checking for invalid digits and bases. This means that the canonical representation for the digits of zero would be zero
[]
, and that leading zeros would be always superfluous:I believe this would allow for some really simple and elegant solutions, but some people prefer to represent the digits of zero as
[0]
.It's up to the one writing the PR to decide how the cases undefined in
all-your-base.json
should be treated! 👍The text was updated successfully, but these errors were encountered: