
JupyterLab: the next generation of the Jupyter Notebook - wlattner
http://blog.jupyter.org/2016/07/14/jupyter-lab-alpha/
======
drauh
Beaker Notebook (posted several times, but without much attention[0]) does
something similar:
[http://beakernotebook.com/features](http://beakernotebook.com/features)

It supports these languages: Python, Python3, R, JavaScript, SQL, C++,
Scala/Spark, Lua/Torch, Java, Julia, Groovy, Node, Ruby, HTML, and Clojure.

It has an experimental native version: [https://github.com/twosigma/beaker-
notebook/wiki/Electron-Be...](https://github.com/twosigma/beaker-
notebook/wiki/Electron-Beaker)

Talk at SciPy 2015:
[https://www.youtube.com/watch?v=iMPfLz6kKv8](https://www.youtube.com/watch?v=iMPfLz6kKv8)

[0]
[https://news.ycombinator.com/item?id=8364237](https://news.ycombinator.com/item?id=8364237)

~~~
IshKebab
Does Electron really count as 'native'?

~~~
clishem
Definitely not in my book.

------
bicubic
> JupyterLab adapts easily to multiple workflow needs, letting you move from a
> Notebook/narrative focus to a script/console one.

I'm not sure I like where that design is going. It's starting to look an awful
lot like RStudio and Matlab and I moved _away_ from those tools for a reason.
My favourite thing about Jupyter is that it _is_ focused on notebooks and
narrative. It brought about a revolution of sorts; now we have people blogging
and writing papers in Jupyter, github is full of random useful notebooks.

This design almost seems like a step backwards in that regard.

~~~
nl
Context: We use Jupyter _heavily_ (mostly against Spark).

In my experience there is a set of things that "traditional" Jupyter notebooks
does really well. Anytime you have a linear flow of steps the notebook
metaphor works really well.

However, if you are doing things approaching traditional development, where
you have multiple sources of data, or loops that require debugging, or
basically anything that isn't linear in nature it doesn't work so well.

I wouldn't want to lose traditional notebooks, but I'd love to be able to
offer people something like this that offers better debugging and some
development tool support, rather than jumping to a full desktop IDE.

~~~
bicubic
My experience is in line with yours, debugging loops and functions is a big
pain point.

However, I think there's a much better solution to be had here, which is to
add more powerful debugging capabilities to Notebook. I think Notebook has
potential for new debugging paradigms, imagine for example being able to break
anywhere in a cell and get a new 'forked cell' which operates in the context
of the code that you just broke into. I think that's the better direction to
go instead of reverting to the very interfaces and paradigms that we moved
away from.

~~~
radiowave
This sounds like a promising idea.

As someone who still reaches for a Smalltalk environment when I need to
prototype something, ipython notebook is about the closest thing I've ever
found to the style of interaction you get with a Smalltalk REPL (aka
"workspace"). Smalltalk deliberately blurs the lines between a text editor and
REPL, and the debugger takes this a step further - a combined editor and REPL,
within a suspended execution context. It could be argued, for example, that
coding within the suspended context of a failed unit test, while the code
underneath your cursor has this REPL-like liveness, is the non-cargo-cult way
of doing TDD.

I'm not trying to claim Smalltalk as the Greatest Thing Ever, but its
existence (and its "otherness" \- from the point of view of today's
conventional style of development) are evidence that there are useful tools to
be had, somewhere down a road less travelled.

~~~
muraiki
I learned enough Smalltalk to make prototypes with Seaside. I love the way
notebooks work and to make them more Smalltalky would be wonderful not only
for programmers but for the field as a whole.

------
yomritoyj
I love how notebooks allow the mixing of code and output and support
incremental development by letting you choose which cells to execute. But I
find the semantics horrible. Each time you execute a cell you do so in an
environment that depends on your entire history and cannot be figured out by
simply reading the notebook. I wish for a environment which would have the
same semantics as a script but which would snapshot the environment at the
entry to each cell so that when a cell is modified execution does not have to
resume at the beginning. Even better if downstream data dependencies are
tracked so that after modifying and reexecuting a cell we know which
downstream results have become stale. Does such an environment exist?

~~~
mjlm
I think this persistent state is one of the main advantages of the notebook
environment, or the Matlab workspace, which I guess it was inspired by. It
allows you to quickly try alternative values for certain variables without
having to re-calculate everything. Saving snapshots would not be feasible if
the project contains large amounts of data. If you want to reset everything,
just "run all" from the beginning, or use a conventional IDE with a debugger.

~~~
rhodin
No, not Matlab but Mathematica: "We were inspired originally by the excellent
implementation in Mathematica" [1].

[1] [http://ipython.org/ipython-
doc/dev/whatsnew/version0.12.html...](http://ipython.org/ipython-
doc/dev/whatsnew/version0.12.html#an-interactive-browser-based-notebook-with-
rich-media-support)

~~~
brians
And that came from Emacs and old Lisp environments---and perhaps something yet
earlier?

As late as 2000, this was the single biggest advantage and single biggest
impediment to new programmers in MIT's 6.001 lab: a bunch of nonvisible state,
mutated by every C-x C-e. The student has tweaked two dozen points trying to
fix a small program, and re-evaluated definitions after many of them, but
maybe not all. The most straightforward help from a teacher is to get the
buffer into a form such that M-x eval-region paves over all that, sets a known
environment of top level definitions, and---more than half the time---the
student's code now works.

I have similar concerns about much of Victor's work, for the same reason.
Managing a mental model of complex state is a n important skill for
programming, but it's best learned incrementally over long experience with
more complex programs. These very interactive environments front load the need
for that skill without giving any obvious structure for helping the student
learn.

Contrast Excel and HyperCard, which have no invisible state: you can click and
see everything.

------
sorenjan
I love Jupyter notebooks, I just wish I could use them in a dedicated program
instead of having to run a server and using a browser based client. It feels
hacky and I just prefer native apps for coding and the browser for reading
documentation and similar. Even an Electron based program that could be
associated with notebook files and hide the server-client model would make it
nicer to use. At the moment I like to open notebooks in a tab in the browser
built into Visual Studio, with the editor open in a tab next to it. With some
custom CSS this can be made to look pretty nice, although it's far from
perfect.

There's of course value in being able to share notebooks and view them in
browsers, I'd just prefer a more native experience when editing them. Maybe an
extension for Visual Studio Code would be a good idea?

~~~
m_ke
You should check this
[https://github.com/nteract/hydrogen/blob/master/README.md](https://github.com/nteract/hydrogen/blob/master/README.md)
out.

~~~
mungoid
Holy cow I never knew that existed! My life could have been so much different
the past few months had I known.. I bet I even skimmed past it on HN without
even looking.. Shame on me

~~~
eggy
Ditto! Amazing. Seems the inverse of notebooks where it is a notebook with
predominantly text and a box with code and results. I'm going to take Hydrogen
for a spin.

I still rely heavily on Mathematica, since the notebook interface won me over
years and years ago. I think the next Mathematica paradigm to be redone in
JupyterLab is easy connections to data without all the connection string fuss.
You can just put in some basic phrases in Mathematica, and you are connected
to the data, albeit curated by Wolfram, but still simple and immediate.

I can link to Mathematica from NetLogo and other programs I use too.

~~~
denfromufa
I found Jupyter notebooks more stable than Mathematica.

~~~
eggy
In what sense? I only get glitches in Mathematica when I am hitting extremely
huge curated data from Wolfram and trying to do something at the same time. I
have only used Jupyter notebooks for a page or two, and mostly toy problems,
so I can't say I have stress tested them. I do like Hydrogen, though.

------
jasongrout
(disclaimer: I'm one of the authors of the scipy talk the post is about...)

First: JupyterLab is definitely still alpha-level software, and is undergoing
very rapid iteration.

I notice that a lot of comments are missing one of the most important ideas
behind JupyterLab. It's built on a very flexible plugin framework (provided by
PhosphorJS), and all components are provided as plugins. JupyterLab
essentially is a reference set of components, but we really see people
creating their own components, and a rich 3rd party ecosystem. This also sets
a foundation for exploring other ideas for what a web notebook might look
like, etc, and provides an easy way to distribute such a component. More than
just extending via components, we've paid a lot of attention to getting having
a good keyboard shortcut system, a good command/command palette system, etc.
The video of the talk shows some simple examples of how JupyterLab can be
extended:
[https://www.youtube.com/watch?v=Ejh0ftSjk6g&list=PLYx7XA2nY5...](https://www.youtube.com/watch?v=Ejh0ftSjk6g&list=PLYx7XA2nY5Gf37zYZMw6OqGFRPjB1jCy6&index=58).

Also, I see several people talking about having a UI that is really focused on
notebooks. We definitely plan on an easy way to maximize a single pane (which
might be a notebook, etc.) to be able to focus on one thing.

~~~
clishem
Thanks for the video. Looks really great!

One thing I missed is a more detailed discussion of the Command palette. Will
it also be extensible? Can plugins add their own commands to it for example?

~~~
jasongrout
That's the only way commands are added. Every command on there was added by a
plugin. You can see a simple example in the about plugin: a command is created
at
[https://github.com/jupyter/jupyterlab/blob/6d540709ad64e7767...](https://github.com/jupyter/jupyterlab/blob/6d540709ad64e7767085eeb3e05d2d6f859333fe/src/about/plugin.ts#L158),
and is added to the command palette at
[https://github.com/jupyter/jupyterlab/blob/6d540709ad64e7767...](https://github.com/jupyter/jupyterlab/blob/6d540709ad64e7767085eeb3e05d2d6f859333fe/src/about/plugin.ts#L173).

------
denfromufa
Jupyter started from ipython, originally mostly written in python and for
python. But the project was so successful that it extended for other languages
using cell magic and then kernel system. The team is now mostly using
JavaScript, Typescript, except for ipython sub-project. Although it's obvious
choice for schools, research, analytical work, and publications, still I
really wish for more adoption in corporate environment, that got stuck in
proprietary tools.

------
maus42
I like the idea of executable cells for developing.

It's been a couple of years since I played around with Jupyter notebooks, but
then I got frustrated quite soon:

Stepping outside my preferred editor (vim) was annoying, likewise I had no
idea if (how?) I could export the code out of notebook to a regular .py text
file (without clumsily copypasting each cell). And the .ipynb files itself
seem quite terrible to manage in Git: write something and if you want to 'git
diff' the changes, sometimes what you see is okay, sometimes it's not very...
easily decipherable. (Text encoded image/png's?!)

My preferred workflow with R is to open the files I'm working with in both
RStudio (with vim keybindings) and vim. Maybe if I just strictly restricted
the use of notebook cells just for calling scripts and functions written in
external files, and use the notebook as a whole just for presentation
purposes, but then it wouldn't be that much an improvement over regular
IPython. Any thoughts?

~~~
j2kun
There's a one-line terminal command to convert to. It's like `jupyter
nbconvert -o python` or something. Works okay out of the box, and has some
meager customizability.

~~~
takluyver
Yep, it's 'jupyter nbconvert --to python'. Docs here:
[http://nbconvert.readthedocs.io/](http://nbconvert.readthedocs.io/)

It actually has a lot of customisability if you're willing to get into Jinja
templates.

------
bpchaps
It looks nice - I kind of wish a lot of these features would have been put
into jupyter itself, though. The lack of configurability in jupyter drives me
insane. Sure, the configs are editable, but the lack of proper documentation
makes it incredibly difficult.

Things like turning off autocomplete and limiting jupyter's ability to freeze
my browser after an accidental infininte loop would go miles for me. These
days I've just gone back into vim..

~~~
denfromufa
Have you tried stopping or killing the kernel? I found jupyter user group on
google very responsive when something is not clear or needs to be extended.
Google search on jupyter is pretty bad since still points at old ipython docs,
although they do have updated docs for jupyter.

~~~
bpchaps
Of course. Problem is, a lot of the kernel halt requests don't seem to make it
90% of the time and restarting the kernel gets annoying when using it on
larger datasets. Though, it has forced me into writing easily re-runnable code
which is kinda good.

~~~
denfromufa
There is cell magic to cache your long-running cells.

~~~
bpchaps
Didn't know about that one - thanks!

Any thoughts on the infinite loop problem, though? I've seen tons of threads
for it in stackoverflow/github and not much ever comes from them. Lots of dev
he-said-she-saids, though. Pretty big problem for a lot of us.

~~~
denfromufa
I replied above - could not reply here somehow initially

------
cauthon
So RStudio in a browser? Jokes aside, this looks great. The biggest
frustration I've had with the notebooks is the organization of code. Nice to
see that become a bit more compartmentalized from the execution window.

~~~
mungoid
Totally agree. My larger notebooks get pretty ugly and I have to spend a fair
bit of time cleaning them up. But that's probably because I am not the most
organized person ever.

~~~
denfromufa
That is why it is better to keep a jupyter terminal or qtconsole around for
quick and messy experimentation connected to the same kernel before pushing it
to notebook

~~~
harshnisar
How?

~~~
denfromufa
Type in jupyter notebook the %qtconsole magic!

------
hacker42
It seems to me that Wolfram Research missed a huge opportunity here with
regards to Mathematica Notebooks and the Worlfram Cloud. They didn't see or
ignored the momentum that open source and the web can gain.

------
andyidsinga
I love the notebook paradigm and executable cells and sharability of the whole
thing (from ipython notebooks). Those still seem to be there, but the look and
feel seems to take the system a step back towards a 90's style IDE with the
tabs and file management.

that said probably still probably a good system on balance..

------
a_bonobo
How does this differ from Rodeo [1]?

[1] [http://blog.yhat.com/posts/introducing-
rodeo.html](http://blog.yhat.com/posts/introducing-rodeo.html)

~~~
denfromufa
Rodeo is python-only last time I checked. Also it is missing notebooks,
widgets, extensions, rich outputs, server architecture, multi-user support.
Rodeo is closer to spyder than jupyter.

~~~
a_bonobo
Thank you for the answer! So JupyterLab would have much more funtionality

------
rgreasons
I see lots of "this is turning into RStudio" comments- but that's kind of the
point of jupyterlab. Brian Granger was on a podcast recently[1] and spoke
about how he feels RStudio has been great for the R community and wants to
Proliferate that for other languages.

I think it's easy for us to forget we are the developer minority. Many, many
developers (especially hobbyists and researchers) live and love the safety and
guiderails of an IDE.

[1] [http://partiallyderivative.com/podcast/2016/07/11/brian-
gran...](http://partiallyderivative.com/podcast/2016/07/11/brian-granger-
interview)

~~~
nl
I think this misinterprets what people here are saying.

I suspect that many people here like IDEs, but think that notebooks are a a
different thing that is valuable in themselves. I feel this way myself, but
provided the notebook-style interface remains I don't see that exploring other
options is a bad thing.

------
sa_su_ke_75
also Pharo smalltalk is a wonderfull context for live immersive coding. Try to
see this video with Roassal 2
[https://www.youtube.com/watch?v=iXUZiFtnxK8](https://www.youtube.com/watch?v=iXUZiFtnxK8)

------
arcticfox
Am I crazy for thinking this might replace my current IDE (cloud9) for some
workflows??

~~~
denfromufa
Not if you are doing significant refactoring and debugging

------
wodenokoto
Does it include a variable Explorer? That's the main thing I'm missing

~~~
jasongrout
It doesn't (yet). I really hope eventually it will include a number of
debugging tools, a variable explorer being one of them.

------
johnchristopher
Jupyter is a pain to sto a set up and configure for PHP on windows. I love it
on Linux but Anaconda isn't exactly an out of the box solution.

------
lorenzfx
What is the advantage of the graphical console vs. the notebook? I don't get
(yet) why I would need the console when I have the notebook.

~~~
jasongrout
One thing people use it for is ephemeral computations that they don't
need/want to be saved, so they don't want to bother with dealing with a
notebook file.

Another thing we could support in the future is easily switching kernels mid-
stream in the console. Maybe that makes sense---it did come up in conversation
yesterday night here at scipy.

