Hacker Newsnew | past | comments | ask | show | jobs | submit | kreco's commentslogin

That's a very weird comment, your spreading your knowledge and not really addresse what could have been changed in the article.

If I follow your comment, you mean that he could have use a non-static global variable instead and avoid mentioning "static" keyword afterward?


Oh! Thanks, I was not being as concrete as I imagined. Sorry.

Yes, the `static` can simply be dropped, it does no additional work for a single-file snippet like this.

I tried diving into Compiler Explorer to examine this, and it actually produces slightly different code for the with/without `static` cases, but it was confusing to deeply understand quickly enough to use the output here. Sorry.


I see exactly the same assembly from x86-64 GCC 15.2 with -O2 the first example in the article both as is and without `static`, which makes sense. The two do differ if you add -fPIC, as though you’re compiling a dynamic library, and do not add -fvisibility=hidden at the same time, but that’s because Linux dynamic linking is badly designed.

TU-level concepts (mostly) dissolve during the linking stage. You need to compile with -c to generate an object file in order to see the distinction.

Also, the difference manifests in the symbols table, not the assembly.


To clarify, I was talking about Compiler Explorer-cleaned disassembly, same as the comment I was replying to.

Interesting take.

In a naive way, when rich entities are interested in a limited resource it's basically over.

Somehow I can see a parallel with the housing crisis where the price go higher and higher.

I can't see both of them ending anytime soon unless there is a major paradigm shift in our life.


What's causing the housing crisis?


Corruption, Zoning, Investment housing


I'm not looking for a job but your various job offers are appealing!


The idea of someone rating me, or rating someone else makes me anxious.

I'm not sure it would be better than just reporting people with undesired behavior.


> The idea of someone rating me, or rating someone else makes me anxious.

But not enough to avoid, as you’re here.


I think it’s more anonymized like “did you enjoy the game with this team (1-5)”


> It claims WebGPU is limited to Browsers. It is, not. WebGPU is available as both a C++ (Dawn) and a Rust (WGPU) library. Both run on Windows, MacOS, Linux, iOS, and Android. It is arguably the most cross platform library. Tons of native projects using both libraries.

I feel like it's important to mention that WebGPU is a unified API on top of whatever is native to the machine (DirectX, Vulkan or Metal).


> Vulkan is also not really cross-platform any more than DirectX. [...]

Vulkan is not entirely cross-platform, but it's still way "more" cross-platform than DirectX by your own point of view.

DirectX: - Windows - Xbox

Vulkan: - Linux - Android - Windows - Nintendo Switch - Nintendo Switch 2

Metal: - MacOS - iOS


On modern Windows it depends on DirectX, as the new ICD infrastructure is part of the DirectX Runtime part of the OS.

https://learn.microsoft.com/en-us/windows-hardware/drivers/d...


Like on of my sibling comment, I truly believe this is connected to some degree of social pressure.

People pointing fingers to "outdated" languages for not having some of the most trendy constructs.

The pipe operator is definitely one of the feature that create more ways to do the same thing while providing unclear benefit.

Never in my life I was in a situation like "with the pipe operator this I would have saved me hours of debugging/reading/creating code".


I just need more RAM. 16GB is unfortunately not enough for me.

With some luck it would be easy to upgrade ourselves.


While msbuild is powerful, I strongly believe it should have been a standard C# language build system instead of a XML-based one.

Any non-trivial thing to do is a pain to figure out if the documentation is not extensive enough.

I really love C#, but msbuild is one of the weak links to me, almost everything else is a joy to use.


I completely agree that it shouldn’t be XML. Then again, I worked with Gradle in the past, which is based on Groovy syntax plus DSL. And that didn’t feel good either (though I must admit that I knew less about Gradle than I do about msbuild). Perhaps the problem of designing a good build system is harder than it seems.


You could check out FAKE. It’s pretty popular in the F# community. While not C#, the terser syntax may be beneficial for a build DSL and you still have access to .NET APIs.

https://fake.build/


But you augment it with tools written in c# which is best of both worlds. Builds are defined declaratively and custom actions are defined in code. Not the horrible hybrid of eg ant or cmake.


I remember using nant back in 2010 or so. Lol those were the days.


I've met teams that strongly prefer Cake [1] and it seems well maintained.

Personally, I think there's too much baby in the MSBuild bathwater unfortunately and too much of the ecosystem is MSBuild to abandon it entirely. That said, I think MSBuild has improved a lot over the last few years. The Sdk-Style .csproj especially has been a great improvement that sanded a lot of rough edges.

[1] https://cakebuild.net/


Coincidentally, I started to do media server similar to this 3 days ago. I just want to serve any folder, then be able to download a file and watch videos with a decent video player.

Now I feel like crap seeing how amazing this project is.


Don't let others stop you. Pretend you never saw it


Thank you!


he probably did this with 500 other file servers already in the wild.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: