News for hackers. Stuff that matters.
Re:Rust 2024 the Year of Everywhere? by echelon on Thursday September 22, 2022 @09:48PM (#32947050)
Writing Rust/Actix for server code is a breeze. There's zero complexity. It's practically Java, just with a more Ruby-like syntax.

Entirely depends on what you're building.

Edit: You can have a small Actix app up over the weekend and never touch "lifetimes" until you're ready.

Re:Rust 2024 the Year of Everywhere? by andrewstuart on Thursday September 22, 2022 @09:52PM (#32947069)
After my initial failed attempt to learn Rust I then took a second shot at it by writing Actix web code and had alot more success. This is the path I would take if I was returning to Rust.

Having said that, I felt that for the most part this approach was just avoiding the task of learning the complexities. But, I do believe that learning something hard starts by learning a little bit of it and building on that initial foothold.

Re:Rust 2024 the Year of Everywhere? by lossolo on Thursday September 22, 2022 @09:56PM (#32947090)
> Entirely depends on what you're building.

Exactly this, if you are building some CRUD app then it's as easy as using Java or Go etc, because basically there you have request -> contact some db -> return result, maybe do some processing of that data, so no need to fight borrow checker at all. But if you build something like multiplayer game server with lots of state of 3D world that constantly changes and interacts with itself, that is operating on self referencing data structures etc then it's not as easy as in GC language.

Re:Rust 2024 the Year of Everywhere? by brown on Thursday September 22, 2022 @10:03PM (#32947137)
I could not disagree more.

The moment you need to do something remarkably simple, such as string concatenation, you are confronted with the reality that Rust is a much lower level language.

Re:Rust 2024 the Year of Everywhere? by rascul on Thursday September 22, 2022 @11:19PM (#32947616)
Re:Rust 2024 the Year of Everywhere? by josephg on Thursday September 22, 2022 @10:40PM (#32947374)
Part of my work involves the braid HTTP spec. Braid uses a custom server-sent events like protocol sent over long lived HTTP connections. I spent about a week trying to get this working using rust & actix. My code became mired in complex lifetimes, crazy iterators, Pin, async and Futures. Hundreds of lines of code later, I gave up and rewrote the whole thing in an hour or two, in about 30 lines of javascript.

The whole experience was so bad I've sworn off using async rust entirely until a few more features land. Thankfully, apparently there GAT lands next release - although its not clear to me if it'll work for futures yet, or if thats a later goal.

I love rust. But, wow.

Re:Rust 2024 the Year of Everywhere? by Thaxll on Thursday September 22, 2022 @10:19PM (#32947237)
For simple CRUD app maybe, but the moment you start to do anything more complicated, aka manipulating data it's a complete different story.
Re:Rust 2024 the Year of Everywhere? by rascul on Thursday September 22, 2022 @11:16PM (#32947603)
I don't know anything about Java or Ruby but I've tried several rust web frameworks and Actix is the one I always find myself using in the end.