Ocaml promotion to attract more users

I was under the impression that many more people would learn and use Ocaml if they at least knew it existed.

I thought some more and came to the conclusion that just knowing that a programming language exists is not enough.

It needs to be presented by someone who has our trust and admiration.

Currently, two people who are getting people interested in Ocaml are TJ Devrie and The Primeagen (both on YouTube and Twitch).

Have you thought about contacting them to do some Ocaml teaching video series? In a build your own X style?

The fact that the language is shown by them, would have more positive impact, in the sense of breaking prejudices that take away people’s willingness to at least try something “new”.

Examples of projects:
Reddit server
StatsD server
Git

Or another project like these.

Of course they would not be complete projects, they would only contain a few features.

I think this kind of action would help a lot in the adoption of Ocaml.

6 Likes

FWIW I started learning Ocaml because of those two “dev influencers”. I’ve been wanting to learning a functional language, and was bike shedding on a language to learn. I just had a baby so time is limited. This one seems nice.

6 Likes

I’m glad you’re learning Ocaml. I was already learning it when I saw them streaming about it.

I hope Moore people engage in this journey.

I wish guys from this forum that have great knowledge and experience with Ocaml made a win-win deal with TJ and ThePrimeagen in order to spread more interest in Ocaml.

Unfortunately currently my knowledge about it is nearly zero, so I have nothing to offer.

I’m not sure what deal is there to make… They are streaming what they are interested in because they find it fun.
If it’s OCaml, and it brings populatority to the language, I’m glad they are doing. But if not, what do we suggested people from this forum do? Pay Prime and Tj for OCaml content?

I think the best path forward is what many people here are doing, build a welcoming community, build tools other people want to use and share. And, if you have the time, that’s something you can contribute even if you are new to the language.

They are other streams with ocaml content, some Dream live coding with antron, https://interview with people working with/on OCaml. I encourage you to watch and share if you like them.

10 Likes

I never thought about paying them. Paid content would be terrible. They must truly want to participate.

I thought someone talk to them and propose to make something they find would be fun.
Eg.: an someone’s picture with another image.

Or a competition between TJ and ThePrimeagen to see who makes the better match 3.games.I don’t know what they would consider fun.

Maybe they would like the idea of having some expert in Ocaml to help them at the moment they needed it.

And thank you for sharing the links. For sure I’ll watch them.

1 Like

Do you have any examples of this strategy being used to successfully market open source projects, especially programming languages?

2 Likes

No.

I just thought it would be good for the Ocaml community to invest more in breaking down a lot of preconceptions people have about the functional programming paradigm and Ocaml, which seems like an exotic programming language that is not meant to be used in production.

I say this because for a long time I myself thought that functional programming was only for academic use, not for companies and “real world” projects.

And saying that it’s widely used by Jane Street in financial applications hasn’t helped change that view, because statistically it doesn’t mean anything (considering the number of companies using other technologies like Python, C, C++, Go, Rust, etc.).

Even if you add all the companies using Ocaml, Clojure, Lisp, and Haskell, the number is ridiculous.

If there is an opportunity to break down these prejudices, it should be seized.

1 Like

I do agree with you that more marketing would be good for OCaml, however I think you’ll find most here are too I interested about that.

What I mean is you’re not going to see cute logos and beautiful pages representing libraries and the like.

Partly this is due to the community being small and with less resources. But it’s also cultural I would say. Regardless, getting into OCaml is getting easier with the efforts being made on making ocaml.org beginner friendly and developing great (although a little alien) tooling

It’s good that you’re here, it’s taken me a few years too, to come here, due to ignorance or small mindedness.

Anyhow, even though I’d make me feel good to know the language I’d invest time in learning is getting “popular”, I decided not to care because my goal in learning OCaml is to improve my programming skills overall and I’m pretty sure I’ll achieve that whether I end up using OCaml professionally or not.

Also I enjoy following those 2 guys on YouTube (Prime cracks me up, and TJ seems to be doing just fine following this book and implementing that toy language)

2 Likes

I am also interested in learning OCaml. I am well versed in Java and Erlang, but I find OCaml very compeling. I was wondering: What is the recomended build tool and text editor to use for OCaml development? Is there any style guide? Best practices?
Thanks

3 Likes

A good place to start is:
https://ocaml.org/docs/up-and-running
This covers installation, building, and editor configuration. From there, look under Guides for more info.

1 Like

The Get up and running guide has a bunch of info that will probably be helpful to you. Additionally there is a good quickstart overview, and this page about editor setup.

2 Likes

The ocaml.org landing page has seen a lot of progress in recent years, months and weeks; I would start there.

  • Recommended build tool: dune
  • “Recommended” text editor: VS Code, Emacs or Vim
  • Style guide: there are a few style cultures that you can pick up by reading the relevant code repositories. Other than that:
    • Use the automatic formatter
    • Use simpler language constructs rather than more complex ones, when the simpler ones do the job fine. My subjective ordering from simpler to more complex:
      • Records and variants
      • Modules
      • A small dose of functors
      • Polymorphic variants
      • Objects
      • First-class modules
      • Classes
      • A large dose of functors
3 Likes

A bit tongue-in-cheek, but I am seeing a trend of Rust people coming to OCaml because Rust turned out to be too complex. Turns out that Rust was actually a great marketing technique for OCaml.

18 Likes

I didn’t noticed that.

Nice to know.

1 Like

For me it was actually (1) compile time and (2) ocaml anonymous functions are so much easier to get right than Rust closures.

2 Likes

Do you think simple_httpd and chaml could interest them ?

I think so. It worth a try.

The team working on improving OCaml.org documentation watched The Primeagen’s videos and learned so much from them! It was helpful to see where he tripped up and what could be further clarified. I haven’t yet seen TJ Devrie’s, but I’ll look it up!

I did contact The Primeagen about a videos series, but I didn’t get a response. Perhaps it would hold more weight coming from an OCaml programmer rather than a technical writer. I love the idea of a “build your own X” tutorial, whether video or in a blog post. There needs to be more “I built this cool thing with OCaml” to help break through the misconceptions around the language.

Agreed that if more people knew about OCaml and saw it being used by those they trusted, it would increase adoption. The more we talk about OCaml in public places, the more traction it will get. It’s important to join in conversations on social media, like responding to other’s tweets, retweeting, and creating original tweets about OCaml. Same thing for other platforms. Perhaps live broadcasts on Twitch?

Thanks for bringing this up!

6 Likes

I had a different experience with the idea of the functional programming paradigm. Also, I think now the most popular programming languages are starting to incorporate functional elements: e.g., C++, C#, Java. That and the existence of F# and Scala might lead many programmers to be intrigued by the idea of functional programming. But, OTOH, they might still think OCaml is exotic or academic.

I think the selling point of OCaml is that the language and compiler facilitate a less bug-prone programming method and help to catch more bugs. There are probably other selling points.

My experience was that I had been using C and C++ for some years and kept seeing the same kinds of bugs and especially the same kinds of hard-to-track-down bugs. I thought there should be a better way. I read a book Symbolic Programming in Lisp and Prolog in which the authors were interested in a better way to program that they called “denotational” and tried to illustrate with Lisp and Prolog. I tried to put some of that into practice in mainstream languages, but it wasn’t too helpful or I didn’t understand it well enough. Fast-forward to several years ago. I went back to school for my master’s in computer science. I had been impressed with Prolog, so I took a course called “advanced programming languages”, but the main language taught turned out to be OCaml.

That course completely altered my view of programming. It was as though someone turned on the lights in a dim room, and I saw things clearly that I could only make out dimly before. I started making more use of C++'s functional features in my work. I used it’s type system to make guarantees about things like not-null and that errors had been checked, I used “const” all over the place, I learned how to use enum and switches without defaults to get the compiler to warn me when not all cases were handled, and I started using template metaprogramming (I know that is controversial) to handle other things at compile time, and perhaps other things. It made a dramatic difference. I happened to be working on a server project that required robustness at that time, so it was that much more consequential. That was also around the time of the Heartbleed bug.

I saw OCaml mentioned in articles as a possible antidote to the problems that led to Heartbleed, but I also saw Rust, and because I was a systems programmer, it was more attractive to me.

I probably would have learned Rust (beyond little bit that I did) if it hadn’t been for getting the job that I started about 2 years ago. We use OCaml, so I had to learn it. Now, I wouldn’t want to do without the garbage collector and the type inference, unless I really had to.

I think it’s true that one thing that people should know about OCaml is that they can just as well use imperative style. They are not trapped into any exotic or academic mode of programming. That is probably true.

Another thing that might have attracted me more to OCaml (or diverted my interest from Rust–if anything could have) might have been seeing more open source uses of OCaml. Even though I’d used OCaml before, I did have the feeling that it was a language that not many people were using and maybe even a bit esoteric. I was skeptical of the claims that it was a fast language and useful for systems programming, too. I don’t know what else could overcome prejudices like those, though.

For some academic open source code I wrote a few years ago, I selected Python, even though I also considered OCaml and Rust. I wanted it to be widely readable and modifiable by casual programmers. I wish OCaml could be so easy for casual use as Python, but I don’t know how to get to that point.

4 Likes