Live data from Hacker News

Jupytext: Jupyter notebooks as Python scripts

github.com

1–10 of 42 posts

Re: Jupytext: Jupyter notebooks as Python scripts

#6
post #3

Can someone provide me a usecase for this when compared to executing jupyter straight into VSCode/Atom with vscodeJupyter/Hydrogen?

The idea is that you can edit your notebooks with your favorite text editor, use git for version tracking them, and no need to mess with a web browser at all.

Re: Jupytext: Jupyter notebooks as Python scripts

#7
post #4

Could this be the answer to "I don't like notebooks" [0]? Or does calling scripts from within a notebook still do horrible things to the managed state? [0] https://news.ycombinator.com/item?id=17856700

I've never thought this criticism was that relevant. Notebooks have been incredibly successful, and if it's possible to call your code in the wrong order and create a mess, it's probably a problem with your code not your coding environment. The more functional your code, the less of a problem jupyter notebooks are. They encourage better code not worse imo.

Re: Jupytext: Jupyter notebooks as Python scripts

#8
post #7
post #4

Could this be the answer to "I don't like notebooks" [0]? Or does calling scripts from within a notebook still do horrible things to the managed state? [0] https://news.ycombinator.com/item?id=17856700

I've never thought this criticism was that relevant. Notebooks have been incredibly successful, and if it's possible to call your code in the wrong order and create a mess, it's probably a problem with your code not your coding environment. The more functional your code, the less of a problem jupyter notebooks are. They encourage better code not worse imo.

The "managed state" is important, though. For example I deal with cases where I'm doing some big expensive operations upfront (eg, processing a bunch of data coming in over a network share— ROS bag files, which are also bzipped, adding more upfront processing cost), and I'm interesting in tweaking the plots and analysis coming out the other end without having to re-run the processing each time.

Even as a relatively experienced developer, I've found it hard to reason about what exactly it is that Jupyter is doing under the hood; basically things will break in weird ways, and rerunning everything will mysteriously fix it, or I have to use hacks to force it to re-import certain modules in order to get things the way I expect.

Basically, it ends up being easier to just manage this myself, like doing the processing and pickling the result, then using other, standalone notebooks to load and render the pickle. But this shouldn't be necessary.

Re: Jupytext: Jupyter notebooks as Python scripts

#9
This seems neat, but also a bit strange. Are Jupyter notebooks so prevalent that it makes sense to ghave an exporter that makes them into markdown and back again? I mean, I always thought this workflow was neat, but isn't one of the selling points of jupyter the WYSIWYG Interface? And if you like working in code, would it not be easier to create a markdown extension for embedded code (Or does something like this already exist?) and create editor plugins or command line tools to render said document or provide a live preview?

Personally, I totally want that functionality but don't want to mess with running jupyter kernels or using my browser to work in my notebook. So where is my markdown with embedded code WYSIWYG editor that saves into plain text files? ;-)

Post reply on HN