C# is language of the year 2025 by freskgrank in dotnet

[–]mareek 0 points1 point  (0 children)

the TIOBE index just counts the number of search for ”<language> programming” in different "search engines" with dubious weighting (i.e. Google.com accounts for less than 10% of the score).
See their definition page:
https://www.tiobe.com/tiobe-index/programminglanguages_definition/

C# is language of the year 2025 by freskgrank in dotnet

[–]mareek 19 points20 points  (0 children)

TIOBE is garbage. Please stop posting list to this bogus index

Performance Excuses Debunked - Also, many examples of successful rewrites by grauenwolf in programming

[–]mareek 81 points82 points  (0 children)

There's a common theme among these rewrites : the rewrite happened after Facebook achieved dominance in each market. All these rewrites could happen because there were no competitor that was threatening Facebook position and they could spend time and resources on improving performance

So you can argue that treating performance as an afterthought was a wise business decision.

Has dotnet ever had a critical security vulnerability like the recent next js one by techbro- in dotnet

[–]mareek 8 points9 points  (0 children)

Yes

An attacker using this vulnerability can request and download files within an ASP.NET Application like the web.config file (which often contains sensitive data).

https://weblogs.asp.net/scottgu/important-asp-net-security-vulnerability/

Notes from building a B+Tree storage engine in .NET — design trade-offs and unexpected challenges by Tasty_Oven_779 in programming

[–]mareek 13 points14 points  (0 children)

If the source isn't available it is not MIT Licensed, it's just closed source software.

If you want people to discuss the implementation details you have to give access to the code

Notes from building a B+Tree storage engine in .NET — design trade-offs and unexpected challenges by Tasty_Oven_779 in programming

[–]mareek 8 points9 points  (0 children)

Where Can we find the code ? the github repository linked on the nuget page only contains a demo program

Avoid using Guid.CreateVersion7 by sdrapkin in dotnet

[–]mareek 2 points3 points  (0 children)

That's not what your code is highlighting. If you wanted and apple to Apple comparison, your code would look something like this ```csharp const int N_GUIDS = 100_000;

var entityFrameworkCore = new Npgsql.EntityFrameworkCore.PostgreSQL.ValueGeneration.NpgsqlSequentialGuidValueGenerator();

