
Neuron, a new VS Code extension for data science - starbugs
https://blogs.msdn.microsoft.com/uk_faculty_connection/2018/10/29/data-science-in-visual-studio-code-using-neuron-a-new-vs-code-extension/
======
greazer
Hey great to hear the excitement for this. In fact, we (the Python VSCode
extension team) were so excited about it, that we've already begun integrating
it into the python VSCode extension itself! It's a little rough yet for a full
release but it's highly functional. If you want to play with it, just build
the extension from [https://github.com/Microsoft/vscode-
python](https://github.com/Microsoft/vscode-python). Suggestions are welcome,
but remember, it's still undergoing changes.

------
pavanagrawal123
Unfortunately this extension has already died in activity. I forked the
extension here:
[https://github.com/pavanagrawal123/VSNotebooks](https://github.com/pavanagrawal123/VSNotebooks)
. A lot of bug fixes and usability improvements have been put in!

~~~
farresito
In what way has it died in activity when there are tens of commits around June
and July? That's not even four months.

~~~
judge2020
3 months can feel like a long time without any commits in the age of
corporate-funded projects like Vue and React.

~~~
kbumsik
This is not a big project like Vue or React. It's just an add-on. It is very
common that popular add-ons are not maintained for months.

------
smortaz
FYI - This was one of the two Cambridge University projects that was done with
our team last summer. I'm not sure why the report came out this late. Both
were well done, especially considering the learning curve and duration.

The 1st one was the data science plugin for vscode mentioned in the blog. The
other one which I haven't seen published yet was a C# kernel for Jupyter which
can be found here along w a video:
[https://github.com/MohamedEihab/icsharp/tree/Roslyn_2](https://github.com/MohamedEihab/icsharp/tree/Roslyn_2)

[disclaimer - work at microsoft]

------
montenegrohugo
This looks awesome. I'm continually surprised by the improvements made to VS
Code. I love both Jupyter and VS Code, and having both merged seems great for
my use case (and anyone else doing exploratory code).

Props!

------
ct0
Anything that resembles RStudio for python makes me really excited to shift
working from R to python for projects running in production.

~~~
samfriedman
In that case you should check out Yhat's Rodeo IDE. Essentially built as
"RStudio for Python".

[https://rodeo.yhat.com/](https://rodeo.yhat.com/)

~~~
leetrout
It was a fun project but it's no longer supported.

[https://github.com/yhat/rodeo/issues/655](https://github.com/yhat/rodeo/issues/655)

[https://github.com/yhat/rodeo/issues/631](https://github.com/yhat/rodeo/issues/631)

~~~
samfriedman
Ah, right you are. Even looks like the download links are broken.

------
ddavis
Any Emacs users looking for something similar, see EIN [0] and ob-ipython [1].

[0] [https://github.com/millejoh/emacs-ipython-
notebook](https://github.com/millejoh/emacs-ipython-notebook)

[1] [https://github.com/gregsexton/ob-
ipython](https://github.com/gregsexton/ob-ipython)

~~~
natrys
ESS [0] is fantastic, which I am using with R.

[0] [https://ess.r-project.org/](https://ess.r-project.org/)

------
deshpand
The next generation of Jupyter, JupyterLab is turning into a whole
IDE/platform, not just a notebook. They are also trying to incorporate the
monaco editor which drives VS Code. Wouldn't that be a better solution?

[https://github.com/jupyterlab/jupyterlab-
monaco](https://github.com/jupyterlab/jupyterlab-monaco)

~~~
pavanagrawal123
that won't bring the rich support of extensions VSCode has.

VSCode's magic isn't just the monaco editor, IMO it's really the ecosystem and
really nice Intellisense the other extensions provide.

though I do agree, this _might_ be the better solution in the long run.

~~~
xrd
I spent time reading through Joel Grus' "I hate notebooks" slide deck and he
makes a really compelling why they (Jupyter notebooks) are not the right tool
for many reasons.

[https://docs.google.com/presentation/d/1n2RlMdmv1p25Xy5thJUh...](https://docs.google.com/presentation/d/1n2RlMdmv1p25Xy5thJUhkKGvjtV-
dkAIsUXP-AL4ffI/edit#slide=id.g362da58057_0_1)

It was eye opening.

His YouTube live coding on building a neural net from scratch really shows the
power of using VSCode to do AI work and complements his assertions.

[https://www.youtube.com/watch?v=o64FV-
ez6Gw&feature=youtu.be](https://www.youtube.com/watch?v=o64FV-
ez6Gw&feature=youtu.be)

Both are well worth the time. All the reading I've been doing on ML/AI really
came together after watching and taking notes in that YouTube video.

~~~
deshpand
You have to give credit to JupyterCon for inviting him! Most of his issues
relate to Jupyter, he has/had not seen JupyterLab. You can trust that many of
these issues will get worked out in the long run. I have nothing against VS
Code but Jupyter(Lab) didn't win the ACM Software System award (Nobel price
for software) for nothing.

------
sorenjan
This looks a lot like the Jupyter extension [0], which is made by a Microsoft
employee and was last updated before the summer. I really like the cell format
of Jupyter (inspired by Matlab I presume), I don't really want to select the
code before I run it. Will Microsoft support both extensions? I would like
support for actual notebooks as well, for when I want to mix text, code, and
figures but without having to work in a browser.

[0]
[https://marketplace.visualstudio.com/items?itemName=donjayam...](https://marketplace.visualstudio.com/items?itemName=donjayamanne.jupyter)

~~~
williamstein
> (inspired by Matlab I presume)

I think Jupyter is inspired by Mathematica (and Macsyma) notebooks, not
Matlab... Source: Fernando Perez started IPython, very much inspired by
Mathematica (he was switching from Mathematica to Python). Then Alex Clemesha
and I created the Sage notebook in 2007, partly inspired by discussions and
demos from IPython developers, and also very much inspired by Mathematica
(Alex Clemesha, a physics student, was also a heavy Mathematica user). Alex
then made knoboo in 2008
[https://github.com/knoboo/knoboo](https://github.com/knoboo/knoboo)), which
is another notebook that inspired the Jupyter notebook implementation.

~~~
sorenjan
I was referring to the cell mode, not notebooks. In Matlab you create a new
cell by starting a line with two comment characters (%%), in the Jupyter
extension you use #%%. You can then run the current cell with ctrl+enter, no
need for selecting anything.

[https://blogs.mathworks.com/community/2008/01/07/ive-got-
som...](https://blogs.mathworks.com/community/2008/01/07/ive-got-something-to-
cell-you/)

------
sandGorgon
This runs Jupyter in the background.

So it retains some of the issues with it - e.g. notebook diff,etc.

~~~
thanatropism
I think (and this isn't just personal experience) most of the appeal of
Jupyter is the fractioned persistent state that allows you to write
incrementally but not re-run increasingly long scripts. Inline plots are just
gravy.

(Yes yes write documents export LaTeX. Not sure people care about this at all)

I've been developing a style where development "cells" are cached with
joblib.Memory so re-running a script from command line doesn't take idiotic
amounts of time. Further, I have litte context managers such that

    
    
       with Figure('filename.png'): plotting_logic()
    

exports a file that immediately shows in the folder navigation bar of Atom.
It's overall a better experience.

What I would really like is being able to use joblib.Memory not as a decorator
(which requires bunching up your "cells" in functions and calling them
separately) but as a context manager.

\---

To the tune of the "Portlandia" song: _the dream of MUMPS state is alive in
joblib..._

~~~
mirashii
You can actually do this as a context manager, I have done something very
similar in the past. I created a dummy context manager with a unique name and
used an importhook to do an AST rewrite to the body of the context manager.
It's a bit of a hack (okay, a lot of a hack), but allows for some really neat
patterns that context managers didn't allow.

------
minimaxir
So when I saw my "Advantages of Using R Notebooks Instead of Jupyter
Notebooks" post was trending on HN this morning, I remembered Neuron is a
strong idea to work outside both technologies, easily complemented by the
multitude of VS Code extensions/theming.

There are still a few important missing features unfortunately (see the issues
page: [https://github.com/lorenzo2897/vscode-
ipe/issues](https://github.com/lorenzo2897/vscode-ipe/issues)), but there's a
lot of promise!

~~~
yodon
Looking through the issues list you linked to, lack of conda support [0] looks
like a pretty big deal for most people doing heavy analysis in Python.

[0][https://github.com/lorenzo2897/vscode-
ipe/issues/162](https://github.com/lorenzo2897/vscode-ipe/issues/162)

~~~
curiousgal
What problem does conda try to solve?

~~~
dual_basis
In general, it is a package manager which supports different environments. It
is similar to pipenv, but existed before. I believe there are still some
differences, for instance conda is language agnostic, and it particularly was
useful for data science where you would want the compiled version of certain
dependencies (eg. MKL) for performance reasons. This SO answer seems like a
good overview:
[https://stackoverflow.com/q/20994716/1060781](https://stackoverflow.com/q/20994716/1060781)

------
yodon
Can anyone comment on strengths or weaknesses of this compared to Hydrogen?

~~~
pavanagrawal123
(disclaimer, i'm working on a fork with better feature support)

Strengths: VSCode support

Weaknesses:

Bad code quality for the extension

No variable explorer

No extensibility

No custom env (fixed in my fork)

No cell support (almost fixed in my fork)

------
vbsteven
This looks really cool. Does anything similar exist for exploration on a SQL
database?

I would love to see some notebook like interface for a SQL database with all
the context awareness of Datagrips/IntelliJ’s editor but with similar
visualisations like this tool.

~~~
StreakyCobra
Not exactly your answer, but microsoft is developing an open-source tool,
that's visually similar to VSCode, to work on databases [1]. Sadly it only
supports SQL Server, Azure SQL DB and SQL DW for now, but people are asking
for additional database engine [2].

[1]
[https://github.com/Microsoft/azuredatastudio](https://github.com/Microsoft/azuredatastudio)
[2]
[https://github.com/Microsoft/azuredatastudio/issues/56](https://github.com/Microsoft/azuredatastudio/issues/56)

------
samfisher83
Does this have a variable viewer like spyder (for data frames, lists, etc.)?

~~~
jakear
VSCode already provides that in the debug view

~~~
pavanagrawal123
Neuron doesn't support this, it won't work natively with the notebook.

------
meanmrmustard92
looks similar to Hydrogen for Atom. I'd recommend that (since it is actively
maintained) too

