-
-
Notifications
You must be signed in to change notification settings - Fork 55
Collatz conjecture #545
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Collatz conjecture #545
Conversation
@kahgoh - I triggered the CI and gave a once-over to the files, which look fine to my eye. But the ocaml code needs a more experienced once-over than I can really give it. Looks like for PR #539, you were talking about making changes to the test generator. Would that also be something you would want here? If so, I think @TheRealOwenRees is more than willing, but would need some guidance on the details. 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for raising this PR to add collatz conjecture for the OCaml track! I've got some comments below 👇🏻
Hello and thank you for your comments. I will look into those and resolve those issues. However I cannot run the commands in the Readme as the OCaml environment does not build. I have a local switch for this and running compiler 5.1.0, as well as trying 5.1.1. I get the following errors:
I have also tried with the If you have any pointers to get this working, I am certain I can finalise this PR. Thanks |
I believe to have fixed this. I will submit a PR for troubleshooting / installation guide updates another time, after finalising this PR. |
I will need to write a special case for the test, where |
Test template added. However it is generating multiple tests for
|
The test generator doesn't handle the If you're up fixing this limitation that would be greatly appreciated 😁. You'll probably need to dive into the test-generator code. I think the points of interest are:
If not, that's okay too 😉 . In this case, let's just mark the test generation broken by adding a |
Also, Github is reporting a merge conflict on |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is looking good! A couple of minor comments.
.gitignore
Outdated
_opam | ||
|
||
node_modules |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you've accidentally added node_modules
? Could you please remove.
|
||
(* filter original cases whose UUID is referenced in "reimplements" *) | ||
let reimplemented_uuids = get_reimplemented_uuids cases in | ||
let filtered_cases = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The alignment seems a little off. Should this be indented?
node_modules/.lsp/debug.log
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file has been accidentally added again 😅.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh dear, this is why I added that line to the .gitignore. My environment likes to add a debug file for some reason. I will delete and resubmit. Apologies for the inconvenience!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I was kinda curious what might be causing it be generated and added .... At least in my environment, I haven't seen node_modules
get generated, although my OCaml version is 4.14.2...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am running a 5.1.1 global switch for this as the Readme stipulates OCaml 5.1 is needed. Perhaps this is the cause of the issue!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Readme stipulates OCaml 5.1 is needed
Oh that's interesting! I had my environment set up a long time ago based on the track docs which says 4.08.0 😅. We should fix that - I'll add that as a separate issue later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was actually going to submit a PR for this later in the week! I would be interested to see if you have any dependency issues when installing this according to the readme. I had the compiler version errors listed in an earlier comment here, but have a fix. I just need to make sure it is not just me with the error !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I've just created #546 to note this version discrepancy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this looks good!
add-practice-exercise
script to generate new practice exerciseIssues:
configlet
would have been better to create the exercise