News for hackers. Stuff that matters.
Re:JupyterLab Desktop App now available by minimaxir on Wednesday September 22, 2021 @05:42PM (#28622256)
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.

Re:JupyterLab Desktop App now available by ghshephard on Wednesday September 22, 2021 @05:53PM (#28622406)
I 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.

Re:JupyterLab Desktop App now available by gobookdev on Wednesday September 22, 2021 @07:56PM (#28623592)
I 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.
Re:JupyterLab Desktop App now available by AlexanderTheGr8 on Wednesday September 22, 2021 @11:25PM (#28624918)
A notebook for Rust? How does that work? I thought notebooks can only be used for interpreted language and not for compiled ones...
Re:JupyterLab Desktop App now available by msdrigg on Thursday September 23, 2021 @01:14AM (#28625409)
Theres a repl for rust that can be used in a Jupyter notebook. I am also curious about how it works under the hood but here it is for anyone to check out: https://github.com/google/evcxr
Re:JupyterLab Desktop App now available by gobookdev on Wednesday September 22, 2021 @11:29PM (#28624933)
The way I did it for Go was by having a API start up on the local machine that executes the code and returns the result to VS Code, going to do the same for Rust.
Re:JupyterLab Desktop App now available by minimaxir on Wednesday September 22, 2021 @05:58PM (#28622492)
> 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.

Re:JupyterLab Desktop App now available by gobookdev on Wednesday September 22, 2021 @08:24PM (#28623812)
The 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.
Re:JupyterLab Desktop App now available by n8henrie on Wednesday September 22, 2021 @09:36PM (#28624295)
I 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.

Re:JupyterLab Desktop App now available by AlexanderTheGr8 on Wednesday September 22, 2021 @11:26PM (#28624927)
I 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.
Re:JupyterLab Desktop App now available by jjoonathan on Wednesday September 22, 2021 @06:07PM (#28622606)
Hey, 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.

Re:JupyterLab Desktop App now available by soVeryTired on Wednesday September 22, 2021 @05:49PM (#28622359)
Oh 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.

Re:JupyterLab Desktop App now available by kristjansson on Wednesday September 22, 2021 @07:05PM (#28623189)
Notebooks 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.
Re:JupyterLab Desktop App now available by AlexanderTheGr8 on Wednesday September 22, 2021 @11:30PM (#28624945)
The 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!

Re:JupyterLab Desktop App now available by kristjansson on Thursday September 23, 2021 @12:04AM (#28625109)
Right, 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.

Re:JupyterLab Desktop App now available by pjmlp on Thursday September 23, 2021 @01:30AM (#28625481)
To put in perspective, notebooks are how using the REPL on Lisp Machines and Xerox workstations (Interlisp-D, Mesa XDE, Mesa/Cedar, Smalltalk) feels like.
Re:JupyterLab Desktop App now available by kristjansson on Thursday September 23, 2021 @01:59AM (#28625613)
Those 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’

Re:JupyterLab Desktop App now available by pjmlp on Thursday September 23, 2021 @02:26AM (#28625753)
In terms of Smalltalk the answer is quite easy, you would trim down the image as kind of "release build" and ship it alongside a tiny executable that would load it.

No big deal other that talking rumors without reading manuals.

Re:JupyterLab Desktop App now available by kristjansson on Thursday September 23, 2021 @03:02AM (#28626028)
I didn't mean to imply that the answer to either question was 'can't be done', but that the analogy might extend to the the points of friction as well.
Re:JupyterLab Desktop App now available by pjmlp on Thursday September 23, 2021 @03:44AM (#28626332)
Sure, and my point was that mostly the friction in Smalltalk's case, was not reading the documentation and having an opinion without Smalltalk experience.
Re:JupyterLab Desktop App now available by kimukasetsu on Wednesday September 22, 2021 @06:34PM (#28622891)
RMarkdown has neither of these issues, and it supports Python. It is baffling to me that most data scientists use Jupyter, since its diffs are meaningless. Its export options are very underwhelming compared to Rmd as well. Notebooks [1] are simply a special case of R Markdown formats. Besides, Rmd are literally text files that work with any text editor, including vim.

[1] https://bookdown.org/yihui/rmarkdown/notebook.html

Re:JupyterLab Desktop App now available by contravariant on Wednesday September 22, 2021 @07:13PM (#28623249)
You can use Jupytext and basically get the best of both worlds (it hooks into jupyterlab to save/restore a markdown version of the notebook). A possible downside is that it doesn't store the outputs of the cells, though that is intended as a feature.

And since rMarkdown just uses pandoc under the hood, it's a bit unfair to say it has better export options than ipynb which is also supported by pandoc.

Re:JupyterLab Desktop App now available by ivan_ah on Wednesday September 22, 2021 @11:10PM (#28624860)
The closest thing to RMarkdown is MyST — the native .md format for the jupyterbook project: https://jupyterbook.org/content/myst.html

I've switched to that instead of notebooks, and loving the text-based life... gittable, diffable, peer-reviewable code, etc.

Re:JupyterLab Desktop App now available by 6gvONxR4sf7o on Wednesday September 22, 2021 @10:56PM (#28624791)
I’ll take a moment to plug jupytext. It just takes an easy pre-commit hook to have auto-synchronized .ipynb and .md (and more!) versions of the notebook, which makes diffing and code review feasible.
Re:JupyterLab Desktop App now available by mistrial9 on Wednesday September 22, 2021 @06:23PM (#28622780)
some things are less-great in the FOSS world. I used MetroWerks tooling that really, really was nice. I even wrote code for them once .. it has been a long while and the real win with Jupyter is the massive popularity I think.
Re:JupyterLab Desktop App now available by pottertheotter on Wednesday September 22, 2021 @07:57PM (#28623602)
I’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.
Re:JupyterLab Desktop App now available by Ekrub on Thursday September 23, 2021 @09:33AM (#28628878)
You 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.
Re:JupyterLab Desktop App now available by robotsteve2 on Wednesday September 22, 2021 @06:31PM (#28622860)
I 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.
Re:JupyterLab Desktop App now available by ivan_ah on Wednesday September 22, 2021 @11:13PM (#28624875)
One 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.

Re:JupyterLab Desktop App now available by arthurcolle on Wednesday September 22, 2021 @06:05PM (#28622582)
I hate the automatic bottom right pop ups for every little thing in VS Code, its so annoying
Re:JupyterLab Desktop App now available by threatofrain on Wednesday September 22, 2021 @05:43PM (#28622269)
Do you have a link of resource explaining more about the VSC notebook workflow?
Re:JupyterLab Desktop App now available by minimaxir on Wednesday September 22, 2021 @05:45PM (#28622303)
Here's the official page on the integration: https://code.visualstudio.com/docs/datascience/jupyter-noteb...

Some more demos: https://code.visualstudio.com/learn/educators/notebooks

Once the extensions are installed, just open an .ipynb file in VS Code.

Re:JupyterLab Desktop App now available by rdedev on Wednesday September 22, 2021 @11:50PM (#28625028)
Just 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
Re:JupyterLab Desktop App now available by 6gvONxR4sf7o on Wednesday September 22, 2021 @05:45PM (#28622308)
Interesting. 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!
Re:JupyterLab Desktop App now available by axpy906 on Wednesday September 22, 2021 @07:52PM (#28623554)
I’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.

Re:JupyterLab Desktop App now available by Ekrub on Thursday September 23, 2021 @09:36AM (#28628907)
Have you tried recently? We re-wrote them from scratch to use native UI elements (used to be a web view) so perf should be much improved.
Re:JupyterLab Desktop App now available by axpy906 on Friday September 24, 2021 @04:37PM (#28647505)
Nope but if it’s been improved, I will take a look. Would be nice to run with remote containers.
Re:JupyterLab Desktop App now available by williamstein on Wednesday September 22, 2021 @07:36PM (#28623433)
Is "Visual Studio Code notebooks" fully open source, like JupyterLab is?
Re:JupyterLab Desktop App now available by Ekrub on Thursday September 23, 2021 @10:05AM (#28629326)
VS Code is here: https://github.com/microsoft/vscode

The extension that enables Jupyter Notebooks is here: https://github.com/Microsoft/vscode-jupyter