• 0 Posts
  • 73 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.



  • You don’t even need to specify the decompression algorithm anymore, I don’t even know if it was mandatory at some point but since I was introduced to Linux like 20 years ago tar would already extrapolate the decompression from the filename extension. Now for the compression I think you do need to include the algorithm, it would be nice if it would default to the extension on the supplied filename also.


  • I think find UI is so bad every time I use it I think about hacking a script just to make it simpler for my use case. At the same time I am very reluctant to use one of this new versions of standard commands trying to reinvent the wheel.

    Some things I don’t link about find:

    1. How the directory needs to be the first argument. I get the reasoning but it is such a pain, specially if you are using it with the same query repeatedly in different paths.

    2. The parenthesis to set order of matches, you are doing it in the shell so you have to escape them which is never fun.

    3. The fact that -name does not match partial names and there is not a version that do so you have to keep doing stuff like -name "*foo*" and of course you have to escape that shit or risk you shell expanding it. Having the GLOB version is nice but there could have a more ergonomic way to do this type, which I assume is a very common use case.

    4. Actually, doing more complex logical matches is always a pain and it would be nice to have a easier way to do some common operations.

    5. The fact that when you do some complex match then the -print is not automatic anymore or the the behaviour is kinda weird. And is a pain to add it in all logical branches or do it in a way that you do not repeat a lot.

    Anyway, sorry for the rant.













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


  • There was a video essay by Folding Ideas (From “the line goes up” fame) about a weird documentary narrated/hosted by Idris Elba, and If I am remembering it right it was basically a propaganda/ad film targeting people like peepers and that are skeptical of the government and such. So I believe there is at least a push to make gold more marketable and in fashion, like De beers did for diamonds.

    I don’t know if I am allowed to link to outside content (because the rule of no reposting outside content) but in any case it should be easy to find for anyone interested.



  • Also there is this far too common thing that experts in one field suddenly think they are experts in everything. I saw some of the most absurd takes from engineers, how this person can be so smart and so dumb at the same time? I think they get hyper confident in their own “gut feeling” which in their field is supported by years of experience and all the knowledge in the world but in other fields it is just their anecdotal experience and bias.