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.
Error messages in javascript are useless:
Fixed test only tests queen promotion and en-passant by black.
Worse, random tests doesn't even test en-passant, so en-passant by white is never tested at all.
Square
andMove
should really be defined in Preloaded and not by user code.Bad "random_strings" test:
parse '(|(9?iXZVg"))' = '' shouldBe '(|(9?iXZVg"))'
You can see after the first
(
there is a|
. Empty string is not a valid regexp (in this kata), so''
is the correct result.Kotlin:
Str(listOf(Normal('a'), Normal('b')))
Parsing "ab": expected:<[ab]> but was:<[(ab)]>
This comment is hidden because it contains spoiler information about the solution
The haskell reference solution takes minutes to pass the python tests - the performance requirements are very different.
(the haskell reference, and presumably many submitted solutions, including my own, choke on nested expressions, presumably they end up doing a bunch of horrific backtracking - can they (parser combinator solutions) be written to be fast?)
Kotlin translation. Please, review and approve (the author might be inactive).
Python version is so broken I passed by pressing attempt a couple of times until I saw green and just clicked "submit". One of those cases where you push to prod and quit I guess.
The comments below mention all the proglems I was going to mention so can this kata be removed? Clearly in so many years nobody thought it needs fixing.
This comment is hidden because it contains spoiler information about the solution
It should be tested that the user does not verify double
Or
correctness by simply checking that the first character on the right side is"("
:"a|b|c"
- parser thinks this input is wrong"a|(b|c)"
- parser thinks this input is correct"a|(b|c)|d"
- parser thinks this input is also correct because"("
comes after"|"
, although the input is invalidIt is not stated whether deeply nested stuff like
"(((a)))|((b))"
is valid, and it must be tested.It is not stated what to do with cases where left and right parts of
Or
are identical. Not tested either.Stuff like
"(a*)*"
is not tested.It should be stated that every step in a stringified recipe must end with
"\n"
.Loading more items...