
Announcing .NET Jupyter Notebooks - GordonS
https://www.hanselman.com/blog/AnnouncingNETJupyterNotebooks.aspx
======
52-6F-62
Probably a good time to mention that for the JS-minded there is Bostock’s
Observable Notebooks as well.

I think the only real drawback is no self hosting.

[https://observablehq.com/](https://observablehq.com/)

A pretty healthy example:

[https://observablehq.com/@rreusser/2d-n-body-gravity-with-
po...](https://observablehq.com/@rreusser/2d-n-body-gravity-with-poissons-
equation)

~~~
alexcnwy
Mike Bostock is a beast - this d3.js example from 2013 still blows my mind:
[https://archive.nytimes.com/www.nytimes.com/interactive/2012...](https://archive.nytimes.com/www.nytimes.com/interactive/2012/02/13/us/politics/2013-budget-
proposal-graphic.html)

I haven’t gotten properly stuck into observable - in what ways is it better
than using a jupyter notebook?

~~~
52-6F-62
I don't know about "better" as I don't have a lot of experience with
either—I've only dabbled or used them to prototype something small. The major
differentiator is the JS implementation and ability to import libraries from
sibling notebooks and other sources.

But yeah I'd have to agree that Bostock is a beast.

~~~
lmeyerov
I like Observable for sharing JS tutorials - was just updating
[https://observablehq.com/@lmeyerov/manipulating-flat-
arrays-...](https://observablehq.com/@lmeyerov/manipulating-flat-arrays-arrow-
style) today.

Observable does some things quite well for that use case:

\-- Easier dependencies: no need for 'npm install', just 'require(...)'

\-- URL publishing

\-- Collaborative merge flow

However, Jupyter made some good decisions that make it win over Observable for
our day-to-day data work:

\-- Manual reexecution vs. automatic: when working with big data, outside
APIs, etc., Observable's automatic reexecution is a non-starter

\-- Fully open source, embeddable, and successful history of non-vc funding:
Jupyter is organized and provided in a way companies ( who aren't Amazon ;-))
can rally around, evidenced by contributions by Bloomberg etc.

\-- Access to underlying unix/windows env and multiple environments (multiple
Python versions, ...). As much as I wish Observable's choice of JS could
provide a viable data environment, and I've personally invested in making it
so and the path to making it first-class is clear, we need way more
gov/google/nvidia/etc. support.

Ultimately, for not-too-sensitive collaborative data work, we use Google
Colab, then offline and sensitive commercial work via Jupyter (Graphistry
ships with it preloaded for GPU dataframe & GPU visual graph analytics
goodness!), and if we did more in JS tutorial land, Observable would be my
first choice.

~~~
alexcnwy
Very cool, thanks for the detailed reply - your JS tutorial looks great :)

Yeah automatic re-execution sounds like a weird design choice. Think I'll
stick with Jupyter notebooks for now...

------
zwieback
Even though I love Python I don't really like Jupyter, seems like with a dev
environment like VS or VSCode I can't quite find the right use case.

With C# it might be a different story, since the development cycle is
fundamentally edit-compile-run an environment like Jupyter might give me an
extra platform for in-between testing. I already use the Interactive built
into VS quite a bit to figure out, for example, just the right format string
for Datetime.Now.ToString() or stuff like that.

~~~
bransonf
The benefit of Jupyter notebooks really is about being able to share chunks of
code and write narrative around it.

It isn’t really aiming to replace a dev environment like VSCode.

We’re seeing a rise of notebooks in particular because they encourage writing
a lot of plain text around your code, and that’s really good both for
teaching, and promoting good documentation skills for learners.

~~~
hos234
>share chunks of code and write narrative around it.

>encourage writing a lot of plain text around your code

Is this targeted at non techies? Teachers?

Can someone provide some good example of this? Not having used it much trying
to understand what the advantages are over good quality documentation/tutorial
pages on say msdn.

~~~
BeetleB
Jupyter came from the scientific community (originally the IPython Notebook -
IPython itself was made by a physics grad student).

The use case is basically a scientific journal. You collect data. Analyze it.
Make plots. Write notes (e.g. with equations, or diagrams). All in one place.

Then you can share the notebook with anyone else. If they have similar data
(in the same format), they can execute the notebook on their data and get the
plots all in one place.

It's great for data oriented work. It was never meant as an IDE replacement,
nor as a general purpose development environment.

~~~
reportgunner
Honest question, does anyone ever reuse the notebooks they receive with _their
data_ or is it just a matter of _you could if you wanted but we don 't_ ?

~~~
miemo
That was my first though :)

Can't imagine trying to pump my data into someone elses pipeline and crossing
my fingers for results!

~~~
na85
The whole point is reproducibility. If you don't understand someone else's
pipeline then you can't hope to reproduce their results.

