Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It’s missing that one can use Hydrogen and avoid this problem: https://nteract.io/.

Export isn’t great atm but can be combined with pweave: http://mpastell.com/pweave/docs.html

I think VSCode has something similar.

This gives another advantage of using a proper editor and its entire ecosystem.



With the VSCode Python extension you can directly create cells with #%% in a similar way to Hydrogen. There is also Neuron which allows you to see outputs in a separate pane.

I'm still struggling to find a setup in which cells are auto-generated (or unnecessary like in RStudio) and the autocomplete works as well as in JupyterLab. If I could reliably see all methods/submodules/inline documentation + path autocomplete quickly and for all packages, I would switch to VSCode. (There's a good chance that this just due to me not being fully aware of what's available in VSCode. )


Have you tried https://atom.io/packages/ide-python for autocompletion/inline documentation? It uses https://github.com/davidhalter/jedi. Also I'd be surprised if those things aren't done properly in VSCode with Python extension(s).

edit: Atom IDE (that this package links to) has been deprecated last week or so by Facebook, I'm not sure what dependencies packages like the above have on the atom-ide-ui.


I have never programmed in R before, but why do you say that there is no need for cells?

I use cells/notebooks in Python, so I can keep my code organized and run computationally intensive things once... Is this something that is not needed in R?


So firstly, you can use R in Jupyter in the exact same way you use Python (ju-pyt-er stands for Julia, Python, R).

Then R also had RMarkdown which allows to have notebooks with executable cells (code chunks) and they play much nicer with version control than .ipynb files.

What I was referring to in my previous post is working with a .R file (which is plain text) in RStudio. If my cursor is on a single line which is also one statement, ctrl/cmd + enter executes that statement and shows me the output in the console or in a separate pane for plots. If the cursor is within a multi-line expression such as a plot declaration, beginning of a loop, function declaration, then the interpreter figures out that I want to run multiple lines and executes the whole loop/declares function/creates plot. Or I can also select some code and run it.

Ideally, this is the kind of behaviour that I'd like to replicate with a .py file. It's a nice interactive workflow and also solves the problems that jupyter has with version control.


Interesting... I'm currently working on VSNotebooks (extension for VScode), which is a fork from Neuron... I would love to get some ideas that could help bring notebooks into the future, so thanks for your reply!


Pweave seems to give the same as RMarkdown but for Python and other languages: https://github.com/mpastell/Pweave. Examples: http://mpastell.com/pweave/examples/index.html


Improved export from Hydrogen to Jupyter Notebooks is at the top of my wishlist, and I'm hoping to submit a PR for it soon. See this issue: https://github.com/nteract/hydrogen/issues/1296


In case anyone reads this, I submitted a PR to support exporting Markdown cells from Hydrogen: https://github.com/nteract/hydrogen/pull/1498




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: