4 ms·
Sometime in the future I would like to use ocaml, but I found the user experience from 0 so difficult that I just didn't bother at all. Haskell was much friendl
by fishmaster 7y ago
Sometime in the future I would like to use ocaml, but I found the user experience from 0 so difficult that I just didn't bother at all. Haskell was much friendlier.
- badfrog 7y agoI think the language is not especially hard to learn, but since it's relatively unpopular it's definitely hard to find good resources.
- fishmaster 7y agoIt wasn't even the language itself, just the materials like you said, the tools, etc.
- yawaramin 7y agoCan you give any specifics?
- pdimitar 7y agoTooling mostly. It was needlessly difficult to make a small project and use dune to build and run it. Contrast this with Elixir and Rust where the beginner howtos are front and center. Both mix and cargo are amazing tools that are also very easy to use. Dune is rather cryptic and non-obvious. I'd definitely be much more excited about OCaml if dune and opam had good cheatsheets and proper brief manuals that don't assume anything about the proficiency of the reader. A lot of educational OCaml material is either old or imprecise. Again, start with dune. I want a brain-dead intro to it but still it should cover everything it can do, and how.
- johnisgood 7y agoYou may want to read part III ("The OCaml tools") here: https://caml.inria.fr/distrib/ocaml-4.10/ocaml-4.10-refman.pdf https://caml.inria.fr/distrib/ocaml-4.10/ocaml-4.10-refman.p... You could give https://ocaml.org/learn/tutorials/ https://ocaml.org/learn/tutorials/ a try as well, specifically this: https://ocaml.org/learn/tutorials/setting_up_with_oasis.html https://ocaml.org/learn/tutorials/setting_up_with_oasis.html For profiling: https://ocaml.org/learn/tutorials/performance_and_profiling.html https://ocaml.org/learn/tutorials/performance_and_profiling.... For debugging: https://ocaml.org/learn/tutorials/debug.html https://ocaml.org/learn/tutorials/debug.html and https://caml.inria.fr/pub/docs/manual-ocaml/debugger.html https://caml.inria.fr/pub/docs/manual-ocaml/debugger.html For unit testing: https://www.cs.cornell.edu/courses/cs3110/2019fa/textbook/data/ounit.html https://www.cs.cornell.edu/courses/cs3110/2019fa/textbook/da... and https://www.cs.cornell.edu/courses/cs3110/2019fa/textbook/testing/intro.html https://www.cs.cornell.edu/courses/cs3110/2019fa/textbook/te... You may find https://github.com/gildor478/ounit#examples https://github.com/gildor478/ounit#examples useful for both OUnit (unit testing) and OASIS (build system).
- pdimitar 7y agoThank you for posting these. I've lost some of the links and I am now bookmarking them so I don't lose them again. I got through some of them and I felt the quality of the OCaml teaching material itself is very high. No remarks there. Any syntax cognitive shock is eventually overcome and things flow pretty well. Wasn't `oasis` the legacy way of building projects? Thought everyone used `dune` now? In short, I am looking for the way that most OCaml programmers manage their project nowadays. I know this is happening through `dune` but the tool's documentation and educational material is very lacking. I don't object against the build file being LISP; when I thought about it for a minute it actually makes a lot of sense. But I need a quality material on everything you can do with `dune`. Can you recommend such?
- yawaramin 7y agoCan you give some specifics about what's lacking in the dune docs?
- pdimitar 7y agoIt has been a while. I admit I haven't read the entire tutorial and I checked the website just now -- seems like stuff has been added (and maybe modified). Looks a bit more understandable and beginner-friendly now! I'll have to give my two hobby projects another go from scratch. :) Is it OK for me to hit you up on OCaml's Discourse forum if I need help or want to give extra feedback when I am able to, in the future?
- yawaramin 7y agoSure, happy to help.
- gopiandcode 7y agoI think the documentation would benefit from suggesting the use of the `dune init ...` commands for beginners - ideally somewhere on the github readme or the readthedocs quickstart. When starting out with OCaml, as I was more accustomed to makefiles, the process of setting up dune projects was a major hurdle. I later found the init commands while looking through the man pages, and was surprised it wasn't more clearly mentioned in the project documentation.
- fishmaster 7y agoFor me it was very difficult to setup/understand/use the following: build tools, dependency management, installing and using libraries, installing and using a specific library for working with unicode strings ("Camomille"), working with strings themselves, etc. I spent a couple of evenings on that and gave up because I just wasn't getting anywhere.