------
Avalaxy
I love .NET and I love Jupyter. I don't know how well they will combine
though. I feel like the lack of Pandas and flexible typing of Python will make
it a lot less useful.

~~~
mumblemumble
I haven't tried it, but what I'm envisioning is LinqPad with cells, including
Markdown cells. And that sounds like a nice tool to me.

Even better if it works well with Deedle and FSharp.Charting. But I'm not
going to demand everything on release day.

~~~
jimmcslim
I feel like Deedle is dead unfortunately, although I see there has been a bit
of commit action recently.

There are a couple of efforts to build .NET wrappers around Pandas, or to
reimplement Pandas in .NET; see
[http://scisharp.github.io](http://scisharp.github.io)

~~~
zyzhu
Hello. I am the current maintainer of Deedle. Recently, I have been focused on
use cases of MathNet interop. Deedle.Math was released last week. pandas-like
matrix dot functions are available now. Lots of linear algebra, stats and
finance related functions are added too. More finance domain functions and
docs improvements are on my to-do list.

I am really excited about the new Data Frame from corefxlab to complement what
Deedle lacks. Since Deedle's original core engineering team has left and moved
on, some core technical debt are beyond my capability to address. But Deedle
is still the best data frame library in .Net ecosystem for now if you are able
to get around some of its odd edges.

------
sgillen
This is great news. Jupyter has become my default tool for prototyping code. I
keep trying other platforms that should theoretically have the same features,
but I just find Jupyter much more pleasant to use.

~~~
reportgunner
How do you prevent jupyter getting lost in a sea of browser tabs ? Do you use
it in a separate one ?

~~~
sgillen
Exactly, one window for Jupyter and sometimes Tensorboard, one for normal
browsing.

------
alkonaut
I’d love to see some nontrivial side by side examples of F# notebooks compared
to python.

~~~
phillipcarter
Hey there, I work on F# at Microsoft and helped put together the initial set
of samples for F#. You can access them here:
[https://mybinder.org/v2/gh/dotnet/try/master?urlpath=lab](https://mybinder.org/v2/gh/dotnet/try/master?urlpath=lab)

What kinds of nontrivial samples would you be interested in seeing?

~~~
LandR
On the introduction to F# sample, there is a comment

    
    
        The best way to work with DUs is pattern matching. Using the previously-defined type definitions, we can model withdrawing money from an account:
    

Then a sample that has nothing to do with withdrawing money from an account.

~~~
phillipcarter
Thanks, fixing that here:
[https://github.com/dotnet/try/pull/638](https://github.com/dotnet/try/pull/638)

------
Lucasoato
Jupyter is such a cool tool, not only for data scientists! Give it a try, guys
:D

------
codeape
Are there any plans for implementing code completion/intellisense?

~~~
jonsequitur
Yes, absolutely.

------
nick_
Integration of ML.NET and
[https://github.com/SciSharp](https://github.com/SciSharp) would be amazing!

------
growlist
Now if only .NET had arguably the world's greatest IDE!

------
ngcc_hk
Not my cup of tea as I am more multi platform. Windows only I suppose. F#
interesting but still.

~~~
herrschnapps
.net core is cross platform, so this should work on Linux and Mac.

~~~
npo9
Not only that, .net core is now essentially the only active branch of .net.
The windows only .net framework is becoming legacy.

~~~
pjmlp
Kind of. .NET Framework will be the XP of .NET until Microsoft provides an
actual migration path to many of the APIs and frameworks that haven't made it
into .NET Core.

Plus some of those APIs that made the cut into .NET Core, like the UI ones,
are Windows only.

~~~
bonesss
There are also some critical tooling gaps that mean .Net Core is still broken
for scenarios that worked a decade ago (FSI package management with F#,
specifically).

~~~
phillipcarter
FSI has never had package management. Are you referring to something else?

~~~
bonesss
Sorry for the loose term. Not package management a la NuGet, but how packages
and their references are handled (ie managed), so that they're not available
and operative in FSI on .Net Core in VS.

Things that work when compiled, worked about a decade ago, but die on FSI
preventing multiple data interaction & scripting scenarios. Ref:
[https://github.com/dotnet/fsharp/issues/3309](https://github.com/dotnet/fsharp/issues/3309)
,
[https://github.com/dotnet/fsharp/pull/5850](https://github.com/dotnet/fsharp/pull/5850)
,
[https://github.com/fsprojects/IfSharp/issues/206](https://github.com/fsprojects/IfSharp/issues/206)
, etc etc

Specifically, referencing a library that uses an FSharp.Data type provider,
and calling that library in FSI in Visual Studio.

Updated to the latest and greatest, 5 y.o. code looks like this when we
execute it:

> System.MissingMethodException: Method not found: 'System.String
> FSharp.Data.Http.RequestString(System.String ....

------
pietroppeter
What about vb.net?

