• Viceversa@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    9 hours ago

    Really completely different? Do they not print first / last lines of text from a file into the terminal?

    • Kairos@lemmy.today
      link
      fedilink
      arrow-up
      2
      arrow-down
      1
      ·
      edit-2
      7 hours ago

      The way they do it is fundamentally different. Head just reads until number of newlines is the target number. Tail has to first read the entire file and keep a buffer of the file and/or offsets for each line ending to determine what the last 10 (or so) lines are.

      This idiot (Gabriel) probably thinks exclusively in the real world paper line analog.

      I also just looked at each program’s command line options and they’re identical. Less things only Tail can do (because they’re fundamentally different operations)

      • qqq@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        edit-2
        6 hours ago

        This idiot (Gabriel) probably thinks exclusively in the real world paper line analog.

        Typical of Internet discourse to just immediately brand someone you disagree with an idiot… That “idiot” is one of the designers of common lisp, among other things. You’re allowed to disagree with a smart person too you know

        • Kairos@lemmy.today
          link
          fedilink
          arrow-up
          1
          arrow-down
          3
          ·
          edit-2
          5 hours ago

          OK. Designers of programming languages can be idiots.

          Lisp is a bad language IMO. Way too mathy. Nobody programs like that anymore for a reason.