1. 75
  1.  

  2. 6

    Great, now I have that song stuck in my head.

    1. 8

      Next up: a complete flight simulator inside cat

      1. 24

        Or a text editor within emacs!

        1. 16

          Or a text editor within emacs!

          It’s been done: https://www.emacswiki.org/emacs/Evil

        2. 8

          You jest, but I only realised in the last year that cat can read from unix sockets as well as files. (I was reimplementing it to learn a new language and read the manpage carefully.) Never realised/knew that before.

          1. 4

            well, bash can read from a tcp socket too:

            exec 3<>/dev/tcp/lobste.rs/80
            echo -e "GET /\r\n" >&3
            cat <&3
            
            1. 4

              A similar feature is also implemented in GNU awk - and someone wrote a web server for it.

              1. 2

                That’s fascinating. That’s so new to me, I don’t even know how to look that up. Could you give me some more info about what’s going on there? Also, it interestingly doesn’t work on the Mac (it just crashes my terminal ¯_(ツ)_/¯). I suppose it could be because of an outdated version of bash, but, again, I can’t even look that up.

              2. 2

                That is cool, I never knew that and kept using socat. Will try cat the next time.

              3. 1

                I read that as “a complete flight simulator inside a cat”, I was worried you were some kind of mad scientist.

                1. 1

                  I thought I’d created something great for the world, a flight simulator inside a cat! But little did I know, I’d created a flying man-eating MONSTER!!