Live data from Hacker News

Zero to Production in Rust

zero2prod.com

101–110 of 195 posts

Re: Zero to Production in Rust

#102

I don’t want to shit on anyone’s hard work because this does look cool and useful if the language was Python, Java, Go, C#, … Using a systems language where it’s not required is just burning time and money.

There was a time when Go was considered a “systems language” only, and very little web development was done with it. Same with Node.js V8, which initially had very little going for it. Every language starts without much of an ecosystem. If folks find Rust to be beneficial, we’ll see that change for Rust too.

Re: Zero to Production in Rust

#103
I bought this book a couple of months ago - I think it’s well put together and practical as someone familiar with backend development (.NET) looking to learn how to do it in Rust. Yes there’s free resources to learn anything, but most online tutorials are not in-depth. It’s up to you if prefer to piece together your knowledge from various sources or if you want to take a deep dive. There is no single right way to do it.

Re: Zero to Production in Rust

#104

Earlier quoted context omitted.

Yes, Actix today is much different than Actix from a couple years ago. All the unsafe, save a necessary few has been removed, and the architecture switched from an actor model, to a finagle/tower inspired service model.

> and the architecture switched from an actor model, to a finagle/tower inspired service model Then they really should think about changing their name, seeing as actix the broader low-level framework is supposed to be all about Actors.

A name change would have been ideal, but the library was already mature and widely used that it was decided a name change was not worth it.

Re: Zero to Production in Rust

#105
post #33

Earlier quoted context omitted.

In my experience, Rust code is relatively easy to read, even by developers with no Rust experience. Of course, you can write hard to read code. But that's not typically what comes out of a process of writing production software. That's not to say that someone with no experience will fully understand the ownership transfer & borrowing that's happening, but that's just stuff you need to do for the compiler. Reading cod…

Yeah, readability is high, it's writing that can be a bit harder IMO. Especially for someone unfamiliar with rust, it can be hard to really know why someone is using self, &self, or &mut self. Yet the code reads the same. That's the funny thing about rust.

The compiler is supposed to tell you when you get it wrong. This does leave design issues on the table, but it's also good for those to be addressed explicitly, by the more senior people on the project.

Re: Zero to Production in Rust

#106
post #31

So I've just tinkered around a bit in Rust, and I'm not intimately familiar with the language. My experience has been pretty good, but I don't see how it's a good fit for the web domain. At least not the enterprisey, CRUD, business apps I'm used to building. I'd be curious to hear from people who have been using Rust for their web backends, though. Beyond the classic selling points of speed and safety, what benefits…

We are using Rust for backend web development and other things. For us, the safety is the critical reason to choose Rust - particularly the thread-safety. Also the relatively small memory footprint compared to something like Java. Performance hasn't driven our decision at all - the number of requests per second is very low. It's correctness that matters. We are a bit unusual because customers have locally deployed se…

Rust is really hard to learn though. the compiler errors are hard to read and understand, it's an extremely syntax heavy language. I used to work with someone who regularly contributed to rust, I had some errors on a project that confused him too. The only other times I needed to a book to learn a language was Scala and haskell, both hard to learn languages.

Re: Zero to Production in Rust

#107

Is it cool now to just link to landing pages where you sell things now? Am I missing something? Why the hell are people upvoting a “buy now with discount code” page?

Seems like hackernews will upvote anything Rust. I have to say, I've never tried the language, but I'm completely sold.

Re: Zero to Production in Rust

#108
post #106
post #31

Earlier quoted context omitted.

We are using Rust for backend web development and other things. For us, the safety is the critical reason to choose Rust - particularly the thread-safety. Also the relatively small memory footprint compared to something like Java. Performance hasn't driven our decision at all - the number of requests per second is very low. It's correctness that matters. We are a bit unusual because customers have locally deployed se…

Rust is really hard to learn though. the compiler errors are hard to read and understand, it's an extremely syntax heavy language. I used to work with someone who regularly contributed to rust, I had some errors on a project that confused him too. The only other times I needed to a book to learn a language was Scala and haskell, both hard to learn languages.

Please file bugs for hard to understand error messages! We treat them as such. We’d rather have too many reports than not enough.

Re: Zero to Production in Rust

#109
post #12

Earlier quoted context omitted.

Correct – it took about 6 months for people to become fully productive in Rust, which matches what I've heard elsewhere. Though I will note that the Rust compilation times were also far more painful than I'd expected – even the tiny (~5k sloc) app at hand would take what felt like a minute to recompute the red squigglies in my editor. TS felt slow if it took 5-15sec, and Sorbet (for Ruby) was usually Rust was in the…

Ironically, I recently received an ADHD diagnosis…

Everyone and their mother is receiving an ADHD diagnosis nowadays. Call me a conspiracist, but I believe this is just one more case of deliberate overfitting by Big Pharma, coupled with the consequences of technology on our attention spans and other characteristics of our cognition and behavior.

As someone that might be similarly diagnosed for the same reasons, your comment does make me more optimistic of achieving something significant in my life, though.

Re: Zero to Production in Rust

#110
post #31

So I've just tinkered around a bit in Rust, and I'm not intimately familiar with the language. My experience has been pretty good, but I don't see how it's a good fit for the web domain. At least not the enterprisey, CRUD, business apps I'm used to building. I'd be curious to hear from people who have been using Rust for their web backends, though. Beyond the classic selling points of speed and safety, what benefits…

We are using Rust for backend web development and other things. For us, the safety is the critical reason to choose Rust - particularly the thread-safety. Also the relatively small memory footprint compared to something like Java. Performance hasn't driven our decision at all - the number of requests per second is very low. It's correctness that matters. We are a bit unusual because customers have locally deployed se…

> I don't think it's any harder to master than some other major languages such as C++ or Java

Oh there is just no way it's harder to learn than C++. C++ has the problem that it's all of C (almost everything from C is still in there) plus all the stuff bolted on to achieve C-with-classes when OOP was the new hotness in the 1980s plus then several further evolutions to add major new features, not always in a very consistent way.

There is a sub-tribe within C++ that wants a simpler "subset of the superset". They believe C++ could be made into a healthy modern language which is practical to teach as a first language to students and still has excellent performance and hardware compatibility. But if you speak to members of that tribe they invariably feel there's just a few little tweaks to make to the superset first... and I just don't think their dream will ever actually come true.

Rust does have a lot of complicated stuff, but almost all of it secretly turns up if you wanted to be good at C++ too.

For example, borrowing versus ownership isn't explicit in C++ but it's necessary to understand what's actually going on so that you'll find Stroustrup has actually written proposals for C++ that formalise this exact notion, they just can't be checked for existing C++ as they are in Rust.

Post reply on HN