HNHacker News
TopNewBestAskShowJobs

3a2d29

633 karma · joined December 11, 2021

submissionscomments
3a2d29··on NSA urges orgs to use memory-safe programming languages
I’m not at all saying I do know a lot on the topic, I am saying I know enough to recognize comments that are wrong.

For starters just cause you “can” have memory safety issues doesn’t mean it’s the same as Rust.

I mean Rust “can” have memory safety issues, so I guess it’s equal to C++? No that’s ridiculous.

So just cause you “can” have unsafety in python doesn’t mean suddenly it’s not better than rust.

If you think memory issues mean rust is better than C++, then you must recognize all GC languages are better than rust. Rust should be used where GCs cannot.

Memory leaks are still a very real issue. Just cause they aren’t a security issue doesn’t mean they don’t affect reliability, which is important.

3a2d29··on NSA urges orgs to use memory-safe programming languages
On the topic of a “forced” C++ to be close to rust.

I guess technically if you forced all allocations to be in unique_ptr<> and then used std::move every time you passed it as a parameter, you would kind have the first part of rust (ownership rules) down.

But the borrow checker? Not sure how that’s possible. It might be (and in fairness, you could require all references to be const)

But I am not sure if there’s a way to do the usual 1 and only 1 borrowed mutable value. (Unless someone can think of a way?)

3a2d29··on NSA urges orgs to use memory-safe programming languages
C# allows you to tune the GC, which I believe was the cause of that issue.

Keep in mind by turning off the GC, how have now made C# just as safe as rust, not unsafer.

3a2d29··on NSA urges orgs to use memory-safe programming languages
What’s kinda annoying about comment sections on these articles is it shows how many people have opinions on this topic that they know only a bit about.

Rust is safer than C++ because it does “opt-out” of memory safety, rather than modern C++ which is more “opt-in”

But Rust (other than for threads) is definitely not more memory safe than Go/Java etc. Safe rust code can still memory leak. Unsafe rust code can have memory errors (and does frequently) that those others would stop.

3a2d29··on NSA urges orgs to use memory-safe programming languages
Out of curiosity, are you a C/C++ dev?
3a2d29··on NSA urges orgs to use memory-safe programming languages
Maybe I am misunderstanding your comment, but there’s no way “unsafe” will be removed from rust.

It’s essential to doing many things.

3a2d29··on NSA urges orgs to use memory-safe programming languages
Except Rust can still have serious memory safety errors like double-frees and memory leaks.

All those other languages cannot. Rust is much less safe than a GC language in terms of memory.

3a2d29··on NSA urges orgs to use memory-safe programming languages
but with a GC, Java/Go/etc are inherently more safe than rust.

Rust can have double-frees and some of the most serious memory safety errors that those cannot.

3a2d29··on Blessed.rs – An unofficial guide to the Rust ecosystem
Very cool!
3a2d29··on How to make sure no dynamic memory is used
Doesn’t the compiler do some hidden allocations?

And as a follow up, why use rust if allocations mean ownership rules are no longer needed?

3a2d29··on Monumental (if correct) advance in number theory posted to ArXiv by Yitang Zhang
Thanks!
3a2d29··on Monumental (if correct) advance in number theory posted to ArXiv by Yitang Zhang
I need a “Explain like I’m 5” for Landau--Siegel zeros.

