News for hackers. Stuff that matters.
Re:Announcing .NET Jupyter Notebooks by zwieback on Tuesday November 12, 2019 @05:56PM (#21519150)
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.

Re:Announcing .NET Jupyter Notebooks by bransonf on Tuesday November 12, 2019 @06:08PM (#21519250)
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.

Re:Announcing .NET Jupyter Notebooks by hos234 on Tuesday November 12, 2019 @07:24PM (#21519807)
>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.

Re:Announcing .NET Jupyter Notebooks by BeetleB on Wednesday November 13, 2019 @01:43AM (#21521665)
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.

Re:Announcing .NET Jupyter Notebooks by reportgunner on Wednesday November 13, 2019 @03:42AM (#21522130)
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 ?
Re:Announcing .NET Jupyter Notebooks by BeetleB on Wednesday November 13, 2019 @11:05AM (#21525638)
Yes.

In a previous job I had set up a notebook to analyze some of the models our team produced - it was essentially a Q/A notebook that generated data from our models, algorithmically looked for unphysicalities in our models, and plotted any it found.

The rest of my team used it for the models they were working on. The alternative/old way was just too painful (lots of manual steps).

But although reuse by others is a touted feature, it's not really that important. It's incredibly useful for one's own workflow. Think of the convoluted Excel sheets people often have at engineering companies. They get new data, copy and paste it into Excel, and get new plots. This is no different.

Re:Announcing .NET Jupyter Notebooks by miemo on Wednesday November 13, 2019 @04:45AM (#21522461)
That was my first though :)

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

Re:Announcing .NET Jupyter Notebooks by na85 on Wednesday November 13, 2019 @08:49AM (#21523905)
The whole point is reproducibility. If you don't understand someone else's pipeline then you can't hope to reproduce their results.
Re:Announcing .NET Jupyter Notebooks by unoti on Tuesday November 12, 2019 @11:08PM (#21521103)
> Can someone provide some good example of this? Not having used it much trying to understand what the advantages are...

Sure! Here are some ways I use notebooks:

Imagine any scenario in which you'd rather make a video to demonstrate how something works. For a lot of those cases, a notebook is a great way to show how the code works and how it all comes together.

Another set of use cases is you've done some research, need to call a few api's, post process the results, and share that with your team or have it ready for later to do something similar. You could think of this as a "Super Postman". For example, you need to run some api's in a loop, filter the results, and accumulate some things and print totals at the end.

Another use case is you're troubleshooting an issue, and want to keep notes of what you've tried, what the results were, and be ready to go back and run things again.

Re:Announcing .NET Jupyter Notebooks by nek4life on Tuesday November 12, 2019 @08:02PM (#21520104)
It solves the problem of scientists that have done experiments, but have no way to share and have their experiments and have them validated using the same procedures and programs. At least that's the way I understand it.

You can even have a notebook run in a cluster.

http://ipython.org/ipython-doc/dev/parallel/

Re:Announcing .NET Jupyter Notebooks by Avalaxy on Wednesday November 13, 2019 @04:13AM (#21522301)
> You can even have a notebook run in a cluster.

Well, that's exactly what Databricks does.

Re:Announcing .NET Jupyter Notebooks by someguy101010 on Tuesday November 12, 2019 @07:29PM (#21519847)
This explains the advantages very well imo

https://en.wikipedia.org/wiki/Literate_programming#Contrast_...

Re:Announcing .NET Jupyter Notebooks by unclesams-uncle on Wednesday November 13, 2019 @05:55AM (#21522799)
I do financial data analysis and Jupyter Notebooks allows me to run scripts while explaining my findings/arguments about the data within the same space.

It's a convenient way to present both data and narrative to whoever might need to see it.

I also like being able to run snippets when writing scripts, at least when it comes to building/testing. I'm more on the data science side than the dev side though, so that's probably why Jupyter Notebooks appeal to me more than other IDEs.

Re:Announcing .NET Jupyter Notebooks by sdegutis on Tuesday November 12, 2019 @06:19PM (#21519337)
That reminded me of Literate Programming and sure enough the wikipedia article for that on mentions Jupyter.
Re:Announcing .NET Jupyter Notebooks by whb07 on Tuesday November 12, 2019 @07:02PM (#21519620)
Try F# feels like Python in most regards but ends up having type inference.

Edit: if you think “oh that’s nice, just like Java/C++”, HECK NO. It goes beyond this, where complex modeling can easily be represented and things like pattern matching and other features not known in other langs

Re:Announcing .NET Jupyter Notebooks by Rapzid on Tuesday November 12, 2019 @07:10PM (#21519681)
I really wish F# were the dominant language in the AI glue space instead of Python :| Typed array/tensor shapes? Yes please.
Re:Announcing .NET Jupyter Notebooks by phillipcarter on Tuesday November 12, 2019 @08:25PM (#21520272)
Hello! We're taking a look at improving these kinds of programming scenarios in F# for the next version of the language. Since F# is first-class in the jupyter experience, one of those hurdles is already done!

That said, improvements to the language can only go so far. We're trying to figure out what a good set of libraries for the whole range of ML tasks looks like for F# and .NET.

Re:Announcing .NET Jupyter Notebooks by tasogare on Tuesday November 12, 2019 @10:39PM (#21520994)
Continue the good work :) I use mostly C# out of habit but F# is my favorite in terms of expressiveness. I'm planning a series of educational videos in French about the language because it doesn't have the exposure it merits.
Re:Announcing .NET Jupyter Notebooks by Rapzid on Wednesday November 13, 2019 @01:40PM (#21527732)
I've been out of the scene for a bit but last I looked Miguel had created tensorflow bindings for .Net. With some magic require incantations I was able to get that into F# and it actually worked.. Looks like there is SciSharp now and that project looks like it's heading in the right direction.

The key, IMHO, is going to be getting some influential people and projects on F# generating code and blog content. The user experience of getting setup for them and the audience they reach needs to be streamlined. From there if it JustWorks™ F# should do the rest of the selling :)

And to digress, because I always mention this when talking about F#, it deserves a batteries included web framework story as good as Elixir's Phoenix.

Re:Announcing .NET Jupyter Notebooks by phillipcarter on Wednesday November 13, 2019 @01:44PM (#21527775)
> And to digress, because I always mention this when talking about F#, it deserves a batteries included web framework story as good as Elixir's Phoenix.

I'd check out Saturn for that: https://saturnframework.org/

Re:Announcing .NET Jupyter Notebooks by whb07 on Tuesday November 12, 2019 @07:36PM (#21519904)
I was thinking of writing the bindings to Pytorch directly to C++ for F# now that would be the killer thing to bring on to .net . It’d be like writing As close as writing Python but order of magnitude improvement for performance. But that’s a lot of work and I don’t do much ml work lol so meh Someone should do it
Re:Announcing .NET Jupyter Notebooks by pjmlp on Wednesday November 13, 2019 @12:56AM (#21521476)
With the caveat of being Windows only, you could have a look into C++/CLI or C++/WinRT.
Re:Announcing .NET Jupyter Notebooks by Fr0styMatt88 on Tuesday November 12, 2019 @06:04PM (#21519223)
The thing that I find really daunting with Jupyter is the set of APIs that it seems I need to learn in order to get it to do anything cool, like for example visualizing data or a function, or making an interactive widget that does the same. I don’t remember the same kind of pain when playing around with Mathematica. I really want to like it and learn it — I really like interactive programming. It just never makes it high enough on my brain space list to seem worth it.

Since C# is my daily language, this is pretty cool though. I just really wish that I had a use-case strong enough for it to overcome the initial pains of learning it and the ongoing mental maintenance of staying usefully fluent in yet another set of libraries.

Re:Announcing .NET Jupyter Notebooks by EForEndeavour on Tuesday November 12, 2019 @09:17PM (#21520610)
Agreed on the bewildering number of disparate APIs that you need to bash together in a Jupyter notebook. Data wrangling, plotting, machine-learning, logging, writing to file/DB... It doesn't help that there are often multiple competing packages that solve basically the same problem in different ways, ensuring that whatever choice you make will be fraught with anxiety about not "doing it right."

That being said, I've found the only way I can get interactive programming to stick in my mind is to pick a sample dataset, wonder some open-ended questions about it, and then answer those questions in a Jupyter notebook with the help of Google, documenting your thought process as you go. A great starting point to find real-world sample data is the UCI dataset repository: https://archive.ics.uci.edu/ml/datasets.php

Re:Announcing .NET Jupyter Notebooks by nomel on Tuesday November 12, 2019 @06:17PM (#21519321)
My use case is algorithm prototyping/development. It lets me mostly put the code aside and concentrate and quickly iterate on the algorithm. It's just a fancy, persistent, reproducible, REPL.
Re:Announcing .NET Jupyter Notebooks by jaked89 on Tuesday November 12, 2019 @06:11PM (#21519268)
C# has supported interactive scripting for years now since Roslyn came about. Even VS has a C# Interactive window.
Re:Announcing .NET Jupyter Notebooks by noblethrasher on Tuesday November 12, 2019 @09:00PM (#21520512)
Actually, C# had a REPL even before Roslyn: The Mono project shipped one about 4 years prior.
Re:Announcing .NET Jupyter Notebooks by pjmlp on Wednesday November 13, 2019 @12:58AM (#21521483)
C# had a pseudo REPL already back then, the immediate window available during debugging sessions.
Re:Announcing .NET Jupyter Notebooks by noblethrasher on Tuesday November 26, 2019 @08:46PM (#21644601)
True, but what made the Mono REPL particularly remarkable was that it launched with much of the functionality of a notebook, with things like inline graphics.
Re:Announcing .NET Jupyter Notebooks by jpalomaki on Wednesday November 13, 2019 @12:46AM (#21521438)
There are approaches to combine the two. See for example this article about Jupyter and vscode [1].

And to ”close the loop”, you can of course access vscode using browser with Visual Studio Online [2].

[1] https://code.visualstudio.com/docs/python/jupyter-support

[2] https://visualstudio.microsoft.com/services/visual-studio-on...

Re:Announcing .NET Jupyter Notebooks by jcmontx on Tuesday November 12, 2019 @08:03PM (#21520105)
> 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.

This is me_irl

Re:Announcing .NET Jupyter Notebooks by baq on Wednesday November 13, 2019 @04:23AM (#21522360)
what I end up doing is having both the dev env and jupyter open at the same time - doing dev the normal way and then using a jupyter notebook for q&d manual validation and plots.

like others said already, jupyter isn't a development environment and trying to use it like one is asking for trouble, but it is a great REPL on some awesome steroids.

Re:Announcing .NET Jupyter Notebooks by rb808 on Tuesday November 12, 2019 @09:14PM (#21520599)
I set up Jupyter for my wider team to use, I thought it would be popular but nearly everyone chose to use PyCharm instead.