1. 7
  1.  

  2. 12
    1. 1

      Oh, I remember that!

      1. 1

        To be fair, the linked post explicitly mentions that author is not using csh for shell scripting, instead for… aesthetic reasons? It’s unclear. They admire Bill Joy though.

      2. 5

        ‘Programming is rather thankless. [You] see your works become replaced by superior ones in a year. Unable to run at all in a few more.’

        — _why (the lucky stiff)

        But it’s a marvel when software defies this gravity. Of course the older generation of hackers had the advantage of getting to the table early, and were able to become early influencers, and perhaps even set the table for the next generation whereby their software became the ground floor upon which one could build upward.

        So, perhaps those who got there first could avoid the dangers that ossify today’s SW, by mere virtue of good timing. But perhaps the reason we still use their tools several decades later is the mere fact that, like great symphonies, they’re just that darn good.

        Or, perhaps it’s because of a reason that’s closely connected to the imagery in this paragraph:

        When I think of software, in the back of my mind I can’t help to conjure up the image of lapping waves slowly yet surely eroding sand castles at the beach

        Tools like csh and vi rely on core features of POSIX only, so it’s difficult to make them incompatible over time. In other words, they don’t really rely on moving target APIs, but on APIs that are solid and unlikely to change. If I make a client for Spotify, or for Slack, or that uses a GUI, I know that in two years it has only half a chance of working, and in ten years it will be unlikely to work, because these are tied with companies that have incentives to change and invalidate the older interfaces. Even if it does survive, it will probably be very ugly from a user interface standpoint, and so without a core audience of people, or without features that make it irreplacable, it be replaced by something that looks nicer and is more compatible.

        Whereas, if I make an Email or IRC client that uses curses in a language like C (i.e. mutt, or irssi, etc.), and pick an older C version (C99 or C89), then it is very likely that in ten years it will still work on any operating system that supports POSIX and has a C compiler. Which is… basically all of them, for the last 30 years. Not just that, but TUI design doctrine doesn’t change all that much.

        Likewise, vi and csh are still around because… they require very little change to work, or they are pretty simple to port (See: heirloom’s copy of ex-vi), and they aren’t considered ‘ugly’ by the core audience.

        EDIT: Also, picking that selection of languages and libraries means you can usually backport it to something like DOS with very little fuss…

        1. 3

          Nice, but you don’t really talk about why you find csh joyful.

          1. 7

            I’m sure I’m missing the joke, but I think the title is in reference to the fact that Bill Joy wrote both csh and vi…

          2. 1

            I sure hope it is tcsh. Csh was my first shell back in 1990. Tcsh (that understood cursor keys and tabs) was a relief. I was even scripting in csh until the book Practical Unix Software came along (and discussed ksh a bit more than man pages did). I think bash became my shell sometime in the 2000s since it was the default shell in most distributions even then.

            1. 2

              I was a sub-sub-sub contractor to a typically huge software project at a telco in the early 2000s, and I remember being shocked and dismayed that the horrendous pile of Java the next level up had produced was controlled by a csh script.

              It was indicative of the entire experience… I was at the client working in an electromagnetically shielded building when 9/11 happened.

              Weirdly, the default shell for root in OpenBSD is (or was) csh.

              1. 2

                I have PTSD whenever tcsh is mentioned.

                I despise tcsh after an encounter while having to integrate extremely legacy tools and legacy tools to a modern environment – also telco work – and lot of logic was written in tcsh for some reason, with no documentation, comments and nobody around from the orignal authors. Weeks of reverse engineering went into the scripts to decipher them and their intent and get the tools they integrated originally working the right way.

                1. 1

                  The switch to ksh (pdksh IIRC) happened in 2005

                  1. 1

                    That explains it, my last serious tangle with OBSD predated that.