programming.dev
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Albin Jose@suppo.fi to Programmer Humor@lemmy.ml · 2 years ago

Depression Is No More

suppo.fi

message-square
98
link
fedilink
1.76K

Depression Is No More

suppo.fi

Albin Jose@suppo.fi to Programmer Humor@lemmy.ml · 2 years ago
message-square
98
link
fedilink
  • lud@lemm.ee
    link
    fedilink
    arrow-up
    45
    arrow-down
    1
    ·
    2 years ago

    Or bash.

    So incredibly annoying too read.

    • Skull giver@popplesburger.hilciferous.nl
      link
      fedilink
      arrow-up
      16
      ·
      2 years ago

      deleted by creator

    • Hazzia@discuss.tchncs.de
      link
      fedilink
      arrow-up
      9
      ·
      edit-2
      11 months ago

      deleted by creator

      • hisbaan@lemm.ee
        link
        fedilink
        arrow-up
        11
        ·
        2 years ago

        I believe the reason is that bash is backwards compatible with sh and sh only has [ ], not [[ ]]

        • float@feddit.de
          link
          fedilink
          arrow-up
          6
          ·
          2 years ago

          [ is a binary (sometimes a symlink) in /usr/bin. It’s /usr/bin/[ 🤓

        • Number358@lemmy.worldBanned
          link
          fedilink
          arrow-up
          6
          arrow-down
          1
          ·
          edit-2
          2 years ago

          Removed by mod

          • twelvefloatinghands@lemmy.world
            link
            fedilink
            arrow-up
            8
            ·
            2 years ago

            Fish might be good for interactivity, but in terms of scripting, just go straight to python. It’s not worth it.

          • Cysioland@lemmygrad.ml
            link
            fedilink
            arrow-up
            3
            ·
            2 years ago

            Fish is starting to get more POSIX compliant as of late, the error redirect is no longer ^ /dev/null but 2>/dev/null

      • Affine Connection@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        2 years ago

        [[ is not a POSIX shell feature.

    • twelvefloatinghands@lemmy.world
      link
      fedilink
      arrow-up
      10
      arrow-down
      2
      ·
      2 years ago

      So many footguns. Use python in place of bash.

      • Rooki@lemmy.world
        link
        fedilink
        arrow-up
        3
        arrow-down
        3
        ·
        2 years ago

        tbh i would rather use assembly than python.

        • herr@lemmy.world
          link
          fedilink
          arrow-up
          11
          ·
          edit-2
          2 years ago

          Absolutely wild take, the two are used in completely different contexts

          • Rooki@lemmy.world
            link
            fedilink
            arrow-up
            1
            arrow-down
            1
            ·
            2 years ago

            python if you want to f*ck every developer that comes after you and the other if want to make a small script yes. Still would choose bash tbh.

        • dylanTheDeveloper@lemmy.world
          link
          fedilink
          arrow-up
          2
          arrow-down
          1
          ·
          2 years ago

          Assembly is torture because it has too much math in it

          • Rooki@lemmy.world
            link
            fedilink
            arrow-up
            2
            ·
            2 years ago

            But its less math than python. You dont have to role the dice if the error message is logical or not

        • lud@lemm.ee
          link
          fedilink
          arrow-up
          1
          ·
          2 years ago

          Wouldn’t it make more sense to code in c++ or something and compile to assembly?

          How much more efficient than a compiler are one really?

          • Rooki@lemmy.world
            link
            fedilink
            arrow-up
            1
            ·
            2 years ago

            Yeah even that i would do, rather to do anything in python ;D

        • twelvefloatinghands@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          2 years ago

          Python has its flaws for sure (I’m getting pretty fed up with the lack of required type notation, myself), but my point here is that bash is even worse:

          • https://mywiki.wooledge.org/BashPitfalls#Non-atomic_writes_with_xargs_-P
          • https://github.com/anordal/shellharden/blob/master/how_to_do_things_safely_in_bash.md
          • Rooki@lemmy.world
            link
            fedilink
            arrow-up
            1
            arrow-down
            1
            ·
            2 years ago

            Bash is still better than python - Change my mind

            • twelvefloatinghands@lemmy.world
              link
              fedilink
              arrow-up
              1
              ·
              2 years ago

              Why tho

              • Rooki@lemmy.world
                link
                fedilink
                arrow-up
                1
                ·
                2 years ago

                Because f*ck python lol. Its just bad

                • twelvefloatinghands@lemmy.world
                  link
                  fedilink
                  arrow-up
                  2
                  ·
                  2 years ago

                  Throw me a bone here. Is there like an existing reasons it sucks or do you just hate snakes?

    • palordrolap@kbin.social
      link
      fedilink
      arrow-up
      3
      ·
      2 years ago

      Perl calls to you. Admire its beauty.

      • seth@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        edit-2
        2 years ago

        deleted by creator

        • palordrolap@kbin.social
          link
          fedilink
          arrow-up
          4
          ·
          2 years ago

          Perl’s unreasonable effectiveness for creating write-only code was part of the joke.

    • CoderKat@lemm.ee
      link
      fedilink
      English
      arrow-up
      2
      ·
      2 years ago

      Bash is so bad. I literally use it every day and have written many Bash scripts, yet I’m constantly having to search for how to do things in it because syntax is so bizarre and difficult to remember. Need to do a for loop over lines in a file? You can bet I’m googling the syntax for it. I have a general idea for what it looks like and know what to search for, but no way in hell can I write it correctly in the first few tries.

      String manipulation is the absolute worst. Have fun getting to learn the unreadable syntax of most sed and awk programs (the only thing most people have memorized is find and replace). Stuff like “split a string of comma separated ints and add them up” are way harder in Bash than in Python, despite the fact I often need to do stuff like that in Bash. Well, in the terminal anyway. Sometimes I’ll just use Python, but Python’s weakness is executing programs and getting their output, which is nowhere near as convenient as it is in Bash.

      Side note, isn’t it weird that for a language where flags like --foo bar are so commonly used, there’s no built in or standard tools for accessing flags?

Programmer Humor@lemmy.ml

programmerhumor@lemmy.ml

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 341 users / day
  • 1.9K users / week
  • 3.16K users / month
  • 9.69K users / 6 months
  • 735 local subscribers
  • 35.9K subscribers
  • 1.77K Posts
  • 38.8K Comments
  • Modlog
  • mods:
  • AgreeableLandscape@lemmy.ml
  • cat_programmer@lemmy.ml
  • BE: 0.19.11
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org