5 kyu

Esolang: Ticker

343 of 560user2514386
Description
Loading description...
Interpreters
Strings
Arrays
Esoteric Languages
  • Please sign in or sign up to leave a comment.
  • saudiGuy Avatar
  • dfhwze Avatar

    This kata is pure garbage, I propose to retire it.

    • many unaddressed questions and issues in the comment section
    • low quality specification
    • random tests immediately contain huge tapes, which makes this kata a debugging hell
  • akar-0 Avatar

    This comment has been hidden.

  • zLuki Avatar

    Fixed tests are not testing for 255+1 = 0 and 0-1 = 255

  • user9526662 Avatar

    fun kata, 10/10

  • gerardet46 Avatar

    C translation here!!!

  • hufftheweevil Avatar

    My solution works 100% for all the set tests, but fails on about 98% of the random tests. Anyone with any suggestions?

    Updating this comment with an 'Issue' marker.

  • ocReaper Avatar

    FYI in PHP you don't need to wrap the cell data since chr() will do that for you!

  • wneumann Avatar

    Swift translation kumited. Please review and approve if satisfactory.

  • docgunthrop Avatar

    /: set selected cell data to 0

    You should clearly state that this only applies if the current cell is within bounds. It's very difficult to debug the random test cases that have 10k commands each when specific requirements are omitted.

  • docgunthrop Avatar

    !: add new data cell to the end of the array

    Do you mean that a new cell with the value of 0 should be added to the end of the cells that are in memory? For example, if the data array's last cell with an integer value is 20, but the pointer is currently set at 50, does that mean the new cell added should be at index 21 or 51 ?

    If the cell data for index 50 is set to 0 by the / command, and the next command is !, does the newly added cell go to 51, or to the last contiguous integer-value cell in memmory? To reiterate, if cells 21 through 49 are not in memory, but the pointer is set to 50, is the added cell supposed to be set at 21 or 51?

  • henryhamon Avatar

    Ruby Translation Kumited! Please accept ;D

  • PetarDambovaliev Avatar

    Description is unclear, inconsistent and you keep calling decrement "increment -1".

  • anter69 Avatar

    This comment has been hidden.

  • donaldsebleung Avatar

    PHP Translation Kumited - please accept :D

  • kazk Avatar

    Add test for out of bounds with <, test.assert_equals(interpreter('<<<*'), chr(0))

  • donaldsebleung Avatar

    JavaScript Translation Kumited - please accept :D

    UPDATE: Apologies, I somehow broke my original translation (think it might be a Codewars issue). Please approve this one instead :)

  • donaldsebleung Avatar

    Great Kata on Esolangs, loved it, keep up the good work :D <3

    Just a few suggestions:

    1. I know that it isn't exactly easy to generate a valid random program for an Esolang but it would be great to see some random tests (e.g. randomly generated (valid) Ticker programs if possible; otherwise, just execute the fixed tests in random order)
    2. It appears that the command - has not been tested despite being mentioned in the Kata Description. It would be great to see at least 1 to 2 tests that include this command.
    3. Your Ticker specification states that the data is initialized with 1 cell only with an initial value of 0 and that the ! command is required to expand the data tape by 1 cell to the right. Perhaps you could specify in your Kata description how the interpreter should respond when the data tape isn't expanded sufficiently and the selector goes out of bounds (and possibly add a few test cases for that)?