This sounds like a hard task as I couldn’t find anything online that does it :(

3a2d29··on Nvidia Security Team: “What if we just stopped using C?”
Hmm I think they are referring to GC as “traditional” GC, but I will concede that they don’t seem to say that.
3a2d29··on Nvidia Security Team: “What if we just stopped using C?”
And rust is unsafe if you use unsafe rust (or even if you use Arc in safe rust and reference count incorrectly).

Ada doesn’t use allocation, remaining 100% memory safe.

3a2d29··on Nvidia Security Team: “What if we just stopped using C?”
I checked and you are not correct.

https://en.m.wikipedia.org/wiki/Garbage_collection_(computer...

Reference counting is a type of garbage collection.

3a2d29··on Nvidia Security Team: “What if we just stopped using C?”
Wouldn’t the performance costs of bounds checking on arrays be the same if the computer was doing it or if your code was doing it?

By that logic C/C++ doing no bounds checking speeds your code up?

3a2d29··on Nvidia Security Team: “What if we just stopped using C?”
Isn’t reference counting a type of garbage collection?

I feel like you can’t put Swift in the world of Rust/Ada/C/C++

3a2d29··on Nvidia Security Team: “What if we just stopped using C?”
Although the article is about Ada, which is technically more memory safe than rust.
3a2d29··on Nvidia Security Team: “What if we just stopped using C?”
I was expecting this to be a rust article lol.

Ada is more memory safe than rust technically, although with less devs using it.

3a2d29··on Many companies aren’t prepared to replace underperforming CEOs
Obviously not corporate, but I believe Rome had 1 year term limits for its 2 consuls.
3a2d29··on Many companies aren’t prepared to replace underperforming CEOs
But surely if CEOs had term limits then the good ones would be jumping from one company to another, so if they think too short term then no board would hire them.

Boards would hire the CEOs that set the next one up for success.

Kinda like how term limits for the us president doesn’t usually result in that type of behavior since it would screw over their party.

3a2d29··on A Tour of C++ (Third edition)
That’s not an attack. I think they are just trying to make the point that once you enter unsafe rust, you can use any unsafe language since the biggest benefit of rust is gone.

Unsafe rust is not used often, they never argued that.

3a2d29··on Activist glues his head to glass covering 'Girl with a Pearl Earring' painting
Maybe you doubt it, but it isn’t bigotry to question your motives because of your birth.

Especially when your birth is a great fortune

3a2d29··on Activist glues his head to glass covering 'Girl with a Pearl Earring' painting
The idea that something has to be on the news to be effective is hilarious.

If most Americans curved their consumption (didn’t buy the latest iPhone every year, drove less) that would do way more than any climate change awareness.

I get that people want to do radical acts because they feel good, but that doesn’t mean you are making a big difference.

In short: lack of awareness is not what is in the way of preventing climate change, personal choices are. Personal choices don’t make the news, but are for more important than these acts, which make you feel good but don’t do anything.

3a2d29··on Python 3.11 is faster than 3.8
I don’t think the borders are that fuzzy.

Who has a C++ repo that isn’t in a low level language because it has to be?

There is no production repo where python gets fast enough to replace Rust/C++.

Still great to see improvements because there are repos where python replaces other languages.

3a2d29··on “You meant to install ripgrep”
This would work, but I think hiding a package behind an alias is never a good idea.
3a2d29··on Learn enough C to survive
I think that’s a joke
3a2d29··on What Makes the Zig Programming Language Unique?
Is there any language other than javascript that has the key word as the full "function"?

Again its personal preference, but I'm curious if there is a language you use often that makes you like that specifically?

Java is a bit like that, but has the C++ data types as its function key word basically. I'm trying to think if I am forgetting one.

3a2d29··on What Makes the Zig Programming Language Unique?
Zig isn't 1.0 so I assume more learning materials will come along once the language is actually finished.

I am not super familiar with zig, but I would say I am not a fan of using the entire word "function"

I believe "fn" is used in rust and I think its readable.

Maybe something like Go's "func" is better, but I really feel this is all arbitrary.

3a2d29··on “Rust is safe” is not some kind of absolute guarantee of code safety
Not to mention there was this whole issue: https://news.ycombinator.com/item?id=29501893

After saying everyone was empowered to use their tool, they tried to kick someone off the team for working for Palantir.

Regardless of politics, kinda unfair to make political statements using the rust accounts, then turn around and say other people can’t be part of rust because they work for a company who is political.

← PreviousPage 3 of 7Next →