3 ms·
> You are right that the ecosystem is small, and will likely be always behind Python, R and Julia. But you should be able to call those languages from OCaml. F
by bachmeier 6y ago
> You are right that the ecosystem is small, and will likely be always behind Python, R and Julia.
But you should be able to call those languages from OCaml. For instance, RInside
https://cran.r-project.org/web/packages/RInside/index.html https://cran.r-project.org/web/packages/RInside/index.html
lets you call R from any language with a C FFI. A very simple solution (even if not quite as convenient as a full OCaml solution) that lets someone write OCaml if that's their preferred language. I helped add that functionality to RInside and I've been doing that for years so I can use D for my research.
- 7thaccount 6y agoI said it earlier, but if I have to call R from another language, in most cases I'd rather just use R by itself. Of course there are reasons why you might integrate the two. Perhaps you have an R expert doing the statistics work and the back end developer gluing everything together. That's fine, but at some point the system becomes pretty confusing and is a giant leaky abstraction.
- mseri 6y agoIndeed! There are already OCaml bindings for many R and python packages in the opam repository (opam is the package manager for ocaml), as well as C and fortran libraries. Similarly there are now a few packages to interact with rust. I think, right now, only a library to interact with julia is missing.