Small correction: the standard library now has an iterator type, Seq.t, and there is a compatibility package. So we’re now fully in the 21st century with both a result type and an iterator interface!
It is nice to see Ocaml in production and constructive feedback about it! I am surprised that a lot of libraries tends to avoids Core et Base as the main a learning booking about Ocaml (Real World Ocaml) tagerts specially that standard library replacement.
Does Async or Lwt with light green threading can be used when multi-core processing is needed? I suppose than it must be with a share-nothing model in mind.
I think libraries avoid large dependencies to avoid passing them on to their consumer applications. Applications themselves are not shy to use Base/Core.
Lwt can’t do multi-core (it can do multiple concurrent system threads though, each thread will run one at a time). However Jane Street’s Async Parallel library can: https://github.com/janestreet/async_parallel . You’re right that it is a shared-nothing model. There is also https://github.com/rvantonder/hack-parallel which is extracted from Facebook’s Hack compiler and seems to have shared memory, however, it’s not very well-documented (it’s extracted from another project) so I haven’t really looked into what it can do.
I think libraries avoid large dependencies to avoid passing them on to their consumer applications. Applications themselves are not shy to use Base/Core.
But as a developer for an application, you have to manage the friction between the libs you want to use and the (almost) standard library of your choice. I don’t know how much frictionless that can be based on you choice to use Base, Batteries, or Containers (I may have missed some new ones, I didn’t follow that much what’s happening in OCaml the last years).
Based on what you say about library development, I assume that you don’t lock yourself too much by choosing your standard library replacement?
You’re able to choose a standard library replacement with minimal friction because of the choices of upstream libraries to not choose one for you and lock you in to that. But if they did, then it’s a good idea to just use the one they chose for you, to avoid blowing up your transitive deps.
Small correction: the standard library now has an iterator type,
Seq.t
, and there is a compatibility package. So we’re now fully in the 21st century with both a result type and an iterator interface!It is nice to see Ocaml in production and constructive feedback about it! I am surprised that a lot of libraries tends to avoids Core et Base as the main a learning booking about Ocaml (Real World Ocaml) tagerts specially that standard library replacement.
Does Async or Lwt with light green threading can be used when multi-core processing is needed? I suppose than it must be with a share-nothing model in mind.
I think libraries avoid large dependencies to avoid passing them on to their consumer applications. Applications themselves are not shy to use Base/Core.
Lwt can’t do multi-core (it can do multiple concurrent system threads though, each thread will run one at a time). However Jane Street’s Async Parallel library can: https://github.com/janestreet/async_parallel . You’re right that it is a shared-nothing model. There is also https://github.com/rvantonder/hack-parallel which is extracted from Facebook’s Hack compiler and seems to have shared memory, however, it’s not very well-documented (it’s extracted from another project) so I haven’t really looked into what it can do.
But as a developer for an application, you have to manage the friction between the libs you want to use and the (almost) standard library of your choice. I don’t know how much frictionless that can be based on you choice to use Base, Batteries, or Containers (I may have missed some new ones, I didn’t follow that much what’s happening in OCaml the last years).
Based on what you say about library development, I assume that you don’t lock yourself too much by choosing your standard library replacement?
You’re able to choose a standard library replacement with minimal friction because of the choices of upstream libraries to not choose one for you and lock you in to that. But if they did, then it’s a good idea to just use the one they chose for you, to avoid blowing up your transitive deps.