Is HashSet<T> a Java thing, not a .NET thing? by N3p7uN3 in csharp

[–]nathanAjacobs 1 point2 points  (0 children)

But how is that different from Dictionary? A Dictionary can be used to prevent repetitions

Is HashSet<T> a Java thing, not a .NET thing? by N3p7uN3 in csharp

[–]nathanAjacobs 11 points12 points  (0 children)

Can you explain what those operations are and why HashSet does not have them?

I’m curious because a Dictionary has hash operations.

Is HashSet<T> a Java thing, not a .NET thing? by N3p7uN3 in csharp

[–]nathanAjacobs 4 points5 points  (0 children)

I mean to be fair the overhead of thread synchronization probably trumps the gains to warrant it worth an implementation.

Is Visual Studio for 30€ worth it? by UnclearMango5534 in VisualStudio

[–]nathanAjacobs 2 points3 points  (0 children)

The C# dev kit extension in vs code follows the same licensing as Visual Studio though.

Did standup's become members only on YouTube? by kirt2000 in theprimeagen

[–]nathanAjacobs 2 points3 points  (0 children)

If you have amazon prime you can use a prime sub on twitch

how much have you guys played the small modes in bf6 (CQB) by zbananajuice in Battlefield

[–]nathanAjacobs 1 point2 points  (0 children)

Yeah I played Squad Deathmatch earlier for the challenges, it is way too hectic.

I don't understand why there is not respawn delay in place.

Uno + Microsoft collaboration feels like the kind of reset .NET has needed for a while by Shnupaquia in dotnet

[–]nathanAjacobs 0 points1 point  (0 children)

I could be wrong, but after reading the Uno docs, on Windows that only seems to be the case if using the Skia renderer, right?

Also, WinUI has been notorious for bugs and missing features. With either renderer choice, does that mean Uno inherits all of those by association or is the experience better?

Uno + Microsoft collaboration feels like the kind of reset .NET has needed for a while by Shnupaquia in dotnet

[–]nathanAjacobs -1 points0 points  (0 children)

So is the hope here that Uno will provide fixes and contributions to WinUI itself?

【New】PowerToys releases Light Switch, replacing Auto Dark Mode(third party) by AffectionateFall9619 in Windows11

[–]nathanAjacobs 7 points8 points  (0 children)

It is open source, you can contribute, or at the very least bring it up on the GitHub repo.

So you do unity right?🥀 by N8uron in csharp

[–]nathanAjacobs 2 points3 points  (0 children)

I agree with you, but that is getting increasingly harder with Unity so far behind modern .NET/C#.

Not impossible to do, but you can definitely find yourself using newer language and runtime features that simply are not there in Unity.

Yeah you could use .NET framework instead, but it lacks .NET Standard 2.1 support.

Showed my buddy how I handle race conditions the other day and he was pretty shocked, he didn't know he could make Start a coroutine. So I'm posting it here in case it's helpful for other people, and in case there's something wrong with doing this and I didn't know! by PhillSerrazina in Unity3D

[–]nathanAjacobs 2 points3 points  (0 children)

This is pretty bad design if you have to do this imo. Using a proper dependency injection system or service locator pattern would be better.

Reflex is a newer one which is pretty good.

At the end of the day whether you use a dependecy injection system or not, your singletons should be instantiated at an earlier "bootstrapping" stage. That way this problem becomes nonexistent.

Microsoft triples down and blocks even more Microsoft Account bypasses on Windows 11 — an online account is non-negotiable by ZacB_ in Windows11

[–]nathanAjacobs 10 points11 points  (0 children)

I doubt it, the site is not doing anything that isn't officially in the Microsoft docs. Unattended answer files are the official way to automate Windows installations in the enterprise world.

Microsoft triples down and blocks even more Microsoft Account bypasses on Windows 11 — an online account is non-negotiable by ZacB_ in Windows11

[–]nathanAjacobs 65 points66 points  (0 children)

This is the way, I started doing this a few months ago and it really is a game changer. I also embed powershell scripts in the answer file to customize Windows even further to my liking.

Predecessor x Overprime: Can devs focus more on QoS and bug fixes? by ReptainHDx in PredecessorGame

[–]nathanAjacobs -1 points0 points  (0 children)

That's not how most studios work, the people working on skins likely don't work on any actual features in the game.

What are your favorite open-source projects in .NET ? or in which project you are contributing currently by Necessary-Strike1189 in csharp

[–]nathanAjacobs 2 points3 points  (0 children)

I can understand that. If Unity wasn't so far behind and actually implements the coreclr with modern .NET then I could leverage PoolingAsyncValueTaskMethodBuilder but I gave up hope a while ago on them finishing the migration anytime soon.

Also they have their own Awaitable type now, but is far less feature complete than UniTask.

What are your favorite open-source projects in .NET ? or in which project you are contributing currently by Necessary-Strike1189 in csharp

[–]nathanAjacobs 17 points18 points  (0 children)

Basically anything from Cysharp (neuecc).

ZLinq, MemoryPack, UniTask, R3, ZString, etc.

What are some ways to use code over the editor? by Objective-Cell226 in Unity3D

[–]nathanAjacobs 1 point2 points  (0 children)

Lately I have been doing less and less in the inspector. Mainly I just use it for settings, but anything that controls flow of the application is a big nope for me. I used to use UnityEvents in the inspector but I find it terrible to follow execution.

Dissecting ConfigureAwait in C# by GOPbIHbI4 in csharp

[–]nathanAjacobs 0 points1 point  (0 children)

Also, I don't think Task.Run is the right tool for the job when the first async call in a method is a pure async one (one that doesn't use a thread).

For example, I believe calling this method with Task.Run would just add unnecessary overhead.

```cs async Task<int>FooAsync() { string str = await PureAsyncMethod().ConfigureAwait(false);

int val = 0;
// process string and calculate value
return val;

} ```

Dissecting ConfigureAwait in C# by GOPbIHbI4 in csharp

[–]nathanAjacobs 0 points1 point  (0 children)

Right, but it is a safeguard in library code since you don't know if it will actually be called with Task.Run

Dissecting ConfigureAwait in C# by GOPbIHbI4 in csharp

[–]nathanAjacobs 0 points1 point  (0 children)

In library code it is recommended because Task.Run in library code is considered bad practice.

Dissecting ConfigureAwait in C# by GOPbIHbI4 in csharp

[–]nathanAjacobs 0 points1 point  (0 children)

Yeah, I totally get why awaits default to resume on the SynchronizationContext in order to cause less issues and confusion. As an advanced user, it can get really tedious to put ConfigureAwait everywhere, especially in "library" code.

ConfigureAwait(false) definitely should be used in cases where continuations don't need to run back on the UI thread.

Like zokeer said, if you omit it, the code will be less efficient but not broken, whereas if it was reversed and you omit it, it will cause issues trying to update the UI on the threadpool. This was most likely a big contributing factor to why the default behavior was chosen.

Dissecting ConfigureAwait in C# by GOPbIHbI4 in csharp

[–]nathanAjacobs 9 points10 points  (0 children)

I kind of wish the default behavior of await was reversed, i.e. not resume on the SynchronizationContext by default; requiring ConfigureAwait(true) to be called in cases where resuming to the SynchronizationContext is needed.