• 0 Posts
  • 27 Comments
Joined 9 months ago
cake
Cake day: September 26th, 2024

help-circle





  • Yes. I talked about screenshots because the first message said:

    I can’t see any screenshots from the article, all require a bluesky account. At least on twitter you could see images without login before the takeover.

    For “text source only” I’m with you quotes are enough.

    And if images are post anywhere, always provide an alt text, plz everyone !




  • Collecting the traces can cost some performance, but that is a small price to pay for the advantages and could even be turned off in production builds.

    They clearly intend this post for developers.

    But yeah I want my stacktraces… in my IDE/debugger where I can see them and jump the stack. Most of the time I just need the head, where the breakpoint (or crash) is.

    They also complain about rust where you can RUST_BACKTRACE=1 <program>. The default error tells you so !


  • I’m with the others: fd default syntax is easier to remember.

    And for the interactive search I’m using skim. With it I cd to the dir I want and Alt t to trigger fuzzy finding. There are also bindings to search for dir or in the history. The neat part is that results are inserted as is in the command line, no need to xargs or copy them. It also make the history look like I always know where the files I want are when in reality they are just fuzzy-found



    1. Is a modern language with a good build system (It’s like night and day compared to CMake)

    Meson exists … as do others.

    But they are not the default option. And your new job may not use them.

    1. And I just like how the language works (errors as values etc.)

    Fair enough; though why? What’s wrong with exceptions?

    Exceptions is a non standard exit point. And by “non standard” I’m not talking about the language but about its surprise appearance not specified in the prototype. Calling double foo(); you don’t know if you should try/catch it, against which exceptions, is it an internal function that may throw 10 level deep ?

    By contrast fn foo() -> Result<f64, Error> in rRst tell you the function may fail. You can inspect the error type if you want to handle it. But the true power of Result in Rust (and Option) is that you have a lot of ergonomic ways to handle the bad case and you are forced to plan for it so you cannot use a bad value thinking it’s good:

    • foo().unwrap() panic in case of error (see also expect)
    • foo().unwrap_or_default() to ignore the error and continue the happy path with 0.0
    • foo().unwrap_or(13.37) to use your default
    • foo()? to return with the error and let the parent handle it, maybe