Ad
  • Default User Avatar

    Thanks for the quick fix, as minor as it might be.

  • Default User Avatar

    Minor issue, but the Java example test has the order of expected and value inversed. It's stating 'Expected null, got HEY JUDE'.

  • Default User Avatar

    I'm aware, that's why I didn't mark it as ISSUE. It's just a remark to express my frustration at Codewarriors refusing to let me continue working on this kata.
    Given that the github bug report for this issue is already a month old with not even a response, I'm not expecting it to be fixed anytime soon, though.

  • Default User Avatar

    Seems someone already told him that part 4 days ago (checking comments further below).

    And yeah, Java is a special snowflake when it comes to asserts.

  • Default User Avatar

    I've already implemented a Brainfuck interpreter in another Kata and was completely aware of how the [] commands are to be implemented. And yes, certainly a couple dozen people previously did so, as well.
    Doesn't change the fact that it's a, from a formal perspective, insufficient/unclear/false description.

    Sorry for paying this much focus to minor details, but I'm working in IT, and currently (again) sitting in a project that is going 200% trainwreck exactly because the customer keeps throwing insufficient details in the requirements at us. Therefore, I usually apply high standards to any kind of 'description' that stems from someone who should have the technical knowledge to actually make it a flawless description.

  • Default User Avatar

    And sadly, here I've got to stop because Codewarriors suddenly keeps throwing
    'Unexpected token { in JSON at position'

  • Default User Avatar

    Java Example Test 'assertEquals (Boolfuck.interpret (".", ""), "");'
    '.' is not a valid command, and how to deal with invalid code is not specified in description. I'll assume it was supposed to be a ; but the translator messed up.

    Albeit there seems to be a test dedicated to throwing invalid commands at you, again, not specified in the description.

  • Default User Avatar

    Unclear description:
    '[ - If the value under the pointer is 0 then skip to the corresponding ]'
    '] - Jumps back to the matching [ character'
    pointer is 0, skip to ], jump back to [, skip to ], jump back to [...

    Should read 'skip to the instruction FOLLOWING the corresponding ]', or contain the proper brainfuck description of performing a pointerCheck at the ] as well.

  • Default User Avatar

    Java Example Test 'assertEquals (Boolfuck.interpret (";", ""), "\u0000");' seems icky.
    My implementation can run the more complex Hello World test just fine, but fails this one with
    'expected:<[]> but was:<[]>'

  • Default User Avatar

    For the java tests, the expected and found values are switched up.
    'expected:<[]> but was:<[Codewars]>' on an empty implementation.

  • Default User Avatar

    Unclear description: 'Duplicate the nth value from the top of the stack.'
    Where to? Top of the stack? Same position as the duplicated value?
    After running the tests, it actually turns out it wants the 'n+1 th' value duplicated to the top of the stack. Clarification, please.

    False information: 'The Java implementations will use an InputStream instance for input. For InputStream use readLine if the program requests a number and read if the program expects a character.'
    InputStream does not provide a readLine method. If your implementation of InputStream does, provide it's class as parameter to the execute method, not the abstract.

    Unclear description: 'Read a number from input, a, Pop a value off the stack, b, then store a at heap address b.'
    Due to the absence of the ability to read Lines, should explain that you have to filter/seperate by line terminators.

    Error: '/WhitespaceInterpreterTests.java:67: error: no suitable method found for execute(String,InputStream,OutputStream)'
    The pre-implemented code of the Java solution should contain an OutputStream parameter for the execute method.
    Note that, after I edited the execute method's parameters (which should never be a thing for a non-puzzle kata), the Example Tests naturally wouldn't compile anymore.

    Undefined behavior 'Expecting exception for unexpected return outside of subroutine call'
    Description does not mention that you must throw an error upon passing a 'terminate subroutine'.

    False information: 'The Java implementations will support an optional OutputStream for output.'
    If you write tests which fail if OutPutStream isn't used, it's not optional, but mandatory.
    As well, it's messily done, too, since half the tests don't even provide an 'optional mandatory' OutputStream, but expect your method to recognize that and write to the output String instead.
    Which would be sort-of-okay IF it would have been describes as such.

    And lastly, WHY do you suddenly expect me to write outputStream data if the PROGRAM CODE itself is incorrect and cannot even be compiled.
    Which is, in my oppinion, completely nonsensical. And even under the assumption that this kata is supposed to be esoteric and therefore includes nonsensical restraints, it should have been mentioned in the damn description that on-the-fly-evaluation is MANDATORY to fullfilling the test cases (based upon the 'OPTIONAL OutputStream' by the way).
    I'm not ashamed to claim I have solved the latter issue by hacking static return values into the code, especially since apparently the author of this kata considered writing unclear descriptions of a higher priority then writing basic randomized tests.

    Overall, a great idea for a kata, with enough length and complexity to be worth of a 1kyu assignment,
    but DAMN the description is horrible.

  • Default User Avatar

    I stumbled upon an interesting bug in the Java version: After getting stuck at one point, I used System.out.print to write myself some info about the point at which I got stuck.
    At one point, I forgot ending the printout with a \n, and as a result the Test aborted, printing the 'expected ...' assertion error to the system console after my text, and greenlighting the entire code. Despite it obviously not working yet.
    After adding the missing \n, this issue did not occur anymore, thus I assume there's some funky interaction between unclosed print lines and Codewarrior's way of detecting Test failures.

    In any case, managed to solve the one stuck condition with a bit of whacky hacking, and now my algorythm works. Very nice and enjoyable kata!

  • Default User Avatar

    Of course, I only vaguely examined the first couple solutions presented to me, and all of them very significantly longer. Or maybe I simply missed your short solution amidst the walls of code.

    Come to think of it, I appear to have implemented a two-pass compiler in my solution. Amusing to only notice it in retrospective.

  • Default User Avatar

    Finally managed to find both the time and determination to complete this.

    Hilariously enough, my solution is a fair bit shorter, and yet very descriptive and simple, then a few other solutions.

  • Default User Avatar

    Tests (including the example ones) should be split into seperate test methods per test.
    Yes, that would make writing the tests less trivial, but in return you could 'pass' the single methods.

    I had a rather ugly-to-track NPE whilst testing pass2, only to figure out that it was actually caused by the simulation of the pass3(p2) result (unimplemented null at the time), after the pass2 test had 'silently' succeeded.

  • Loading more items...