ReasonML is Facebook’s OCaml for JavaScript.<p><a href="https://reasonml.github.io/" rel="nofollow">https://reasonml.github.io/</a><p>They have used it extensively:<p><a href="https://reasonml.github.io/blog/2017/09/08/messenger-50-reason.html" rel="nofollow">https://reasonml.github.io/blog/2017/09/08/messenger-50-reas...</a><p>With impressive results:<p>“ Messenger used to receive bugs reports on a daily basis; since the introduction of Reason, there have been a total of 10 bugs (that's during the whole year, not per week)! *”
Very nice practical and modern textbook for OCaml. I were using it last year to teach this subject at my school. Here are my additional notes and exercises, if you are interested: <a href="https://a-nikolaev.github.io/fp/" rel="nofollow">https://a-nikolaev.github.io/fp/</a>
I don't know why they felt they had to mess with OCaml's syntax - one of the nicest around AFAIC. With F#, even MS didn't feel like they had to add extra braces and other baggage and change keywords ("match" to "switch ()", etc.) to make C# programmers have an easier first ten minutes of transition time.
An great course and a very good professor. I'm glad they've compiled the course into an ebook. It's the only way I can think of FP, so I'm glad I can know point people to the same source I learned it from.<p>It would be quite awesome if they made it fully interactive; in the vein of several other textbooks that have been shared on HN recently.
If you want to access RESTful APIs via OCaml, you may consider using OpenAPI Generator to generate the OCaml client automatically instead of manually creating one. Here are 3 simple steps to do so:<p>1. Download the OpenAPI Generator CLI Java JAR (<a href="https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.3/openapi-generator-cli-4.2.3.jar" rel="nofollow">https://repo1.maven.org/maven2/org/openapitools/openapi-gene...</a>)<p>2. Rename the JAR as "openapi-generator-cli.jar"<p>3. Run the following command to generate an OCaml API client for the Petstore API (<a href="https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml" rel="nofollow">https://raw.githubusercontent.com/OpenAPITools/openapi-gener...</a>):<p>Mac/Linux:<p>$ java -jar openapi-generator-cli.jar generate -g ocaml -i <a href="https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml" rel="nofollow">https://raw.githubusercontent.com/OpenAPITools/openapi-gener...</a> -o /var/tmp/ocaml/<p>Windows:<p>$ java -jar openapi-generator-cli.jar generate -g ocaml -i <a href="https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml" rel="nofollow">https://raw.githubusercontent.com/OpenAPITools/openapi-gener...</a> -o C:\tmp\ocaml<p>If you've any feedback or question, please let us know via <a href="https://github.com/OpenAPITools/openapi-generator/issues/new" rel="nofollow">https://github.com/OpenAPITools/openapi-generator/issues/new</a>
As I don't have a lot of time to investigate at this moment - is this intended to be a generally-standalone guide that one could use to learn OCaml? I'm guessing not, since it doesn't seem to dive in too deep into any subject, just giving a very broad overview.
I haven't used OCaml in a couple of years. has the stdlib story been improved/standardized? is there still the whole async vs jwt problem or did jwt finally win out?<p>I think i remember that there wasn't a good web framework, and that the existing popular one had a memory leak.<p>I was learning from a book (Real World OCaml, i think) and it kept pushing jane street libs like Async and Core.