I’d be interested to know what you found lacking in Quickstart — Dune documentation
I’m sure it could be improved.
I’d be interested to know what you found lacking in Quickstart — Dune documentation
I’m sure it could be improved.
The community is pretty eager to act on concrete feedback for improvement (within available bandwidth). But IMO this kind of general condemnation is not great for guiding improvement or for morale.
I have a git project with ocaml_experiments. The first problem was that I had no clue how to handle single-file examples. When I tried exercism, everything was set up for me. Looking at most of my commits, I would probably find that they were related to uncertainty about dune. I made initial commit on the 12th of October and did not progress far. It would be much easier if there was a simple example of project created with dune, using external libraries that I could easily expand.
Only last week I managed to get that:
Commits in my experiments folders indicate lack of understanding frustration and going in circles.
It took me ages to decipher documentation. If I judged the language similarly to a car and its acceleration from 0 to 60 miles, similarly I could judge the language, documentation and the ecosystem trying to find out how much it takes from 0 to snake game. So far OCaml gave me worst experience.
It is a known limitation of the human mind, so I am not surprised when I see dogmatism and a lack of understanding from experienced OCaml users. Similarly, some Haskellers lose the ability to explain Monads and other elements of the ecosystem.
I have a random collection of various links where some of them, to some extent, contradict one another. Partly because changes in the language and ecosystem, partly because people did not come up with a common way of doing OCaml that can be recommended to new users.
Somewhere in this thread there are comments of a programming lecturer, he may have to give you an idea what people struggle with. But if you do not have time to guide a new user and help him you will never understand our struggles. You forgot what it was like, or you are an expert, and OCaml is only for people like you.
Hello @Jacek_Podkanski,
My personal experience here is actually the opposite to your statement:
It is a known limitation of the human mind, so I am not surprised when I see dogmatism and a lack of understanding from experienced OCaml users.
and I read several of your posts/questions and actually I think that here all people were trying to help you. Honestly, my experience is that people try to understand the difficulties of beginners. Beginners also have to make the effort to calmly explain their difficulties.
Regarding: contradictory set of links that you have, you can share them for feedback, the people will be happy to discuss about it.
Partly because changes in the language and ecosystem, partly because people did not come up with a common way of doing OCaml that can be recommended to new users.
About this, it doesn’t seems to be specific of OCaml but the programming in general.
Well, then I must admit that I have those limitations as well. So I will ask calmly.
Why did it take me more than a month to sift through the difficult documentation and create example like ncforeign?
Why in other languages it would take me a day?
Why documentation in other languages has links to example repositories?
Why examples in OCaml libraries have different dune file and a noob can not translate those to a dune file that would be the result of editing dune file initialised with init?
What about project specific .ocamlinit or other ways of defining required libraries? How answering that is complicated by my lack of understanding of dune?
I hope my questions are reasonable.
PS.
Hope that will be the answer to my frustrations
Hello @Jacek_Podkanski
I don’t find useful to have here a long conversation, so I happy to discuss more via message. I think that the others users/developers here understand your frustrations, which others of us have gone through, but questioning the professionalism of the developers is not a way to reach a solution.
Why did it take me more than a month to sift through the difficult documentation and create example like ncforeign? Why in other languages it would take me a day?
I don’t know, but in the thread where you finally created your example ncforeign, others users gave you examples. I gave you like link to several examples in github, also I gave you the link to Real World Ocaml where the ncurses example is described offering my help with specific questions about it. Copy that code of the book and ask for specific help to have it running could solve this quicker. But anyway you solved, congrats.
Why examples in OCaml libraries have different dune file and a noob can not translate those to a dune file that would be the result of editing dune file initialized with init?
I don’t understand what you mean. Developers of libraries are free to edit their dune files according to their preferences/needs. This is fine.
What about project specific .ocamlinit or other ways of defining required libraries? How answering that is complicated by my lack of understanding of dune?
It is your choice to begin with dune. As I already commented, you can begin with ocamlfind/ocamlopt/ocaml to learn the language and then go to dune. Dune is not so straight forward, but it may be rewarding in long run.
I hope my questions are reasonable.
Your concerns are reasonable, I did not question that. But realize what the other user said to you:
I’d be interested to know what you found lacking in Quickstart — Dune documentation. I’m sure it could be improved. The community is pretty eager to act on concrete feedback for improvement.
and you replied with:
I am not surprised when I see dogmatism and a lack of understanding from experienced OCaml users.
Have a nice day.
Where did I say that I question the professionalism? I only observed that some Haskellers lose the ability to explain Monads and similar may happen here, That has nothing to do with professionalism. When I show examples of what others did, it does not question your professionalism. Our communication has some frustrating imperfections, but again this does not question your professionalism.
I am thankful you made a real effort to reach out. When you observe the fact that we are going in circles, maybe this is the best I can do in the current circumstances and should go quiet.
I got a reply to my question that gave me 2 days of frustration and will try to see how far I can go with that.
Following the pretty long opam package install in Ubuntu of the ocsigen system, the demo app does not compile -
.opam/default/bin/js_of_ocaml: Error: missing dependency ‘caml_new_string’
Put me off right away.
In none other language I have to browse source code on github instead of using go to definition in LSP recursively.
Still love OCaml.
I’m not sure to understand the example, because Format.formatter
is abstract so even in another language you wouldn’t know its internals?
But maybe something which can help is hovering multiple times over the same value. It will expand the types more and more. This might avoid the need to jump recursively in some cases.
The issue is jumping to definition of a dependency and then trying to jump to definition to a transitive dependency doesn’t work.
I think OCaml is pretty awesome, and I switched from it to Standard ML (for hobby projects) mostly on a whim.
Usability is generally better in OCaml land. OCaml has a larger ecosystem, as well as high quality tools that have been refined over time by many people like an LSP and formatter, compared to SML’s good-but-more-nascent ones.
If I try to recall my pain points with OCaml, I think C FFI (trying to build bindings to a C library) with dune is the biggest that I experienced, but most of that (I think) was my own fault, as I knew less about the C ecosystem (tools like pkg-config) than I do now.
I’m not sure how easy/possible it is, but I would be happy to see the process of calling out to C (particularly with dune) made simpler.
With MLton"s C FFI (for example), it’s pretty easy to get by for someone inexperienced like me. To call GLFW functions, I had to:
The step that makes this simple, I think, is (4). With OCaml/dune, one would need to translate the library’s link options to a dune stanza, which is complicated for someone who (like myself) knows C’s general syntax but not its “build ecosystem”.
I think this use case, where someone inexperienced with C wants to use a C library, is common (lots of people use SQLite knowing only higher level languages for example).
I would guess that there are generally more people in the OCaml community who would want to bind C libraries too, because of the smaller community here while mainstream languages have more people (= able to rely more on the work others have done).