239
Gentoo users be like (sh.itjust.works)
top 23 comments
sorted by: hot top controversial new old
[-] seaQueue@lemmy.world 99 points 7 months ago

Gentoo users would be really mad about this if they weren't still building their web browsers and could get online

[-] Hupf@feddit.de 26 points 7 months ago
[-] 0x4E4F@sh.itjust.works 1 points 7 months ago

It do be like that 😔...

[-] satanmat@lemmy.world 12 points 7 months ago

And as soon as that’s working; they’ll break something else

[-] henfredemars@infosec.pub 33 points 7 months ago

Why does this option without specifying a number of threads even exist? It might as well be footgun mode.

[-] seaQueue@lemmy.world 22 points 7 months ago

I'm pretty sure it's "run as many threads as there are cores" mode, though if you're running it in a terminal I always find it best to use nproc-1 or -2 so the machine actually stays usable.

[-] henfredemars@infosec.pub 25 points 7 months ago

My man pages specify it’s as many as possible limited only to the number of jobs.

[-] seaQueue@lemmy.world 21 points 7 months ago

Oof, that might as well be a fork bomb then

[-] Artyom@lemm.ee 8 points 7 months ago

I don't think I've ever used -j without specifying as many cores as I have, so it sounds completely reasonable.

[-] ikidd@lemmy.world 25 points 7 months ago* (last edited 7 months ago)
[-] palordrolap@kbin.social 5 points 7 months ago

One of Perl's design principles was the Robustness principle, though it probably wasn't known by that name at the time. (The name came about around the same time Perl was becoming a thing, something something zeitgeist something.)

Perl can be locked down and made to complain (with at least a couple of levels of pedantry) when things are wrong, but unlike most other languages, it doesn't do so by default.

[-] Atlas48@ttrpg.network 1 points 7 months ago

probably TECO, too

[-] mvirts@lemmy.world 13 points 7 months ago
[-] Andrew15_5@mander.xyz 3 points 7 months ago

Those are rookie numbers!

[-] Tenthrow@lemmy.world 12 points 7 months ago

It is driving me crazy that I have no idea what this means.

[-] MajorHavoc@programming.dev 38 points 7 months ago* (last edited 7 months ago)

I believe the left hand is a shell fork-bomb, on the assumption that anything that zany is probably malicious.

And the right hand is a way to tell Make to use up all available system resources:

"-j [jobs]’ ¶
‘--jobs[=jobs]’
Specifies the number of recipes (jobs) to run simultaneously. With no argument, make runs as many recipes simultaneously as possible. If there is more than one ‘-j’ option, the last one is effective. See Parallel Execution, for more information on how recipes are run. Note that this option is ignored on MS-DOS."

Edit: I think the make command is technically only a problem when run for a Makefile that tries to do too many things, and has at least one mistake in dependency controls. So... for every Makefile I ever encountered (or that I ever wrote!)

Yeah. They're the same picture

[-] Voroxpete@sh.itjust.works 25 points 7 months ago* (last edited 7 months ago)

You are correct, left hand is a fork bomb. Specifically, it creates and then runs a function named ":". What this function does is pipe its output into itself while running in a background process, which instantly spawns infinite copies of itself. Technically I believe the : character could be any character as its just a name. The creator just picked a colon for aesthetics.

[-] laurelraven@lemmy.blahaj.zone 13 points 7 months ago

I always just kind of glazed over looking at that and just know "it's a fork bomb" and basically what it does

With your explanation, I can now actually understand all the parts and how they work, it actually makes sense

[-] Mixel@feddit.de 5 points 7 months ago

Now I get why it does what it does and how it works. I never thought that the colon was the variable name but it makes so much sense!

[-] Max_P@lemmy.max-p.me 6 points 7 months ago

I think it can also get weird when you call other makefiles, like if you go make -j64 at the top level and that thing goes on to call make on subprojects, that can be a looooot of threads of that -j gets passed down. So even on that 64 core machine, now you have possibly 4096 jobs going, and it surfaces bugs that might not have been a problem when we had 2-4 cores (oh no, make is running 16 jobs at once, the horror).

[-] AVincentInSpace@pawb.social 4 points 7 months ago

so without an argument to -j the number of concurrent jobs is unbounded???

[-] unlawfulbooger@lemmy.blahaj.zone 10 points 7 months ago
nice make -j $(nproc)
[-] groche@lemmy.rochegmr.com 8 points 7 months ago

Nah you can have x3 load per core without problem. The real problem is when you haven't got enough ram xD

this post was submitted on 19 May 2024
239 points (96.9% liked)

linuxmemes

21615 readers
545 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack members of the community for any reason.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
  • These rules are somewhat loosened when the subject is a public figure. Still, do not attack their person or incite harrassment.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn. Even if you watch it on a Linux machine.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, and wants to interject for a moment. You can stop now.
  •  

    Please report posts and comments that break these rules!


    Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't fork-bomb your computer.

    founded 2 years ago
    MODERATORS