• 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.
  • rollmagma@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    8 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.

  • PanoptiDon@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    8 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.

  • AutoTL;DR@lemmings.worldB
    link
    fedilink
    English
    arrow-up
    0
    ·
    8 months ago

    This is the best summary I could come up with:


    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!

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

  • iAvicenna@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    8 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?

  • BigMikeInAustin@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    8 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.

    • luciferofastora@lemmy.zip
      link
      fedilink
      arrow-up
      0
      ·
      8 months ago

      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…

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

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

    Stern but just

  • Aatube@kbin.melroy.org
    link
    fedilink
    arrow-up
    0
    ·
    8 months ago

    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.

    • Exec@pawb.social
      link
      fedilink
      arrow-up
      1
      ·
      8 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.

    • Noa Himesaka@lemmy.funami.tech
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      8 months ago

      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
        link
        fedilink
        arrow-up
        0
        ·
        8 months ago

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

        • uis@lemm.ee
          link
          fedilink
          arrow-up
          0
          ·
          edit-2
          8 months ago

          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.

          Hah.

    • CaptDust@sh.itjust.works
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      8 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 …

    • kill_dash_nine@lemm.ee
      link
      fedilink
      English
      arrow-up
      0
      ·
      8 months ago

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

    • Gallardo994@sh.itjust.works
      link
      fedilink
      arrow-up
      0
      ·
      8 months ago

      I am more than sure that Linus wrote the original message as he would normally do, and then made it clean and pretty with an AI. Sometimes I resort to this option too.