this post was submitted on 29 Feb 2024
185 points (100.0% liked)

technology

23862 readers
253 users here now

On the road to fully automated luxury gay space communism.

Spreading Linux propaganda since 2020

Rules:

founded 5 years ago
MODERATORS
 
all 49 comments
sorted by: hot top controversial new old
[–] Wheaties@hexbear.net 65 points 1 year ago* (last edited 1 year ago) (6 children)

White house urges developers forget programming languages that necessitate an understanding of computers as machines with limits and tolerances, not simply magic boxes to receive instruction.

[–] DefinitelyNotAPhone@hexbear.net 42 points 1 year ago (4 children)

Being aware that the gun you're holding naturally tends towards pointing directly at your own foot does not make the existence of the footgun any more tolerable. Even the best developers will fuck up; having your language enforce memory safety is objectively a good thing, and arguments against it come from FUDDs and gatekeepers.

[–] NephewAlphaBravo@hexbear.net 48 points 1 year ago* (last edited 1 year ago)

C and assembly should 100% be a part of any formal programming education, and then any actual work should be done with memory-safe languages because we're all the dumbest people alive.

[–] AnarchoSnowPlow@midwest.social 28 points 1 year ago

I work in embedded systems (more and more test lately though), historically in aviation (not fucking Boeing lol) and test and measurement instruments. So, critical environments. In those situations, when you're writing bare metal firmware, you never dynamically allocate anything. Everything tends to be accounted for, RAM usage is tightly controlled, there are even points where you're counting clock cycles for efficiency. We even accounted for radiation based bit flip events, which are incredibly uncommon, but we know they exist so they have to be handled.

My point is, this is a valid concern in some spaces, but when you use C in a purely functional way, it's not the loaded gun they portray it as.

[–] sharedburdens@hexbear.net 11 points 1 year ago

I'm aware that it is technically possible to program a microcontroller in rust, but it felt like a lot more work than doing it in C

[–] Helmic@hexbear.net 6 points 1 year ago

It is also a serious boon to open source projects because it dramatically limits the damage a PR from someone new might accidentally do. Being able to reasonably expect that this fast, low level code won't introduce memory leaks is part of why even end users tend to like Rust projects.

[–] FunkyStuff@hexbear.net 18 points 1 year ago

So true, this is also the reason I've chosen to rip out seatbelts from my car, since I know I'm just a good driver.

[–] BynarsAreOk@hexbear.net 14 points 1 year ago* (last edited 1 year ago)

JOE BIDEN IS LITERALLY OLDER THAN THE FIRST PROGRAMMING LANGUAGE EVER

[–] comrade_pibb@hexbear.net 8 points 1 year ago

6502 assembly gang where u at

every programming language involves a certain level of abstraction that necessitates limitations. You could make the same argument in favor of assembly over a compiled language.

[–] trabpukcip@hexbear.net 31 points 1 year ago (2 children)

Too bad they don't use that "memory safe programming" on brandon

[–] glans@hexbear.net 10 points 1 year ago (1 children)

for some reason the president is a java applet trying to run in netscape navigator over dialup

[–] Tachanka@hexbear.net 2 points 1 year ago

it's an apt metaphor, because the last time dialup was relevant is the last time he had a coherent thought

[–] Tachanka@hexbear.net 9 points 1 year ago

biden-point beer brew here, ooh earth rider

[–] mustGo@hexbear.net 25 points 1 year ago (1 children)

Joke's on amerikkka. Linux kernel maintainers are one step ahead.

[–] driving_crooner@lemmy.eco.br 1 points 1 year ago

Why not rewrite the Linux Kernel on Rust?

[–] farting_weedman@hexbear.net 19 points 1 year ago

Oh yeah, switch to the programming languages that are easier for ai to generate code in, that’s a good idea.

GO BACK TO SLEEP, AMERICAN DEVELOPERS

[–] SpiderFarmer@hexbear.net 17 points 1 year ago

TIL Biden runs on C++.

[–] jackmarxist@hexbear.net 15 points 1 year ago (1 children)

