News for hackers. Stuff that matters.
Re:Performance Improvements in .NET 6 by theshadowknows on Thursday August 19, 2021 @10:16PM (#28241677)
Where should someone start if they wanted to get familiar and proficient with .NET?
Re:Performance Improvements in .NET 6 by jongalloway2 on Friday August 20, 2021 @01:09AM (#28242844)
Hi, I'm on the .NET community team. Here's what we see as the happy path for .NET:

- .NET website (https://dot.net) - High level info on different workloads, 5 minute in-browser tutorials, links to live shows and community

- MS Learn (https://aka.ms/mslearn-dotnet) - Interactive tutorials with learning paths built from 30ish minute learning tutorials

- Docs (https://aka.ms/msdocs-dotnet) - More in-depth documentation on specific tasks and features, e.g. API documentation, performance optimization, security guidance, etc.

While you can go directly to any of them, the dot.net site will link you to Learn modules that will link you to docs, so hopefully you can start on the dot.net site and it will help you find the right place.

One thing I really like (and I'm totally biased because I've helped set it up) is https://live.dot.net. Those are all our live shows with the PM and dev teams. We've got a show every day of the week, and there's always really good Q&A in the chat.

Re:Performance Improvements in .NET 6 by j_4 on Friday August 20, 2021 @03:32AM (#28243592)
Hey, thanks for your work, love .NET.

I guess this is as good of a chance as I'm gonna get - the docs experience in non-anglosphere countries is dreadful, the website keeps pushing a localized version with absolutely garbled machine translations which are never going to be even passable for technical documentation. It's just a completely miserable experience without the "FFS MSDN" browser extension.[1][2]

At least that was the situation a year or so ago - all my computers are now 100% English locale so I have no quick way to check.

Just let us use the website in English.

[1]: https://addons.mozilla.org/en-US/firefox/addon/ffs-msdn-in-e...

[2]: https://chrome.google.com/webstore/detail/ffs-msdn-in-englis...

Re:Performance Improvements in .NET 6 by indigo945 on Friday August 20, 2021 @07:55AM (#28245038)
Hah, I hadn't realized there was a dedicated browser extension for this. I've been using the Redirect plugin for Firefox to regex-rewrite the URLs - because obviously, the machine translated documentation is useless at best (and harmful at worst).

Indeed ridiculously annoying though. For some reason, Google also started to show the titles of English-language YouTube videos in machine translated German for me, usually completely garbling the meaning - and the video is in English anyway! It's not like I could watch it if I didn't already understand the original title!

Who would have thought that managers in primarily monolingual cultures (i.e. the US) don't understand the actual needs of an international, polyglot audience? The techbro-ism behind these decisions is palatable. "That's a technological solution to what I, without actually asking any of the people affected, imagine to be a problem, so it must be good, right? I mean, it has ML?"

Re:Performance Improvements in .NET 6 by jongalloway2 on Friday August 20, 2021 @04:06PM (#28250788)
Thanks for letting me know, I'll check in with friends in docs and try to get this sorted out. Sorry for the frustration.
Re:Performance Improvements in .NET 6 by whb07 on Thursday August 19, 2021 @11:21PM (#28242168)
Check out F#, the bastardized yet legitimate child of MSFT.

If you like functional languages or would like to try it, give it a whirl!

https://dotnet.microsoft.com/learn/languages/fsharp-hello-wo...

If you use vscode, highly suggest to use Ionide extension. You’ll be quickly amazed at how smooth it all works.

Re:Performance Improvements in .NET 6 by yCombLinks on Friday August 20, 2021 @12:05AM (#28242448)
F# is cool, but definitely not where to start. C# is by far, by far, by far the most popular .net language
Re:Performance Improvements in .NET 6 by de_keyboard on Friday August 20, 2021 @05:44AM (#28244339)
C# is more popular but actually harder to learn IMO (although this does depend on your prior experience). C# is huge, but F# achieves more with fewer language constructs. F# can also be transpiled to JavaScript, which is a huge advantage.
Re:Performance Improvements in .NET 6 by rspeele on Friday August 20, 2021 @03:11PM (#28250141)
I love F#, it's my #1 favorite language by far. But I code in C# at my day job and I gotta say, while I haven't exactly kept count, it's hard for me to agree that F# has fewer constructs. To be fair, much of that comes from the fact that F# has to do nearly everything C# does for compatibility, and have its own stuff too. It leads to a lot of "wait, which tool do I use for this problem?" questions for newbies.

* [<Extension>] methods vs `type X with member ...` extensions

* let-bound functions vs static methods vs instance methods

* operator overloads vs let-bound operators

* curried functions vs multi-parameter functions

* modules vs static classes

* `exception MyError of string` vs `type MyErrorException(msg) inherit Exception(msg)...`

* polymorphic data: interface vs abstract class vs discriminated union

* Async vs Task

* seq { ... } computation expression vs chain of Seq module operations vs. LINQ methods

* Option vs Nullable vs Result

* Statically resolved generic vs runtime generic (`^a` vs `'a`)

* `for i = 0 to 10` vs `for i in 0..10`

* `upcast` vs `:>` and `downcast` vs `:?>`

* `function` vs `fun x -> match x with`

* .fsi files and the syntax for declarations in them

* `let mutable` and `<-` vs `ref` and `:=`

* sprintf vs interpolated strings with "%d"-style format specifiers vs interpolated strings with FormattableString format specifiers vs String.Format

* Code quotations vs linq-style Expression<Func<...,...>>

I am very comfortable with F# today and feel I have a solid grasp on how I like to do things. But when I was introduced to it, I was a little overwhelmed, even though I already had familiarity with C# and with Haskell.

Re:Performance Improvements in .NET 6 by de_keyboard on Monday August 23, 2021 @03:07AM (#28273037)
This is a fair point! Although I was more talking about the language constructs that are used for 90%+ of code, which from my own experience is:

  * let
  * discriminated unions
  * records
  * lists
  * seq
  * async
  * fun
Like all languages people actually use, F# has a long tail of advanced features!
Re:Performance Improvements in .NET 6 by dharmaturtle on Friday August 20, 2021 @01:01AM (#28242786)
Depends on what OP is familiar with. If they know/like functional programming, I'd recommend F# highly. If not... Yeah go with C#.

Then later learn F# because it's absolutely kick ass :)

Re:Performance Improvements in .NET 6 by raegis on Friday August 20, 2021 @02:32AM (#28243270)
An experienced functional programmer can learn F# in a minute, which is fine for console programs. But I tried to write a basic GUI program in F# on Linux and gave up after I reached my googling limit.
Re:Performance Improvements in .NET 6 by dharmaturtle on Friday August 20, 2021 @10:00AM (#28246060)
To add to the other comment, how about Fabulous?

https://github.com/fsprojects/Fabulous

Re:Performance Improvements in .NET 6 by jkulubya on Friday August 20, 2021 @08:11AM (#28245141)
Re:Performance Improvements in .NET 6 by phillipcarter on Friday August 20, 2021 @11:10AM (#28246926)
I'd also argue that C# is a worse language to start with than F# if you're coming from Python.
Re:Performance Improvements in .NET 6 by Rapzid on Thursday August 19, 2021 @10:19PM (#28241698)
For somebody who already knows how to program, and enjoys getting a comprehensive data dump, C# 9.0 In a Nutshell.
Re:Performance Improvements in .NET 6 by ripley12 on Thursday August 19, 2021 @11:39PM (#28242294)
Yes, it's a truly fantastic book for beginners and veterans alike. It's too big for most people to read cover to cover, but as a reference book it's invaluable (and much better than C# in Depth IMO). It covers just about everything in C# and is remarkably up-to-date.

Joe Albahari has had to work with just about every feature in C# (he's the author of LINQPad) and it really shows in the book.

Re:Performance Improvements in .NET 6 by runevault on Friday August 20, 2021 @12:02PM (#28247560)
c# in Depth (4th edition) is also a good book for data dumping how things work in c#, though I think it only covers through c# 8.
Re:Performance Improvements in .NET 6 by ripley12 on Friday August 20, 2021 @01:52PM (#28249161)
I'm not a big fan of C# in Depth as a reference book. It follows a very chronological path (here's what was introduced in .NET Framework v1, here's what was introduced in version 2...), which can be interesting but I don't think it's a useful framing for most people.
Re:Performance Improvements in .NET 6 by GiorgioG on Thursday August 19, 2021 @11:19PM (#28242154)
Re:Performance Improvements in .NET 6 by tzamora on Friday August 20, 2021 @12:30AM (#28242600)
.net is very easy, I have more than 11 years of experience in .net doing gaming and web development and believe me is a very easy language with a very powerful ide and a lots of documentation.
Re:Performance Improvements in .NET 6 by chiph on Thursday August 19, 2021 @10:21PM (#28241718)
There is so much to it that you have to pick where to start. If you have never done C#, definitely start there. But then you can branch off to web development, service development, back-end data access development, and much more.

This YouTube channel is pretty good.

https://www.youtube.com/user/kudvenkat

Re:Performance Improvements in .NET 6 by aoetalks on Friday August 20, 2021 @01:06AM (#28242816)
If you want to write a game, there’s Unity.

Or you could make some kind of REST API with ASP.NET Core or gRPC.

Re:Performance Improvements in .NET 6 by tasogare on Thursday August 19, 2021 @10:29PM (#28241768)
Install the SDK. Open a terminal, create a folder and run "dotnet new console" inside it. "dotnet run" (prints Hello world) then start playing around by adding code to Program.cs.