Closed Naereen closed 3 years ago
Thank you. I have read the post you mentioned. It's big advantage that we can use many python libraries for mathematics and visualization from ocaml. The author of the post seems to want to provide ocaml services for python users. I'm interested in use cases of pypi in practice. If jane street uses ocaml and pypi for data analysis, that is very cool application!
Thank you. I have read the post you mentioned.
Thanks for your interest :+1:!
It's big advantage that we can use many python libraries for mathematics and visualization from ocaml.
Yes but honestly the integration of Python from OCaml is much more cumbersome than the other way around...
Compare writing python_function = %ocaml <some OCaml code>
to what is required for pythonlib.
The author of the post seems to want to provide ocaml services for python users. I'm interested in use cases of pypi in practice. If jane street uses ocaml and pypi for data analysis, that is very cool application!
Indeed!
What is the purpose of this issue? Has it been already solved?
I'm not exactly sure what I had in mind opening this issue. I thought that maybe in the README of ocaml-jupyter there could be one line mentioning this blog post and Pypi package, saying something like this:
While ocaml-jupyter provides a complete kernel for Jupyter to work with OCaml in a notebook, independently of the Python backend or IPython kernel, some users might be interested in doing the opposite, and using some OCaml small ode from a IPython kernel notebook, inter-connecting it with their Python code. It is possible by using [this Pypi package], see [this blog post] and an example in [my demo notebook].
Hmm. I think the purpose of the README is explanation of usage of ocaml-jupyter, not providing complete comparison of related work. The description of pypi in README would be noisy if maintenance of the package possibly stopped, independently of ocaml-jupyter. In order to reduce maintenance cost, I want to omit needless information which has no effect to ocaml-jupyter's usability.
However, if someone writes a blog post about choices for using ocaml on jupyter, users will be grad.
You're right. Your README does contain a comparison to IOCaml, but that's a very close project, so it's quite different. (by the way did you know about IOCaml-js, which compiled the underlying OCaml interpreter to javascript and provides a pure in-browser client-side notebook for OCaml? it's quite nice)
Have a look at this blog post by the author of this undocumented pypi ocaml package.
You can see here what it's capable of doing, and it's quite impressive!
Of course it's very limited, as the Pypi package does not rely on the system OCaml runtime but on a pre-compiled version which comes included in the Pypi package... so it cannot use external modules, and is much more limited in its integration with Jupyter, when compared with your (:sparkles: awesome) project. It does ship the entire standard library (see details).
On the other hand, it allows to use dynamically defined OCaml functions from Python, the same way it can be done for other languages lke Julia or R (see this blog post if you never saw these possibilities, or this one). For instance: