Campfyre
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Napain@lemmy.ml to Programmer Humor@lemmy.ml · 2 years ago

:3{:3|:3&};:3

lemmy.ml

message-square
75
fedilink
504

:3{:3|:3&};:3

lemmy.ml

Napain@lemmy.ml to Programmer Humor@lemmy.ml · 2 years ago
message-square
75
fedilink
  • perishthethought@lemm.ee
    link
    fedilink
    English
    arrow-up
    44
    ·
    2 years ago

    ELI5?

    • aldalire@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      128
      ·
      edit-2
      2 years ago

      Replace “:” with “a” you get

      a() a a&; a

      Reformatting

      a() {

      a | a &

      };

      a

      So it creates a function, a, which what it does is it calls itself and pipes its output to itself (the a | a). The ampersand means that this will run entirely in the background. Then, to initiate things, the command calls a (in the last line)

      So, there will be exponentially be many recursive calls to a, which will eventually deplete your stack and set your pc on fire

      • FilthyShrooms@lemmy.world
        link
        fedilink
        arrow-up
        24
        ·
        2 years ago

        This is why I should not be allowed to use Linux

        • starpanda@lemmy.world
          link
          fedilink
          arrow-up
          20
          ·
          2 years ago

          on windows a forkbomb is literally %0|%0 iirc

          • eatham 🇦🇺@aussie.zone
            link
            fedilink
            English
            arrow-up
            3
            ·
            2 years ago

            How does that work?

            • starpanda@lemmy.world
              link
              fedilink
              arrow-up
              6
              ·
              2 years ago

              %0 means your current command iirc so it just reexecutes itself piping its own output to the new instances

          • FilthyShrooms@lemmy.world
            link
            fedilink
            arrow-up
            2
            ·
            2 years ago

            Please I do not need this information oh god what do I do now?

            • starpanda@lemmy.world
              link
              fedilink
              arrow-up
              5
              ·
              2 years ago

              find your nearest school pc with like 8g ram

              • Hugucinogens@lemmy.blahaj.zone
                link
                fedilink
                arrow-up
                1
                ·
                2 years ago

                Did you just… Write 8g ram, implying it’s an amount small enough to belong on a school pc?

        • halva@discuss.tchncs.de
          link
          fedilink
          arrow-up
          4
          ·
          edit-2
          2 years ago

          most linux distros from android to alpine can be and often are configured to limit the amount of forks a user can spawn

      • Omega_Haxors@lemmy.ml
        link
        fedilink
        English
        arrow-up
        17
        ·
        2 years ago

        Use `` to disable text formatting, it's intended for code but it can be used for anything where formatting shouldn't be considered

      • jaybone@lemmy.world
        link
        fedilink
        arrow-up
        9
        ·
        2 years ago

        I always wonder, does it really need the pipe? Why not just :&:& ?

    • Skyhighatrist@lemmy.ca
      link
      fedilink
      arrow-up
      38
      ·
      2 years ago

      It’s a fork bomb. It exponentially forks processes in the background in an attempt to consume all CPU cycles.

    • Davel23@kbin.social
      link
      fedilink
      arrow-up
      9
      arrow-down
      10
      ·
      2 years ago

      https://www.youtube.com/watch?v=nB_s79lHSVs

      • PlutoniumAcid@lemmy.world
        link
        fedilink
        arrow-up
        47
        ·
        2 years ago

        Just a sentence, please kind sir, not a video?

        • Darkrai@kbin.social
          link
          fedilink
          arrow-up
          29
          ·
          2 years ago

          Its creating a function named : that spawns two copies of : then calls that function to start the duplicating code or forks. For that, its called a fork bomb.

          • NegativeLookBehind@lemmy.world
            link
            fedilink
            arrow-up
            8
            ·
            edit-2
            5 months ago

            deleted by creator

        • wise_pancake@lemmy.ca
          link
          fedilink
          arrow-up
          20
          ·
          2 years ago

          Is a fork bomb, it starts a process that starts two more processes, which each start two more processes, which each start two more processes, which each start two more processes…

          And eventually the computer locks up plus it’s hard to kill since the PIDs change constantly.

        • Midnight Wolf@lemmy.world
          link
          fedilink
          English
          arrow-up
          15
          ·
          2 years ago

          https://en.wikipedia.org/wiki/Fork_bomb

          Self-replicating program, malicious

        • DaGeek247@fedia.io
          link
          fedilink
          arrow-up
          9
          ·
          2 years ago

          Fork bombs are things that infinitely spawn new forks, until the system crashes. Its an infinite ‘if true, spawn new instance’ loop that only stops when the system gets a hard reset.

        • Classy@sh.itjust.works
          link
          fedilink
          arrow-up
          5
          arrow-down
          1
          ·
          2 years ago

          Maybe he thought the topic was interesting and wanted to share more details with us? I appreciate the video.

Programmer Humor@lemmy.ml

programmerhumor@lemmy.ml

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 5 users / day
  • 73 users / week
  • 3.1K users / month
  • 7.15K users / 6 months
  • 2 local subscribers
  • 37.9K subscribers
  • 1.39K Posts
  • 34.9K Comments
  • Modlog
  • mods:
  • cat_programmer@lemmy.ml
  • AgreeableLandscape@lemmy.ml
  • BE: 0.19.7
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org