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

What’s preventing this from being done in VSCode? Other than it hasn’t yet?

I don’t think it ticks every box for you, but have you tried Jupyter Notebooks in VSCode[0]?

[0] https://code.visualstudio.com/docs/datascience/jupyter-noteb...



VSCode doesn't support an API to put outputs inline in the text editor. IIRC there have been longstanding feature requests for it but it would probably have a performance hit. The closest thing is having a separate output window on the right side


I don't think it's an API problem, because Scala Worksheets work in VSCode[0] (and in most editors actually).

[0] https://scalameta.org/metals/docs/editors/vscode/#worksheets


I think you're referring to the "inlay hint" API, which is different from being able to visualize any HTML in the current text editor, like Hydrogen is able to: https://cloud.githubusercontent.com/assets/13285808/20360886...


VSCode’s Jupyter Notebooks is slightly different from Hydrogen in that it’s basically a MarkDown document with executable code blocks (cells) in the text editor that show their output in the text editor.

Again, not exactly the same as Hydrogen but there’s definitely some overlap in use cases and VSCode’s Jupyter Notebooks is pretty good. You should give it a shot and see if it’s a viable replacement for what you were using Hydrogen for.

This showcases the UI a bit if I’m not being clear: https://code.visualstudio.com/learn/educators/notebooks


That's exactly my complaint though. I don't want to work in a notebook frame of mind. I don't want to have to demarcate `#%%` every time I run code (especially because you'd need to scroll down to put another `#%%` where the code you're running should stop.)

As I noted in a sibling comment, I wrote a quick extension [0] that makes this easier by automatically inferring code blocks, but VSCode Jupyter is lacking in other ways: you can't have multiple Jupyter kernels running at the same time and it doesn't show you runtime completions in the editor (necessary for compiled packages without type support).

[0]: https://github.com/kylebarron/vscode-jupyter-python


Is that not what Jupyter notebook support is about? I can run something and see the output below the code.


But with Hydrogen you could do that in a regular Python script without needing to create a notebook or think in terms of cells. There's an example of this in the Hydrogen readme: https://github.com/nteract/hydrogen#hydrogen-




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

Search: