arendjr

joined 1 year ago
[–] arendjr@programming.dev 1 points 2 days ago* (last edited 2 days ago) (2 children)

You know, as a full-time Linux user, I think I rather have game developers continue to create Windows executables.

Unlike most software, games have a tendency to be released, then supported for one or two years, and then abandoned. But meanwhile, operating systems and libraries move on.

If you have a native Linux build of a game from 10 years ago, good luck trying to run it on your modern system. With Windows builds, using Wine or Proton, you actually have better chances running games from 10 or even 20 years ago.

Meanwhile, thanks to Valve’s efforts, Windows builds have incentive to target Vulkan, they’re getting tested on Linux. That’s what we should focus on IMO, because those things make games better supported on Linux. Which platform the binary is compiled for is an implementation detail… and Win32 is actually the more stable target.

[–] arendjr@programming.dev 4 points 2 weeks ago (1 children)

tsc is (very) slow and there are also no convenient ways to interact with it from Rust.

So it saves a lot development and CI time to roll our own. The downside is that our inference still isn’t as good as tsc of course, but we’re hopeful the community can help us get very close at least.

 

Biome is a formatter and linter for web languages: JavaScript, TypeScript, CSS, HTML, JSON, and GraphQL.

Version 2 adds type-aware lint rules and it is the first TypeScript linter that does not require tsc. Other new features include:

  • Monorepo support
  • GritQL Plugins
  • Revamped, configurable import sorting
  • Linter domains
  • Bulk suppressions
  • Analyzer assists
  • Many new lint rules
[–] arendjr@programming.dev 4 points 2 weeks ago (2 children)

Heh, I agree with everything you said, but I’m afraid such a framework is impossible to create, let alone implement. It’s impossible to foresee the infinite possibilities for people to screw themselves through bad decisions, so all you’d create is a lot of bureaucracy to still end up in the same place.

[–] arendjr@programming.dev 3 points 3 weeks ago (1 children)

That’s still a very major achievement! Do I understand correctly this means all target architectures supported by GCC are now unlocked for Rust too?

[–] arendjr@programming.dev 6 points 3 weeks ago

It’s that the compiler doesn’t help you with preventing race conditions. This makes some problems so hard to solve in C that C programmers simply stay away from attempting it, because they fear the complexity involved.

It’s a variation of the same theme: Maybe a C programmer could do it too, given infinite time and skill. But in practice it’s often not feasible.

[–] arendjr@programming.dev 6 points 3 weeks ago

Which one should I pick then, that is both as fast as the std solutions in the other languages and as reusable for arbitrary use cases?

Because it sounds like your initial pick made you loose the machine efficiency argument and you can’t have it both ways.

[–] arendjr@programming.dev 5 points 3 weeks ago (3 children)

I’m not saying you can’t, but it’s a lot more work to use such solutions, to say nothing about their quality compared to std solutions in other languages.

And it’s also just one example. If we bring multi-threading into it, we’re opening another can of worms where C doesn’t particularly shine.

[–] arendjr@programming.dev 6 points 3 weeks ago (2 children)

Well, let’s be real: many C programs don’t want to rely on Glib, and licensing (as the other reply mentioned) is only one reason. Glib is not exactly known for high performance, and is significantly slower than the alternatives supported by the other languages I mentioned.

[–] arendjr@programming.dev 30 points 3 weeks ago (15 children)

I would argue that because C is so hard to program in, even the claim to machine efficiency is arguable. Yes, if you have infinite time for implementation, then C is among the most efficient, but then the same applies to C++, Rust and Zig too, because with infinite time any artificial hurdle can be cleared by the programmer.

In practice however, programmers have limited time. That means they need to use the tools of the language to save themselves time. Languages with higher levels of abstraction make it easier, not harder, to reach high performance, assuming the abstractions don’t provide too much overhead. C++, Rust and Zig all apply in this domain.

An example is the situation where you need a hash map or B-Tree map to implement efficient lookups. The languages with higher abstraction give you reusable, high performance options. The C programmer will need to either roll his own, which may not be an option if time Is limited, or choose a lower-performance alternative.

[–] arendjr@programming.dev 1 points 1 month ago (1 children)

Of course, but it needn’t be black and white. You can also diversify, make yourself less reliant on a single platform. And by doing so, enable your audience to follow you elsewhere. Or diversify into different activities altogether. And when it’s no longer half your income on the line, then switch.

But doing nothing and saying, “but half my income!”? That’s not only a choice, but also complacency.

[–] arendjr@programming.dev 7 points 1 month ago (3 children)

Great points, except:

People can’t leave for anything smaller.

They can and some do. It’s still a choice.

[–] arendjr@programming.dev 1 points 1 month ago

Ah yes, then we are in agreement. I thought we were talking about unintentionally arriving at the same implementation after looking at the original, which is where the discussion started.

 

Biome is an integrated linter/formatter for JavaScript/TypeScript, CSS, HTML and GraphQL.

We are now in the process of implementing TypeScript-like inference (not full type checking!) that allows us to enable type-informed lint rules. This is similar to typescript-eslint except instead of using tsc we attempt to implement the inference ourselves.

This post describes our progress thus far, with a detailed overview of our type architecture.

 

Recent events in #politics triggered me to write a manifesto on the values of #Democracy and what we can to do preserve them.

 

Recent events in #politics triggered me to write a manifesto on the values of #Democracy and what we can to do preserve them.

45
DirectX Adopting SPIR-V (devblogs.microsoft.com)
submitted 9 months ago* (last edited 9 months ago) by arendjr@programming.dev to c/linux@programming.dev
 

SPIR-V is the intermediate shader target used by Vulkan as well, so it sounds like this may indirectly make DirectX on Linux smoother.

 

With this post I've taken a bit more of a practical turn compared to previous Post-Architecture posts: It's more aimed at providing guidance to keep (early) architecture as simple as possible. Let me know what you think!

 

This new version provides an easy path to migrate from ESLint and Prettier. It also introduces machine-readable reports for the formatter and the linter, new linter rules, and many fixes.

 

I just had a random thought: a common pattern in Rust is to things such as:

let vec_a: Vec<String> = /* ... */;
let vec_b: Vec<String> = vec_a.into_iter().filter(some_filter).collect();

Usually, we need to be aware of the fact that Iterator::collect() allocates for the container we are collecting into. But in the snippet above, we've consumed a container of the same type. And since Rust has full ownership of the vector, in theory the memory allocated by vec_a could be reused to store the collected results of vec_b, meaning everything could be done in-place and no additional allocation is necessary.

It's a highly specific optimization though, so I wonder if such a thing has been implemented in the Rust compiler. Anybody who has an idea about this?

view more: next ›