Linus Torvalds Injects Tabs To Thwart Kconfig Parsers Not Correctly Handling Them

  • 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.
TCB13, (edited )
@TCB13@lemmy.world avatar

“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.”

onlinepersona,

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

Anti Commercial-AI license

polskilumalo,
@polskilumalo@lemmygrad.ml avatar

Dude. Censoring profanity ain’t as cringe as licensing a fucking Lemmy comment XD

onlinepersona,
Kusimulkku,

Can’t we just all come together and agree that they’re both cringe

VirtualOdour,

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.

onlinepersona,
mindbleach,

Doing the pointless thing is whatever.

Mocking people who point out it’s pointless is toxic, abusive, and deeply revealing. You think AI harvesters give a shit what you’ve told them not to harvest?

Iapar,

It has some strong SovCit vibes.

WldFyre,

Ah finally! You didn’t put that link in this comment, so I get to feed it to my hungry AI that I keep down in my basement!

fartsparkles,

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

potkulautapaprika,

Well, I do miss the “fuck you mauro” livid linus, yes, nowadays he goes more for ‘brevity is the wit of soul’

ozymandias117,

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

OtisRamflow,

Thanks for your insight, fartsparkles.

dohpaz42,
@dohpaz42@lemmy.world avatar

Please make fartsparkles the new rimjobsteve. Pretty please?

Vilian,

+1

fartsparkles,

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,
@bigmclargehuge@lemmy.world avatar

than usual?

fartsparkles,

I mean, it wasn’t an unhealthy amount!

TheAnonymouseJoker,
@TheAnonymouseJoker@lemmy.ml avatar

Sparkly bling bling farts is the new fetish.

fiercekitten,

I need more fartsparkles in my life.

Iapar,

We all do.

TCB13,
@TCB13@lemmy.world avatar

Indeed 😂😂

dezvous,

Why are you censoring your own text? Truly baffling.

TCB13,
@TCB13@lemmy.world avatar

Because… there’s moderation on lemmy that doesn’t like certain words :P

dezvous,

I promise, you can say shit, ass and fuck

TCB13,
@TCB13@lemmy.world avatar

I’ve had some posts removed because of that so… maybe not on this community but still.

tetris11,
@tetris11@lemmy.ml avatar

Yes, but can you say removed, removed, and sharemoved?

caseyweederman,

sha256 I said it

lud,

Pretty sure your instance is one of the only ones with that filter

tetris11,
@tetris11@lemmy.ml avatar

cover your eyes!

mindbleach,

Not on your instance.

thedeadwalking4242,

The Gordon Ramsey of programing

Aatube,

The associated forum post contains a much more endearing translation.

uis, (edited )

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

TCB13,
@TCB13@lemmy.world avatar

Nice one. Maybe e can make a website “whatwouldlinussay.com”?

Miaou,

Complaining about PC but type the word “fuck”? Genius.

merthyr1831,

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.

barsoap,

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.

That’s a recipe for disaster as your syntax is under-specced. You’re right-up inviting programmers to produce programs with implementation-defined semantics.

Haskell (which also uses layout syntax) never had that problem as tabs were simply defined to be eight spaces, but that then led to issues with people setting different tab-widths in their editors and a flurry of syntax errors when they did “tabs for indentation, spaces for alignment”. Which is why Haskell then moved ahead to outlaw tabs, I think it’s still in the “throw a warning” phase but at some point it’s going to be a hard error.

That’s not to say that kconfig should do the same – presumably they used tabs for a good reason, and all those other programs are simply not following the spec. Essentially including unit tests in the actual production files is a good move when you’re dealing with that kind of situation.

UndercoverUlrikHD,

Eight space indentation should be crime, I’m not made out screen width over here.

If you want to be strict with indentation, use tabs as your standard instead of forcing others to use your preferred visual width.

barsoap,

Eight is still the default tab width and will be as long as VT100 continues to be a thing, i.e. forever. Haskell could’ve chosen another static value but that would have caused even more trouble.

