Open dangirsh opened 6 years ago
Thanks for the well-articulated points @dangirsh! Indeed, I do believe using org for an intermediate "cell-representation" layer would be more flexible/powerful for all the reasons you mentioned. As an example, it would be cool to navigate code in a similar way one navigates an org-mode tree (i.e. expanding and collapsing sub-trees).
However, this set of changes is clearly targeted at improving the emacs side of pynt. Unfortunately, I find myself using emacs less and less these days and am focusing my efforts more on the jupyter side of things (e.g. via a jupyterlab plugin). Coupled with the fact that I haven't nailed down the use case for pynt yet (i.e. for what kinds of programs does pynt actually improve the coding experience?), someone else will likely have to lead this effort.
Features like branch unpacking could benefit from having powerful tree manipulation facilities, which are the heart of Org. I assume you're relying on the markdown headings to manage the tree structure in the ipynb. According to this spec, you're limited to a depth of 6.
This sounds like a concern below the level that pynt works at. pynt actually just "flattens" out a code region that you give it, pushing everything to the global scope. So there is no more tree structure (among nodes) in a pynt-generated EIN notebook.
Org mode has lots to offer over Jupyer notebooks / JupyterLab / EIN. Off the top of my head:
Code cells in Org mode can execute in Jupyter kernels (for various languages) via the ob-ipython package. This gives the user:
By virtue of using Org, "notebooks" written this way:
The scimax project has very interesting additions (video demo) to ob-ipython, including:
Here are some ways Pynt could be more powerful with Org:
I don't know the Pynt code well enough to guess the level of effort for this. It likely mainly depends on how much experience the contributor has with automating Org.
I thought the best first step would be to discuss the pros/cons here.