Beta
Logging (T)error
Loading description...
Regular Expressions
Algorithms
Date Time
Parsing
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
Errors are arbitrary and the expected handling is undefined. It is only possible via repeatedly failing against the tests and guess what the author wanted.
There are no sample tests.
There are no random tests either.
Alright, thanks, enjoyed that one! It was a nice practical programming challenge for a relative Clojure n00b—helped make me feel more like a real Clojure programmer! 😁
The problems are that 1) It's a shame Clojurians don't have access to more advanced or interesting parsing libraries on CodeWars—Clojure has some fantastic options in this realm, so it's a real shame, and we don't even get the lovely spec library which starts from Clojure 1.9 😕, aaaand 2) It's quite hard honing in on the exact, specific interpretation of the data, as not only can you fail and parse less data than required, it's possible with regexes to rescue more correct data than is actually specified!
Also, I'd like to submit some sample tests, but I think the idea for this kata is that you write them yourself, isn't it...? In that case, would you mind making that clear in the in-line comments?
Thanks for the nice challenge!
I see that this kata is ideal for solving using
clojure.spec
, but unfortunately that core library isn't available in the Clojure 1.8 that Codewars supports! Hopefully there'll be an update soon. Nonetheless, I'm going to give this kata a fair go.