Avatar

Solemarc

Solemarc@lemmy.world
Joined
0 posts • 98 comments
Direct message

I don’t get why we’re taking a swing at Linus here. The article only mentions him in relation to the rust for Linux project being slow going. But, it IS going and the US government has only stated that “you need a plan to move to a memory safe language by 2025 or you might be liable if something bad happens as a result of the classics (use after free/double free/buffer overflow/etc.)” but I don’t think Linux would count it’s free software and it does have a plan.

permalink
report
reply

Well, I’m not American.

In Australia you either bring your own lunch or you bring cash for the school shop. If you have no lunch then the school feeds you from the shop and charges the parents later.

permalink
report
parent
reply

Hang on, does this say “schools charge transaction fees when you pay for lunch online”??? As in, a parent puts $20 on their child’s tab for lunch and the school taxes it so the kid only gets $18? That’s wild.

permalink
report
reply

I could swear it was higher earlier this year/last year but looking at the survey results, Linux climbed to 2% this survey. I think maybe that half remembered headline was something like “Linux is higher than MacOS at 1.5% market share” or something like that instead?

permalink
report
parent
reply

“You can turn it off”, “it’s an optional feature”, they didn’t even last a year! What ever happened to slowly boiling the frog?

permalink
report
reply

I can’t be bothered to build them but looking at the releases on GitHub openssl 3.4.0 is 17.5mb and rustls is 2.6mb. both of these releases are source files not binaries but I don’t see how rustls could possibly be larger than openssl.

permalink
report
parent
reply

Just looked it up, looks like you’re right. The Go GC has to pause when it sweeps and it looks like the JVM has multiple GC implementations but all of them have to pause for sweeps. I don’t really use either language so I didn’t know how the magic worked.

permalink
report
parent
reply

Ahh! Of course! The problem with Concord was the price! That’s why no one cared during its free beta weekend!

permalink
report
reply

Huh, I knew Go’s GC ran on another thread but not the JVM, cool.

permalink
report
parent
reply

This is because rust doesn’t do proper tree shaking of code and bundles everything into it even if it’s not necessary.

This isn’t true. a simple:fn main() { println!("Hello World!); } compiles into the same size binary as:

fn main() { println!(hello_world()); }

fn hello_world() -> String { String::from("Hello World!") }

fn another_function() -> String { String::from("Completely unused function") }

So why are the complexities of Rust worth it to save like 10ms loading a website? Not that as a language I like php that much due to no typing, but performance for a web app really isn’t that important.

if the amount of rust, c and c++ in web infrastructure doesnt convince you that performance is important then I guess we’ll have to agree to disagree here.

Rust again isn’t that good for embedded either due to the large binary size

I’m not sure about this one, I’ve never worked on embedded but I’m not convinced. There’s an embedded rust book and their target hardware is a device with 256kb of flash memory, and 48kb of RAM.

This can also be solved with a file hash. When you compile the app, ensure the compiled file hash matches the hash of the binary in cargo. So you can get the best of both worlds

This doesn’t address security at all, the only thing a hash does is tell you that the file you download was the file that was uploaded. If I upload malware in my library to cargo, cargo generates a hash for my library, then you download my library. The only thing the hash tells you is that you did indeed download my malware. It’s also harder to audit my library because cargo has a binary blob instead of my code, you have to go to my repo in order to find the malware, and you better hope I haven’t done something clever like add the malware in locally instead of in the repo, so it’s only there when I build to upload to cargo.

permalink
report
parent
reply