With Haskell’s syntax you really want to align at single-space resolution, not necessarily just on the left but also further to the right, within the lines. The gold standard is pretty much lhs2tex “poly” style (section 8, page 19), and not just because it allows lhs2tex to spit out beautiful code, it’s also highly readable in ASCII form. In that style 2+ spaces mean “align this with the 2+ space stuff above and below”.

So there’s no way around spaces and as tabs+spaces are a bad idea tabs get the boot. That argument is specific to Haskell but in general I’d argue that tabs are more trouble than they’re worth – if you have trouble editing space-only indentation, get a proper editor. If I want my Rust indented by a different amount I can just tell rustfmt to change everything, no biggie.

Subverb,

Having a language dependent on indentation is absurd on the face of it. It’s a ridiculous idea that should have been ridiculed from the outset.

barsoap,

No. Having a language depend on semicolons even though there’s ways to do without, ways that don’t even include layout if you don’t want to, is well not absurd on the face of it it’s hysterical raisins.

Haskell has one of the most admired syntaxes out there, and it’s layout. It’s clean, predictable, very simple and most of all intuitive rules. It makes sure that semantic structure always follows visual structure, thus provides a single source of truth why Algol-likes (i.e. everything that looks at least vaguely like C) have two.

I don’t indent my Rust, I let rustfmt do that. All that automation and I still get into lots of missing or mismatched braces situations which literally never happen in Haskell because the structure of the program is visually obvious, you don’t have to look for tiny squiggles to figure out what it is.

casual_turtle_stew_enjoyer,

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

JackbyDev,

This isn’t about using one or the other, it’s about not exploding when you encounter a tab.

lemmyreader,

Your word choice reminds me of Linus before he went into this kind of rehab thing.

casual_turtle_stew_enjoyer,

Yeah I liked him better then /s

AnActOfCreation,
@AnActOfCreation@programming.dev avatar

Notice Linus doesn’t use tabs; he just thinks the parser shouldn’t die when it sees them.

casual_turtle_stew_enjoyer,

Yeah and that makes sense. But I still choose to die on the hill of tabs or nothing. That’s just how anal I am about my code.

And I realize there are niche scenarios where tabs don’t make sense, but I could care less about those. Afaik, even assemblers support tabs. If you have tabs, I feel it is almost sacrilegious not to use them for indentation.

highalectical,
@highalectical@lemmygrad.ml avatar
inetknght,

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.

uis,
uis,

Based Linus is based.

tooLikeTheNope,

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

Stern but just

nxdefiant,

Tabs are a dark pattern confirmed.

The war is over, long live spaces.

PanoptiDon,

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.

normanwall,

Lol

jonwyattphillips,

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

Incandemon,

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

Mr3Sepz,

It was probably not for Elise, but Therese, but again its complicated.

iAvicenna,

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?

inetknght,

grep -oP ’ *’ oops no tabs

cut -d ’ ’ -f 3 oops no tabs

nik282000,
@nik282000@lemmy.ca avatar

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,

There’s the .tsv format too.

dinckelman, (edited )

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

palordrolap,

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.

barsoap,

Robustness Principle

It’s a principle for brittleness. First you get implementation-defined behaviour, then bug-compatible software.

emptiestplace,

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

lolcatnip,

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.

mino,
@mino@lemmy.ml avatar

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,

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.

half_built_pyramids,

On the fediverse we do not have to worry about upsetting coka cola or spez because a swear appeared next to their advertisement or name. Not that many people care about that elsewhere, but we especially don’t care about it here. I think that’s worth calling attention to every once in a while. It doesn’t always have to be swears as the vehicle to remind us that the power dynamic is different here.

It’s fucking nice to be reminded there no corpo overlords here sometimes, though. Which is ironic that sometimes the foss benevolent dictators for life aren’t always benevolent.

palordrolap,

It's not about whether other people are willing to accept it. It's about whether I'm willing to generate it. This is the other half of the principle.

WldFyre,

But you still used it, no one’s confused about what word you meant. It’s such an odd line to draw IMO.

It’s like the “anal doesn’t count as REAL sex” nonsense, but for cussing lol

blind3rdeye,

Obviously the semi-censored version isn’t the same - otherwise you wouldn’t be talking about it. And the author has told you that it was a stylistic choice to use that different version. That’s enough, isn’t it? And judging by the reactions here, apparently the semi-censored version is even more hard-hitting than the full word!

