Initial diamond text support in test suite#855
Initial diamond text support in test suite#855sshine merged 6 commits intoexercism:masterfrom chiroptical:diamond_data_text
Conversation
There was a problem hiding this comment.
Thanks for the PR!
You seem to have uncovered a pretty significant problem of #841:
Test suites with property tests don't overload as easily as when we only need to compare for equality.
I can think of three approaches, one of which you have picked:
- Write a thin
ToStringclass, as you did. - Use an existing low-dep package like
string-conversionsto do the same. (It does pull inbytestringfor no purpose beyond letting people solve the exercise with that, too. This exercise only has byte-sized characters in input and output.) - Consider going
Text-only for this exercise and future exercises in a similar situation. Since diamond is currently unlocked by hello-world, maybe this has implications, and maybe that's okay as long as the stub has the right imports; this isn't set in stone, and it's a principal decision either way. - (Edit: In the spirit of my co-maintainer) Or something else entirely.
I am inclined to let you decide, but we can give @petertseng a couple of days to respond.
|
@barrymoo: What would you prefer? |
|
By the way, just so my position is known: I agree this is unfortunate. I'm tentatively open to any of the proposed solutions, and don't have any to add at this moment. I think we're waiting for something to be added to the README, yes? |
|
Yes, I'm sorry, I completely forgot that. @barrymoo:
This will merge the hint with README.md in such a way that passes CI. |
I really don't think this is a decision I should make. I am split between |
|
The |
|
@barrymoo: I'd go with |
|
I'll update this PR tonight with |
sshine
left a comment
There was a problem hiding this comment.
Hi Barry, thanks for your work.
I've pushed two small changes to the feature branch.
I think this is ready to go. As per our recent custom, I'll give other maintainers 48 hours to interject.
(The rest of this is partly a note to myself, partly a recognition of the pain points you experienced in contributing.)
I saw parts of your twitch stream and collected notes where my specification was unclear to remind myself to document and/or provide this information in the future.
.meta/hints.mdis optional and can be created if it doesn't exist.- Hard to find examples of hints in exercises: Caused by a bug we're fixing in #864.
- Saying
diamond :: Char -> Maybe [Text]in the hint twice does seem superfluous. Let's keep it like this for now. We can revisit changing theData.Texthint into a shorter form for all exercises for which this applies.
As for:
- "Do I really wanna put
configletinbin/?" I had mixed feelings. - "problem-specifications: Path not found": Kudos for assuming this was an Exercism repo.
I should have told you that bin/ensure-readmes-are-updated.sh fetches configlet and clones the problem-specifications repo for you; I forgot to tell you this, because I use configlet directly; the advantage of bin/ensure-readmes-are-updated.sh is that it automatically downloads dependencies if they're not already available.
- Your quest to explore the CI log: You initially overlooked the error and stopped at the second occurrence of red color, which happened to be a false negative. (This is addressed in #783, but not solved yet.)
|
As a side note unrelated to the completion of this pull request, toString :: ConvertibleStrings a String => a -> Stringthat fixates the output type. Some people (such as the author of the A comparable example you may have run into is when you write because "what |
Add
Data.Textsupport fordiamondfrom #841@sshine Should I just modify the
README.mdor add a.meta/hints.mdsimilar to https://github.com/exercism/haskell/blob/master/exercises/bob/.meta/hints.md?