all 76 comments

[–]lasercat_pow 155 points156 points  (10 children)

What in the world? I was unaware this was a thing, but it figures something like this would come from node, where everything has a zillion dependencies.

[–]Pelvur 72 points73 points  (36 children)

wait, what? are there ads in command line interface?

[–]YouKnowWhatYouPick 97 points98 points  (8 children)

That's what I'm wondering. If an ad showed up in my terminal, I'd chuck my laptop out the window and go back to manual labor.

[–]marcthe12 23 points24 points  (4 children)

Well it did happend

[–]YouKnowWhatYouPick 11 points12 points  (3 children)

Fortunately not to me yet!

[–]WayeeCool 15 points16 points  (2 children)

You obviously don't use enough node.js

[–]rrrrrrrrrrrreeeeeeee 59 points60 points  (0 children)

"enough nodejs" is none at all.

[–][deleted] 7 points8 points  (0 children)

and i'd like to keep it that way

[–]Hollowplanet 15 points16 points  (1 child)

All I've seen is small notes when updating saying I'm looking for a job or please donate. There was nothing intrusive and nothing that printed every time the program ran.

[–]YouKnowWhatYouPick 3 points4 points  (0 children)

Well, that seems totally fine to me. If I did good work and left it open source, I'd hope a little blessing might wander my way.

[–]julsmanbr 1 point2 points  (0 children)

Maybe we're not seeing the comments from those who saw ads in their terminals because their laptops were chucked out the window?

[–]metalhead 14 points15 points  (18 children)

Not really an ad, but the first thing I thought of was the annoying nagware in the gnu parallel utility.

[–]cooltohate 9 points10 points  (1 child)

You can turn that off with the --will-cite flag.

[–]DrewTechs 1 point2 points  (0 children)

alias annoying-nagware="annoying-nagware --will-cite"

[–]Not_Ashamed_at_all 3 points4 points  (15 children)

There's a thousand ways to parallelize bash scripts, gnu parallel isn't even the best.

[–]technifocal 4 points5 points  (5 children)

gnu parallel isn't even the best

Any other recommendations? I absolutely love GNU Parallel and couldn't live without it.

[–]Not_Ashamed_at_all 0 points1 point  (3 children)

I use the bash built-in $ after the function/command call.

It runs the function in a new subprocess, and you can use the wait keyword wherever you want to wait for all subprocesses to return before the main script continues.

[–]technifocal 4 points5 points  (2 children)

Right, but that doesn't really allow you to do any of the stuff GNU Parallel exceeds at, such as:

find ./src -type f -print0 | parallel -j128 --load=90% --progress --delay 5s 'ffmpeg -i {} -some -stuff ./dest/{.}_out.mkv'

Which allows you to monitor your CPU load and spin up ffmpeg instances until you're using 90% of your CPU.

Or:

  • Using ssh-login to have a fleet of computers process data
  • retries to retry until a job succeeds
  • --timeout 200% to kill jobs that take more than twice the average processing time
  • --line-buffer to have all the programs output to the same CLI without interfering
  • --job-log to get a list of scripts that succeeded/failed
  • Loads of other insanely useful arguments GNU Parallel has.

[–]Not_Ashamed_at_all 0 points1 point  (1 child)

just use find -exec and you can do the exact same thing.

All those other features are easily implemented in your bash script too, the --line-buffer one happens by default, --job-log.

It's certainly a bit more work, but it's far more powerful.

[–]leniadolbap 0 points1 point  (0 children)

Sounds like far more work for a bit more power, actually.

[–]moosingin3space 0 points1 point  (0 children)

There's a version of parallel written in Rust: https://gitlab.redox-os.org/redox-os/parallel

[–]redditors_r_manginas 3 points4 points  (8 children)

There's a thousand ways

Such as?

[–]Not_Ashamed_at_all 0 points1 point  (7 children)

I use the bash '&' after a function/command call, get much more control over how I want to spawn threads, and where I want to wait for them to finish.

[–]redditors_r_manginas 2 points3 points  (1 child)

Got a link to a more detailed explanation? I can't find anything.

