Using Python and OCaml in the same Jupyter notebook
blog.janestreet.com
Using Python and OCaml in the same Jupyter notebook
1–10 of 35 posts
Re: Using Python and OCaml in the same Jupyter notebook
#2I think there should be a better integration between editors & REPLs, something like Common Lisp & Emacs SLIME. SLIME queries a server running on Common Lisp to incrementally compile & evaluate code from the editor (like LSP, but not autocomplete queries but evaluation queries). I hope the LSP protocol gains ability to evaluate code for languages with REPLs, it would be awesome if it allows interactive development in multiple editors & multiple languages (like how LSP is facilitating autocomplete).
Re: Using Python and OCaml in the same Jupyter notebook
#3The jupyter-notebook interface is IMO, not really suited for interactive development. Notebooks enforce code to be broken up into pieces of cells to be evaluated. The code must be written in a specific linear way to cater the format of notebooks. Also the distinction between the code & notebooks are too big, it's clunky to move between. You get to resort copy-pasting back-and-forth. It's always frustrating when I try…
I accidentally discovered this after exporting a jupyter notebook to python and opening it in vscode.
Re: Using Python and OCaml in the same Jupyter notebook
#4The jupyter-notebook interface is IMO, not really suited for interactive development. Notebooks enforce code to be broken up into pieces of cells to be evaluated. The code must be written in a specific linear way to cater the format of notebooks. Also the distinction between the code & notebooks are too big, it's clunky to move between. You get to resort copy-pasting back-and-forth. It's always frustrating when I try…
For python, visual studio code has some of this integration. It still runs a jupyter kernel, but will run "cells" directly from your source code file (where the cells are delimited by "# %%" comments) and output to a separate pane with a jupyter-driven repl in it. I accidentally discovered this after exporting a jupyter notebook to python and opening it in vscode.
Re: Using Python and OCaml in the same Jupyter notebook
#5Re: Using Python and OCaml in the same Jupyter notebook
#6The jupyter-notebook interface is IMO, not really suited for interactive development. Notebooks enforce code to be broken up into pieces of cells to be evaluated. The code must be written in a specific linear way to cater the format of notebooks. Also the distinction between the code & notebooks are too big, it's clunky to move between. You get to resort copy-pasting back-and-forth. It's always frustrating when I try…
Re: Using Python and OCaml in the same Jupyter notebook
#7The jupyter-notebook interface is IMO, not really suited for interactive development. Notebooks enforce code to be broken up into pieces of cells to be evaluated. The code must be written in a specific linear way to cater the format of notebooks. Also the distinction between the code & notebooks are too big, it's clunky to move between. You get to resort copy-pasting back-and-forth. It's always frustrating when I try…
For python, visual studio code has some of this integration. It still runs a jupyter kernel, but will run "cells" directly from your source code file (where the cells are delimited by "# %%" comments) and output to a separate pane with a jupyter-driven repl in it. I accidentally discovered this after exporting a jupyter notebook to python and opening it in vscode.
Re: Using Python and OCaml in the same Jupyter notebook
#8The jupyter-notebook interface is IMO, not really suited for interactive development. Notebooks enforce code to be broken up into pieces of cells to be evaluated. The code must be written in a specific linear way to cater the format of notebooks. Also the distinction between the code & notebooks are too big, it's clunky to move between. You get to resort copy-pasting back-and-forth. It's always frustrating when I try…
Another complaint I have with jupyter notebooks is that they don't play nice with git. For this (and other reasons), I much prefer Emacs org-mode, or even running Python in Rmarkdown+Rstudio+reticulate.
Re: Using Python and OCaml in the same Jupyter notebook
#9Re: Using Python and OCaml in the same Jupyter notebook
#10The jupyter-notebook interface is IMO, not really suited for interactive development. Notebooks enforce code to be broken up into pieces of cells to be evaluated. The code must be written in a specific linear way to cater the format of notebooks. Also the distinction between the code & notebooks are too big, it's clunky to move between. You get to resort copy-pasting back-and-forth. It's always frustrating when I try…