• 0 Posts
  • 7 Comments
Joined 2 years ago
cake
Cake day: November 10th, 2023

help-circle
  • You know… I was about to reply with "I use set -e and I love it, but them I read the link and it gave me flashbacks. In a previous work at some points I programmed way more in bash than the languages I was officially hired to program into, and I run in some many of this edge cases, I think almost all of the ones mentioned in the link, including doing the workarounds mentioned. two that standed out to me was local var=$(fail) and if f(). Side note, I remember finding a bug in declare (I don’t remember exactly, but one of the flags, maybe -l to make a local variable was not working) and was só excited to fill a bug report but then I saw that it had already fixed in a newer bash release.

    Anyway, In the end if I recall correctly I never settled in a one fixed approach, I distinctly remember adding set -eu to a bunch of scripts but also remember having to set +e in some cases like when sourcing other scripts and also adding the suggested foo || die combo a bunch"

    I think in the end my approach was the same as rking’s at the end of the linked text, I used it but not relied on it. And I guess using too much bash made me paranoid and I heavily tested every line for all sorts of error cases. I think set -e is good when debugging when the thing is not working, especially because bash also suffers to lack a good debug and tracing environment, leaving you to set a bunch of stuff just to have a trace of your script and see what it is doing.





  • I don’t know if that is the reason but I wonder if the recent ruling that made Firefox loose on the cash income from Google as a default search engine has them doing a similar type of deal with AI companies, even Google, like, Firefox has a built-in interface for AI and the backend you can choose but the default one is one that some AI company pay a fee to be.

    If that is the case I think it is fine, it is like a wink-wink situation, you have to have it enabled by default and with a default provider for it to be worth something for someone to pay for the privilege, and then the users can simply change it be gone with it without affecting the payout. (Unless the pay or renew pay has some metric like use statistics)