Earlier quoted context omitted.
> side note: sad that .NET and C# are not considered "major"... Even Microsoft does not use C# for their new projects. See the new TypeScript compiler that is being rewritten in Go. So I think it is safe to say C# is indeed a minor language.
This is an interesting point I hadn't thought of when I saw the announcement of the new TypeScript compiler. It might be overstating the case to say that C# is indeed a minor language, but it's thought-provoking that it wasn't Microsoft's automatic choice here, the way it is for some all-Microsoft in-house IT shops.
HTTP/3 is everywhere but nowhere
351–360 of 504 posts
Re: HTTP/3 is everywhere but nowhere
#352Earlier quoted context omitted.
> side note: sad that .NET and C# are not considered "major I've said it before on here, but the tech community severely underrates .NET today. It's not Windows only (and hasn't been for ~8 years) plus C# is a very nice language. F# is also an option for people who like functional languages. I'd highly recommend giving it a try if you haven't already.
Can .net produce cross platform libraries/executables like Go does? With Go I can develop on Mac and create executables for windows and Linux
Self-contained will work fine because we precompile the runtime and libraries for all supported platforms.
Native AOT won't, because we rely on the system linker and native libraries. This is the same situation as for C++ and Rust. Unlike Go, which doesn't use anything from the system, we try to support interop with system libraries directly, and in particular rely on the system crypto libraries by default.
Unfortunately, the consequence of relying on system libraries is that you actually have to have a copy of the system libraries to link against them, and a linker that supports that. In practice, clang is actually a fine cross-linker for all these platforms, but acquiring the system libraries is an issue. None of the major OSes provide libraries in a way that would be easy to acquire and deliver to clang, and we don't want to get into the business of building and redistributing the libcs for all platforms (and then be responsible for bugs etc).
Note that if you use cgo and call any C code from Go you will end up in the same situation even for Go -- because then you need a copy of the target system libc and a suitable system linker.
Re: HTTP/3 is everywhere but nowhere
#353Earlier quoted context omitted.
LINQ in EntityFramework certainly isn't perfect, but frankly it's so far ahead of anything else available in all other languages. It was a brilliant idea to add expressions type into the language AND to create a standard set of interfaces that enable collection interop AND to to then create universal clients for local and remote collections that use all this machinery to deliver first class DX.
"All other languages" is a stretch IMO. Any language that has proper macros (e.g. Rust, Clojure) can do something LINQ-like as well as C#.
Having been working in TS with Prisma for a bit, what stands out is how a Prisma query is effectively trying to express an expression tree in structural form
An example on TS with Prisma:
const loadedAda2 = await tx.runner.findFirst({
where: { email: 'ada@example.org' },
include: {
races: {
where: {
AND: [
{ position: { lte: 10 } },
{ time: { lte: 120 } },
{
race: {
name: { contains: 'New' }
}
}
]
}
}
}
})
(Other query tools like Kysely end up using strings (though with the support of TypeScript at dev time))And the same in C# with EF and LINQ:
var loadedAda = await db.Runners
.Include(r => r.RaceResults.Where(
finish => finish.Position r.Email == "ada@example.org");
The difference being that the C# code is actually passing an expression tree and the code itself is not evaluated, allowing C# to read the code and convert it to SQL.Re: HTTP/3 is everywhere but nowhere
#354Earlier quoted context omitted.
The difference here is that we didn't select to use a Microsoft product, a produce we used became Microsoft. It only matters in the context of it being "ironic" that it is used and favored in the coding community.
OK, then thoughts on VS Code and TypeScript? Microsoft contributions to Python? Do they all trigger some weird instant irrational reaction?
Re: HTTP/3 is everywhere but nowhere
#355Earlier quoted context omitted.
But because they had an existing body of code that was not class based, it would be more of a re-write (C#) versus a refactor (Go). I don't understand this reasoning at all, and I'm hoping you can shed some light on it. As far as I know, C# supports static methods. Thus, using OO in C# would not have been required, would it? I feel like I'm missing something here.
C# supports top-level functions as well, that's not the issue. But, just to give a simple example, in TS you can do things like: var foo: { bar: { baz: string } } which have no equivalent in C#, because it doesn't have anonymous struct types, and its typing system is almost entirely nominal. Go, on the other hand, can translate this directly pretty much mechanically: var foo struct { bar struct { baz string } } And k…
type Platform = "Mastodon" | "Bluesky" | "Threads";
type Profile = {
name: string,
socials: {
handle: string,
platform: Platform
}[]
}
function getProfiles() : Profile[] {
return [{
name: "Charles",
socials: [
{ handle: "@chrlschn", platform: "Mastodon" },
{ handle: "@chrlschn", platform: "Bluesky" }
]
},
{
name: "Sandra",
socials: [
{ handle: "@sndrchn", platform: "Threads" }
]
}]
}
Versus: using Profile = (
string Name,
(
string Handle,
Platform Platform
)[] Socials // Array of tuples in another tuple
);
enum Platform { Mastodon, Bluesky, Threads }
Profile[] GetProfiles() => new[] {
("Charles", new[] {
("@chrlschn", Platform.Mastodon),
("@chrlschn", Platform.Bluesky),
}),
("Sandra", new[] {
("@sndrchn", Platform.Threads)
}),
};
With some caveatsRe: HTTP/3 is everywhere but nowhere
#356Earlier quoted context omitted.
The ironic thing? GitHub, VS Code, and TypeScript are all Microsoft products.
Yet, somehow DevOps and Visual Studio (proper) continue living as near zombies. I would never have predicted Microsoft would still be developing a (sort of) Github competitor after acquiring Github. Why not plow all of that focus and energy into making Github the best project management system around? Project management in Github is one of the biggest gripes people have - even on Teams and Enterprise.
That said, Microsoft is never going to be able to completely kill Azure DevOps. If nothing else, they'll have to keep it alive for enterprise customers' TFVC source control history.
Re: HTTP/3 is everywhere but nowhere
#357TLS termination is still not working for HTTP/3, I think. The nicest feature of HTTP/3 is that it is UDP based, and thus does not allow so much interception by the malicious ISPs.
The people whose ISPs are spying on them, won't be able to use HTTP/3 anyway. It's not hard to figure out if a packet is HTTP/3 and when you drop all HTTP/3 packets your browser will usually just use something that does make it through.
Re: HTTP/3 is everywhere but nowhere
#358TLS termination is still not working for HTTP/3, I think. The nicest feature of HTTP/3 is that it is UDP based, and thus does not allow so much interception by the malicious ISPs.
can you please elaborate on what do you mean? TLS termination as in HTTP/3 on a reverse proxy? nginx's implementation works. (but for me it caused a strange performance degradation with Seafile)
By terminating an udp stream and fetching the backend data using http 2.0?
This might be enough for static web and such, but in a "new web" you'd want to use all those nice features of http/3 which have no direct equivalent in http/2, like multiplexing udp streams for video and such.
And if you forward the udp stream itself, what do you do with the certificate? Use a selfsigned one with no expiration date and add a custom CA? Seems laborious.
Re: HTTP/3 is everywhere but nowhere
#359Earlier quoted context omitted.
The problem I keep running into is that IPv6 support in common infrastructure is somewhat lacking. It's always a headache to learn that some container orchestration system doesn't support IPv6. Or an http client. Or a DNS resolver. Or whatever. Not to mention the supreme annoyance I have that, to this day, my ISP still does not have IPv6 addressing available.
Major reason for that is BSD Sockets and their leaky abstraction that results in hardcoding protocol details in application code. For a good decade a lot of software had to be slowly patched in every place that made a socket to add v6 support, and sometimes multiple times because getaddrinfo didn't reach everyone early enough.
> results in hardcoding protocol details in application code
Are you suggesting that this could have been implemented a different way? Example: IP could be negotiated to upgrade from v4 to v6? I am curious about your ideas.Re: HTTP/3 is everywhere but nowhere
#360The article talks about the advantages of HTTP/3 for IoT applications. I recently did an IoT application (weather station) where I actually ended up using HTTP/1.0. I only had to send a total of around 70 bytes every two minutes. If at the end of that two minutes I had an invalid or missing response there was nothing more to do other than record the result for a possible future reset. Once there was new data availabl…
IoT is not about latency. IoT is about devices being behind a NAT which does not allow inbound connections.
With UDP-based HTTP/3 it is possible to do "udp hole punching".