Hacker News new | ask | show | jobs
by Grumbledour 2846 days ago
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? ;-)

3 comments

As an academic, ipython notebooks are becoming the lingua franca of reproducible research. I don’t like it or them, but they’re excellent for didactic purposes. Extracting the code from the markdown is very helpful for me, as I prefer working directly with it most of the time.
I'm sure notebooks are used a lot for interactive exploration, but I would not use them for reproducible research, so long as they lack things like dependency tracking:

https://twitter.com/joelgrus/status/1033035196428378113

The bar in academia (over-generalizing here) was so low for so long that anything around including your code with your publication still gets placed under the historical title of "reproducibility" - that's probably where the confusion here is arising. I agree with your sentiment, but grandparent probably just meant "a lot of people release their code as notebooks".
It’s a step, but you’re both right. Things that containerize notebooks would count as reproducible, but they’re unwieldy and disgusting. I agree that while better than nothing they’re still not there.
1 thing. Code review. Even thou notebooks are not meant for production code, it's good to check them into repository to document what you did (let's ignore out of order computation and other horrors), and get feedback on your code / experiment.

Right now, ipython notebook is stored as json, where code is list of json strings (so that you have it line by line).

Additionally, the "WYSIWYG Interface" is horrible in comparison to vim, emacs, idea, pycharm or whatever you are using. What I like about notebooks is being able to present things as experiment: this is the code, and there are the outputs. "WYSIWYG Interface" is good if you want to tweak few things, or if you are starting out.

I think you misunderstood me. My question was not why you would use an external editor (and get all the benefits you provided), but rather, why work back from jupyter to achieve this rather than working forward from simple markdown and allow code blocks to be embedded and run from the editor.

But maybe I am missing some other features than the interface that the ipython kernel provides? I haven't used it much myself, since I found the setup and usage rather complicated, though to be fair, I don't really use python and its ecosystem much.

I would prefer to use editor as yiu describe. but realitybis that jupyter is something lot of people like, find awesone and want to use. this is something that helps someone like me use what other use, but feel less pain. maybe people on future will start migrating out of ui because of stuff like this.
> So where is my markdown with embedded code WYSIWYG editor that saves into plain text files? ;-)

It's here: https://github.com/gregsexton/ob-ipython

Well, yeah. Org mode can do anything, right? If only it wasn't so tightly coupled to emacs. Not a hater btw, I just can't get used to the editor. The concept of an extendable editor sounds really good, but it just seems so complicated and uncomfortable to use...
If you are used to vim maybe spacemacs can help you?
Or a non-spacemacs emacs + evil setup. I jumped ship from Vim but Spacemacs didn't feel quite right so I started from scratch.