What are some small things that I can do in 2021 so that future founders of important open source projects similar to gitea, peertube, and mastodon feel compelled to use ocaml in 2023?
A comprehensive user guide for the modern toolchain. Much of the current documentation is scattered, incomplete, and assumes some implicit knowledge. E.g. after installing opam you are expected to know how to set up a reasonably modern switch, and then which packages to install to get going.
Also would be a lot of help if there was a foolproof guide for Windows, preferably using WSL.
The OCaml Platform is fragmented into many different tools with their own little fiefdoms of documentation. We need something that brings them all together in a cohesive way, otherwise people will keep turning away from the complexity of adopting OCaml.
Sounds like the goal of “Real World OCaml”. The new edition will hopefully cover all of that.
+1 to docs but I’ll also add tooling. If you want to attract developers the experience needs to be top notch, especially with modern tools. I’d say improvements to ocamllsp which is quite good but still has some annoying bugs. Also a good debugger would also go a long way I think.
All the disparate tools are there: opam, dune, ocamllsp, utop, ocamlearlybird, and so on. There’s just no cohesive platform distribution. To use an analogy, you have to go to a bunch of small, independent, or thrift stores to get everything you need. What’s needed is a department store as the front face of OCaml.
The problem is, the definition of “top notch” varies from developer to developer. It is especially dependent on their experience and familiarity with their underlying operating system, from my arguably irrelevant observations.
One small some thing that you can do in 2021 is to write a chapter for OCaml From the Ground Up.
This is also exactly what i do at the moment.
I agree with the approach, but I find myself more motivated to contribute edits or fixes to the rwo book.
If you want to attract developers the experience needs to be top notch, especially with modern tools.
I am unsure on this point. I could see this being true for corporate developers used to jetbrains product line, but open source developers might have lower standards or be happy with well supported vim and emacs development.
I know this is a common trope, I’m just not sure how true it is. The underlying assumption is that Ocaml is a language people want to use and the tools is what’s preventing them. But I rarely see Ocaml come up as even an option in language discussions. Usually it’s “we’re using Python, should we use Go or Rust?”
I think that this is the correct answer to the question posed. It’s clear that language choice is largely driven by inertia, popularity, and fads. Therefore, the best way to get future developers using any language is to increase its visibility and popularity. Participate in social media, discussion forums, users groups, and conferences. Success stories are compelling (“How I solved $PROBLEM”; “Why we moved away from $LANG”).
A more concrete answer to the original question: Write blog posts about issues that you’ve run into and how you resolved them and short tutorials/explainers on specific features/tools/libraries. We need those.
I would add that a unique selling point helps as well. If someone is thinking “we’re using Python, should we use Go or Rust?”, they are making associations like “…should we use Go (for the goroutines / because it’s simple) or Rust (because it’s fast and saner than C++)”.
What’s the single-sentence unique selling point for OCaml that we would like people to associate with it?
- Type-safe and pragmatic?
- Makes code easy to refactor and maintain?
- Catches bugs early?
Choose one
That wasn’t my starting assumption. My point of view is that OCaml is a language that some people try out from time to time, but then encounter the complexity of the tooling and how to put it all together. And when they encounter this massive barrier they often don’t make it past it.
Of course, you are right that OCaml is often not even in the picture. It is a niche language after all. But I think when people do decide to try it out, the developer experience is very important.
As an OCaml lurker and rescript user, it’s really hard to sell the language when setup isn’t as easy as the other ecosystems like Go, Rust, Node/npm. The trend is towards having a single CLI and language server on the level of Go. You can see that almost as a requirement for any new(er) language/runtime: Elixir, Deno, Crystal, Grain, Gleam.
I’m not stating anything new.
Sounds like the goal of “Real World OCaml”. The new edition will hopefully cover all of that.
Is there an ETA for the 2nd version (on paper)?
Not a sentence, more an experience : sense of wonder.
… when your program compiles without a complaint and then runs perfectly as you imagined.
I am also curious if people personally know about the status of OCaml at Mozilla, Framasoft, and any other foundations with open source engineers. Have people already tried advocating for OCaml within any of these groups and have they had any success?
Hey, i stumbled upon this topic beuase i am one of those confused outside people who are interested in the lang but toally overwhelmed.
Some really basic questions that need to be answered on the “Front Page” of ocaml are:
WTF is resonml, reson, rescript, bucklescript and ocaml and how do they relate. I don’t need to know their history, i can pursue that myself if I am interested. I want one sentience that tells me what to use for what task.
What is the tooling setup I should use? Y’all have like 5 different VSCode extension and its a huge mess.
How do I get setup on Windows??
So there’s Cygwin, msys2,mingw, wsl, native, i could use opam, or perhaps esy… but esy won’t compile packages because of symlink errors issue-1315. And maybe I should run it as admin?? At least according to some github issues, but also maybe that isn’t important anymore? But either way it doesn’t work. And there is this ocaml for windows thing opwm-mingw, but wait that’s soon to be deprecated, but it is what the official ocaml website recommends.
.
Look, I’ve used a hell of a lot of programming languages, everything from Nim to Lua, and I have never seen anything as chaotic, disorganized and confusing as this. I consider myself a very very persistent person but I’ve spent hours and hours on this… It’s just not worth it. I’d just use f#. Takes like 5 minutes to install dotnet core, type “dotnet new console -lang f#”, and “dotnet run”.
And yes the dev story is probably better on Linux, but I have a job where, like most people, I have to use Windows, and people would come and kick my ass if I just up and ran a Linux VM with network access.
I have to apologize for the salt, but I had really hoped to give ocaml a go and it has ended up being a huge waste of time. In some ways I wish there had been a message of the front page basically saying “If you’re on windows, just quit now”.
Anyhoo, I guess I’ll give it a go next time I have a Linux machine and we’ll see how that is.
If you can describe what exact steps you followed to install on Windows and what happened then, that would be very helpful. Ideally in a new thread to keep it focused on that.