4 ms·
Sigh. I really think that the only reason notebooks are so popular is that Python never had a popular IDE with a high-quality REPL where people can learn to wor
by st1x7 6y ago
Sigh. I really think that the only reason notebooks are so popular is that Python never had a popular IDE with a high-quality REPL where people can learn to work interactively while writing code in plain text.
R illustrates this very well - as an R user you can have your pick between RStudio, Jupyter and Rmarkdown and the overwhelming majority of users pick RStudio and notebooks are reserved only for a niche set of use cases. It also speaks volumes that almost no one writes R in Jupyter even though it's supported very well - R users just have better options available to them.
- minimaxir 6y agoYou bring up RStudio but not the R Notebooks which it supports natively (https://bookdown.org/yihui/rmarkdown/notebook.html https://bookdown.org/yihui/rmarkdown/notebook.html), which IMO is a far-superior way of handling notebooks than Jupyter. (namely, the files are plain text so you can actually commit to Git without fuss) I wrote a detailed blog post about the differences between Jupyter and R Notebooks years ago: https://minimaxir.com/2017/06/r-notebooks/ https://minimaxir.com/2017/06/r-notebooks/
- jph00 6y agoNo that's not the reason - or at least, not for everyone. I created nbdev. I've been coding for over 30 years, and spent over 10 years using R and S-PLUS. I've used Delphi, Visual Studio, Emacs, vim, vscode, and many other editors and IDEs, including many with integrated line-oriented REPLs. There's a big difference between a line-oriented plain text REPL, and a Mathematica/Jupyter-style notebook REPL, especially when you want to mix and match your charts, image outputs, rich table outputs, interactive JS outputs, and so forth. Also, for experimentation, where you want to go back and change things to see what happens (e.g. very common in data science) I find it much easier and more understandable in a notebook. I have a video where I show the difference between these styles of working in some detail: https://www.youtube.com/watch?v=9Q6sLbz37gk https://www.youtube.com/watch?v=9Q6sLbz37gk
- sbelskie 6y agoYea, I don't really get what repls have to do with what notebooks offer. They are similar-ish, obviously, but they accommodate different workflows and use cases.
- st1x7 6y agoThat's getting to my point though - they should accommodate different workflows and use cases. But what's happening instead is that people are overusing notebooks in cases where plain text + REPL is more appropriate.
- sbelskie 6y agoThat makes sense as a possible situation. I’m just not sure that it’s one that’s familiar to me. I can’t honestly say I have my finger on the pulse of where people are using notebooks vs repls but the former seem really great for 1) step by step examples 2) scripts-in-progress where certain steps are more in flux than others. Though, I think I get what you mean as I reflect on my own dev experience. As a mainly C# dev which has a very very limited repl experience (I would and should say no repl experience but someone will yell at me about csi.exe or dotnet-script) I have seen people using notebooks for want of a good repl, but I’m curious why anyone writing python would.
- fulafel 6y agoPeople mean different things by REPL - the nicer Lisps had richer reader prompts that were not totally text bsaed, could show you graphical stuff and accept commands other than just source code, have interactive features etc - see eg https://upload.wikimedia.org/wikipedia/commons/c/c6/Listener.png https://upload.wikimedia.org/wikipedia/commons/c/c6/Listener... or some youtube videos of Lisp machines.
- fulafel 6y agoThis is an interesting view in light of the fact that Jupyter is actually a direct evolution of the most popular bells-and-whistles REPL in Python land (IPython) - .ipynb files were just saved IPython REPL sessions. (try "sudo apt-get install ipython && ipython" on your Ubuntu/Debian system to try it out)
- slightwinder 6y ago> Sigh. I really think that the only reason notebooks are so popular is that Python never had a popular IDE with a high-quality REPL where people can learn to work interactively while writing code in plain text. I would not call Idle unpopular. But it had a limit for growing for sure. But Notebooks are mostly coming from the science-corner of python. People there used notebook-like tools and workflows for decades and some brought that over to ipython-project. I remember 15(?) Years ago when the project started focusing more and more on the cluster-aspect of their shell, they brought up many differenct tools for this. One of them was notebook-like and what become later Jupyter. It quickly became popular in certain groups for those reasons.
- Jugurtha 6y agoI don't think this is the best comparison. People use notebooks in Python to work with data and code, not for lack of a popular IDE. Comparing R and Python also could be done better. Python is a general purpose language. R is for statistics and science. Even then, Python is extremely popular for these very domains with Jupyter notebooks. This is why I shrug looking at "Jupyter killer" notebook alternatives tackling machine learning: in my experience delivering machine learning products to large, paying, clients, the bottleneck never was slicker stylesheets or cool animations. It was the nuts and bolts of things.
- Kwpolska 6y agoThere are good IDEs for Python development, such as PyCharm (from JetBrains). You can launch an IPython console in PyCharm, and get a REPL. And besides, many languages don’t have any REPLs or haven’t had them for years (C# until 2015, Java until 2017), and people were still able to work fine with those.