This Repository contains files relating to the various exercises and tutorials I completed for learning Ocaml. The motivation to learn OCaml is that this language is used for some aspects of the product development at my company. I started knowing nothing about either OCaml, nor Functionl Programming, nor FL (Functional Languages), nor ML (Meta languages). Each Activity below is accompanied by a folder in which I have kept the content related to thta activity.
I started in a similar way as I did when learning C and Python, just by creating scripts that I could execute and see the output. https://riptutorial.com/ocaml/example/7096/hello-world was my starting point. I then tried following https://dev.realworldocaml.org/guided-tour.html but executing the example in the .ml files instead of top-level. This proved difficult for a biginnner because the syntax is actually (and frustratingly) quite differnt between the script and the top-level.
I transitioned to following the Guided Tour from RealWorldOCaml https://dev.realworldocaml.org/guided-tour.html This cource assumed that I was using a 'top-level' that was initialized with jane Street 'Base' or 'Core' libs. My organization is not presently using these libs, so this learning pathway resulted in a bit of friction. Note: the content related to this activity is very dis-organized.
I transitioned to reading through and following the examples in the OCaml Manual: https://ocaml.org/manual/index.html this did not make any assumptions about the top-level libs, and therefore i could use: https://try.ocamlpro.com/ to impleement and evaluate OCaml in the browser. Note: the content related to this activity is organized as follows: OCaml_Manual.ml contains the code copied from my try.ocamlpro.com session. Mostly this is retyped content from the examples. Retyped content is ussful when in the early stages of learning a language as retyping is a good way to learn the basic syntax and idioms. Occasionally there are personal exercises where I will have an idea of how I can challenge myself to try something slightly different than the exmaple content to test my knowledge of what i have learned so far. These are indicated by leading and trailing comments of the form (* personal exercise start*) and (* personal exercise end*), such that these can be found easily by searching the code.
For the porpuse of reporting the time it took for me to learn various parts, I have kept a detail log of the time spent, and what I learned. https://docs.google.com/spreadsheets/d/1EjtlMiWCFRwPfY1HU-veXlC_bL-cR8ZGAxN42yx2dAA/edit?usp=sharing