Live data from Hacker News

Rust Foundation: Hello, World

foundation.rust-lang.org

121–130 of 284 posts

Re: Rust Foundation: Hello, World

#121
post #14

It's a little concerning to see Huawei involved so closely in Rust, given the concerns about them silently including spyware in their products to give access to the Chinese government. I don't think I'm being a total conspiracy theorist; for example the UK, US and Sweden all ban Huawei equipment from their countries' mobile phone networks. Hopefully since this code is all open source there is sufficient scrutiny to a…

And, Rust already has a way of avoiding trusting-trust attacks via mrustc.

Re: Rust Foundation: Hello, World

#122

Earlier quoted context omitted.

don't get me wrong, I love rust and find it a great language for doing systems level stuff but it would be my last choice for a crudy type web application. Those are intrinsically IO bound. Sure, you might find a noticeable improvement if you're using something really slow like rails without any caching but there are plenty of garbage collected rapid development languages that will be fast enough that the visible per…

> Those are intrinsically IO bound. Rust has a great async story compared to other languages, which benefits IO-bound workloads even more so than CPU-busy ones.

I disagree.

Saying that it is "great" is really overselling it at this point, unless the languages you're comparing to are mainly C or C++. I would also toss Ruby in that category for now, but they seem to be working on making async better with Ruby 3+.

When compared to Python, JavaScript, or C#... Rust's language support for async isn't really that impressive to most developers, although the implementation has some technical characteristics that are nice for people who care about the low level details. The ecosystem is pretty lacking, even though it is much better than it was a few years ago.

Compared to the aforementioned languages (including Rust), Go and BEAM-based languages are just on another level.

I'm sure both Rust's language ergonomics and the ecosystem will improve over time, but Rust's goals also make it unlikely to ever be compatible with my definition of a great async system... which is the model Go and Erlang use where the developer can't tell that every single sequential process isn't running in a separate OS thread -- and, by extension, every function is automatically async with no distinction that I have to worry about.

In Go, I can spin up as many goroutines as I need, and I don't have to worry about any single goroutine blocking an executor like I have to worry about in Rust.

Yes, some async runtimes in Rust have worked on clever things like monitoring the executor threads and spawning a new executor to steal a blocked executor's work queue... maybe some day that will be a battle tested solution. Like most of the Rust async story, there are rough edges that could benefit from some more time.

(I have worked professionally with both Rust and Go for several years, and I think they're both great languages with different trade offs... I'm not trying to bash Rust here.)

Re: Rust Foundation: Hello, World

#123

I found parts of that announcement very difficult to follow. Can anyone tell me what the following means? « For too long, open source as both an industry and a community has done a poor audit of its expenses. Notably, ignoring the price of what I’d controversially argue is the core value proposition of open source software: the freedom to collaborate. »

Just a throwaway line, written, no doubt, in a fit of high-mindedness.

Re: Rust Foundation: Hello, World

#124

Earlier quoted context omitted.

serious question : would you recommend Rust for CRUDdy type of web applications -- stuff where mostly you are firing off prepared statememts at a SQL db and then applying business logic to result set. This is what most J2EE apps do currently.

You're in a Rust thread, I think the general response is going to be, "Yes!" And I personally, say yes. But that comes with some caveats. You will be entering an ecosystem that doesn't have all the libraries that folks coming from the rich history of Java has, so you will most likely be signing up for some extra work. But, this is also a great opportunity, because it means that you could be responsible for building a…

"But, this is also a great opportunity, because it means that you could be responsible for building a missing library or feature. "

Ok, so this is an 'opportunity' for some, but a 'big cost' for others.

So remember there are very few Rust devs out there, it is a little bit hard, and though a good chunk of devs might jump at the chance to learn, others, not so much.

It would be a really hard thing to rationally do a 'crud app in Rust' at this moment in time due to all the above reasons. There's a lot of added risk for really no benefits.

If you have a core team that has the skills, ability and is willing to commit to it, then maybe. But we have to think beyond that, when you need another 100 devs ... and people maintaining it ... one can see how other things factor into the equation.

If there is some specific reason and the conditions are right, and if that reasoning is not warped by our own natural tendencies to 'want to use Rust' then there might be an opportunity ... but generally not.

