-
OCaml is possibly my favorite language, along with Rust, and what I hope from the Santa is projects like https://github.com/tezedge/ocaml-interop to become mature.
I think all these "properly typed" languages should aspire to have great interoperability: after all, they have types to help. But I realize there can be big technical difficulties in making it safe, in particular with garbage collection..
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
Thus to explore the use of effects, you need to use the experimental Effect (https://github.com/ocaml/ocaml/blob/trunk/stdlib/effect.mli) module which gives you access to low-level primitives for defining effects, installing an effect handler and resuming a continuation. The module will be considered as experimental in OCaml 5.0 and subsequent version of OCaml 5 will refine the integration within the language. The objective here was to decouple the multicore runtime work from the higher-level language design questions.
-
Effects are included in OCaml 5, but considered experimental. This doesn't stop us from building libraries that take advantage of them internally, in order to provide really nice external interfaces.
The best developed one is "eio", which uses effects (and io_uring on Linux) internally in order to provide a really high performance, direct-style IO library for OCaml. You can walk through some of the code here: https://github.com/ocaml-multicore/eio#getting-started
Also a video talk about our experiences with using effects for writing parsers, from the OCaml Workshop last year. https://watch.ocaml.org/videos/watch/74ece0a8-380f-4e2a-bef5...
-
For nested parallel computations (think Scientific Programming, where one would use OpenMP, Rust Rayon, etc), we have domainslib [1]. Eio, a direct-style, effect-based IO library is pretty competitive against Rust Tokio [2]. The performance will only get better as we get closer to the 5.0 release.
[1] https://github.com/ocaml-multicore/domainslib
[2] See the http server performance graphs at https://tarides.com/blog/2022-03-01-segfault-systems-joins-t...
-
So it's Reason, not ReasonML which the umbrella project's name, and Rescript is a imcompatible syntax split from the Bucklescript team (that previously transpiled Reason to JS). Bucklescript's new name is... Rescript.
But not everyone agrees with the split and work is being done on Melange to replace Bucklescript : https://github.com/melange-re/melange
Ultimately JsOfOcaml can directly transpile Ocaml to JS.