linuxmemes
Hint: :q!
Sister communities:
Community rules (click to expand)
1. Follow the site-wide rules
- Instance-wide TOS: https://legal.lemmy.world/tos/
- Lemmy code of conduct: https://join-lemmy.org/docs/code_of_conduct.html
2. Be civil
3. Post Linux-related content
sudo
in Windows.4. No recent reposts
5. π¬π§ Language/ΡΠ·ΡΠΊ/Sprache
6. (NEW!) Regarding public figures
We all have our opinions, and certain public figures can be divisive. Keep in mind that this is a community for memes and light-hearted fun, not for airing grievances or leveling accusations.Please report posts and comments that break these rules!
Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't remove France.
We used to have good, strong open source tools made out of C (which is a lot like steel - it can only be worked by blue collar computer nerds with muscly brains). Now that steel core is corroding because of the influence of hackers and other white collar computer sorts with their creative problem solving, and unintended uses of memory.
That new corrosion is called rust, and it eventually appears on every C project that's left outside, unless someone comes along to brush it off occasionally.
Iron Oxide. Everyone else is wrong.
Ferrous oxide innit?
Wustite, ferrous oxide, is black. FeO.
Typical rust, usually found as hematite, is Fe2O3 and is red/brown. Also an iron oxide.
Magnetite is also another black iron oxide, Fe3O4.
There are quite a few other flavors of iron and oxygen too.
It's a programming language, which is particularly relevant for Linux, because it doesn't require a runtime (separate program that runs the code). This allows it to be used in the kernel.
But it also means that it's very good for building libraries. With a small bit of extra work, virtually any other programming language can call libraries implemented in Rust (like you can with libraries implemented in C).
Add to that, that Rust allows for performance similar to C and makes lots of typical C bugs impossible, and suddenly you've got folks rewriting all kinds of C libraries and applications in Rust, which is something you might have also heard about.
Actual answer:
Rust is a relatively new programming language. Similar to C or C++ it compiles directly into executable binary code so it can be used for bare metal or low level operating system programming. It is thus relevant to Linux kernel development as things like drivers can and are being developed in Rust.
Compare this to the likes of Java or C# which get compiled to bytecode or a kind of pseudo machine code that gets run in a virtual machine, which has advantages for application development, or something like Python which is interpreted (or just-in-time compiled) at run-time, useful as an end user scripting language.
Rust is designed from the ground up to tackle some modern problems, a key one being memory safety. It's a lot more paranoid about memory allocation and access and it's structured around this. Older languages like C allow the programmer a lot more absolute control over the hardware, which effectively means the C programmer has a lot more footguns in his toolbox. Theoretically, Rust offers fewer opportunities for the developer to shoot himself in the foot.
Rust also comes with some really cool tooling. Compiler errors usually point straight at the problem and say something like "Shouldn't there be a colon here?" The build system, called Cargo, is really slick in a lot of ways, handling linking, compiling, even library package management in a very automatic fashion. It's real slick to work with.
As with anything, fans of the language can be a bit much; they stereotypically suggest rewriting everything under the sun in Rust whether it makes sense or not, and this includes the Linux kernel, which has caused some friction in the community; Linux contributors are often very accustomed to C and some don't want to deal with anything else.
I listen to Steve Gibson's podcast "Security Now" and he was talking about why, for security reasons, memory safe applications should be the way of the future. So many security vulnerabilities come from improper memory management. And while C may be more powerful, giving up some of that power for standardization is almost always worth it. We could make much more progress if we were spending less time trying to make sure the memory is handling correctly in every situation. So while there is no doubt the crazy fans of it, I think moving to memory safe languages in general should be the way of the future.
Of course, he still writes all his programs in assembly and refuses to learn anything else. But when you're at his age, I guess you get a pass XD
Rust is a programming language designed to run on crabs. It just happens to also run on computers. When rust programmers talk about the borrow checker, that's something born directly out of having to run on crabs. It's difficult to get the little guys to cooperate otherwise. And when they talk about rust having good error messages that's because of the crabs too. The compiler is not just some piece of software, it's a piece of software being run on crabs and the crabs have some measure of intuition to them. Basically what I'm saying is that carcinization applies to computer hardware.
Rust is when you run DOOM on 16 billion crabs. You can't do that in other languages. Just ask Amelia Airheart.
Itβs a 2025 movie, starring Alec Baldwin, that gained notoriety in 2021, when a cinematographer was accidentally killed by a live round fired from a prop-revolver that Alex Baldwin was using.
How is it a prop if it can fire a real bullet?
Because a real gun is a prop gun if it's being used as a prop.
It's not the gun that was the issue, it was the fact that there was live ammunition on the set at all.