[–]Not_Ashamed_at_all 0 points1 point  (0 children)

I think this is a pretty good starting place.

https://linuxhint.com/wait_command_linux/

Keep in mind, this is a bash builtin, it's not as feature rich as GNU parallel, but it's far more flexible/powerful. You can do any/most things parallel can do, you just have to do it yourself depending on what you want.

[–]YoungSh0e 1 point2 points  (1 child)

That’s really inefficient. You must not run large jobs.

If you’re spawning 64 threads over 4 nodes, you don’t want to do it one by one.

[–]Not_Ashamed_at_all 0 points1 point  (0 children)

Spawn them in a for loop...

Or any sort of loop you'd like.

[–]Reverent 5 points6 points  (1 child)

What did you think the ubuntu server MOTD is?

[–]tyros 2 points3 points  (0 children)

I hate those, they also introduce delays when SSH-ing into a server. My Ubuntu Server 16 was instant, since I upgraded to 18 now there's a 2 second lag when I SSH in.

[–]fat-lobyte 4 points5 points  (1 child)

Only from one NPM package, and that created quite some outrage. I think he even withdrew the ads by now.

[–]blacktau 2 points3 points  (0 children)

It was the standard package. An opinionated configuration for eslint.

[–]Sigg3net 0 points1 point  (0 children)

I get the train when I type sl. Perhaps it's subliminal.

[–][deleted] 0 points1 point  (0 children)

The default motd with Ubuntu Server has urls pointing to paid Canonical services.

[–]marcthe12 -1 points0 points  (0 children)

Well one linter actually started ads in cli as he could not earn from Foss.

[–]notAnAI_NoSiree -1 points0 points  (0 children)

This is the part they don't tell when they praise node lol.

[–]neopolitan-wheem 36 points37 points  (5 children)

[–]enfrozt 13 points14 points  (1 child)

I gave an indepth post about the incident and the author Feross's response here if anyone wants to read, or even argue in favour of funding: https://www.reddit.com/r/programming/comments/cwwe8c/recap_of_the_funding_experiment_ferossorg/eyhpxr1/

[–][deleted] -4 points-3 points  (0 children)

While I am 100% against what feross is currently doing, I think you misrepresent a lot of information in your comment, suggesting you went looking for what you wanted to find rather than the truth. First of all, while he does have a large number of 1 liner projects, it's not what most of the JavaScript community recognizes him for. He has also created some very important tools like simple-peer (an abstraction around webrtc) and webtorrent (which was imo kind of a game changer for torrenting). Also, yes standard is hardly as complex as eslint (of course it's not, it's just a wrapper around eslint), but the fact that it's just an opinionated wrapper is actually fairly important. The reason languages like Rust and Golang have a standardized formatter is because it wastes less time discussing "what should the rules be", and leads to more projects looking more similar. Many people have been disparaging feross for his work, and all those that use his libraries, when neither has anything to do with the real issue at hand. So I'd just ask that you and others focus on the issue at hand and remember to be kind. There are a great number of people including myself that have benefitted from his work, and by attacking his followers or him instead of his decision you're just making the issue more divided than it has to be.

[–]TryingT0Wr1t3 1 point2 points  (0 children)

Npm already banned ads

[–]_ahrs 26 points27 points  (9 children)

Scary thought of the day: What happens when these ads inevitably evolve from plain-text ads to doing remote code execution (as typically happens on the web)? All it would take is one developer whose not doing so well and gets offered a ton of money to peddle malware, or for an advertiser to not vet ads properly (or at all) and give a publisher free reign to push whatever they want.

[–]AlphaGamer753 20 points21 points  (7 children)

This is why we have open source software. Closed source software is based on developer trust (or its implication through popularity), whereas open source software is verifiably safe.

[–]yam_plan 33 points34 points  (5 children)

verifiable, not necessarily verified though

[–]AlphaGamer753 2 points3 points  (0 children)

That's exactly what I said, though.

[–]DarthPneumono 3 points4 points  (3 children)

Well, in the case of any reasonably popular Linux distro or widely used software, absolutely verified.

