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.
Suggestion: Add HEAP tag.
Hi,
Could somebody please explain why code below is not valid and should throw error:
I've made an incomplete Rust translation. I gave up on translating advanced tests, random tests and the optiming brainfuck interpreter from other languages, since the code is really hard to understand. Nevertheless, it has a complete solution, a basic brainfuck interpreter, all fixed tests and all invalid input tests. Maybe someone else can translate the rest. Or maybe it can be approved as is, so that people can have at least some fun with writing a compiler in Rust. I spent a lot of time on this
Link in description have content removed.
But I found it here:
https://www.reddit.com/r/ProgrammerHumor/comments/ba55q2/i_present_you_the_miracle_sort
You cannot "import typing" in Python 3.10 when testing.
Error below:
Traceback (most recent call last):
File "/workspace/default/tests.py", line 2, in
File "/workspace/default/solution.py", line 2, in
File "/workspace/default/preloaded.py", line 11, in
File "", line 1027, in _find_and_load
File "", line 1002, in _find_and_load_unlocked
File "", line 945, in _find_spec
File "/workspace/default/.venv/lib/python3.10/site-packages/_distutils_hack/init.py", line 88, in find_spec
TypeError: str.format() argument after ** must be a mapping, not int
If you didn't intend this to be valid
then you should change
to
At least in Python, this is never tested. Same issue as below. Please either remove the requirement or put it in the Error Handling section and add a test case.
At least in Python, this is never tested. Test cases should be added or the requirement should be removed.
My current solution fails on such cases locally, but passes all fixed tests before timing out on random tests for unrelated reasons.
Is there a limited, unlimited, or undefined number of vars allowed to be defined?
In Python,
End before begining a block
test contains an unintended syntax error at line 2:The spec doesn't allow unescaped
'
in strings (see String and CharElement definitions). This input should never be tested, because it's not listed in theError Handling
section. My current solution passes this test just because of a lexer error, without recongizing an unmatchedend
. I suggest changing the code to justOther languages probably need this fix as well.
In Python, extected and actual outputs from interpreted BF are compared as strings, so error messages from the test framework look like the following:
However, many
msg
s feature numbers and not strings, and I have to decipher them every time. I suggest also printingexpected
andactual
as lists of ints. Currently,expected
is already printed this way:but not
actual
. So I'm essentially asking to includeactual
too. Maybe this applies to other languages as well.Dart 2.14 should be enabled.
What does it do with a proc that uses a variable defined before the proc definition in a call before the variable definition?
Something like
Would that be a variable accessed before definition error because of macro-style rules?
I think there is an error in random tests for C. My solution passes all static tests and a few hundred random tests before causing this error:
Test Crashed
Caught unexpected signal: 6
Maybe there is a memory leak in the random test generator? I tested my solution locally, there are no crashes, Valgrind shows no memory issues and even after running my code in an endless loop ram usage is constant.
Python new test framework should be used (Refer this & this for more detail)
Ruby 3.0 should be enabled (Refer this & this for more detail)
Loading more items...