5 ms·
These are a bit easier to see what's going on: https://github.com/torvalds/linux/commit/d5cf50dafc9dd5faa1e61e7021e3496ddf7fd61e?diff=unified&w=0 https://githu
by infogulch 3y ago
These 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 3y agoPeople use tab width of 3 ;) just to keep us on our toes
- sampo 3y 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 3y 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 3y 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 3y 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 3y agoI maintain, that if everybody used a sufficiently smart editor, tabs for indentation and spaces for alignment would be the objectively correct choice.
- silon42 3y 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 3y 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 3y agoA sufficiently smart editor can figure out everything by itself and doesn't need preformatted text.
- Shish2k 3y agoIf everybody used a sufficiently smart editor, and used sufficiently smart codegen, and we removed all the existing breakage from our tools and infrastructure, yes. I wish I lived in that world. TBH my money is on that never happening, but maybe we will skip to an even higher level, where the canonical format for source code is the AST rather than plain text - indentation, braces, line length, all the things that humans care about but the computer doesn’t become render settings.