All of lore.kernel.org
 help / color / mirror / Atom feed
From: Casey Schaufler <casey@schaufler-ca.com>
To: Linus Torvalds <torvalds@linux-foundation.org>,
	David Laight <David.Laight@aculab.com>
Cc: David Howells <dhowells@redhat.com>,
	Christoph Hellwig <hch@lst.de>, Al Viro <viro@zeniv.linux.org.uk>,
	Ian Kent <raven@themaw.net>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	LSM List <linux-security-module@vger.kernel.org>,
	NetFilter <netfilter-devel@vger.kernel.org>
Subject: Re: clean up kernel_{read,write} & friends v2
Date: Fri, 29 May 2020 15:02:45 -0700	[thread overview]
Message-ID: <7b6a91a5-8c6d-044f-f675-800e0157dc39@schaufler-ca.com> (raw)
In-Reply-To: <CAHk-=wjR0H3+2ba0UUWwoYzYBH0GX9yTf5dj2MZyo0xvyzvJnA@mail.gmail.com>

On 5/29/2020 12:19 PM, Linus Torvalds wrote:
> On Fri, May 29, 2020 at 6:08 AM David Laight <David.Laight@aculab.com> wrote:
>> A wide monitor is for looking at lots of files.
> Not necessarily.
>
> Excessive line breaks are BAD. They cause real and every-day problems.
>
> They cause problems for things like "grep" both in the patterns and in
> the output, since grep (and a lot of other very basic unix utilities)
> is fundamentally line-based.
>
> So the fact is, many of us have long long since skipped the whole
> "80-column terminal" model, for the same reason that we have many more
> lines than 25 lines visible at a time.
>
> And honestly, I don't want to see patches that make the kernel reading
> experience worse for me and likely for the vast majority of people,
> based on the argument that some odd people have small terminal
> windows.
>
> If you or Christoph have 80 character lines, you'll get possibly ugly
> wrapped output. Tough. That's _your_ choice. Your hardware limitations
> shouldn't be a pain for the rest of us.
>
> Longer lines are fundamentally useful. My monitor is not only a lot
> wider than it is tall, my fonts are universally narrower than they are
> tall. Long lines are natural.
>
> When I tile my terminal windows on my display, I can have 6 terminals
> visible at one time, and that's because I have them three wide. And I
> could still fit 80% of a fourth one side-by-side.
>
> And guess what? That's with my default "100x50" terminal window (go to
> your gnome terminal settings, you'll find that the 80x25 thing is just
> an initial default that you can change), not with some 80x25 one. And
> that's with a font that has anti-aliasing and isn't some pixelated
> mess.
>
> And most of my terminals actually end up being dragged wider and
> taller than that. I checked, and my main one is 142x76 characters
> right now, because it turns out that wider (and taller) terminals are
> useful not just for source code.
>
> Have you looked at "ps ax" output lately? Or used "top"? Or done "git
> diff --stat" or any number of things where it turns out that 80x25 is
> really really limiting, and is simply NO LONGER RELEVANT to most of
> us.
>
> So no. I do not care about somebody with a 80x25 terminal window
> getting line wrapping.

The first law of good C programming is:
	"Thou shalt adhere to the One True Brace Style"

It extrapolates into indentation, line width, and a number of
other things. Since Linux is a trademark of Linus Torvalds,
you get to define what the "One Truth" is. Time to resize my
terminals.

>
> For exactly the same reason I find it completely irrelevant if
> somebody says that their kernel compile takes 10 hours because they
> are doing kernel development on a Raspberry PI with 4GB of RAM.
>
> People with restrictive hardware shouldn't make it more inconvenient
> for people who have better resources. Yes, we'll accommodate things to
> within reasonable limits. But no, 80-column terminals in 2020 isn't
> "reasonable" any more as far as I'm concerned. People commonly used
> 132-column terminals even back in the 80's, for chrissake, don't try
> to make 80 columns some immovable standard.
>
> If you choose to use a 80-column terminal, you can live with the line
> wrapping. It's just that simple.
>
> And longer lines are simply useful. Part of that is that we aren't
> programming in the 80's any more, and our source code is fundamentally
> wider as a result.
>
> Yes, local iteration variables are still called 'i', because more
> context just isn't helpful for some anonymous counter. Being concise
> is still a good thing, and overly verbose names are not inherently
> better.
>
> But still - it's entirely reasonable to have variable names that are
> 10-15 characters and it makes the code more legible. Writing things
> out instead of using abbreviations etc.
>
> And yes, we do use wide tabs, because that makes indentation something
> you can visually see in the structure at a glance and on a
> whole-function basis, rather than something you have to try to
> visually "line up" things for or count spaces.
>
> So we have lots of fairly fundamental issues that fairly easily make
> for longer lines in many circumstances.
>
> And yes, we do line breaks at some point. But there really isn't any
> reason to make that point be 80 columns any more.
>
>                   Linus


  reply	other threads:[~2020-05-29 22:02 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-28  5:40 clean up kernel_{read,write} & friends v2 Christoph Hellwig
2020-05-28  5:40 ` [PATCH 01/14] cachefiles: switch to kernel_write Christoph Hellwig
2020-05-28  5:40 ` [PATCH 02/14] autofs: " Christoph Hellwig
2020-05-28  5:40 ` [PATCH 03/14] bpfilter: " Christoph Hellwig
2020-05-28  5:40 ` [PATCH 04/14] fs: unexport __kernel_write Christoph Hellwig
2020-05-28  5:40 ` [PATCH 05/14] fs: check FMODE_WRITE in __kernel_write Christoph Hellwig
2020-05-28  5:40 ` [PATCH 06/14] fs: remove the call_{read,write}_iter functions Christoph Hellwig
2020-05-28 18:56   ` Al Viro
2020-05-29  5:51     ` Christoph Hellwig
2020-05-28  5:40 ` [PATCH 07/14] fs: implement kernel_write using __kernel_write Christoph Hellwig
2020-05-28  5:40 ` [PATCH 08/14] fs: remove __vfs_write Christoph Hellwig
2020-05-28  5:40 ` [PATCH 09/14] fs: don't change the address limit for ->write_iter in __kernel_write Christoph Hellwig
2020-05-28 18:43   ` Linus Torvalds
2020-05-29 12:32     ` Christoph Hellwig
2020-05-31 23:59       ` Logan Gunthorpe
2020-05-28 19:00   ` Al Viro
2020-05-29  5:57     ` Christoph Hellwig
2020-05-29 13:37       ` Christoph Hellwig
2020-05-28  5:40 ` [PATCH 10/14] fs: add a __kernel_read helper Christoph Hellwig
2020-05-28  5:40 ` [PATCH 11/14] integrity/ima: switch to using __kernel_read Christoph Hellwig
2020-05-28  5:40 ` [PATCH 12/14] fs: implement kernel_read " Christoph Hellwig
2020-05-28  5:40 ` [PATCH 13/14] fs: remove __vfs_read Christoph Hellwig
2020-05-28  5:40 ` [PATCH 14/14] fs: don't change the address limit for ->read_iter in __kernel_read Christoph Hellwig
2020-05-28 19:03   ` Al Viro
2020-05-28 18:51 ` clean up kernel_{read,write} & friends v2 Linus Torvalds
2020-05-28 18:57   ` Sedat Dilek
2020-05-28 19:22   ` Joe Perches
2020-05-28 19:33     ` Al Viro
2020-05-28 19:44       ` Matthew Wilcox
2020-05-28 20:06         ` Al Viro
2020-05-28 20:14           ` Deucher, Alexander
2020-05-28 20:18         ` Joe Perches
2020-05-28 20:29       ` Dave Airlie
2020-05-28 21:03     ` Joe Perches
2020-05-28 20:17 ` David Howells
2020-05-28 21:20   ` Casey Schaufler
2020-05-29 13:08     ` David Laight
2020-05-29 19:19       ` Linus Torvalds
2020-05-29 22:02         ` Casey Schaufler [this message]
2020-05-29 23:12         ` [PATCH] checkpatch/coding-style: Allow 100 column lines Joe Perches
2020-05-30 22:14           ` Andreas Dilger
2020-05-30 23:15             ` Joe Perches
2020-06-05  6:36         ` clean up kernel_{read,write} & friends v2 Philippe Mathieu-Daudé
2020-06-05 15:00           ` Nicolas Pitre
  -- strict thread matches above, loose matches on Subject: below --
2020-05-13  6:56 Christoph Hellwig
2020-05-20 15:59 ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7b6a91a5-8c6d-044f-f675-800e0157dc39@schaufler-ca.com \
    --to=casey@schaufler-ca.com \
    --cc=David.Laight@aculab.com \
    --cc=dhowells@redhat.com \
    --cc=hch@lst.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=raven@themaw.net \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.