As team members get more excited about 'the problem they are solving' and less 'the tools they use' - you might see an inclination towards other tools, for the most part, at least today, for CRUD-ish kinds of things.

Re: Rust Foundation: Hello, World

#125

I found parts of that announcement very difficult to follow. Can anyone tell me what the following means? « For too long, open source as both an industry and a community has done a poor audit of its expenses. Notably, ignoring the price of what I’d controversially argue is the core value proposition of open source software: the freedom to collaborate. »

I read it as a reference to the problem of maintainer burnout in the face of unbounded input from users and collaborators. This is something the Rust project has been dealing with and thinking about for a while.

Re: Rust Foundation: Hello, World

#126

I found parts of that announcement very difficult to follow. Can anyone tell me what the following means? « For too long, open source as both an industry and a community has done a poor audit of its expenses. Notably, ignoring the price of what I’d controversially argue is the core value proposition of open source software: the freedom to collaborate. »

Here's my take: Collaborating in the open and communicating the results of discussions and the rationales for decisions to the wider community who wasn't present for the discussions has a high time cost. It seems the core rust team has put a lot of effort into making decisions in the open, which increases freedom to collaborate.

Re: Rust Foundation: Hello, World

#127
post #87

As someone who wants to use Rust for real world applications, what are some good use cases for Rust? Web development is not its strong suite, apparently. Or, better still, what have you personally built using Rust?

It's a good thing I didn't get that memo, nor anyone to tell me that backend web development wasn't its strong suit, because I built an entire platform of services with it and an EDA. As I worked on my projects, I wound up crossing streams with developers who had moved from Node, Python, Java, Ruby, PHP, and Go.

Re: Rust Foundation: Hello, World

#128

A win for Rust for sure, but it also seems like a loss for Mozilla.

This is a very good "partial exit" for Mozilla, actually. The original plan might be to do something like this to split the cost, while oxidized Firefox still reaps more benefits than the competition playing catch-up. Rust can't/shouldn't be directly monitized, so it makes sense to have something like this. Mozilla can still hire as many people as they want, but they never attempted to make it a company-managed proje…

> Rust can't/shouldn't be directly monitized

I agree that the main implementation should not, but I could see something like a verified Rust compiler (maybe something like the "Sealed Rust" proposal) being commercialized.

[0]: https://ferrous-systems.com/blog/sealed-rust-the-pitch

Re: Rust Foundation: Hello, World

#129
Just as crazypython said, it seems that the power has shifted from Mozilla and the community to big corporations on the future of Rust.

This is worrying to me in that engineers are naively selling their souls to big corporations just to work on Rust.

I'm glad for the formation of the foundation, even though I hear that even Facebook (although not on the board yet) are looking for engineers to work on the Rust compiler.

Yikes.

Re: Rust Foundation: Hello, World

#130
post #88

Earlier quoted context omitted.

I have some extensive (self-assesment :) ) experience building this kind of application, and my answer would be "no, but maybe" (I was one of the first engineers & architect on our zero to ~500k codebase). Some of the arbitrary, random things I've learned: 1. Given how nice and powerful language is, Rust works relatively well with less experienced engineers. Potentially. You can build very nice APIs which are straigh…

> Turned out, strings are not that cheap to clone if all you have is a bunch of strings. Yeah, if you're doing a lot of cloning, you'll probably run into performance issues at some point. A common way to solve that problem is usually to use references instead of cloning. Of course, writing your code that way takes more work/thought/planning.

>A common way to solve that problem is usually to use references instead of cloning.

Right. I think, we ended up with having everything from the list:

1. String 2. &str 3. Cow 4. Arc, for interned strings (thin Arc would be even better & there is probably a crate for this) 5. Something like owning_ref::ArcRef 6. One-off tricks where you actually need to construct a new string, but don't want to really construct it (for example, for hash lookup).

#5 I think is undervalued, actually; it's amazing for "enterprise" kind of stuff where you have large trees of data you need to pass around & you don't want to use straight borrowing (like &'a Whatever) because lifetimes are too infectious. And you don't want to use Arc at every corner (like, say, Java would do, not quite, but in semantics).

My problem, though, was to explain all the nuances given that they usually have nothing to do with the "business" part of the problem somebody was solving.

Post reply on HN