<div dir="ltr"><div dir="ltr"><div class="gmail_default" style=""><font color="#0000ff" style=""><font face="arial, helvetica, sans-serif">While the idea of small tools that do one job well is the core tenant of what I think of as the UNIX philosophy, this goes a bit beyond UNIX, so I have moved this discussion to COFF and BCCing TUHS for now.</font><span style="font-family:Arial,Helvetica,sans-serif">  </span></font></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font color="#0000ff"><br></font></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font color="#0000ff">The key is that not all "bloat" is the same (really)—or maybe one person's bloat is another person's preference.  That said, NIH leads to pure bloat with little to recommend it, while multiple offerings are a choice. Maybe the difference between the two may be one person's view over another.</font></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, May 10, 2024 at 6:08 AM Rob Pike <<a href="mailto:robpike@gmail.com">robpike@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div style="font-family:arial,sans-serif">Didn't recognize the command, looked it up. Sigh.</div></div></blockquote><div><font color="#0000ff"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif">Like Rob -- this was a new one </span><span class="gmail_default" style="font-family:arial,helvetica,sans-serif">for me, too.</span></font></div><div><font color="#0000ff"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif">I looked, and it is on the SYS3 tape; see: </span></font><a href="https://www.tuhs.org/cgi-bin/utree.pl?file=SysIII/usr/src/man/man1/nl.1">https://www.tuhs.org/cgi-bin/utree.pl?file=SysIII/usr/src/man/man1/nl.1</a></div><div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div style="font-family:arial,sans-serif"><br></div><div style="font-family:arial,sans-serif">  pr -tn <file></div></div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div style="font-family:arial,sans-serif"><br></div><div style="font-family:arial,sans-serif">seems sufficient for me, but then that raises the question of your question.</div></div></blockquote><div><font color="#0000ff"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif">Agreed, that has b</span>een burned into the ROMs in my  fingers since the mid-1970s 😀 </font></div><div><font color="#0000ff">BTW: SYS3 has pr(1)<span class="gmail_default" style="font-family:arial,helvetica,sans-serif"> with both switches too  (more in a minute)</span></font></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div style="font-family:arial,sans-serif"><br></div><div style="font-family:arial,sans-serif">I've been developing a theory about how the existence of something leads to things being added to it that you didn't need at all and only thought of when the original thing was created. </div></div></blockquote><div><font color="#0000ff">That is a good point, and I generally agree with you.</font><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div style="font-family:arial,sans-serif">Bloat by example, if you will. I suspect it will not be a popular theory, however accurately it may describe the technological world.</div></div></blockquote><div><br></div><div><span class="gmail_default" style="color:rgb(0,0,255);font-family:arial,helvetica,sans-serif">Of course, sometimes the new features >>are<< easier (more natural <i>for some people</i>). </span><span style="color:rgb(0,0,255)"> </span><span class="gmail_default" style="color:rgb(0,0,255);font-family:arial,helvetica,sans-serif">And herein lies the core problem. The bloat is often repetitive, and I suggest that it is often implemented in the wrong place - and usually for the wrong reasons.</span></div><div><span class="gmail_default" style="color:rgb(0,0,255);font-family:arial,helvetica,sans-serif"><br></span></div><div><span class="gmail_default" style="color:rgb(0,0,255);font-family:arial,helvetica,sans-serif">Bloat comes about because somebody thinks they need some feature and probably doesn't understand that it is already there or how they can use it. But they do know about it, their tool must be set up to exploit it - so they do not need to reinvent it.  GUI-based tools are notorious for this failure. Everyone seems to have a built-in (unique) editor, or a private way to set up configuration options et al. But ... that walled garden is comfortable for many users and >>can be<< useful sometimes.</span><br></div><div><span class="gmail_default" style="color:rgb(0,0,255);font-family:arial,helvetica,sans-serif"><br></span></div><div><span class="gmail_default" style="color:rgb(0,0,255);font-family:arial,helvetica,sans-serif">Long ago, UNIX programmers learned that looking for $EDITOR in the environment was way better than creating one.  Configuration was as ASCII text, stored in /etc for system-wide and dot files in the home for users.  But it also means the >>output<< of each tool needs to be usable by each other [<i>i.e.</i>, docx or xlx files are a no-no).</span></div><div><span class="gmail_default" style="color:rgb(0,0,255);font-family:arial,helvetica,sans-serif"><br></span></div><div><font color="#0000ff"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif">For example, for many things on my Mac, I do use the GUI-based tools -- there is no doubt they are better integrated with the core Mac system >>for some tasks.<< But only if I obey a set of rules Apple decrees.  For instance, this email read is easier much of the time than MH (or the HM front end, for that matter), which I used for probably 25-30 years.</span></font><span style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,255)"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"> </span></span><span style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,255)">But on my Mac, I always have 4 or 5 iterm2(1) open running zsh(1) these days. And, much of my typing <span class="gmail_default" style="font-family:arial,helvetica,sans-serif">(</span>and everything I do as a programmer<span class="gmail_default" style="font-family:arial,helvetica,sans-serif">)</span> is done in the shell<span class="gmail_default" style="font-family:arial,helvetica,sans-serif"> (including a simple text editor, not an 'IDE').  People who love IDEs swear by them -- I'm just not impressed - there is nothing they do for me that makes it easier, and I have learned yet another scheme.</span></span></div><div><span style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,255)"><br></span></div><div><span style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,255)"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif">That said, sadly, Apple is forcing me to learn yet another debugger since none of the traditional UNIX-based ones still work on the M1-based systems. But at least LLDB is in the same key as sdb/dbx/gdb <i>et al</i>.,<i> </i>so it is a PITA but not a huge thing as, in the end, LLDB is still based on the UNIX idea of a single well-designed and specific to the task tool, to do each job and can work with each other.</span></span></div><div><span style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,255)"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></span></span></div><div><span style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,255)"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif">FWIW: I was recently a tad gob-smacked by the core idea of UNIX and its tools, which I have taken for a fact since the 1970s.</span></span></div><div><span style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,255)"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></span></span></div><div><span style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,255)"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif">It turns out that I've been helping with the PiDP-10 users (all of the PiDPs are cool, BTW). Before I saw UNIX, I was paid to program a PDP-10. In fact, my first UNIX job was helping move programs from the 10 to the UNIX.  Thus ... I had been thinking that doing a little PDP-10 hacking shouldn't be too hard to dust off some of that old knowledge.</span></span><span style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,255)"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif">  While some of it has, of course, come back.  But daily, I am discovering small things that are so natural with a few simple tools can be hard on those systems.</span></span></div><div><span style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,255)"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></span></span></div><div><span style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,255)"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif">I am realizing (rediscovering) that the "build it into my tool" was the norm in those days.   So instead of a pr(1) command, there was a tool that created output to the lineprinter. You give it a file, and it is its job to figure out what to do with it, so it has its set of features (switches) - so "bloat" is that each tool (like many current GUI tools) has private ways of doing things. If the maker of tool X decided to support some idea, they would do it like tool Y.  The problem, of course, was that tools X and Y had to 'know about' each type of file (in IBM terms, use its "access method").  Yes, the engineers at DEC, in their wisdom, tried to "standardize" those access methods/switches/features >>if you implemented them<< -- but they are not all there.</span></span></div><div><span style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,255)"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></span></span></div><div><span style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,255)"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif">This leads me back to the question Rob raises.  Years ago, I got into an argument with Dave Cutler RE: UNIX <i>vs.</i> VMS. Dave's #1 complaint about UNIX in those days was that it was not "standardized."  Every program was different, and more to Dave's point, there was no attempt to make switches or errors the same [getopt(3) had been introduced but was not being used by most applications).  He hated that tar/tp used "keys" and tools like cpio used switches.  Dave hated that I/O was so simple - in his world all user programs should use his RMS access method of course [1].  VMS, TOPS, <i>etc.</i>, tried to maintain a system-wide error scheme, and users could look things like errors up in a system DB by error number, <i>etc</i>.  Simply put, VMS is very "top-down."</span></span></div><div><span style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,255)"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></span></span></div><div><span style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,255)"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif">My point with Dave was that by being "bottom-up,"  the best ideas in  UNIX were able to rise. And yes, it did mean some rough edges and repeated implementations of the same idea.  But UNIX offered a choice, and while Rob and I like and find: pr -tn perfectly acceptable thank you, clearly someone else desired the features that nl provides. The folks that put together System 3 offer both solutions and let the user choose.</span></span></div><div><span style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,255)"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></span></span></div><div><span style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,255)"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif">This, of course, comes as bloat, but maybe that is a type of bloat so bad?   </span></span></div><div><span style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,255)"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></span></span></div><div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font color="#0000ff">My own thinking is this - get things down to the basics and simplest privatives and then build back up.  It's okay to offer choices, as long as the foundation is simple and clean.  To me, bloat becomes an issue when you do the same thing over and over again, particularly because you can not utilize what is there already, the worst example is NIH - which happens way more than it should.</font></div><br></div><div><span style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,255)"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></span></span></div><div><span style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,255)"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif">I think the kind of bloat that GUI tools and TOPS et al. created forces recreation, not reuse. But offering choice and the expense of multiple tools that do the same things strikes me as reasonable/probably a good thing. </span></span></div><div><span style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,255)"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></span></span></div><div><span style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,255)"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></span></span></div><div><span style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,255)"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif">1.]  BTW: One of my favorite DEC stories WRT to VMS engineering has to do with the RMS I/O system.  Supporting C using VMS was a bit of PITA.   Eventually, the VMS engineers added Stream I/O - which simplified the C runtime, but it was also made available for all technical languages.  Fairly soon after it was released, the DEC Marketing folks discovered almost all new programs, regardless of language, had started to use Stream I/O and many older programs were being rewritten by customers to use it. In fact, inside of DEC itself, the languages group eventually rewrote things like the FTN runtime to use streams, making it much smaller/easier to maintain.   My line in the old days: "It's not so bad that ever I/O has offer 1000 options, it's that Dave to check each one for every I/O. It's a classic example of how you can easily build RMS I/O out of stream-based I/O, but the other way around is much harder.   My point here is to <i>use the right primitives</i>. RMS may have made it easier to build RDB, but it impeded everything else.</span></span></div></div></div>