[-] BB_C@programming.dev 0 points 7 hours ago* (last edited 7 hours ago)

My post was a showcase of why there is no substitute for knowing your tools properly, and how when you know them properly, you will never have to wait for 5 minutes, let alone 5 years, for anything, because you never used or needed to use an IDE anyway.

This applies universally. No minimum smartness or specialness scores required.

[-] BB_C@programming.dev 0 points 12 hours ago

Not sure how what I write is this confusing to you.

  • Tests don't necessarily live in paths containing test.
  • Code in paths containing test is not necessarily all tests.
  • cargo expand gives you options for correctly and coherently expanding Rust code, and doesn't expand tests by default.
  • rg was half a joke since it's Rust's grep. You can just pipe cargo expand [OPTIONS] [ITEM] output to vim '+set ft=rust' - or bat --filename t.rs and search from there.
[-] BB_C@programming.dev 1 points 1 day ago

What part are you struggling with?
The ripgrep (rg) part, or the cargo expand part?

[-] BB_C@programming.dev -2 points 2 days ago

You two bring shame to the programming community.
Just ripgrep cargo expanded output for f**** sake.

[-] BB_C@programming.dev 12 points 3 days ago

I thought I saw this weeks ago.

May 21, 2024

yep

Anyway, neovim+rust-analyzer+ra-multiplex is all I need.

[-] BB_C@programming.dev 16 points 4 days ago

Not to minimize their work, which is actually amazing!

you wouldn't know because..

Still based on GNOME.

you don't have a single clue about what they are actually doing.

[-] BB_C@programming.dev 3 points 5 days ago

that’s not what I’m looking for when I’m looking at a backtrace. I don’t mind plain unwraps or assertions without messages.

You're assuming the PoV of a developer in an at least partially controlled environment.

Don't underestimate the power of (preferably specific/unique) text. Text a user (who is more likely to be experiencing a partially broken environment) can put in a search engine after copying it or memorizing it. The backtrace itself at this point is maybe gone because the user didn't care, or couldn't copy it anyway.

[-] BB_C@programming.dev -1 points 5 days ago

Don't get angry with me my friend. We are more in agreement than not re panics (not .unwrap(), another comment coming).

Maybe I'm wrong, but I understood 'literally' in 'literally never' in the way young people use it, which doesn't really mean 'literally', and is just used to convey exaggeration.

[-] BB_C@programming.dev 8 points 5 days ago

But why can’t we fight to make Rust better and be that “good enough” tool for the next generation of plasma physicists, biotech researchers, and AI engineers?

Because to best realize and appreciate Rust's added value, one has to to be aware, and hindered by, the problems Rust tries to fix.

Because Rust expects good software engineering practices to be put front and center, while in some fields, they are a footnote at best.

Because the idea of a uni-language (uni- anything really) is unattainable, not because the blasé egalitarian "best tool for the job" mantra is true, but because "best tool" from a productive PoV is primarily a question of who's going to use it, not the job itself.

Even if a uni-language was the best at everything, that doesn't mean every person who will theoretically use it will be fit, now or ever, to maximize its potential. If a person is able to do more with an assumed worse tool than he does with a better one, that doesn't necessarily invalidate the assumption, nor is it necessarily the fault of the assumed better tool.

Rust’s success is not a technical feat, but rather a social one

fighting the urge to close tab

Projects like Rust-Analyzer, rustfmt, cargo, miri, rustdoc, mdbook, etc are all social byproduct’s of Rust’s success.

fighting much harder

LogLog’s post makes it clear we need to start pushing the language forward.

One man's pushing the language forward is another man's pushing the language backward.

A quick table of contents

Stopped here after all the marketing talk inserted in the middle.
May come back later.


Side Note: I don't know what part of the webshit stack may have caused this, but selecting text (e.g. by triple-clicking on a paragraph) after the page is loaded for a while is broken for me on Firefox. A lot of errors getting printed in the JS console too. Doesn't happen in a Blink^twice^ browser.

[-] BB_C@programming.dev 0 points 5 days ago

From my experience, when people say “don’t unwrap in production code” they really mean “don’t call panic! in production code.” And that’s a bad take.

What should be a non-absolutest mantra can be bad if applied absolutely. Yes.

Annotating unreachable branches with a panic is the right thing to do; mucking up your interfaces to propagate errors that can’t actually happen is the wrong thing to do.

What should be a non-absolutest mantra can be bad if applied absolutely.

[-] BB_C@programming.dev 4 points 5 days ago* (last edited 5 days ago)

(DISCLAIMER: I haven't read the post yet.)

For example, if you know you’re popping from a non-empty vector, unwrap is totally the right too(l) for the job.

That would/should be .expect(). You register your assumption once, at the source level, and at the panic level if the assumption ever gets broken. And it's not necessarily a (local) logical error that may cause this. It could be a logical error somewhere else, or a broken running environment where sound logic is broken by hardware or external system issues.

If you would be writing comments around your .unwrap()s anyway (which you should be), then .expect() is a strictly superior choice.

One could say .unwrap() was a mistake. It's not even that short of a shortcut (typing wise). And the maximumly lazy could have always written .expect("") instead anyway.

10
20
[-] BB_C@programming.dev 51 points 1 month ago* (last edited 1 month ago)

Examples ARE usage documentation.

What value is this blog supposed to be adding exactly?
The fact that top-level and API descriptive explanations are important?
The fact that some projects don't have complete documentation?
To whom exactly would this be considered new information?

view more: next ›

BB_C

joined 1 year ago