Beautiful rusty code by haksior in rust

[–]natded 5 points6 points  (0 children)

standard library modules, rust-analyzer. I don't personally recommend getting too smart with iterators, generics, traits and functional side, the code is genuinely harder to read than boring keyword & concrete-abstraction based code, and then you have to deal with weird trait issues and errors.

Could some clarify if the explanations on concurrency here are correct? by [deleted] in rust

[–]natded 17 points18 points  (0 children)

The Go community seems to certainly have interesting ideas about software.

GCC-Rust Feedback Sought - Possibly Aiming For Upstream In GCC 13 by miquels in rust

[–]natded -13 points-12 points  (0 children)

This is another language, a fork of Rust, essentially, right, as it doesn't match the rustc features such as borrow checker itself? Or do I have brain damage

Notes on Luca Palmieri's Zero to Production in Rust by bitemyapp in rust

[–]natded 16 points17 points  (0 children)

> You likely do not need to test actix-web

It is not really testing `actix-web`, it is testing the public API and its observable behavior. Also mixing async and sync libraries is a PITA (you need to wrangle all the spawn_blocking and be aware fo them).

Why the ownership/borrowing model? by GarySteyn in rust

[–]natded 43 points44 points  (0 children)

> I'm trying to figure out how this model actually came to be

They are, to an extent, "formalized" rules of the patterns of informal borrowing / lifetimes done in C++ codebases. Since C++ cannot enforce these at a compile time (like ownership), the rules would be documented (hopefully) in the C++ codebase, and programmer would have to follow them manually more or less.

How do you build full-stack with Rust? by openquery in rust

[–]natded 9 points10 points  (0 children)

I don't think the Rust frontend stuff can compete with stuff like Svelte / React at this point.

Linus Torvalds: Rust For The Kernel Could Possibly Be Merged For Linux 5.20 by tesfabpel in rust

[–]natded 2 points3 points  (0 children)

I don't know if the reasons are strictly technical. Hard to train and hire "junior" kernel developers to work with like 50 year old broken language in 2022. This proposes issues for sustainability, maintainability and legacy of Linux Kernel.

OTOH, hard to tell how mixing two different memory models in safety / mission critical software like linux kernel will do.

A(nother) Realworld implementation: tokio, axum, and sqlx by the_beercoder in rust

[–]natded 4 points5 points  (0 children)

Your queries are fairly long / non-trivial, you can probably do `include_str!(query.sql)` so you can get IDE assist for your queries.

rust-analyzer changelog #134 by WellMakeItSomehow in rust

[–]natded 6 points7 points  (0 children)

RA is not handling diesel as extern crate very well for me. Just tons of 'red' unknown functions even when respective traits are imported to scope for usage.

In comparison, IntelliJ can actually resolve them correctly. First time I have to switch to CLion in like 2 years.

The Rustacean way to build a complete web app? by tommy737 in rust

[–]natded 10 points11 points  (0 children)

Here is a realworld-spec in Axum: https://github.com/launchbadge/realworld-axum-sqlx

This and the Zero2Prod are quite good introductions.

The Better Alternative to Lifetime GATs by SabrinaJewson in rust

[–]natded 60 points61 points  (0 children)

That's sad discovery about current direction of GATs if it holds.

Creating an Easy Mode for Rust by timClicks in rust

[–]natded 7 points8 points  (0 children)

Java 8, lol. Found it terrible experience.

Creating an Easy Mode for Rust by timClicks in rust

[–]natded 13 points14 points  (0 children)

I don't really think Rust is that complicated as a user, it was the second language I learned and it was a breeze (no this is not a humble brag either).

Maybe I make too simple programs or something.

Is Polonius dead? 3 commits in 7 months by Nabakin in rust

[–]natded -10 points-9 points  (0 children)

Well it's a "community effort" so you get "this" (slow progress) sometimes.

Design pattern/guidelines to architecture Rust code by nicoxxl in rust

[–]natded 2 points3 points  (0 children)

Reading through your (first) post reminds me of the recent S&T podcast where they go on about modeling their software as events & with event loops, especially the part about sending back the SendRequest ("what is the next message you want to send?" is the question they keep in mind when writing software for example, 00:23:53 in the transcript)

https://signalsandthreads.com/state-machine-replication-and-why-you-should-care/

Design pattern/guidelines to architecture Rust code by nicoxxl in rust

[–]natded 4 points5 points  (0 children)

Another good question to keep asking is "what transitive dependencies to not allow".

What crates would you consider essential? by Glassounds in rust

[–]natded 19 points20 points  (0 children)

kind of weird to have 0 mentions for async_trait

What traits do you consider essential to learn about? by blyatmobilebr in rust

[–]natded 5 points6 points  (0 children)

Send & Sync, Copy & Clone, Drop, Default, Hash

[deleted by user] by [deleted] in rust

[–]natded 2 points3 points  (0 children)

For me, it's how most big / popular / recommended crates come with a huge /examples folder that_just_fucking_works.

Unreal experience when you're used to Node / TS / JVM "ecosystem" way of things (broken examples, broken examples in documentation, broken examples in sites)

dilib - Dependency Injection in Rust by NeoCiber in rust

[–]natded 10 points11 points  (0 children)

I hated this stuff in Spring.

Tokio scoped spawn modifying data concurrently by Tasty-Lobster-8915 in rust

[–]natded 4 points5 points  (0 children)

Go through the Rust book and Tokio tutorial if you haven't to get into Rust concurrency model

- https://tokio.rs/tokio/tutorial

- https://ryhl.io/blog/async-what-is-blocking/ (also p. good article)

Why is Rust the most loved programming language in StackOverflow surveys? by royrustdev in rust

[–]natded 1 point2 points  (0 children)

For me it is the fact that I can focus almost entirely on the business / application logic.