HackerTrans
TopNewTrendsCommentsPastAskShowJobs

MainJane

no profile record

comments

MainJane
·4 वर्ष पहले·discuss
If you feel I am "moving the goalposts" why not just prove your original case? If you are spending 5 minutes on reading the source code, why not instead spend them on proving your original assertion is correct? You can then let the readers decide if they feel I "move the goalposts".

I included the example:

    yes 1000000 | parallel -kj10 "echo 'This  is  double  spaced  '{#}; seq {}" | pv >/dev/null
to give you some fixed "goalposts" to aim for: Provide a solution that gives the same output byte for byte.

Also you do not seem to get the point about the amount of data. I regularly have output from a single job that is bigger than RAM, but rarely have output from a single job that would fill /tmp. However, the total combined output from all the jobs will often take up more space than /tmp.

In numbers: RAM=32 GB, /tmp=400 GB, a single job=33 GB, number of jobs=1000, jobs in parallel=8.

In other words: Running all jobs and saving the outputs into files before outputting data will not be useful for me. If you want to use FIFOs I really cannot see how you can deal with output that is bigger than RAM, unless you mix output from different jobs - which again would not be useful to me. But prove me wrong by spending 5 minutes on building the solution.

As for your example:

    yes 2000000000 | parallel seq | pv > /dev/null
How would you design this, if output from different jobs are not allowed to mix?

If they are allowed to mix paralel gives you:

    # bytes are allowed to mix
    yes 2000000000 | parallel -u seq | pv > /dev/null
    # only full lines are allowed to mix
    yes 2000000000 | parallel --lb seq | pv > /dev/null
none of these use space in /tmp.

I sit back with the feeling you are willing to spend hours complaining, but not 5 minutes on proving your assertion that it can be done "easy-ish".

Prove me wrong: Spend 5 minutes on the task you believed was "easy-ish".

If it cannot be done in 5 minutes, be brave enough to admit you were wrong.
MainJane
·4 वर्ष पहले·discuss
Honestly, I fail to see the problem, if I had to run `ls --no-awesome-ls-pro-upgrade-msg` once when I installed it the first time. And if I did not like it, I could use one of the alternatives to `ls` or build my own.

In LibreOffice I have to click a "Don't show tip of the day again" every time I install it on an new machine, and personally I have no problem with that. If I had, I would use something else.

Zsh asks me to configure it, first time I run it. I find that slightly annoying, but not to the extend that I would even consider complaining, sending a patch, or using an alternative.

But I assume you are aware that your comparison is really not valid: Parellel is not limited in features - you do not get extra features by paying/citing. What you are doing is keeping it alive.

Also, if you really do not like the notice, why not just pay for it? Are you opposed to paying for free software? And if so, how do you suggest developers of free software make a living? And why are you not actively doing that for GNU Parallel, which you clearly have so strong opinions on, that you are willing to spend time complaining but not willing to ignore (and use another tool)?
MainJane
·4 वर्ष पहले·discuss
> This is an unreasonable standard when you do not know in advance how big the output is.

Why is that unreasonable?

Let us say a single job outputs 10% of the free space. As long as you run fewer than 10 jobs in parallel, GNU paralel can run forever, because it spits out the output when a job is done and then frees up the space for this job, while starting the next one.

A simple example:

    yes 1000000 | parallel -j10 seq | pv >/dev/null
On my laptop I get 600 MB/s which would fill /tmp in a few minutes, and it does not.

When dealing with big data it is not uncommon that the total data piped between commands is way larger than the free space on /tmp (which is typically fast, where as free space on $HOME is slow - thus setting $TMPDIR to $HOME/tmp may slow down your job drastically).

If you only have 5 minutes, I hope you will use them on providing actual code to support your claim, that "The comparison is not very fair to modern day xargs."

If it takes longer than 5 minutes to code, I would say your use of "easy-ish" is unwarranted.

You leave me with the feeling that you have not thought this through and that the reason why you do not provide any code is because you are now realizing you are wrong, but you do not have the guts to admit so.

Prove me wrong by posting the code. It should be "easy-ish" :)

You can use this as the test case to implement:

    yes 1000000 | parallel -kj10 "echo 'This  is  double  spaced  '{#}; seq {}" | pv >/dev/null
MainJane
·4 वर्ष पहले·discuss
> The comparison is not very fair to modern day xargs.

I am curious how you come to that conclusion.

> `nproc` is a relatively standard utility (coreutils). So, xargs -P$(nproc) gets you core (or core-proportional) parallelism.

I follow you on this point. A bit harder on remote systems, but definitely doable.

> Grouping output/Making a safe parallel grep is also easy-ish with `--process-slot-var=slot` and sending to `tmpOut.$slot`.

I tried spending 5 minutes on coding this, but the details seem to be very hard to get right: composed commands, grouping stderr, combined with not leaving tmp files behind if killed and allowing for the total output to be bigger than the free space on /tmp. I could not do it.

Could you consider spending 5 minutes on showing in code how you would do it?

> Jobs on remote computers can be done similarly with any kind of `arrayVar[$slot]` setup where `arrayVar` has a bunch of `ssh` targets, possibly duplicates if you want to run >1 job per host. (In pure POSIX sh you could use eval and $1, $2 positional args with shell arithmetic..)

This one seemed even harder to me: It was completely unclear how you would make sure that a given number of jobs were constantly running. And how would you need to quote data, so an eval would not cause "foo space space bar" turn into "foo space bar". And how you would kill remote jobs, if the local script was killed.