THE COMMIES ARE COMING TO STEAL OUR C++ CODE

[–] comrade_pibb@hexbear.net 11 points 1 year ago

Abolish class

[–] M68040@hexbear.net 12 points 1 year ago

Year of the COBOL comeback

[–] morte@hexbear.net 12 points 1 year ago

I started learning rust just to tick off another trans stereotype box

[–] sovietknuckles@hexbear.net 12 points 1 year ago (1 children)

Or Go

The only other language as safe as Rust is Ada, Go is a non-contender

[–] RNAi@hexbear.net 19 points 1 year ago

Pokemon Ada to the Polls

[–] hmmm@hexbear.net 11 points 1 year ago

what if we kissegmentation fault

[–] glans@hexbear.net 11 points 1 year ago

I wondered if this was some kind of joke, but it's not: PRESS RELEASE: Future Software Should Be Memory Safe | The White House


Purely as an end user. If I am looking for a tool to accomplish a given task for which there are a bunch of choices, I will try rust or C first before trying the other options. I don't know if it is inherent in either language or if the people who use them just tend to be better coders. As opposed to something like python where the barrier to entry is much lower.

I love the rust spins on classic cli tools like ag (grep), fd (find) and eza/exa (ls). Though I couldn't live without any of the originals either. They are just so mature and so well documented.

Is it my imagination or is rust more MIT kind of vibe compared to GPL with C stuff?

[–] Faresh@lemmy.ml 9 points 1 year ago* (last edited 1 year ago) (1 children)

I tried Rust and found it to be fun (I generally think how I would solve a problem in C and then try to make my rust program follow the same exact logic without any additional overhead, trying to not use unsafe rust as much as possible, which I find to be fun).

Unfortunately, I noticed that compile times are noticeable on even very simple programs (on the scale of seconds) on my machine, which I find problematic, because that means that complex programs written in rust will probably take an eternity to compile. (I haven't actually tried compiling any such software yet, though) I wonder what parts of the compilation process are the biggest factor in compile times, and if one could theoretically do away with it and still have a memory safe language.

What I'm about to say may be very influenced by my love for Scheme, but I feel like Rust is a very complex language, and I find unlikely that any alternative implementation will ever be made because of that (or it will be done but at the cost of massive amount of effort from various people). I think diversity of implementations, extensibility and simplicity are important in a language.

Am I misguided, or acting too much on my first impressions? And what other memory safe systems programming languages (so languages that don't rely on a garbage collector) are out there besides Rust?

[–] Zezzy@hexbear.net 6 points 1 year ago

Rust is very complex, in part due to the obsession with zero cost abstraction that leads to caring about lots of edge cases like NonZero types. But at least when I've worked with it, a lot of that you can just ignore and write straight forward code, and it'll still likely be very performant. Although the Rust sort of philosophy vibes with me better, so not all might find that so forgiving.

I did quit using Rust due to its compile times though. Even using dependencies that would advertise fast building like Bevy quickly started taking more than a minute to build (not from scratch, just making one line changes). And during that minute I'd get bored and do something else, and my productivity plummeted.

[–] Gorillatactics@hexbear.net 8 points 1 year ago (1 children)

explain this like I never progressed further than hello world.

C++ and even more so C are programming languages which require the programmer to manage memory resources (although newer versions have introduced features that automate much of it). Doing this incorrectly can introduce vulnerabilities that allow an attacker to access data that they're not supposed to. Rust and Go are newer languages that are designed to mitigate this danger. The Linux Kernel is perhaps the most influential software project still being written entirely in C.

As for why the White House has something to say about it, I got no idea. I would have assumed this would be under the purview of NIST or something.

[–] PorkrollPosadist@hexbear.net 7 points 1 year ago

I'm going to become a Suckless guy because of this.

[–] Owl@hexbear.net 7 points 1 year ago

This most likely came from the NSA, which considers critical infrastructure being hackable to be a national security risk.

[–] ForkBombRaja@hexbear.net 2 points 1 year ago* (last edited 1 year ago)

The white house hates the rule of three :)