• 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@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    7 months ago

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

  • rollmagma@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    7 months ago

    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.

  • tooLikeTheNope@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    7 months ago

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

    Stern but just

  • BigMikeInAustin@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    7 months ago

    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.

  • iAvicenna@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    7 months ago

    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?

  • PanoptiDon@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    7 months ago

    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.

  • inetknght@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    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.

  • merthyr1831@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    7 months ago

    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.

    • Subverb@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      7 months ago

      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.