this post was submitted on 15 Apr 2024
508 points (98.3% liked)

Linux

48328 readers
636 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 
  • Linus Torvalds added hidden tabs to Kconfig to challenge parsers that can't handle them.
  • Tabs were intentionally added to the common Kconfig file for page sizes to expose faulty parsers.
  • Torvalds believes parsers unable to handle tabs shouldn't be parsing kernel Kconfig files, aiming to force fixes.
top 50 comments
sorted by: hot top controversial new old
[–] TCB13@lemmy.world 277 points 7 months ago* (last edited 7 months ago) (7 children)

"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."

[–] fartsparkles@sh.itjust.works 231 points 7 months ago (4 children)

And honestly, I find his phrasing today far more damming with its conciseness. It screams leadership.

[–] OtisRamflow@lemm.ee 139 points 7 months ago (4 children)

Thanks for your insight, fartsparkles.

[–] dohpaz42@lemmy.world 27 points 7 months ago (2 children)

Please make fartsparkles the new rimjobsteve. Pretty please?

[–] fartsparkles@sh.itjust.works 17 points 7 months ago (1 children)

Spreading kindness to strangers, treating people with respect, and being a force for good on the internet is something everyone should aspire to.

Also I ate way too much glitter than usual this one time and I’ve never been able to live it down. Embrace, extend, shine.

[–] bigmclargehuge@lemmy.world 11 points 7 months ago (1 children)
load more comments (1 replies)
load more comments (1 replies)
load more comments (3 replies)
[–] ozymandias117@lemmy.world 22 points 7 months ago

Yeah, I can’t stop laughing at

If you can't parse tabs, you can't have page sizes.

It’s like how I’d admonish my pet

load more comments (2 replies)
[–] thedeadwalking4242@lemmy.world 21 points 7 months ago

The Gordon Ramsey of programing

[–] dezvous@lemmy.world 17 points 7 months ago (9 children)

Why are you censoring your own text? Truly baffling.

load more comments (9 replies)
[–] onlinepersona@programming.dev 12 points 7 months ago (1 children)

I think your keyboard is broken. It's inserting random stars in your text.

Anti Commercial-AI license

[–] VirtualOdour@sh.itjust.works 30 points 7 months ago (4 children)

Yours is too, its posting a silly link at the bottom which makes you look like you're a Facebook mom in 2003.

Dear Mark Zuckerberg

