4 ms·
Lol, the commit message is just great https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d5cf50dafc9dd5faa1e61e7021e3496ddf7fd61e&dt=
by slaymaker1907 2y ago
Lol, the commit message is just great https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d5cf50dafc9dd5faa1e61e7021e3496ddf7fd61e&dt=1 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...
It's good that Linus is really exercising those 3rd party tools! They should send some money his way for helping them test their code.
- sampo 2y ago> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d5cf50dafc9dd5faa1e61e7021e3496ddf7fd61e&dt=1 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin... This web view renders tabs as spaces, so it's not possible so see what was changed.
- infogulch 2y agoThese are a bit easier to see what's going on: https://github.com/torvalds/linux/commit/d5cf50dafc9dd5faa1e61e7021e3496ddf7fd61e?diff=unified&w=0 https://github.com/torvalds/linux/commit/d5cf50dafc9dd5faa1e... https://github.com/torvalds/linux/blob/d5cf50dafc9dd5faa1e61e7021e3496ddf7fd61e/arch/Kconfig#L1175-L1180 https://github.com/torvalds/linux/blob/d5cf50dafc9dd5faa1e61... Unfortunately Github doesn't have a way to render symbols for whitespace, but you can tell by selecting the spaces that the previous version had leading tabs. Linus changed it so that the tokens `default` and the number e.g. `12` are also separated by a tab. This is tricky, because the token "default" is seven characters, it will always give this added tab a width of 1 char which makes it always layout the same as if it were a space no matter if you use tab widths of 1, 2, 4, or 8.
- lionkor 2y agoPeople use tab width of 3 ;) just to keep us on our toes
- sampo 2y agoIndentation by steps of 3 spaces is common in old Fortran 77 code. This is LAPACK for example. Scroll down to about line 400 to see actual code, not comments. https://github.com/Reference-LAPACK/lapack/blob/master/SRC/cbbcsd.f https://github.com/Reference-LAPACK/lapack/blob/master/SRC/c...
- pull_my_finger 2y agoTab width of 3 is actually really nice in languages like Lua or Ruby that have `end` as a delimiter. It makes nested blocks "step" down very aesthetically.
- krackers 2y agoDo all text editors render "tab" with variable width, taking you to the next tab stop? For some reason up until now I was thinking that was always a word processor thing and I incorrectly assumed (perhaps because we usually don't use tabs for their original purpose) that a tab character was always rendered as constant width.
- infogulch 2y agoI don't know of any text editors that don't render variable width tabs based on the tabstop position. In programming environments we usually only use tabs at the beginning of the line for indentation, it's a bit more rare to use them for alignment due to inconsistent tabstop settings. There's also Elastic Tabstops if you want to go all in on using tabs for alignment: https://nick-gravgaard.com/elastic-tabstops/ https://nick-gravgaard.com/elastic-tabstops/
- Brananarchy 2y agoI maintain, that if everybody used a sufficiently smart editor, tabs for indentation and spaces for alignment would be the objectively correct choice.
- silon42 2y agoAs long as we agree that the line length limit will be based on tab=8... are there smart editors that can check that?
- Brananarchy 2y agoI consider line wrapping to also be part of a sufficiently smart editor, and line limits should also go away in an ideal world. The limiting factor on line length should be "is this too complex for your coworkers to understand"
- GoblinSlayer 2y agoA sufficiently smart editor can figure out everything by itself and doesn't need preformatted text.
- everybodyknows 2y agoThis gets to a dimension of the problem that is often overlooked: Git web viewers, like every other code viewer we use carries its own notion of the position of the tab stops. Notably, this includes CLI shells, connected to a "terminal emulator", where what is being emulated is an ancient piece of hardware: https://en.wikipedia.org/wiki/Teletype_Model_33 https://en.wikipedia.org/wiki/Teletype_Model_33 Semantics of the ASCII tab byte code: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap05.html#tagtcjh_2 https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1... A far-downstream consequence of this is that source code formatted to an assumption of tab stops at other than 8-column intervals, as is not uncommon in Javascript, produces unreadable CLI output from diff, git-diff, ...