Nucleotide-count and collatz-conjecture are marked as "wip’ because i am not sure on how to treat the cases where an error is expected. I did not find a way to make the verbs to produce a domain error without calling the foreign 13!:8(45).
The track has now 12 exercises (10 of them completed).
If some tests cases don’t make sense for your exercise, feel free to ignore them (best to add include = false in their tests.toml entry). Not all test cases make sense for a track, so feel free to ignore those.
In my view, these exercises necessitate a specific type of error—specifically, a domain error—rather than a general one.
To provoke this specific error, I utilize the 13!:8 debug foreign function. However, a newcomers probably will not encounter this function before a considerable period of time.
Considering these factors, I have reservations about including the error check, as it could potentially transform straightforward exercises into more challenging ones.
An option would be to include a note specifying that the function should return empty for illegal values. This mirrors the way the Haskell track handles some similat situations by returning Nothing
About the error cases, I think I found a good middle-ground solution. For the currently implemented exercises that deal with error cases, I am making the tests pass if the solution returns empty or the proper error for the exercise. Later, I try to fit the information about the error return could fit at the intructions as an extra option.
This week, I intend to meet the 20-exercise cap and then take a deeper look at the documentation. I’ll probably add some snippet examples to the instructions for exercises with multiple inputs too.
In this PR, I’ve get to 40 implemented exercises from the 48in24 event.
I believe the track is ready to go live on the site. @ErikSchierboom@iHiD, do you have any feedback or is there anything that should be addressed before the launch?
I assume this is the message field being populated? If so, that field is one really used for error messages. Could you also show the code run bit for passing tests?
Update the average run time of the test runner
The track’s config.json has this section:
"test_runner": {
"average_run_time": 20
}
However, the test runner is incredibly fast and seems to finish almost instantaneously. Maybe set this value to 2?
Tweak docs/ABOUT.md
The about document starts with “J is a strange language”. I feel like as a student, this might not entice me to join the track Maybe this should be something like “J is an unusual language” or something like that?