Swearing is used for emphasis and to invoke a reaction. The attention it has brought here seems to show that it has invoked a reaction and captured people’s attention. Maybe that drawing of attention means it was fit for purpose - or maybe not. In any case, it was the choice of the author to do it like that.

WldFyre,

Of course they can do whatever they want, it just looks juvenile.

“I don’t wanna cuss so I self-semi-censor the words” is still just cussing. It’s a weird lie about something that doesn’t matter, just fucking cuss or use a different word if you don’t like cussing.

blind3rdeye,

You think it’s juvenile to self-censor? Have you never heard and adult use swear-adjacent words when talking? This happens for all sorts of reasons. If you think this is a childish thing to do, then I can only assume social norms are very different where you. I can’t think of any child I know ever self-censoring in this way. They’d either swear, or not swear. But I do know of adults who do it.

WldFyre,

But they didn’t use swear adjacent words, they self censored some letters from a cuss word. I even said “just use a different word.”

blind3rdeye,

Oh my god! You’re right! I see now! Thanks for clarifying that. It was totally absurdly juvenile and silly of them to write like that. Should we really even tolerate that kind of behaviour here on lemmy? I didn’t understand how bad it was until you explained it to me - but I’m sure glad you did, because now it is so crystal clear that the way that they expressed themselves was ridiculous and possibly even harmful to the community.

WldFyre,

Do you also think “lets go Brandon” is more civil than “fuck Joe Biden”?

I was just pointing out it was silly that they “don’t want to generate” cuss words, but instead of just saying a different word, they still just cuss. It’s a weird mental block that doesn’t make sense.

blind3rdeye,

Yeah. It makes no sense. A totally crazy mental block. Irrational and nonsensical. No sane person would ever write like that. No chance anyone would ever want to express themselves in that way unless that had some kind of twisted sinister motive. We shouldn’t allow that kind of thing here. We need to make sure everyone on lemmy knows that it is not what we want in this community. Lets keep this discussion going to make sure this wisdom is heard.

palordrolap,

I turned the volume down to a more comfortable level.

lolcatnip,

You know you can say fuck on Reddit, right?

half_built_pyramids,

Can you say fuck spez?

lolcatnip,

Yes?

VirtualOdour,

Yeah though I have to admit I like it when people self censor because I imagine them like a cute Ned Flanders all flustered ‘well dang diddly h - e - double C!’

But yeah it’s nice that platform’s exist simply for people to express themselves rather than to serve as vehicles for advertising. I’ll say fuck to celebrate that!

DAMunzy,

Oh, BS. You don’t have to worry about swearing on Reddit either. Yes, reddit sucks, but the censoring of words on there isn’t like TikTok.

soupuos,

That’s a good f*****g point

Swedneck,
@Swedneck@discuss.tchncs.de avatar

mingegurgle

mindbleach,

Eugh.

Bravo.

Swedneck,
@Swedneck@discuss.tchncs.de avatar

congratulate ben croshaw, i stole it from zero punctuation

themusicman,

WE DO NOT BREAK USERSPACE

UpperBroccoli,

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

BigMikeInAustin,

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.

luciferofastora,

Me: “This is the file format we agree on.”
They: “Yep, that’s what you’ll get.”

They: “Why is your script not working?”
Me: “Idk what was the last file you put through it?”

In their defense, they got the file from a third party that we both previously assumed competent enough to follow explicit written instructions. Guess there’s a lesson in trust…

  • All
  • Subscribed
  • Moderated
  • Favorites
  • linux@lemmy.ml
  • GTA5RPClips
  • DreamBathrooms
  • InstantRegret
  • magazineikmin
  • thenastyranch
  • ngwrru68w68
  • Youngstown
  • everett
  • slotface
  • rosin
  • ethstaker
  • Durango
  • kavyap
  • cubers
  • provamag3
  • modclub
  • mdbf
  • khanakhh
  • vwfavf
  • osvaldo12
  • cisconetworking
  • tester
  • Leos
  • tacticalgear
  • anitta
  • normalnudes
  • megavids
  • JUstTest
  • All magazines