Live data from Hacker News

More, less, and a story of typical Unix fossilization

utcc.utoronto.ca

71–80 of 127 posts

Re: More, less, and a story of typical Unix fossilization

#71
post #11

Earlier quoted context omitted.

Debian doesn't install it by default either - agree, surprising. On another note, even more surprising is less's behavior with colored output (you have -r and -R switches, which are almost, but not completely, alike; and in neither of them does page-up render properly).

I was pretty sure this is incorrect for at least Debian 8 / Jessie based on recollection. And now I'm 100% sure it's false -- sigh https://www.xkcd.com/386/ -- having just installed it in a VM with only "standard system utility" selected (it is selected by default), and verified that less is installed.

I don't see it:

  $ docker run --rm debian:jessie less -V
  docker: Error response from daemon: Container command 'less' not found or does not exist..
while more is present:

  $ docker run --rm debian:jessie more -V                                                  1 ↵
  more from util-linux 2.25.2

Re: More, less, and a story of typical Unix fossilization

#72
post #7

There is another pager, less advanced than more http://www.unix.com/man-page/linux/1/pg/

There's "most" pager discussed here a week or so ago, too. (Incidentally that link returns a blank page for me on FF mobile.)

Posting this here, too, for visibility:

The page works for me when I tell my browser to request the desktop site.

Re: More, less, and a story of typical Unix fossilization

#73
post #15

I've used Linux for a decade-and-a-half, but I've never totally loved the shell, because of the need to learn this sort of pointless arcana. PowerShell was a massive step forward, and I had hoped that an Open Source, cross-platform equivalent would develop so that we could get past the current local maxima of 1970s-era design. It's rather weird that the Open Source equivalent of PowerShell is now...PowerShell. Even i…

> There are now new Linux users starting every day, and asking them to learn that less is better than more is not funny. I think the article was more critical of commercial Unix vendors than Linux. From the article: > Oddly, FreeBSD has done the most sensible thing; they've outright replaced more with less. There is a /usr/bin/more but it's the same binary as less and as you can see the more manpage is just the less…

After using Xonsh and PowerShell, I'd be pretty happy if a Linux distribution did break from the pack and ship a radical alternative as the default, with a legacy bash installation as you describe.

Incremental changes probably won't spread uniformly - when Ubuntu switched to dash, the Fedora developers explicitly decided that they would not ship dash and would continue with bash, because they have to maintain total compatibility.

In discussions of the new PowerShell release I've seen quite a few comments that boil down to "PowerShell is fine for Windows, but we don't need it on Linux", and I feel that, yeah, we do need a much better shell because what we have is nowhere near the best that can be done. Everybody that's used *NIX for a long period of time has to adapt to the classic shell way of doing things, but we shouldn't be pushing this mess on the next generation.

Re: More, less, and a story of typical Unix fossilization

#74
post #3

Now all we need is someone to modify less to recognize that its standard in is connected the output of more so that if you type `cat /etc/passwd | more | less` it could output something which, more or less, looked like the input.

I hereby award you a "Useless use of cat" award [1] more http://porkmail.org/era/unix/award.html#cat

Somehow when I was learning Linux/UNIX 13 years ago, my default way of grepping for something in a file became `cat foo | grep bar`. I've tried, a bit, to break this habit, but can never stick with it. The only time it slows me down is when I'm trying to show someone something and they interrupt to ask why I do it that way :)

Re: More, less, and a story of typical Unix fossilization

#75
Interestingly, it occurred to me that NixOS might be in perfect position to enable painless "gradual migrations" of tooling.

Imagine alternative history of UNIX, where NixOS was invented really long time ago, before 'less' was created. Now, imagine we're Mark Nudelman and we want to add fancy features to 'more' (instead of creating a new tool named 'less'). We could do this freely, and all tools depending on peculiarities of "old more" could be pinned to use a "private" old version of the binary, while new ones would by default use the "new more". Then, the backwards tools could be gradually updated, until no one imported the "old more" and it could be safely removed from the nixpkgs repository. (While any external, non-nixpkgs package definitions could still backport the "old more" definition should they really need it.)

Does this reasoning have any holes?

Re: More, less, and a story of typical Unix fossilization

#76

Earlier quoted context omitted.

I hereby award you a "Useless use of cat" award [1] more http://porkmail.org/era/unix/award.html#cat

Somehow when I was learning Linux/UNIX 13 years ago, my default way of grepping for something in a file became `cat foo | grep bar`. I've tried, a bit, to break this habit, but can never stick with it. The only time it slows me down is when I'm trying to show someone something and they interrupt to ask why I do it that way :)

I love that the same set of people who like to wax poetic about the elegance of pipes and composable single-purpose tools are the most pedantic about not doing all that when a single tool happens to have all the features you strictly need, monolithically built in. Never mind that STDIN works the same on all processes, while the file argument is highly inconsistent! Never mind that the expansion of single tools to encompass common tasks is widely regarded as a pox on the cleanliness of UNIX! You must learn all the options! Minimize the number of processes! You have 16 GB of RAM but that unnecessary 'cat' is UNACCEPTABLE!

Re: More, less, and a story of typical Unix fossilization

#77

Earlier quoted context omitted.

The problem isn't the 35k, the problem is now we all have to spend a little bit of extra brain capacity, remembering the difference between 'more' and 'less', and how while you would imagine 'more' is better (based on the traditional English meaning of the words), actually, 'more' is the lesser product. I wonder how many hours have been wasted altogether on people learning, and misunderstanding, which of more or less…

yeah, calling it less may have been fun at the time, but its poor ui design. if you call a method 'add_one', having it multiply by three might be what you intend, but its not very intuitive.

Heh, all the basic UNIX tools reek of geek design and bad UX.

cat -> from the obscure verb "catenate". A regular user would never, ever find the connection unless someone points it out. It should be "join" or "merge" or "unify" or something.

dd -> "data description". Really? It should be "blockcopy" or something.

grep -> "globally search a regular expression and print". Again, really? It should be "find" or "search".

ls, mv, cp, rm are kind of ok but in this day and age they should definitely be list, move, copy, remove by default (with aliases if need be). Heck, 99% of Unix commands are too short for their own sake.

cron -> "Chronos". Really?, third edition. It should be "scheduler" or something.

I mean, at this point we've all moved on and have memorized all these commands and parameters, but a lot of brain cells have died for no real benefit to humanity.

Re: More, less, and a story of typical Unix fossilization

#79

Earlier quoted context omitted.

I hereby award you a "Useless use of cat" award [1] more http://porkmail.org/era/unix/award.html#cat

Somehow when I was learning Linux/UNIX 13 years ago, my default way of grepping for something in a file became `cat foo | grep bar`. I've tried, a bit, to break this habit, but can never stick with it. The only time it slows me down is when I'm trying to show someone something and they interrupt to ask why I do it that way :)

It's not a bad idiom to use. You can keep retrieving the last command, and change the grep term quickly with ^w . When the search argument to grep is in the middle of the line, you can't easily iterate over a bunch of search terms by hand.

Re: More, less, and a story of typical Unix fossilization

#80
post #15

I've used Linux for a decade-and-a-half, but I've never totally loved the shell, because of the need to learn this sort of pointless arcana. PowerShell was a massive step forward, and I had hoped that an Open Source, cross-platform equivalent would develop so that we could get past the current local maxima of 1970s-era design. It's rather weird that the Open Source equivalent of PowerShell is now...PowerShell. Even i…

I dunno, I'm a long term *NIX person (Solaris 1994-2011, Linux on and off 1994-2006, Linux mostly 2006-now) I am now involved in more Powershell scripting on Windows than I have ever done before. I don't see - Get-Content -Tail 10 FILE as an improvement on - tail -10 FILE I think when it comes to the combination of intuitive command names and terseness when required, VMS' DCL is still unsurpassed. Having commands wit…

> I dunno, I'm a long term NIX person (Solaris 1994-2011, Linux on and off 1994-2006, Linux mostly 2006-now)

But I think this is the point. PowerShell (or the spirit of it) would be more useful for new users because they don't need to spend time memorizing every single command and can start being productive earlier. It probably makes less of a difference if the commands are already part of your muscle memory.

Though to be fair, CMD is a lot more quirky and inconsistent than modern bash. So before the advent of PowerShell, I think you could have made the same argument on favor of ...nix and against windows.

Post reply on HN