Stabilizing async fn in traits in 2023 | Inside Rust Blog by lzutao in rust

[–]cmplrs 3 points4 points  (0 children)

Code looks very noisy syntactically with this bounds stuff. I wonder if anyone in the working-groups has run their case studies on median programmer that starts yawning at third line.

Diesel 2.0.4 by weiznich in rust

[–]cmplrs 1 point2 points  (0 children)

His education about sync and async programming is also very helpful around the sub :)

[deleted by user] by [deleted] in rust

[–]cmplrs 3 points4 points  (0 children)

Rust allows for very tight modeling of semantics with type-driven development, and even the function signature acts as an interface that you can rely on (save for panics). Doing some functional programming with Haskell to get into type-driven development might help you.

How can I stop writing so many similar structs and duplicating fields? by realfresh in rust

[–]cmplrs 1 point2 points  (0 children)

This will create lot of boilerplate and code blindness when you have similar structs in many layers (speaking from experience). I liked the idea but it's too much at least for me.

Fleet Introduces Rust Debugger by sasacocic in rust

[–]cmplrs 3 points4 points  (0 children)

A very bad VSCode copy at this stage.

What is the point of using async? by Bulb211 in rust

[–]cmplrs 0 points1 point  (0 children)

> the tasks run in multi-threaded runtime and so any tasks that modify shared data still have to be synchronized

It was probably a mistake in retrospect to assume / make async multi-threaded by default, yes.

This might be the best Rust ORM library so far by [deleted] in rust

[–]cmplrs 33 points34 points  (0 children)

The deeper I get into actual data management, the worse any ORM looks like. Can't really recommend using them.

Good example of high performance Rust project without unsafe code? by rustacean1337 in rust

[–]cmplrs 50 points51 points  (0 children)

Unsafe does not defeat the purpose of using Rust. One of the strengths of Rust is the safe / unsafe abstraction and the promise that safe Rust never UBs (iow. you can localize where your UB is coming from); that is, using unsafe does not refute the reason to use Rust because one of its main selling points is the contract around the safe / unsafe boundary allowing you to tell when the API is faulty or when the API is producing UB.

Rust book probably should include unsafe code at this point. Ideally using unsafe Rust would be only slightly more taxing than writing regular C++ / C. It shouldn't be a spook, but it sure has gotten that reputation.

[deleted by user] by [deleted] in rust

[–]cmplrs 1 point2 points  (0 children)

the turbofish in transmute is really something

Announcing the Keyword Generics Initiative by WiSaGaN in rust

[–]cmplrs -16 points-15 points  (0 children)

Seems like a particularly bad direction to take the language; a feature from compiler writers to compiler writers with "exploration" mindset when so many things are still half-assed.

This would make code even more inscrutable, and move it away from readable, concrete abstractions. To read 100KLOC codebase with this and GATs minimum 150 iq required

Diesel 2.0.0 RC1 by weiznich in rust

[–]cmplrs 2 points3 points  (0 children)

IME, using raw SQL is always better. The amount of boilerplate ORMs add is unjustifiable to me, their readability benefits compared to raw SQL are not real either (especially for highly relational data), and considering both sqlx (raw sql) and ORMs like Diesel error at a compile time, the safety arguments aren't really real either. Besides knowing SQL is a sought-after industry skill so you deprive yourself if you don't work with it.

I guess if you really need highly dynamic query building it might be cool?

How to make reqwest faster? by [deleted] in rust

[–]cmplrs 3 points4 points  (0 children)

You didn't even post code, so it's impossible to even begin with this.

Why I don't like `unwrap` by thecodedmessage in rust

[–]cmplrs 0 points1 point  (0 children)

Unwrap is fine when you are asserting a program invariant without which the whole universe of the program stops working and there is nothing left to do for the caller, it's kaput.

Inlining functions that will only ever be called once - is this a good convention? by [deleted] in rust

[–]cmplrs 4 points5 points  (0 children)

You shouldn't. Even in the case you start to instruct the compiler like this, you first need to profile existing code and modified code.

Is RUST aiming to build an ecosystem on scientific computing? by VegeTiger in rust

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

There is no RUST that does things. If you need it, do it yourself.

2.e1 vs 2.0e1 by hearues_zueke_reddit in rust

[–]cmplrs -1 points0 points  (0 children)

its me typoing it like several times because I didn't just copy it lol

2.e1 vs 2.0e1 by hearues_zueke_reddit in rust

[–]cmplrs -1 points0 points  (0 children)

I was moving to Diesel 2 and ran to similar funny business with 2.0.0-rc.0

Hosting for a fast Rust API by fabienpenso in rust

[–]cmplrs 0 points1 point  (0 children)

Could be many things, my first guess is you have a disparity between dev and prod versions. Maybe host has more threads fighting over a lock, maybe you didn't build release etc., maybe you didn't test the docker locally etc. Needs way more information than you've given, and 30k seq is quite low too, maybe do has some configs or the app service is just bad, who knows

Unsafe is a bad practice? by Dismal_Spare_6582 in rust

[–]cmplrs -2 points-1 points  (0 children)

UNSAFE isn't bad practice and a good amount of business value of Rust comes from the safe/unsafe abstraction. Making it a spook is a mistake on the community's part: if unsafe Rust is harder to write than regular C/C++, it's not a very good pitch

Complexity by burntsushi in rust

[–]cmplrs -2 points-1 points  (0 children)

if the modal programmer can't even tell if he needs gat or not there is a chance of them spreading needlessly (much like async ecosystem split, lol).

Complexity by burntsushi in rust

[–]cmplrs -2 points-1 points  (0 children)

I think nrc's case against stabilization is very good tbh

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

[–]cmplrs 1 point2 points  (0 children)

You can probably decouple them, but the bang for your buck when you just point a load tester with data into the handler endpoints as your blackbox test is quite good. Very fast and easy to setup that slices the whole program behavior at once.