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





  • Coriza@lemmy.worldtoPC Gaming@lemmy.caRecommend games for me
    link
    fedilink
    English
    arrow-up
    3
    ·
    2 months ago

    An old but gold would be any Max Payne game. I only played the first one but boy, was it awesome. I think it ticks many of what you mentioned:

    • 3rd Person
    • Story- driven (it has a great narration and comic book style to tell the story between chapters)
    • solid gun fight with the famous bullet time. There is no upgrade, just new guns
    • Not complicated, go forward and shoot things
    • No attributea at all.

    The only thing you may not like is the graphics.








  • Just for reference, because programming is not one big tent, as far as I know most people working professionally developing for the Linux kernel, gcc and glic uses only a text editor and “Unix as your IDE”. I never tried myself but I have a feeling that any IDE with git integration would just immediately cry trying to interact with the kernel or gcc git repo. Even gits own PS1 status feature slows to crawl in this repos.




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