Add Sleep Sort in Scala#4495
Conversation
There was a problem hiding this comment.
Hey @Dani-DEV28! Thanks for contributing to this project! We are a rather small team, so it may take some time to process this request. In the meantime, there are several ways you can make yourself a part of The Renegade Coder community. For instance, you can:
- Subscribe to the monthly newsletter
- Become a patron
- Join us on Discord
- And, check out the rest of the list which includes links to The Renegade Coder YouTube channel and Twitter account
Thanks for your help!
There was a problem hiding this comment.
Please take a look at the project requirements. The error messages are incorrect. In order to avoid a lot of duplication, I'd recommend making invalidChecker just return true or false. If invalid, display the common error message.
rzuckerm
left a comment
There was a problem hiding this comment.
Better, but still not right. Please see the project requirements, specifically, this section: Sleep Sort Invalid Tests
rzuckerm
left a comment
There was a problem hiding this comment.
Looks like you have a type mismatch error
|
I don't if I understand the test cases too well, but I think I found a issues with the test generated: I believe my issues with the test stem from that the extra (') in the in_param, because I do know if manual type all the test case on my local build they sort, but the test report that my code doesn't pass. I was wondering where can I go about modifying the test_sleep_sort.py file, because when I modify it directly, it regenerate to before modification after running the glotter test command |
|
The |
|
If you are running glotter locally, when prompted for the parameter, do not use the single quote. For example, you would enter "9, 8, 7, 6, 5, 4, 3, 2, 1". |
|
According to this article, using |
|
One final comment, when you are ready to do the final submission, please remove all the commented out code. It adds clutter. |
|
@Dani-DEV28 You're really close on this one. Please consider changing |
rzuckerm
left a comment
There was a problem hiding this comment.
Thanks for your contribution @Dani-DEV28 . The key to getting this working was to add blocking around the Thread.sleep call and to use output.synchronized instead of this.synchonized. I'm not a Scala programmer, so I turned to ChatGPT to help me with these changes. I ran the GitHub workflow 10 times to make sure that there were no surprises since we've been bitten before by buggy implementations of Sleep Sort before.
Congrats on taking the first step to contributing to the Sample Programs repository maintained by The Renegade Coder!
For simplicity, please make sure that your pull request includes one and only one contribution.
Please fill one of the sections below as applicable.
Please also add any other relevant information to the Notes section at the bottom.
You may delete or just ignore any other sections.
For more information please refer to our contributing documentation
I Am Adding a New Code Snippet in an Existing Language
Other Notes
Modify the .gitignore to exclude .metals and .scala-build