With this statement, I give notice to Facebook it is strictly forbidden to disclose, copy, distribute, or take any other action against me based on this profile and/or its contents. The content of this profile is private and confidential information. The violation of privacy can be punished by law (UCC 1-308- 1 1 308-103 and the Rome Statute. NOTE: Facebook is now a public entity. All members must post a note like this. If you prefer, you can copy and paste this version. If you do not publish a statement at least once it will be tacitly allowing the use of your photos, as well as the information contained in the profile status updates. FACEBOOK DOES NOT HAVE MY PERMISSION TO SHARE PHOTOS OR MESSAGES.

load more comments (4 replies)
[–] uis@lemm.ee 9 points 7 months ago* (last edited 7 months ago) (1 children)

No-no-no. "Whoever can't handle tabs as whitespaces should heat their IQ, it is below freezing right now". Or classic "should be retroactively aborted".

load more comments (1 replies)
load more comments (2 replies)
[–] nik282000@lemmy.ca 95 points 7 months ago (2 children)

Why would anyone NOT parse a tab as whitespace? Like, python really wants you to use spaces but will still let you use tabs if you are consistent.

[–] MonkderDritte@feddit.de 21 points 7 months ago

There's the .tsv format too.

[–] dinckelman@lemmy.world 12 points 7 months ago* (last edited 7 months ago)

Even then, unless for some reason you code on paper, there is no excuse to not have a formatter, that enforces one style, or the other

[–] inetknght@lemmy.ml 90 points 7 months ago

I'm honestly on Torvalds' side here.

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.

[–] Aatube@kbin.melroy.org 79 points 7 months ago (5 children)

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.

[–] noahimesaka1873@lemmy.funami.tech 34 points 7 months ago* (last edited 7 months ago) (2 children)

I tried it with Claude 3 Opus, even better:

Alright, listen up you little shits. Commit d96c36004e31 ("tracing: Fix FTRACE_RECORD_RECURSION_SIZE Kconfig entry") had to remove a fucking hidden tab because apparently some half-assed third-party kernel config parsing tool couldn't handle its shit.

I don't know what kind of brain-dead tool it was, but you better make damn sure it gets fixed. Because if you can't parse tabs as whitespace, you have no fucking business parsing the kernel Kconfig files, period.

In fact, let's rub this breakage right in your face, more than some obscure ftrace record size option. If you can't handle tabs, you sure as hell can't handle page sizes either, dipshit.

Yeah, I know the whole tab-vs-space clusterfuck is sadly a classic Unix thing, and 'make' is notorious for being a broken piece of crap in that regard. But guess what? That doesn't make it fucking okay, got it?

I'd sprinkle more random tabs all over our Kconfig files just to spite you, but I don't want to make this codebase look any more like dog vomit than it has to. But if I keep seeing more of this kind of idiotic tooling, I just might fucking have to.

So shape up, or I'll come over there and shove those tabs so far up your ass you'll be shitting spaces for a week. Fuck!

[–] Aatube@kbin.melroy.org 13 points 7 months ago (1 children)

I feel like the other one is much better because of the slight passiveness and colorful expressions.

load more comments (1 replies)
load more comments (1 replies)
[–] kill_dash_nine@lemm.ee 32 points 7 months ago

“ok, now add a metric shit ton of swearing and further belittle parsers who can’t deal with tabs.”

[–] CaptDust@sh.itjust.works 12 points 7 months ago* (last edited 7 months ago)

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.

Heh this is so succinctly scathing, but also dead on ....

[–] Exec@pawb.social 10 points 7 months ago

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.

This is genius.

load more comments (1 replies)
[–] palordrolap@kbin.social 73 points 7 months ago (2 children)

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.

[–] emptiestplace@lemmy.ml 33 points 7 months ago (5 children)

using a rly bad word but pretending not to is kinda weird

[–] mino@lemmy.ml 42 points 7 months ago (1 children)

I don't understand this either. There's no fucking algorithm overlord here right? No fucking tiktok, youtube bullshit required.

If you want to say fuck, fucking say fuck.

On another note. Thx for introducing me to the robustness principle ♥️

[–] palordrolap@kbin.social 22 points 7 months ago (17 children)

Maybe I want to say it without saying it. There's no rule against doing that, but people somehow think there is - or that there ought to be.

Most of the time I don't swear, so it makes me uncomfortable to use the word. There have been and undoubtedly will be exceptions. When the mood takes me. When the word, unfettered, feels right. Today was not that day.

Funny how the partial omission offends some people more than the original word does. Adapt your parsers.

load more comments (17 replies)
[–] lolcatnip@reddthat.com 20 points 7 months ago

Sometimes it works well as a stylistic choice. It's not pretending not to use a bad word, but rather drawing attention to the fact that you're deliberately being a little bit naughty with a wink to the reader. It's like the absurdity of what happens when you find a stranger in the Alps.

load more comments (3 replies)
load more comments (1 replies)
[–] tooLikeTheNope@lemmy.ml 70 points 7 months ago* (last edited 7 months ago)

Torvalds believes parsers unable to handle tabs shouldn’t be parsing kernel Kconfig files, aiming to force fixes.

Stern but just

[–] PanoptiDon@lemmy.world 64 points 7 months ago (2 children)

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.

[–] jonwyattphillips@lemmy.ml 17 points 7 months ago (1 children)

Fur Elise wasn't discovered until 40 years after his death and its unknown who it was written for.

[–] Incandemon@lemmy.ca 29 points 7 months ago (1 children)

Wait, isn't that obvious? Its for Elise!

load more comments (1 replies)
[–] uis@lemm.ee 61 points 7 months ago

Based Linus is based.

[–] BigMikeInAustin@lemmy.world 38 points 7 months ago (1 children)

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.

load more comments (1 replies)
[–] janNatan@lemmy.ml 27 points 7 months ago

Unconventional way to take acid, but I support him.

[–] themusicman@lemmy.world 11 points 7 months ago (1 children)
[–] UpperBroccoli@lemmy.blahaj.zone 15 points 7 months ago

Invalid, not an ABI change. Besides, this does not break, it only reveals existing breakage.

[–] uis@lemm.ee 11 points 7 months ago
[–] merthyr1831@lemmy.world 10 points 7 months ago (5 children)

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.

load more comments (5 replies)
load more comments
view more: next ›