If you believe this is simple, could you spend 5 minutes on showing the rest of us how you would do it in actual working code? Because it seems the devil is really in the detail.

> Last I looked at the source for GNU parallel it looked like mountains upon mountains of Perl I would rather not depend upon, personally, but to each his own.

Personally, I would take production tested code over home-made untested code any day - no matter the language in which it was written.
MainJane
·4 वर्ष पहले·discuss
Would it not be more fruitful addressing the hard issue: Funding.

https://git.savannah.gnu.org/cgit/parallel.git/tree/doc/cita...

I think many free software developers would rejoice if you cracked that problem.
MainJane
·4 वर्ष पहले·discuss
I think that is the right thing to do: Don't like it? Don't use it.

Also: https://git.savannah.gnu.org/cgit/parallel.git/tree/doc/cita...
MainJane
·4 वर्ष पहले·discuss
I was curious how much breakage GNU Parallel has suffered. So I fetched all versions (in parallel) and ran:

    parallel -k --tag --argsep -- {} echo ::: 1 -- parallel-*
Every version since 20120622 work (except for 20121022). That is code which is almost 10 years old.
MainJane
·4 वर्ष पहले·discuss
Also try:

    parallel --tmux ...
MainJane
·4 वर्ष पहले·discuss


    cat hosts.txt | parallel --quote --timeout=10 ssh {} 'echo {} $(md5sum ~/.config/file)'
Also try:

    parallel --slf hosts.txt --timeout=10 --nonall --tag md5sum .config/file
MainJane
·4 वर्ष पहले·discuss
> I don't care what GNU thinks, but it's simply not scalable.

How so?

A lot of software requires you to configure it before the first run, and we regard that as scalable.

A lot of software requires you to pay for it before the first run (most Microsoft server software comes to mind), yet we regard that as scalable. You can also pay for gnu paralell: https://git.savannah.gnu.org/cgit/parallel.git/tree/doc/cita...

Is it because you insist that you get software for free (zero cost in gnu speak)? Because that is really not what the free software movement is all about.
MainJane
·4 वर्ष पहले·discuss
I still remember when those were not of the "OK, don't show this again" type, so you could not simply stop them first after the first run.
MainJane
·4 वर्ष पहले·discuss
> If you're not describing an experiment or system that uses GNU parallel as one of its key components then it makes no sense to cite it any more than it does to cite any other utility.

GNU Parallel agrees with you, but also gives you a test of when to regard it as a "key component" (as you put it):

https://git.savannah.gnu.org/cgit/parallel.git/tree/doc/cita...

> If you feel the benefit from using GNU Parallel is too small to warrant a citation, then prove that by simply using another tool. [...] If it is too much work replacing the use of GNU Parallel, then it is a good indication that the contribution to the research is big enough to warrant a citation.
MainJane
·5 वर्ष पहले·discuss
git-bisect is nice if you are looking for a git commit.

If you are looking for a limit or the failing part of a file have a look at: https://gitlab.com/ole.tange/tangetools/-/tree/master/find-f...
MainJane
·5 वर्ष पहले·discuss
> Try using GNU parallel to sort a list of numbers, [...] – it's not possible,

Yet it clearly is possible, so your blanket statement is clearly wrong.

`parsort` a simple wrapper, and this really goes for many uses of GNU Parallel: You need to prepare your data for the parallel step and post-process the output.

Maybe you originally meant to say: "Only for those processes, where you can preprocess the input and post-process the outputs."
MainJane
·5 वर्ष पहले·discuss
> Try using GNU parallel to sort a list of numbers,

`parsort` is part of GNU Parallel.
MainJane
·5 वर्ष पहले·discuss
In your examples you fail to put 'xargs -P' in the middle of a pipeline: You only put it at the end.

In other words:

  some command | xargs -P other command | third command
This is useful if 'other command' is slow. If you buffer on disk, you need to clean up after each task: Maybe there is not enough free disk space to buffer the output of all tasks.

UNIX is great in that you can pipe commands together, but due to the interleaving issue 'xargs -P' fails here. It does not live up to the UNIX philosophy. Which is probably why you unconsciously only use it at the end of a pipeline.

You can find a different counterexample on https://unix.stackexchange.com/questions/405552/using-xargs-... I will be impressed if you can implement that using xargs. Especially if you can make it more clean than the paralel version.
MainJane
·5 वर्ष पहले·discuss
Have you read the FAQ?

https://git.savannah.gnu.org/cgit/parallel.git/tree/doc/cita...
MainJane
·5 वर्ष पहले·discuss
Your `do_one`:

  * does not buffer stderr
  * does not check if the disk is full for a period of time during a task (thus risking incomplete output)
  * does not clean up, if killed
  * does not work correctly if task_with_stdout is a composed command
Given that GNU Parallel is a drop-in replacement for xargs, I am curious why you find it a 'weirdo interface'.
MainJane
·5 वर्ष पहले·discuss
> anything that is more than a single script

... which is exactly what GNU Parallel is. Your concern is even mentioned in the design documentation: https://www.gnu.org/software/parallel/parallel_design.html
MainJane
·5 वर्ष पहले·discuss
It is documented in the GNU Parallel documentation: https://www.gnu.org/software/parallel/parallel_alternatives....

If you seriously believe you can implement everything using xargs, then this (contrived) example is for you: https://unix.stackexchange.com/questions/405552/using-xargs-...

Newer versions include 'parset' which can set shell variables in parallel, which is useful if you want to 'map' values from one array to another.