logo

OCaml and Python: Getting the Best of Both Worlds

time4 yr agoview153 views

In this talk we present how we expose a wide variety of OCaml libraries and services so that they can be accessed from Python. Our initial use case on the Python side consisted in Jupyter notebooks used to analyse various datasets, these datasets being handled by OCaml libraries. However we extended this to provide lots of other OCaml libraries to Python users, e.g. exposing the Time_ns module from Core to provide a robust timestamp library, manipulating holidays, etc. Our Python bindings are written entirely in OCaml and interface well with some Python libraries such as NumPy or Pandas that are commonly used for data manipulation. In order to make writing such bindings easier, we wrote some specific library as well as a PPX extension.

Laurent Mazare Jane Street

Loading comments...