OCaml Riot, an actor-model multi core scheduler - thoughts?

Ha FAIR. Admittedly I have never looked at an Erlang lib outside of OTP before.

That we do this for money and have to optimize for doing stuff quickly.

If we were just tinkering I’d have zero problem with the “just read the code” trope.

But often at work you have a current goal and you’re looking into how to achieve it within an hour, or within the same day at least. Reading the code of a potential dependency is a non-starter.

Explains why I never picked it up and used Elixir instead. :yum:

1 Like

@yawaramin tagging you if you’d wanna weigh in. I recall you being excited for Riot.

1 Like

I have utmost respect for @yawaramin, he’s always extremely helpful on OCaml Discourse forum.

2 Likes

That he is, and he always gave me very reasonable and honest opinion on my questions on OCaml (inspired me to try out OCaml in the first place).

I do share some of your observations around OCaml especially with tooling. DX is the first thing I see in a programming language. And Elixir spoiled me further.

1 Like

Hello, I checked this thread a while back and there were no replies, forgot to check back and I see now there are a few :slight_smile:

Overall I think Riot is exciting. The creator (Leandro) is a long-time Elixir hacker and OCaml legend. He is also very focused on DX and making libraries with great documentation and design. I have every confidence that the Riot ecosystem he is creating is going to be extraordinary.

Let me address a couple of things that caught my eye in this thread.

Riot does, yes, but that’s a design decision in this library and not an inherent limitation of statically-typed actor systems. For example see Akka, which has typed actors with distinct message types: Introduction to Actors • Akka Documentation

As you can imagine, having multiple ‘standard libraries’ is not centrally planned by the OCaml community. Different people make different libraries that solve their problems. My advice is to stick with the default Stdlib that ships with OCaml until you need something specific, then add the specific library eg uuseg for Unicode string segmentation.

Example 2: package and dependency management. I have personally seen mailing lists / forum threads with the ever so helpful “what is dependency management?”

In every community, you will find some bored cranks who question every modern practice as a matter of course, it doesn’t mean that is the majority opinion. And in fact there are multiple OCaml teams working hard on package management concerns.

There’s a lot of effort to bring the community into the modern era. Things are looking very exciting. And Riot is going to take OCaml 5 Multicore to the next level with massive concurrency. It’s super exciting.

9 Likes

To slightly expand on this, the OCaml platform roadmap does address many tooling pain points I had (I’m clearly spoilt by mix and cargo).

My very first OCaml steps, I struggled similarly as @dimitarvp described, but based on the roadmap I’m fairly confident the upcoming 2-3 years significantly lower the barrier to entry.

3 Likes

Thank you, and I hope you don’t see my comment as overly harsh.

I believe OCaml is amazing because I saw what it can do, but stuff like having to make sure I have Unicode strings in my project and picking the right stdlib and potentially being unable to have DX on the level of mix and cargo in general have turned me off.

…I can’t believe I read the whole thing but I did. Pretty good plan actually! I have followed the multicore-monthly tag on the OCaml Discourse forum before 5.0 landed (and now there are no more posts under that tag, understandably), now I’ll start following the platform-newsletter one.

Good to know. I keep an eye on OCaml for several years now and it only gets better with time. Also made one small experiment with domainslib when 5.0 was released and liked the result.

1 Like

I’d really like to see OCaml catch on. I think it’s got a lot to recommend it and I would like to see it get more general acceptance.

4 Likes