Live data from Hacker News

Why Rust?

rerun.io

221–230 of 294 posts

Re: Why Rust?

#221

I saw a YT video about how safe Rust is. I want to give it a try but I do mainly web applications, where I use Spring Boot and front-end frameworks. From what I have read Rust is better for system level or regular applications (not web apps). Can modern web applications be built efficiently with Rust? And by efficiently I mean, is the ecosystem there (libraries and tools). I imagine the following would be needed.. 1)…

Rocket is another nice Rust web framework.

You can choose your own template engine instead of having to use one that's provided (like in ASP.NET MVC). There are a multitude of template engines available in Rust.

Re: Why Rust?

#222

I wish C++ has a universal dependency manager like crates. It feels like every external library I want to use requires their own exotic setup.

Yes, but C/C++ is straightforward also. You simply need the source and link it or get a library object file (.lib or .so) and the header files.

IDE's like Visual Studio hide this behind tons of settings and dialogs but in the end it's simple if you know the above.

Re: Why Rust?

#223

Earlier quoted context omitted.

That isn't a trend line, the crates are sorted by percentage of unsafe code. From your link: To get this plot I ordered all crates by unsafe code % and then plotted it, so each point on the graph is unsafe code % for a single crate. The link is still some evidence in support of your position, given that it drops off close to the left edge, i.e., a small number of crates have a large amount of unsafe code. But it isn'…

Yes, you’re correct trend is the wrong term. Was that an aggressive statement? It wasn’t intended to be. I find the statements around unsafe in Rust to generally be incorrect though, from what I can tell, it’s only ever used in quite narrow cases and not generally across the vast majority of Rust software.

Have a look at Rust/WinRT where the Microsoft team is the opinion others should provide the safer wrappers on top.

Re: Why Rust?

#224
post #9

This must be how people felt about C++ in the beginning ...

I was in college when C++ was taking off, and the hype around C++ wasn't really the language, but rather the OOP paradigm, which C++ enabled on top of C, which was heavily established. C++ took off far faster than Rust has. I don't have exact numbers, but C++ was used almost nowhere in the late 80s, and by 2000, it was the defacto programming language all over the place (especially with video games). Rust's first stable release was 2014, meaning it has been around for 8 years. By the time C++ was around the same age, it was as popular as, well, C++ is now, actually!

Rust is just way better thought out on a deeper level than C++ ever was (or is). It has its issues, and while it may suddenly accelerate adoption in the next several years, I don't actually seeing it gaining many inroads. I hope to be wrong! I think, these days, language kinda doesn't matter as much, as all languages are picking up chunks and pieces of all the various paradigms, like a decorator crab, and that tends to work fine for established code bases.

Re: Why Rust?

#225
post #31

Earlier quoted context omitted.

> Too bad most of the Rust jobs right now seem to be in crypto. What is the problem with that?

Potential criminal liability and resume stench. Would you hire ex scammer/ponzi to maintain your backend? I wouldn't.

> resume stench

This is such a bogus argument. I am working in Crypto and have no trouble getting offers from non crypto companies. My resume also carries other evils such as the surveillance overlord and the evil empire, among others. I always found it easy to waltz into a new job with those names.

I have also hired dozens of people coming from companies which were pinatas of du jour. Neither I nor any of the other people involved (sourcers, recruiters, execs, HR) gave even a minimal amount of shit regarding "resume stench". If a candidate passed our hiring bar, we hired them.

So stop spreading this FUD.

Re: Why Rust?

#226
post #138
post #50

Earlier quoted context omitted.

> It's a bubble, 99/100 crypto companies are going to crash and burn, or already have. I'm sure this is the 990th time that I have heard this. The fact is, it isn't going away and it seems even more crypto companies have taken interest in using Rust and that is good. Even some (crypto) companies are sponsoring the Rust Foundation as silver members. Nothing wrong with that. [0] [0] https://foundation.rust-lang.org/mem…

What are crypto companies doing that I should care about? Give me something I could go check out and use that is: (1) Not speculation, gambling, or some variation thereof. (2) Useful for something other than crypto itself. (3) Actually works and can be used today. (4) Continues to make sense even in a crypto bear market. (In other words: I will still buy milk even if the US dollar is falling because the point is the…

https://news.ycombinator.com/item?id=32406095

I prepared that post since the question you posed comes up every week here, if not more frequently.

Re: Why Rust?

#227
post #31

Earlier quoted context omitted.

> Too bad most of the Rust jobs right now seem to be in crypto. What is the problem with that?

It's a bubble, 99/100 crypto companies are going to crash and burn, or already have. If you manage to land on the 1/100 that actually does something useful and survives, well, better odds than the lottery I suppose.

No post body was provided.

Re: Why Rust?

#228

Earlier quoted context omitted.

Potential criminal liability and resume stench. Would you hire ex scammer/ponzi to maintain your backend? I wouldn't.

> resume stench This is such a bogus argument. I am working in Crypto and have no trouble getting offers from non crypto companies. My resume also carries other evils such as the surveillance overlord and the evil empire, among others. I always found it easy to waltz into a new job with those names. I have also hired dozens of people coming from companies which were pinatas of du jour. Neither I nor any of the other…

I hire candidates based on skill, core values and judgment. I completely accept that others might use different criteria.

Re: Why Rust?

#229

Earlier quoted context omitted.

> resume stench This is such a bogus argument. I am working in Crypto and have no trouble getting offers from non crypto companies. My resume also carries other evils such as the surveillance overlord and the evil empire, among others. I always found it easy to waltz into a new job with those names. I have also hired dozens of people coming from companies which were pinatas of du jour. Neither I nor any of the other…

I hire candidates based on skill, core values and judgment. I completely accept that others might use different criteria.

So you think someone who worked at a crypto startup showed a lack of judgement? Do you have a blacklist of companies or sectors (adtech, surveillance tech, data collection, weapons manufacturers, pharma, lottery, porn, ...)? I would love to see that list.

Re: Why Rust?

#230

Earlier quoted context omitted.

Which should be incredibly negligible unless you're counting literal millions of objects. Even then, I'm suspecting that refcounting will never be in the top spots of things that slow you down.

What I'm saying is that bumping atomic references inside a hot loop will be detrimental for performance, and since it invalidates a cache line and this can flush caches for lots of cores. It also shuts down ILP.

One really nice thing about Rust's use of Arc is that you don't need to bump atomic references in a hot loop, or much at all usually.

Once you have an Arc you can `as_ref()` to get a &T. So maybe you need an Arc to share something with another thread, so you clone it once. Once you're in that thread though you can go back to just using `&` and never touch the atomic again.

Post reply on HN