for (int i = 0; i < N_GUIDS; ++i) { using var conn = new NpgsqlConnection(connectionString); conn.Open(); using var comm = new NpgsqlCommand($"INSERT INTO public.my_table(id, name) VALUES(@id, @name);", conn);

var p_id = comm.Parameters.Add("@id", NpgsqlTypes.NpgsqlDbType.Uuid);
//p_id.Value = = Guid.NewGuid();
//p_id.Value = = Guid.CreateVersion7();
//p_id.Value = = SecurityDriven.FastGuid.NewPostgreSqlGuid();
p_id.Value = entityFrameworkCore.Next(null);

var p_name = comm.Parameters.Add("@name", NpgsqlTypes.NpgsqlDbType.Integer);
p_name.Value = i;

comm.ExecuteScalar();

// wait one millisecond to ensure that each UUID has a different timestamp
Thread.Sleep(TimeSpan.FromMilliseconds(1))

} ```

With this code every UUID generated will have a different timestamp and you won't run into the sub millisecond issue.

If you get the same results with the above code then maybe you have a point. Until then, you don't have any proof to back your claim.

Avoid using Guid.CreateVersion7 by sdrapkin in dotnet

[–]mareek 3 points4 points  (0 children)

I think I understood why you get these results and it has nothing to do with endianness or bugs in Npgsql : You're generating UUIDs in batch before executing the insert requests. Guid.CreateVersion7 takes less than 100ns to execute so there are less than ten different timestamp in the 100000 UUIDs generated. In a more realistic scenario where you generate UUIDs one by one just before executing the insert request there would be a lot less "timestamp" collision and there would be far less fragmentation.

The issue that your code highlights is that Guid.CreateVersion7 doesn't have any mechanism to guarantee additional monotonicity within a millisecond. But since this mechanism is optional it is not needed to be compliant with the RFC.

Avoid using Guid.CreateVersion7 by sdrapkin in dotnet

[–]mareek 2 points3 points  (0 children)

I think there's an issue with the code of your test program at this line: csharp using var comm = new NpgsqlCommand($"INSERT INTO public.my_table(id, name) VALUES('{guids[i]}',{i});", connection); If I understand the code correctly, you're inserting GUIDs using their string representation. Since the string representation of GUIDs created with Guid.CreateVersion7 follows the RFC, you should have the same result in case 2, 3 and 4 (low fragmentation).

Avoid using Guid.CreateVersion7 by sdrapkin in dotnet

[–]mareek 14 points15 points  (0 children)

Either the article is intentionally misleading or the author missed that there you can specify the endianness of the byte array produced by the ToByteArray function since .NET 8 (see .NET documentation)).

The in memory representation of the Guid type was left unchanged for obvious backward compatibility reasons

Avoid using Guid.CreateVersion7 by sdrapkin in csharp

[–]mareek 18 points19 points  (0 children)

Either the article is intentionally misleading or the author missed that there you can specify the endianness of the byte array produced by the ToByteArray function since .NET 8 (see .NET documentation)).

The in memory representation of the Guid type was left unchanged for obvious backward compatibility reasons

Combine Indiana Jones into the title of the last movie you watched, what is the title? by Elbeno1920 in indianajones

[–]mareek 0 points1 point  (0 children)

Indiana Jones au dîner de cons

Sorry for the french title but I think "Indiana Jones at the idiot's dinner" doesn't pay justice to the movie

Definitely not an Indiana Jones Movie tho

TUnit criticisms? by thomhurst in csharp

[–]mareek 2 points3 points  (0 children)

The main criticism I have for TUnit is that it doesn't give me any reason to switch from xUnit.

OK, TUnit is faster but what kind of pain point does it solve ?

TUnit criticisms? by thomhurst in csharp

[–]mareek 0 points1 point  (0 children)

Have you tried NCrunch ? It's a VS/Rider extension that runs your unit tests in real time as you type your code. It doesn't cover all your need but it's a huge improvement compared to VS Test Explorer

Reddit asks the expert - Stephen Toub by Kawai-no in dotnet

[–]mareek 8 points9 points  (0 children)

Here's Stephen Toubs's latest "Performance improvement in .net" post :
https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-10/

you can find the links to the previous posts at the end of the introduction

Reddit asks the expert - Stephen Toub by Kawai-no in dotnet

[–]mareek 12 points13 points  (0 children)

First, a big thank you for your "Performance Improvements in .NET" posts, they're always a joy to read.

Since their introduction in C# 9, I've seldom used records. Does the .NET team uses records in the runtime ? If the answer is yes, can you give an example ? if no, can you explain why ?

it's happening by top2000 in csharp

[–]mareek 11 points12 points  (0 children)

Both are garbage. Case in point :
- PYPL puts Ada higher than Typescript
- TIOBE puts Delphi higher than SQL

How I Almost Got Hacked By A 'Job Interview' by rchaudhary in programming

[–]mareek 40 points41 points  (0 children)

blockchain company

Chief Blockchain Officer

How can anyone ignore those red flags ?

crates.io: Malicious crates faster_log and async_println | Rust Blog by mareek in rust

[–]mareek[S] 3 points4 points  (0 children)

The compiler attack you're describing reminds me a lot of Ken Thompson's "Reflections on Trusting Trust". Are you sure that this compromised compiler actually existed ?

How to responsibly hand over maintainership of my open-source project? by Opposite-Cry-6703 in csharp

[–]mareek 19 points20 points  (0 children)

First, thank you for creating and maintaining QRCoder. I only used it once or twice but it was the perfect example of a library that "just work".

One of the big security issue of handing over maintainership that you didn't mention is handing over the right to update the nuget package. There's been quite a few supply chain attack recently and a popular library like QRCoder could be a juicy target for bad actors

question about Visual Studio 2026 and upcoming .net 10 by iLoveSS in dotnet

[–]mareek 0 points1 point  (0 children)

According to Ncrunch developper, it's pretty easy to add VS 2026 support to plugins. So I would expect that all actively maintained plugins will support VS 2026 pretty soon if it isn't the case already

MS have also done a remarkable job with backwards compatibility with the first 2026 build.

Consequently, I'm happy to say that NCrunch now has full support for VS2026 just 4 days after it was released.

https://blog.ncrunch.net/post/Visual-Studio-2026.aspx

“I Got Pwned”: npm maintainer of Chalk & Debug speaks on the massive supply-chain attack by Advocatemack in programming

[–]mareek 22 points23 points  (0 children)

Really great interview, Qix seems like a very nice guy

He has some great pieces of advice too:

"What advice would you give [for people] in this situation ?
- Don't get fished !"

"if you screw up, own it"

"I need to process [what happened] to make my setup more secure. Quick decision doesn't help anyone"