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.
Getting odds and evens swapped? Your list has 2,3,4,5,6 appearing odd number of times, the kata states there will be exactly one that appears an odd number of times. And yes, this trick only works if the input follows the rule.
Not these issues so much now, seems to have been replaced by the 6000ms timeout being pretty random; same deterministic code, same deterministic tests, sometimes it times out, sometimes it doesn't. That's only one kata (translation) though so not great sample size.
't' is the first character that repeats, 'e' is the character the repeats first
Haskell tests seem really unreliable, maybe about 4 out of 5 attempts or more seem to result in "Unknown error" or some timeout (not the 6000ms one)
fn
a keyword not an identifier, and you can't normally name your variables as keywords can you? Iffn
is accepted as variable or function name then things likefn + 1
andfn f
andfn f + 1
should also be accepted, but I suspect that might trip existing solutions. Either way a test or two would make it less ambiguous.fn f fn => fn + 1
-- should be an error again becausefn
is a keyword.In that case maybe it's not really a performance issue. Could it be simply getting into good old infinite loop? There's only so fast you can run those...
shrug I'm guessing a solution that passed all the tests helped getting through the translation process. FWIW there's two more in addition to that so this is doable.
Are you sure you've addressed the right performance issues? A language like Befunge accesses the input grid an awful lot, a lot more than it can output and the most basic datatypes aren't always that great for performance.
Actually the Haskell tests have expected/actual values swapped, sorry about that. I don't know about fixing that though, I don't see any way to make edits to my translation, only to translate it to a new language.
It would be helpful to know which packages are available, e.g. while parsec isn't installed polyparse is.
Which version of hspec is it? I'm trying to use 'pendingWith' for a nicer behavior when test setup fails, but Test.Hspec isn't exporting it nor 'pending'?
I think the tests could cover few more corner cases, e.g. each of the following should probably be throwing errors
The "works for random strings" test seems wrong. Apparently returning Nothing for invalid regexps "a(" and "a)" is failing, is the test expecting Str [Normal 'a', Normal ')'] by any chance?