• 2 Posts
  • 125 Comments
Joined 1 year ago
cake
Cake day: July 6th, 2023

help-circle



  • BB_C@programming.devtoLinux@lemmy.mlLadybird announcement
    link
    fedilink
    arrow-up
    36
    arrow-down
    3
    ·
    2 days ago

    A reminder that the Servo project has resumed active development since the start of 2023, and is making good progress every month.

    If you’re looking for a serious in-progress effort to create a new open, safe, performant, independent, and fully-featured web engine, that’s the one you should be keeping an eye on.

    It won’t be easy trying to catch up to continuously evolving and changing web standards, but that’s the only effort with a chance.









  • 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.



  • 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 Blinktwice browser.


  • 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.


  • (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.