Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This comment is hidden because it contains spoiler information about the solution
O(n) doesn't pass, you need better. If you're saying that the reference solution is O(n), yes, it's a problem and explains the huge variability in the time execution
=> ?
This comment is hidden because it contains spoiler information about the solution
Sorry it has been a long time since I last compiled by myself with
ocamlc
. Indeed, your solution worked but, withocamlc
, there is a need to add the-I
option so that it knows what directory it should use. The line is now:CWCompileAndRun "fibo.mli" "fibo.ml" Options "-I /opt/coq/default/lib/num /opt/coq/default/lib/num/nums.cma -w -8" Driver "
Honestly, in my opinion, it is almost always simpler to use modern tools like opam/dune when working with OCaml. I guess you were not able to do that because Opam is broken on Debian stable (I don't know it it is still broken actually ?).
Anyway, thank you for your help.
I republished and marked this issue as solved.
might work.
Changing
compile_and_run
to useocamlfind
and specifying-package num
option would be better.num
is already installed because it's required bycoq
.nums.cma
is at/opt/coq/default/lib/num/nums.cma
.Maybe
ocamlc
needs some flags becausenum
is no longer included incore
?https://github.com/codewars/coq_codewars/blob/51a7efe1f7071f94980cc35466f656d9f4370624/src/coq_cw.ml#L168
I managed to make the Coq proof ok (not deployed) for now but I still get some OCaml error. It seems that the nums.cma file is not available:
I think maybe it is necessary to install the library
num
for this new ocamlc ? I hope it could be handled by this command (if you useopam
the package manager of ocaml):opam install num
Most likely, this comes from the way my solution is written (the behavior of some tactics changed between 8.11 and 8.12): I can modify this when I have time.
Thank you for your help.
I just deployed the fix for
ocamlc
missing, but it's now failing with:Yeah, I use multi stage build for Coq image and I had to install
ocaml
on the final image.I'll let you know when the fix is deployed.
I probably broke it. I avoided compiling OCaml through OPAM this time.
Looks like there's
ocaml
but notocamlc
inPATH
.Ah, I see, I'll ping @monadius about it
I looked it up a little bit. There seems to be a problem with the CWCompileAndRun command with Coq8.12. I get the following error: "ocamlc not found".
The test for the plugin in coq_codewars repository (coq plugin) seems to still be working well with Coq 8.12.
I cannot solve this CWCompileAndRun problem on my own (but I can help by providing a solution compatible with Coq 8.12).
This Kata is not compatible with Coq 8.12 as of 08/10/2020
I agree with the statement of ipergenitsa above. Perhaps, for Coq and other theorem proving tools, it would be a good idea to differentiate between different aspects of the katas complexity (with a tag ?):
I think this particular problem would fall into the second category meaning that it is significantly harder for someone with a small background in mathematics. I personally struggled with problems of the third category (for example one using the very new feature of polymorphic universes in Coq).
Note that I may have missed the relevant tags and the respective meaning of 8kyu/7kyu etc (pointers are welcome ;) )
Loading more items...