6 ms·
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 mi
by zwieback 7y ago
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.
- Fr0styMatt88 7y agoThe 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.
- EForEndeavour 7y agoAgreed 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 https://archive.ics.uci.edu/ml/datasets.php
- bransonf 7y agoThe 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 7y ago>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.
- someguy101010 7y agoThis explains the advantages very well imo https://en.wikipedia.org/wiki/Literate_programming#Contrast_with_documentation_generation https://en.wikipedia.org/wiki/Literate_programming#Contrast_...
- nek4life 7y agoIt 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/ http://ipython.org/ipython-doc/dev/parallel/
- Avalaxy 7y ago> You can even have a notebook run in a cluster. Well, that's exactly what Databricks does.
- unoti 7y ago> 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.
- jaked89 7y agoC# has supported interactive scripting for years now since Roslyn came about. Even VS has a C# Interactive window.
- noblethrasher 7y agoActually, C# had a REPL even before Roslyn: The Mono project shipped one about 4 years prior.
- pjmlp 7y agoC# had a pseudo REPL already back then, the immediate window available during debugging sessions.
- noblethrasher 7y agoTrue, 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.
- nomel 7y agoMy 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.
- whb07 7y agoTry 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
- Rapzid 7y agoI really wish F# were the dominant language in the AI glue space instead of Python :| Typed array/tensor shapes? Yes please.
- whb07 7y agoI 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
- pjmlp 7y agoWith the caveat of being Windows only, you could have a look into C++/CLI or C++/WinRT.
- phillipcarter 7y agoHello! 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.
- tasogare 7y agoContinue 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.
- jcmontx 7y ago> 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
- rb808 7y agoI set up Jupyter for my wider team to use, I thought it would be popular but nearly everyone chose to use PyCharm instead.
- jpalomaki 7y agoThere 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 https://code.visualstudio.com/docs/python/jupyter-support [2] https://visualstudio.microsoft.com/services/visual-studio-online/ https://visualstudio.microsoft.com/services/visual-studio-on...
- baq 7y agowhat 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.