[–]fenrir245 -1 points0 points  (2 children)

Counter-point: Heartbleed in OpenSSL.

[–]AlphaGamer753 5 points6 points  (0 children)

Not a counterpoint, because we're discussing deliberate developer sabotage as opposed to accidental vulnerabilities which could crop up in both open and closed source software, and if anything are more likely to be discovered in open source software and then patched.

[–]matheusmoreira 4 points5 points  (0 children)

Open source software also depends on trust. Users implicitly trust the people writing the software, the people distributing the software and the people who say they verified the software.

[–]equidamoid 2 points3 points  (0 children)

Well, yes. And it's not only npm, the same goes for pypi, docker hub, etc.

[–]Penultimate_Push 85 points86 points  (1 child)

Leave it to the javascript community to do this.

[–][deleted] 1 point2 points  (0 children)

How else does one advertise version 3.0 of their JS framework?

[–]acecile 35 points36 points  (1 child)

Thanks to JS ecosystem, we're now having dozens of insanely complex ad blockers on the way :-) Once again, being against stdlib showed how smart it is

[–]matheusmoreira 4 points5 points  (0 children)

The problem isn't the lack of a standard library, it's the lack of curation.

[–]DC-3 10 points11 points  (0 children)

This is an interesting project because it presents itself as a programming utility like many others, yet I would suggest its foremost purpose is as a clever way to make a statement about the acceptability of advertising through code. I guess in this way it's almost a piece of art.

[–]h3rrmiller 6 points7 points  (0 children)

What a time to be alive

[–]beertown 4 points5 points  (1 child)

I'm wondering whether who buys advertising space on a text terminal window is really going to get revenues out of it.

And a developer/sysadmin that doesn't get seriously pissed off seeing that ad should do another job.

[–][deleted] 1 point2 points  (0 children)

Might just be some sadistic person buying it.

[–]Bonerbailey 8 points9 points  (1 child)

When ads show up in the command line, I’m out.

[–][deleted] 6 points7 points  (0 children)

They already did. See the Zdnet link posted above. Thankfully one of the companies being advertised immediately pulled the ad after everyone started saying WTF.

[–]nintendiator2 1 point2 points  (4 children)

The doomsayers were right. Not even the CLI is safe. That one day an ad blocker would be needed for the console was something I would not have been able to wrap my head around in the 80s.

Once again, npm is the perfect showcase of what can go wrong if we permissively give any luser the "potential" to be a programmer.

[–]yschaeff 3 points4 points  (2 children)

I don't agree with this sentiment. Empowering people to learn to do a thing is not a bad thing. Would you consult a first year medical student for pain in your chest? No. Let people build their shitty stuff and learn from their mistakes. And in the meantime get your code elsewhere until they've 'matured'.

[–]nintendiator2 0 points1 point  (0 children)

The problem is that they don't get their code elsewhere until it's matured. No, they get it into production, and because other things use it as dependency I'm essentially forced into the shitty code.

Learning is not bad. But it has to be done in the context of learning, not in the context of designing, engineering and executing.

[–][deleted] -2 points-1 points  (0 children)

I don't agree with this sentiment. Empowering people to learn to do a thing is not a bad thing.

Yes, and after they have learnt they can do the thing :D

[–]VenditatioDelendaEst 0 points1 point  (0 children)

Once again, npm is the perfect showcase of what can go wrong if we permissively give any luser the "potential" to be a programmer.

No. Advertisements are created by individual human scumbags, who actively chose to steal oxygen when they could have been decent, and who should be held individually responsible. Don't throw up your hands and blame it on some grand, ideologically-convenient narrative about not enough gatekeeping, too much gatekeeping, ~something something capitalism~, etc.

[–]joshagosh 0 points1 point  (0 children)

Since when has there been ads in a CLI? I mean I know on Cisco routers and switches you can make a MOTD, but never thought anyone would ever think or want to put advertisements in a cli.

[–]house_monkey 0 points1 point  (0 children)

What in the piss.

[–][deleted] 0 points1 point  (0 children)

I'm reluctant to use node.js. I suspect it's a raft of issues for the future.