5 ms·
If you haven't used them in awhile, Visual Studio Code notebooks (which leverage Jupyter) are now at a level that they're better than Jupyter/JupyterLab for Pyt
by minimaxir 5y ago
If you haven't used them in awhile, Visual Studio Code notebooks (which leverage Jupyter) are now at a level that they're better than Jupyter/JupyterLab for Python Data Science. It now integrates more closely with themes/settings, and has many additional features such as native debugging, native diffing for Git, Intellisense/autocomplete, and in general the UI/UX is faster.
That said, a desktop JupyterLab is still very valuable as it increases accessibility dramatically, but it's no longer the only player in the space.
- threatofrain 5y agoDo you have a link of resource explaining more about the VSC notebook workflow?
- minimaxir 5y agoHere's the official page on the integration: https://code.visualstudio.com/docs/datascience/jupyter-notebooks https://code.visualstudio.com/docs/datascience/jupyter-noteb... Some more demos: https://code.visualstudio.com/learn/educators/notebooks https://code.visualstudio.com/learn/educators/notebooks Once the extensions are installed, just open an .ipynb file in VS Code.
- 6gvONxR4sf7o 5y agoInteresting. I've been very excited by and disappointed by pycharm's work on that front. I'll have to check out the VS code version. Thanks!
- soVeryTired 5y agoOh man. Lack of proper debugging and diffing is a _huge_ problem with jupyterlab notebooks. In several cases I've seen, data scientists don't even realise that these tools exist. I know VS Code has been making progress recently but a good jupyter competitor with some halfway decent software development features would be a game changer.
- kristjansson 5y agoNotebooks are the out-of-order log of a fancy terminal. That can be great! But trying to use them for anything more than interaction or the most basic scripting is a fool’s errand. Build software in a real environment, then use it a notebook.
- AlexanderTheGr8 5y agoThe advantage of notebooks is extremely fast iteration. They are amazing for very fast "trial-and-error". Building software in "real" env has a slightly different use case than notebooks. If you are a data scientist or working with a lot of data, you definitely want to use a notebook over a normal environment. Imagine you want to read a lot of data from csv file and plot a graph of it. But then you realize that the alpha value used for graph should be 0.3 rather than 0.1. In real env, you would need to read the huge amount of data again. In notebooks, you avoid that!
- kristjansson 5y agoRight, that’s interactive computing. Notebooks are a strict improvement over a standard REPL-in-terminal for those use cases. The problem come when you want to make that process reusable for other CSVs, on other machines, in other environments, to repeat it in the future, to test components of it, to make and track changes over time, to share with a coworker, etc.
- pjmlp 5y agoTo put in perspective, notebooks are how using the REPL on Lisp Machines and Xerox workstations (Interlisp-D, Mesa XDE, Mesa/Cedar, Smalltalk) feels like.
- kristjansson 5y agoThose machines came and went a bit before my time, but I do recognize the sense of excitement and power I feel in notebooks in the recollections I’ve read. Similarly, comments about ‘how do I distribute a Smalltalk program if it’s just the image of the entire VM’ rhyme just a bit to my ear with ‘how do I share my notebook with my coworker if it’s really the agglomerated state of my interpreter and language environment’
- ghshephard 5y agoI use all three of JupyterLab, Jupyter Notebooks and VS Code Notebooks. What I love about VS Code Notebooks - it's almost zero context switching to jump from the the code you are working on to a REPL and back. What I don't love about VS Code Notebooks (and why I still spend a lot of time in JupyterLab) - the context gets confused as to what cell you are in frequently - so your Ctrl-Enter keys don't work, and you have to manually run each cell one at a time. ~Removed comment about graphs not being inline~ - I stand corrected. Just checked an the latest version does let you show your graphs inline. And they look awesome.
- minimaxir 5y ago> Also - and this is the deal breaker for most people I know - you can't display graphs within your notebook. Until we get that ability - everyone I know who does work and lives off of their matplotlib workstream is going to continue using Jupyter Lab/Notebooks. Hmm? The latest demos seem to imply that a plt.show() does embed the plot images into the Notebook. The major limit on cell outputs is more limited interactivity.
- gobookdev 5y agoThe API microsoft provides allow you to make outputs that do anything that JavaScript can do, when making an extension. One of their engineers made a something called REST Book that's a really good example.
- gobookdev 5y agoI use VS Code notebooks a lot, I like the workflow so much that I made an extension for Go called gobook using the API. I bind everything notebook related to shift+alt, so shift+alt+enter to run cell, shift+alt+r to run all etc. I'm learning Rust and working on a VS Code notebook for it now.
- AlexanderTheGr8 5y agoA notebook for Rust? How does that work? I thought notebooks can only be used for interpreted language and not for compiled ones...
- arthurcolle 5y agoI hate the automatic bottom right pop ups for every little thing in VS Code, its so annoying
- jjoonathan 5y agoHey, it looks like ipywidgets finally work in VSCode notebooks! Light/dark colorscheme clashes that would make Star Wars proud, but I'll take it. Pyviz (panel, holoviews, etc) interactivity doesn't look like it works yet. Ipywidgets might be enough, though! JupyterLab has had debugging for a while. It seems to be broken in both VSCode and Jupyter, though (or, rather, it hasn't broken on the breakpoints, where it ought to have broken). Ah well, probably needs more futzing around with the kernel.
- robotsteve2 5y agoI use JupyterLab professionally and have never been able to get VSCode notebooks working at the same level. For example, simple bracket highlighting doesn't work in the VSCode notebooks I've tried. I want to like them, but they don't get the job done for me.
- williamstein 5y agoIs "Visual Studio Code notebooks" fully open source, like JupyterLab is?
- deleted 5y ago[deleted]
- Ekrub 5y agoVS Code is here: https://github.com/microsoft/vscode https://github.com/microsoft/vscode The extension that enables Jupyter Notebooks is here: https://github.com/Microsoft/vscode-jupyter https://github.com/Microsoft/vscode-jupyter
- axpy906 5y agoI’ve tried vs code notebooks. For me, they don’t run as fast as jupyter. That said the convert jupyter NB to Python in VS saves a lot of time.
- pottertheotter 5y agoI’ve been using JupyterLab for the past couple years and tried VS Code two or three months ago and it was not a smooth experience. I regularly use VS Code for my non data science coding, but VS Code notebooks were much slower than JupyterLab and they would often hang, requiring me to kill the kernel and VS Code. Switched back to JupyterLab and had zero problems.
- Ekrub 5y agoYou should give it a spin again. Notebooks _used_ to be a web view in VS Code. But we re-wrote them to use native UI elements and the performance is much better.
- n8henrie 5y agoI tried VS Code notebooks on Windows again this week and went back to the webapp within 2 days. The simplest things -- like ability to copy a cell's output to the system clipboard -- didn't work, with multiple outstanding / unresolved issues on GitHub. Lots of problems with pandas plots / pyplot. I'm surprised to see it recommended on HN, it still felt "alpha" to me.
- AlexanderTheGr8 5y agoI use it a lot, and a big advantage is how configurable it is compared to other options. You can change practically everything in Settings. So you can customize it in the way you prefer.
- ivan_ah 5y agoOne cool feature of Visual Studio Code notebooks is you can set VSCode as the default "opener" for .ipynb files, which allows you to open notebooks using double click. I still run jupterlab for my "main" environment, but I've been using VSCode to explore notebooks I download from the web. Very convenient.
- rdedev 5y agoJust a fair warning if you are using the latest version of the jupyter notebook extension (I dont think it will be a problem if you are not using the extension but I haven't tried that method). It has much better support for intellisense than its previous version but it still has a couple of bugs that sometimes require restarting vscode to fix it. It is pretty easy to switch between versions though