"if you can't parse tabs as whitespace, you should not be parsing the kernel Kconfig files." ~ Linus Torvalds
This is what we got after people sent him into PC training. The OG Linus would say something like "if you're a piece of s* that can't get over your a** to parse tabs as whitespace you should be ashamed to walk on this planet let alone parsing the kernel Kconfig files. What a f* waste of space."
Tabs are a necessary part of the tooling and configuration files. Any tool which doesn't properly handle files that are correctly formatted for other tools is... a broken tool.
I'll take you up on that. ChatGPT, translate this commit message to actual Linus style:
Subject: Regarding Commit d96c36004e31
So apparently, this commit thought it was a brilliant idea to strip away a tab because some third-rate kernel config parsing tool couldn't handle it. Seriously? We're bending over backward for these tools now?
Listen up, if your parsing tool throws a tantrum over a tab, it's time to rethink your life choices. Tabs are as fundamental to Kconfig files as oxygen is to humans. If you can't handle tabs, you have no business parsing kernel configurations.
And let's not pretend this is some isolated incident. The whole tab vs. space saga is like a bad sitcom rerun from the '70s. Sure, 'make' might have its quirks, but that doesn't mean we should stoop to that level of incompetence.
I'm tempted to flood our Kconfig files with tabs just to prove a point, but let's not make a mess where it's not needed. However, if this idiocy persists, don't be surprised if I start tabbing everything in sight.
Let's get our priorities straight, people. We're building a kernel here, not babysitting fragile parsing tools. So let's fix this mess and move on to more important things.
The Robustness Principle may seem like little more than a suggestion, but it is the foundation on which many successful things are based.
To boil it down to meme-level old-school Torvaldsry: Assume everyone else is a f--king idiot who can barely do what they're supposed to and expect to parse their files / behaviour / trash accordingly.
If you do not do this, you are, without doubt, one of those f--king idiots everyone else is having to deal with. If you do do this, it does not guarantee that you are not a f--king idiot. Awareness is key.
Examples where this works: Web browser quirks mode; Driving a car; Measure twice, cut once. This latter one is special because it reveals that often, the f--king idiot you're trying to deal with is yourself.
Assume everyone else is worse.
Fun corollary: In altering his behaviour towards f--king idiots people who should know better, Linus has learned to apply the robustness principle to interpersonal communication.
Reminds me of Beethoven writing Für Elise for sometime he loved, and when he was rejected, the music was finished in such a way that she could not play it.
I do the same to people who refuse to follow specifications they agreed to follow.
There is a slight satisfaction to get back at them for continually delivering much lower quality than is required.
But it really is to cover me. Because, it always happens, later in the future that edge case comes up, and everything breaks. And management is ready to blame me. But then I show them that I tested the edge case before the conclusion of the project. And that programmer ignored my emails, and that I told management these edge cases weren't covered. But then management signed off on calling it complete. And suddenly management is no longer red with fury. And they usually won't allow me time to fix it. So the can gets kicked down the road until the next time that edge case fails.
The Register did a good article covering the change.
Source files should be conservative with the standard they expect from the developer, and parsers should be liberal in what they expect from the source, ie. allow deviations from the standard.
Python for example supposedly only allows 4 spaces for indentation, but as long as the developer is consistent most if not all Python interpreters will accept any kind of indentation.
Within yesterday's Linux 6.9-rc4 release is an interesting little nugget by Linus Torvalds to battle Kconfig parsers that can't correctly handle tabs but rather just assume spaces for whitespace for this kernel configuration format.
Due to a patch having been queued last week to replace a tab with a space character in the kernel tracing Kconfig file, Linus Torvalds decided to take matters into his own hand for Kconfig parsers that can't deal with tabs... Torvalds authored a patch to intentionally add some tabs of his own into Kconfig for throwing off any out-of-tree/third-party parsers that can't correctly handle them.
Torvalds added these intentional hidden tabs to the common Kconfig file for handling page sizes for the kernel.
Torvalds wrote in the patch: "Commit d96c36004e31 ("tracing: Fix FTRACE_RECORD_RECURSION_SIZE Kconfig entry") removed a hidden tab because it apparently showed breakage in some third-party kernel config parsing tool.
Yes, tab-vs-space confusion is sadly a traditional Unix thing, and 'make' is famous for being broken in this regard.
I'd add more random tabs to our Kconfig files, but I don't want to make things uglier than necessary.
The original article contains 308 words, the summary contains 184 words. Saved 40%. I'm a bot and I'm open source!
I am no kernel or parsing expert here but how hard would it be to convert tabs to spaces? Is it like very finicky and is weirdly platform dependent that it wouldn't just be one of the first things that you do if you are writing a parser for anything?
I also like to use tabs. I use them in my code and lists. I like tapping a key that immediately makes an obvious whitespace. This is very helpful to me for readability of nested stuff.
I also hate YAML even though I make a lot of tasks/roles/playbooks in ansible.
I will fight tooth and nail with anyone who agrees with this decision. Not because Torvalds did it, but because fuck you use tabs you goddamn neanderthals
Wow, super newsworthy. Even included some bs about "colorful language". Can't let a thing like that go by without trying to entice some internet drama.