Live data from Hacker News

GNU Parallel, where have you been all my life?

alexplescan.com

161–170 of 277 posts

Re: GNU Parallel, where have you been all my life?

#162
post #147

Earlier quoted context omitted.

What you mention is the main reason why shell script is not a decent language to write long programs. It is full of inconsistencies, and since it depends on other commands, you have to learn the quirks of each command you use. Moreover, good luck if you need to debug this. Shell should only be used for small scripts that are easy to debug.

Do you recommend any good alternative when your shell program gets too large? Honest question, as I’m struggling to leave the shell environment once the program gets too large. I could use Perl, but $? and the likes get quickly out of hand. Python’s support for pipes was difficult last time I used it, but that may have changed. What would you recommend?

You've some hesitation with Perl, but if you stick at it, you'll find what you seek. It feels very 'unixy' and can achieve much the same as shell while being more consistent in its syntax. Its portability means it will work the same across environments. Plus the newest editions have niceties like modern classes and try/catch as inbuilt language features.

Sharing this because its the route I went, anything I'd have written in Bash I'd now do in Perl.

Re: GNU Parallel, where have you been all my life?

#163
post #60

Earlier quoted context omitted.

If you're a startup and relicensing previously open source code under a restrictive license or doing other shady things you'll get plenty of defenders to line up to say 'hey, they have to make a living somehow', but if a single guy tries to make a living via a simple message in a widely used program all hell breaks loose. What gives?

Notably, GNU Parallel did not relicense; it's still GPL. The author wants to have his cake (gain the popularity benefits of being a GPL-licensed GNU tool, be able to carpetbomb Stack Overflow with "use GNU Parallel" answers, etc.) and eat it too (get people to cite or pay him as a condition of using the product). Since this isn't possible (GPL doesn't allow additional restrictions), but the author still really wants…

Shouldn't gnu put a stop to this?

Re: GNU Parallel, where have you been all my life?

#164
post #147

Earlier quoted context omitted.

What you mention is the main reason why shell script is not a decent language to write long programs. It is full of inconsistencies, and since it depends on other commands, you have to learn the quirks of each command you use. Moreover, good luck if you need to debug this. Shell should only be used for small scripts that are easy to debug.

Do you recommend any good alternative when your shell program gets too large? Honest question, as I’m struggling to leave the shell environment once the program gets too large. I could use Perl, but $? and the likes get quickly out of hand. Python’s support for pipes was difficult last time I used it, but that may have changed. What would you recommend?

If it's too large, then just write normal Python code. It'll be a lot longer than the equivalent shell-like script, but you'll gain it back in maintenance effort, debugabillity, and robustness.

Re: GNU Parallel, where have you been all my life?

#165

Earlier quoted context omitted.

It's disingenuous to say that Richard Stallman is a "random person" regarding the GPL.

But legally, does intention matter in either copyright or contract law? And specially someone who is neither licensee or licensor?

I’m not sure I understand what you’re asking. Why is the intention of the author of the license in question?

In this case, Stallman simply clarified that Parallel’s notice did not count as a legal requirement and does not conflict with the GPL. His opinion wasn’t necessary, but since he wrote the license, it is authoritative. In this case, the question wasn’t brought to court, it was simply a clarifying discussion, and thus his intention did affect how things go in practice.

> And specially someone who is neither licensee or licensor?

Also wasn’t Stallman effectively the licensor or representing the licensor at the time, as president of FSF, head of the GNU project, and author of the GPL?

Re: GNU Parallel, where have you been all my life?

#166
post #35

Another reminder that you shouldn't use Bash to write scripts. E.g. in Python this would all be very easy to do. Just start a bunch of threads and e.g. invoke subprocess.run() from them.

start a bunch of threads and e.g. invoke subprocess.run() from them

Done that many, many times and honestly combining python with parallel is in many cases the best way to go. Write your python script to be as fast as possible on one core and then use parallel to run it on all your cores. This has the added advantage that you can go from running on all the cores on your machine to running on all the cores on a 100 machine cluster by just changing a couple of lines of code.

Re: GNU Parallel, where have you been all my life?

#167

Earlier quoted context omitted.

It's disingenuous to say that Richard Stallman is a "random person" regarding the GPL.

“Arbitrary” is probably a better description than “random” here.

I still disagree with arbitrary, just less strongly.

Whether his opinion on GPL is relevant, or if it is, how important it is, is up for debate. But I still don’t think it’s “based on a random choice or personal whim, rather than any reason or system”.

Re: GNU Parallel, where have you been all my life?

#168
post #78
post #68

Earlier quoted context omitted.

> And calling that GPL? You can add any message you want into your GPL program. Also, a GPL program does not have to be free. This has nothing to do with the GPL. You can say in your program that 'by using this software you agree that you're a a cat' and license it under the GPL. That does not mean the GPL relates to cats in any way.

Can you back that up? If I put the GPL in my software and add a file next to it that says "Also you can't use this software if you make more than $100k/year", I've pretty clearly added an additional clause that's incompatible with the GPL.

If I say "Please don't use this software if you make more than $100k/year" I haven't added an additional clause, just communicated a desire. I'm as annoyed by parallel's citation nag (particularly since I don't plan on ever publishing a scientific paper), but it does not impose extra requirements.

Re: GNU Parallel, where have you been all my life?

#169
post #153
post #82

Earlier quoted context omitted.

The message isn't part of the license, and it's phrased in a way that wouldn't be binding if it were. It says "please cite" and "feel free to not cite if you pay". It doesn't say "must cite" or "you may only not cite if you pay". IANAL, but it doesn't seem like it would interact with the GPL at all. So the worst that could be said is that the implementation is annoying or in poor taste.

Software cannot be distributed with a clickwrap agreement under the GPL. Requiring the user to affirmatively agree to a contract is a clickwrap agreement even if the terms are non-monetary. The old “you are making a second agreement, not the one the software is distributed under” approach. Notionally the GPL allows you to disregard this but it may or may not be binding depending on your jurisdiction, and it’s certain…

It's not a clickwrap agreement, since the user doesn't agree to anything:

   To silence this citation notice: run 'parallel --citation' once.
Post reply on HN