Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
I believe the last sprintf call will write 0 outside of the allocated buffer.
It's added at first, but then removed by replacing the space char with 0.
Null-terminator for the resulting string. '\0' should be equivalent to 0 in this case.
Non-zero would be considered a valid pointer by the client code.
It shows me my version as deprecated and your one as approved. I suppose this is how it should be.
Approved by someone
Apparently I posted my solution in your name. :D ... wasn't sure how that worked.
So it turns out that updating ghc (and thereby hspec), the stdout's get properly captured and grouped under the its. Then I addressed the other things I mentioned.
I suppose you can submit your solution now. x)
Me, I will be seeing about claiming my internet points.
Alright. Consider it dealt with. Thank you!
You may fork it if you want, although I'm not sure if there is any value in this attempt.
Apparently I can't reject my own translation, so I'll be grateful if someone rejected this for me.
Hello!
This is an abandoned attempt. I should probably delete it.
Hello. So uhm. The deal is that someone promised me EIGHT internet points if I reviewed this, and I can't turn that down. So here goes -
This translation has been sitting here for ages, which is a shame. But I see you're still around!
I do have an objection, which is that there's a bunch of stdout under
describe "highlight"
, somehow not under anyit
, any test output should be in theit
's.Also, some tests lack such output, and also don't show input,. This is inconsistent. I want every test to behave the same, ideally the quickcheck ones as well.
I'd also like to see the
describe "highlight"
removed, it's really just an added layer of nesting.I'm not sure what language you're translating from, but looking at the current python tests, they have a much lower weighting on digits. Not a big deal perhaps.
I'll do a precursory check on test correctness in a bit (by implementing my own solution), but for now I'll ask if you would like to address the inconsistent test output yourself or if you'd prefer that I adopt it by forking it.
No, the solution doesn't matter at all! You can use any solution you want.
Haskell translation
Couldn't figure out how to make regex work in Haskell. I hope it doesn't really matter if solution isn't exactly "translated".