Live data from Hacker News

Ask HN: What's the Deal with HN and Rust?

news.ycombinator.com

41–50 of 108 posts

Re: Ask HN: What's the Deal with HN and Rust?

#41
post #19

Earlier quoted context omitted.

Are you putting Haskell and Rust in the same category when it comes to likely future adoption? They seem very different to me - Haskell being unlikely to get much more traction, and the opposite for Rust.

Same take. I don't see Haskell / Erlang / Elixir and the like truly ever taking off. It's not because they aren't awesome (because they are) - it's because what they solve isn't as desperately needed as what Rust solves. I don't feel like this aspect is debatable. Our systems are miserably insecure and unwilling to trade off performance to become more secure. Without Rust or something like it, there's no chance - tha…

> it's because what they solve isn't as desperately needed as what Rust solves.

Undoubtedly, the issue of memory safety while remaining performant is a game-changer, but the word need is a bit strong here...

Re: Ask HN: What's the Deal with HN and Rust?

#42
post #25

You're not wrong. HN Rust articles: 4 in the last 24 hours (not including this one) https://hn.algolia.com/?dateRange=all&page=0&prefix=false&qu... HN Go articles: 0 in the last 24 hours https://hn.algolia.com/?dateRange=all&page=1&prefix=true&que... JavaScript: 5 in the last 24 hours - a much more popular language but none of these got to the front page https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...…

Not sure if this is interesting but only one of those Rust articles is about Rust or its usage. The rest are about programs written in Rust.

For Javascript it's the opposite; only one is about something written in Javascript. The rest are about language or its usage.

Not sure if one can say that that's an indication of pumping. Seems more an indication of usage.

Re: Ask HN: What's the Deal with HN and Rust?

#43

inexperienced novices and disheartened veterans alike get infatuated with that new shiny thing ... the rest of just smirk at the pump articles, as we have achieved state of Zen and realize _all_code_is_garbage_ and that nobody, other than minuscule amount of people who ever had a git write access in their life, actually care or will ever care about code let alone a programing language the app was written in

What's wonderful about rust is that by making ownership explicit and enforced, it enables less experienced people to learn those concepts and confidently use new approaches to write performant software without having to shoot off their own foot learning C or other languages where understanding ownership is necessary but not enforced. More experienced people will generally be happy to offload ownership tracking to the…

> More experienced people will generally be happy to offload ownership tracking to the compiler and save some of their brainpower for other things.

For me, the great benefit here is we can explicitly mark down in the code if a parameter is mutable vs immutable. This is a gain since you know explicitly if what you pass in will be changed or not inside the function.

Re: Ask HN: What's the Deal with HN and Rust?

#44

inexperienced novices and disheartened veterans alike get infatuated with that new shiny thing ... the rest of just smirk at the pump articles, as we have achieved state of Zen and realize _all_code_is_garbage_ and that nobody, other than minuscule amount of people who ever had a git write access in their life, actually care or will ever care about code let alone a programing language the app was written in

Rust was a shiny new thing back in like 2018. It gets talked about a lot because it has a lot of ergonomic and conceptual fixes that make life better. People like that. No, not every programming language is the same.

"nobody, other than minuscule amount of people who ever had a git write access in their life, actually care or will ever care"

So nobody, other than nearly every software engineer out there. Nobody, except the majority of people working in our field. Okay...

Re: Ask HN: What's the Deal with HN and Rust?

#46

Well, many people don’t want to pay the factor of 2 performance cost of a managed language like Java and strcpy in C is Turing complete and most code has to portable to at least x86 and ARM (often both 32 and 64 bits) so assembly is out…

> 2 performance cost of a managed language like Java

It can be a lot worse too. Java lacks the ability to have really compact data structures and can not lean in too much into the hardware acceleration without becoming incompatible. You can't exactly set `--fast-math`. Shame GCJ got dropped.

> strcpy in C is Turing complete

Not something I've heard of - is this an abuse of Unicode?

> most code has to portable to at least x86 and ARM (often both 32 and 64 bits) so assembly is out…

(I've not looked into this deeply) - It should in theory be possible to offer translation from one architecture to another, but I guess it is much more effort than it is worth.

Seems like if you could translate your assembly into LLVM equivalent assembly (or just use it directly), you could then build for the target architecture [1].

[1] https://stackoverflow.com/questions/7773194/is-it-possible-t...

Re: Ask HN: What's the Deal with HN and Rust?

#47
post #32
post #2

It solves a large class of problems that are not handled in C and C++. Some people are hyped that it can solve all problems under the son, while others don't like the hype talk or are deeply invested in C and C++ knowledge and don't like their belittlement.

Curious - what class of problems do you see Rust and its ecosystem handling that C++ doesn't?

Rust may allow 100 engineers to work on the same codebase without spending all their time debugging memory corruption errors. I say "may" because I don't have firsthand experience in a team that big.

Re: Ask HN: What's the Deal with HN and Rust?

#48
Rust might be a better C++. (Zig is the better C)

The memory safety thing seems to be appealing to some people who believe it will dramatically reduce the security issues found in many software. (they usually know very little about actual security exploits)

Rust is building a cult-like community around it, and I think it could be its demise, I personally hate it (the community)

Re: Ask HN: What's the Deal with HN and Rust?

#50
post #20

inexperienced novices and disheartened veterans alike get infatuated with that new shiny thing ... the rest of just smirk at the pump articles, as we have achieved state of Zen and realize _all_code_is_garbage_ and that nobody, other than minuscule amount of people who ever had a git write access in their life, actually care or will ever care about code let alone a programing language the app was written in

Pretty much. People are gonna find ways to write atrocious Rust code just like they have with any other language, and no-one is gonna bother to check all the unsafe blocks. Severe bugs may be less prevalent, but life as a a developer will suck just as much. :)

People do consistently audit unsafe usage. And I would rather have atrocious rust code that's memory safe, than atrocious C/C++ code that comes with a free package of CVEs.

There are tools that explicitly exist for this use case, such as cargo-geiger [0]. There was some drama with a large framework called Actix a while ago due to the maintainer having a bit of a cavalier attitude towards unsafe usage. Etc.

0: https://github.com/rust-secure-code/cargo-geiger

Post reply on HN