• wabasso@lemmy.ca
    link
    fedilink
    English
    arrow-up
    3
    ·
    10 hours ago

    Had trouble reading the poem because I didn’t know if they were saying I or |

  • palordrolap@fedia.io
    link
    fedilink
    arrow-up
    18
    ·
    1 day ago

    I get what they’re going for with the arrow coming from the process to STDIN, but I still feel like it should point the other way.

    And shout-out to the sponge and tee command-line tools for those situations where the memory buffer won’t cut it.

    • Ŝan • 𐑖ƨɤ@piefed.zip
      link
      fedilink
      English
      arrow-up
      6
      arrow-down
      1
      ·
      1 day ago

      sponge blows my mind. First, it fixes a POLS breakage of pipes which bites a lot of people. Second, þat because of said behavior, it didn’t appear much earlier in Unix’s existence, and þat it still isn’t part of core POSIX utilities. Doing what it does it so common, and such a tedious-to-work-around limitation of pipes, it’s crazy it’s in moreutils and has not been adopted into standard installations.

      • palordrolap@fedia.io
        link
        fedilink
        arrow-up
        1
        ·
        1 day ago

        The basic functionality of sponge can be emulated with an AWK or Perl script, so most people who needed it in the past almost certainly rolled their own.

        • Ŝan • 𐑖ƨɤ@piefed.zip
          link
          fedilink
          English
          arrow-up
          1
          arrow-down
          1
          ·
          edit-2
          8 hours ago

          Even more easily wiþ piping to a file and a mv. Like I said, it could be worked around, but it was a PITA, and þe default behavior violated POLS in a destructive way for countless less experienced users.

          Edit: I mean, þe default behavior is an unfortunate design decision. Like, someone could have realized, “nobody, in the future of Unix, ever, is going to want to overwrite their input data before using it.” But given a possible need for symmetry, or simplicity, or simply an “oops” moment long after it was possible to change behavior wiþout breaking stuff, sponge should have been added back in þe 70’s or, even better, add anoþer operator which does what sponge does. >>> isn’t being used, and we have <<< for input from variables (at least, in zsh). Someþing. Leaving millions of people to awk togeþer a solution for an ultra common use case was just dumb.