snaggen

joined 2 years ago
16
This Week in Rust 514 (this-week-in-rust.org)
184
The ???? operator (programming.dev)
submitted 2 years ago* (last edited 2 years ago) by [email protected] to c/[email protected]
 

I found this funny.

The context is as explained by @[email protected]

the issue is that you can't return from inside a closure, since the closure might be called later/elsewhere

and this post was the asnwer to the question by @[email protected]

you got me curious what the record for the longest ? operator chain on crates.io is

Original post: https://fosstodon.org/users/antonok/statuses/111134824451525448

[–] [email protected] 4 points 2 years ago (1 children)

If you refer to bindgen it also supports C++, and since Mozilla who was the main driver of rust uses C++ I assume the bindgen for that is pretty good.

[–] [email protected] 8 points 2 years ago* (last edited 2 years ago)

Yes, but all programmers have a love/hate relationship to their languages and toolchains. When I started off back in the 90:s, my prefereed language was Perl, it was amazing, but it was also a nightmare in some aspects... and unfortunately the larger the project the larger the nightmares. I assume Python is probably pretty much the same, even though I have avoided to work with dynamic languages in very large scale projects due to the support nightmares that comes with them. So I assume the Rust cult, is based on the fact that the rust frustration comes a lot from the strictness of the language, but that becomes less of a problem the more you use it (since your skills improve) and at that point the strictness instead gives the reward of reliability and efficiency.

So, while dynamic languages may frustrate you the more you use it (since the projects grows and it is a nightmare to maintain), rust will instead reward you over time.

[–] [email protected] 1 points 2 years ago

Always nice to get a summary of the week. I had not seen about the websocket implementation, nice to see that Rust is yet again pushing the limits for performance.

[–] [email protected] 11 points 2 years ago (4 children)

If that works for you and you are happy with it, fine. But sudo-rs seems to have a bit of a different usecase since it is intended as a drop in replacement for sudo, hence it must be able to handle the sudoers file aso. It still removes some of the never-used obscure functionality that sudo had, so it is probably a lot smaller code base than original sudo.

[–] [email protected] 2 points 2 years ago

That varies quite a lot... but in general, the small tools seems to start as someone adding color and bling, possibly some nice things like automatic pager (like in bat). Still often nice additions though. For larger stuff like rg and gitoxide the authors seems to have done quite a lot of research and are really experts in their field. You don't improve grep and git by accident.

[–] [email protected] 4 points 2 years ago (1 children)

I like that they now have rustls 0.21 support! Not that I know anything wrong with rustls 0.20, but I was always annoyed that cargo outdated pointed out that my rustls was outdated, and I wan't allowed to fix it :)

[–] [email protected] 10 points 2 years ago* (last edited 2 years ago)
[–] [email protected] 12 points 2 years ago (1 children)

I hope this means that it will be easier for Lemmy to support the passkey standard. Now, I assume it will take a while until this is production ready, since the standard seems to be in a quite early stage.

[–] [email protected] 18 points 2 years ago* (last edited 2 years ago) (2 children)

Absolutely nothing.... but for some reason I find it interesting when people rewrite things that I didn't know needed rewrites. Sometimes these projects are doing someting really interesting. Grep is one such example, noone was saying that grep needed a replacement. In fact, it was used as a benchmark for regex (which is how rg started, to compare rust regex against grep), then someone creates rg that outperforms grep and is much nicer to use. That is also why I keep an eye on GitOxide, since nobody ever accused git of being slow, yet there are someone rewriting git with amazing performance improvements.

[–] [email protected] 12 points 2 years ago (3 children)

bat and rg I actually have already.... but now you make me waste so much time fiddling with all these ;)

[–] [email protected] 2 points 2 years ago (2 children)

I still think this works better with a rust hashtag, than as a community ping, since that creates a new post in the Lemmy forum.

view more: ‹ prev next ›