SharpLab
interactive
Our great sponsors
SharpLab | interactive | |
---|---|---|
106 | 48 | |
2,547 | 2,732 | |
- | 1.9% | |
7.8 | 9.6 | |
3 months ago | 8 days ago | |
C# | C# | |
BSD 2-clause "Simplified" License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
SharpLab
-
Is .NET just miles ahead or am I delusional?
Do these all compile to the exact same thing?
https://sharplab.io/#v2:CYLg1APgAgTAjAWAFBQMwAJboMLoN7LpHoCW...
Yes, so you are right.
-
Generating C# code programmatically
Recently, while creating some experimental C# source code generators (xafero/csharp-generators), I was just concatenating strings together. Like you do, you know, if things have to go very quickly. If you have a simple use case, use a formatted multi-line string or some template library like scriban. But I searched for a way to generate more and more complicated logic easily - like for example, adding raw SQL handler methods to my pre-generated DBSet-like classes for my ADO.NET experiment. You could now say: Use Roslyn and that's really fine if you look everything up in a website like SharpLab, which shows immediately the syntax tree of our C# code.
-
The One Billion Row Challenge – .NET Edition
One results in MOVSX, the other in MOVZX [1]. The difference thus is sign/zero extension when moving to the larger register. However, they seem to perform pretty much identical if I'm reading Agner Fog's instruction tables correctly.
[1] https://sharplab.io/#v2:C4LghgzgtgPgAgJgIwFgBQcDMACR2DC2A3ut...
-
Any programs or websites to practice programming?
If you don't have an IDE, you can use SharpLab.io or dotnet fiddle
- Por debaixo do capô: async/await e as mágicas do compilador csharp
-
C# Testing Playgrounds for old versions?
The closest online tool I can think of would be SharpLab, but you can only choose between Roslyn's git branches instead of C# versions.
- The combined power of F# and C#
-
TypeScript 5.2's New Keyword: 'using'
Your code is destructuring two properties and discarding one of them. It doesn't work with a single property: https://sharplab.io/#v2:C4LgTgrgdgNAJiA1AHwAICYAMBYAUBgRj2Nw...
I think that records don't generate a deconstruct method when they only have one property, but even if you manually define one you'll get an error on `var (varName) = ...`
-
Tips for entry-level .net developer?
- LinqPad is great and I love, but, IMO, it is not the best tool to start with. It does not provide intellisense or debugger in the free version. Assuming you do not want to pay for this licence just to play a little with the language, I'd suggest https://sharplab.io/. It is not as powerfull as LinqPad, but at least it gives you suggestions.
- Running a XUnit test with C#?
interactive
-
Exploratory Data Analysis with F#, Plotly.NET, and ML.NET DataFrames
All of this will be accomplished inside of a single Polyglot Notebook. If you're not familiar with Polyglot Notebooks, they're a technology built on top of Jupyter Notebooks that allow you to use additional language kernels, including a F# Kernel. This lets you run interactive data science experiments in a single notebook as shown here in VS Code:
-
.NET 8 Standalone 50% Smaller On Linux
I use .NET on Linux and the experience with Rider has been great. The workflow transfers really well between Mac, Windows, and Linux, and everything works the way you expect. The only problems I run into are that there are still things that are Windows focused. For example MAUI does not run on Linux which is a shame because we could use another cross platform GUI.
There are still bugs, for example I ran into one with Polyglot Notebooks not working on Manjaro or Pop!_OS https://github.com/dotnet/interactive/issues/3159
-
Importing Code in Polyglot Notebooks
First of all, if you have a small amount of code that lives in an individual C# file and you wanted to reference it in your notebook, you can do this via the #!import magic command as shown below:
-
How can I authenticate against Azure Artifacts from Jetbrains Rider?
My 2 cents: use a Personal Access Token instead of a password, it is much safer (even though not 100% safe). Some references: https://github.com/dotnet/interactive/discussions/1340 https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate
-
Announcing Polyglot Notebooks! Multi-language notebooks in Visual Studio Code - .NET Blog
See also https://github.com/dotnet/interactive
-
Getting work done with PowerShell on Linux
U have Powershell notebooks https://github.com/dotnet/interactive
-
Argue in comments 💅
Or Rider or simply install dotnet by itself (very easy) and code in a notepad or VSCode. .NET interactive is another awesome way to start: https://github.com/dotnet/interactive/blob/main/docs/display-output-csharp.md
-
Jupyterlab Desktop
Hi! My name is Claudia and I am a PM at Microsoft (opinions are my own) working on Polyglot Notebooks in VS Code. Polyglot Notebooks are exactly what you are describing! They are notebooks where you can use multiple languages AND share variables between them to ensure a continuous workflow. Not only that, but each language has language server support. Polyglot Notebooks currently supports C#, F#, PowerShell, JavaScript, HTML, SQL, KQL, and Mermaid.
We have just added support for Python and R integration and I am actually in search of external testers! If you are willing to sign an NDA to try out our Python and R integration and give us feedback please drop your email in the form below and I will reach out with instructions for you to try it out!
https://forms.office.com/r/UQchfQSGa5
If you'd like to start trying it out today you can install the extension from the marketplace here: https://marketplace.visualstudio.com/items?itemName=ms-dotne...
-
Does anyone have any experience using ML.NET for forecasting?
I've been excited about a lot of the work being done in .NET Interactive and Polyglot Notebooks, particuarly with ML with F#. I don't know too much about ML, so I thought I'd check out ML.NET.
- Run C# Straight from Command line! (C# REPL)
What are some alternatives?
JITWatch - Log analyser / visualiser for Java HotSpot JIT compiler. Inspect inlining decisions, hot methods, bytecode, and assembly. View results in the JavaFX user interface.
Plotly.NET - interactive graphing library for .NET programming languages :chart_with_upwards_trend:
Roslyn - The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
spectre.console - A .NET library that makes it easier to create beautiful console applications.
.NET Runtime - .NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
obsidian-jupyter
BenchmarkDotNet - Powerful .NET library for benchmarking
jupyter - An interface to communicate with Jupyter kernels.
csharplang - The official repo for the design of the C# programming language
livebook - Automate code & data workflows with interactive Elixir notebooks
ASP.NET Core - ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
AngouriMath - New open-source cross-platform symbolic algebra library for C# and F#. Can be used for both production and research purposes.