6 kyu
Esolang: Tick
445 of 936user2514386
Loading description...
Esoteric Languages
Interpreters
Strings
Arrays
Fundamentals
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
A logic that works for Ruby isn't working for Haskell. There should be consistency across languages. Only 1 default test isn't helping either. We're left with having to attempt trial and error method to fix issues.
I don't know why I am encountering negative indices in Haskell. Shouldn't '>' be explicit. Even if I assume it when it's actually absent, I am not getting the results the tests expect.
python new test framework is required. updated in this fork
Approved
What's the preferred struct to use in Haskell for registers with 'infinite' memory? I'm using "Data.Map.Strict", but keep timing out.
Just a normal list? Laziness can work for you here; you can even initialise the list as
repeat 0
. You'll have to fix negative indices, but that's not hard.I'm surprised a map times out, perhaps I've been using it incorrectly.
I can only agree on both points.
I just did a
Map
-based solution as well, and it does not time out.Map.Strict
orMap.Lazy
doesn't seem to make a significant difference either.Looking at your unfinished solution, you do seem to be using
List
s andString
s as random access structures, which they are not. Try just walking the tape from left to right, and similar optimisations?thanks, it got through
are there any sequences that break the use of lists? negative index for lists acts as is. Streaming a character followed by a carriage move on the tape is a weak attempt. It is not obvious for me to use a list for memory to solve this problem.
.
List can be used for memory cells, but beware of negative indexes on the languages that support them. With a small tweak, the issue can be resolved.
What does it mean by move the data selector right or left?
This comment has been hidden.
It's not clear what should be done when a character with a code greater than 127 should be added to the output. There's a discussion here: https://www.codewars.com/kumite/5f5b6c20a098c100239da582 Some languages don't have such tests, some expect unicode codepoints, PHP expects bytes. Should the tests be added to all languages? Should the requirements in PHP be changed?
Rust translation
what is meant by "data selector"?
It's the pointer to the output.
Julia translation
This kata is a very nice entry point to the world of esolang and the brainfuck language. At the end I spent more time navigating through the links than solving the kata. Thank you.
Having only 1 sample test case is not helping my case. Even if i'm going wrong with my interpreter, I need a few other test inputs to check where i'm going wrong. Please post a couple more test case assertions. The test cases just tell me i'm wrong without showing the input string. So how do i know that the right inputs are being passed in the first place?
A few notes :
Note you can add your own tests cases or just run the full solution.
C# translation kumited, please review and approve.
Note that the CW runner output is a bit off at the moment.
Approved - However I want you to fix the issues if someone finds one.
This comment has been hidden.
It's much more likely that your code has some problems. Why not use some
console.log
and try to debug your code? :)This comment has been hidden.
Haskell translation submitted. Please review and approve if acceptable. Thanks
This comment has been hidden.
The description indicates that memory can be extended infinite in both directions. can you mark this as resolved?
Hello Krazy! Thank you, the description is good now, so I hope it will be clearer for future warriors.
Swift translation kumited. Please review and approve if acceptable.
Approved some time ago
It seems not to be working for the 'Hello world!' case. Rest of tests all pass and that is why I doubt. When the output is 'Hello wor' the instruction is '<<<<*'. This will only produce an 'o' here and not 'l' as the test expects. So the final output will be 'Hello worod!' instead of 'Hello world!'. Can you please check?
This comment has been hidden.
.
.
This comment has been hidden.
Now it works.
Ruby Translation kumited! Please accept
PHP Translation Kumited - please accept :D
Hey, I just wrote my first interpreter! Thanks for the challenge! :-)
This comment has been hidden.
This is not an issue, this is your code, that is "wrong". ;-) Something you didn't do makes some sort of unexpected incrementation which should not occur (I just pass the kata in python, so no trouble).
JavaScript Translation Kumited - please accept :D
Approved. :)