Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
retoor46318hFor every language in exception of Rust (reason is obvious) you have https://codebeat.co/.
-
12bitfloat937417hI know this doesn't help much but when you're wrapping a bunch of stuff in mutexes, it's often not a great idea
For very multithreaded code I think a more actor-ish approach works best where you send "messages" to each other instead of locking global datastructures
For less multithreaded code it's often best to have your data be owned by a "context" object or something inside a slotmap and only reference the objects with indices. This way, instead of Arc<Mutex<T>>, the ownership is so much simpler since it's now all just dependent on the context object. Then you can pass that context object as a reference down the call stack
Doesn't always work of course, but just some of my thoughts. Code architecture in Rust is hard! -
jestdotty552917h@12bitfloat that's an idea
fuck
cuz currently I even wrote load balancing code with mutexes
fuck
and ofc it's not perfectly optimal because it's checking things all the time
ragh
rewriting this AGAIN would be such a production ðŸ˜
Related Rants
what I want is for AI to spot logical inconsistencies in my code and debug it
specifically a complex multi threaded form...
raaghhh
stupid tokio having no damned mutex debug tools
rant
mutex
ai
async
rust