7 ms·
Kudos for giving the gist of the idea in a piece of code: def public_license (paid_available, commercial, contributing): if paid_available: i
by nine_k 9y ago
Kudos for giving the gist of the idea in a piece of code:
def public_license (paid_available, commercial, contributing):
if paid_available:
if commercial:
if contributing:
return 'contribution-enabling, BSD-like license'
else:
return '90-day free trial, then you have to buy a license'
else:
return 'noncommercial, BSD-like license'
else
return 'standard, Open Source, two-clause BSD'
- kemitchell 9y agoI've ended up doing the same for the other L0 public licensing option, L0-R, a stronger-than-strong copyleft license, in the Open Source Initiative license review thread. That license is still being revised, so I won't dump the pseudocode here. But pseudocode's been very useful in that discussion, too. All the same, I don't quite feel like kudos are appropriate. I'd like to think I'm capable of writing the license terms plainly enough that regular old English speakers can understand them. But experience has taught me that I should translate to code, especially when I'm patching an existing license, rather than writing from scratch, as with https://github.com/berneout/berneout-license-kit https://github.com/berneout/berneout-license-kit (_very experimental_) FWIW, I often start drafting legal code based on more structured pseudocode. Most lawyers I know who do a lot of drafting have some kind of personal boolean logic shorthand.
- nine_k 9y agoThe pseudo code expresses the gist very succinctly, hence kudos. It's like an abstract of a scientific article. Not all important details, but the few key things.
- nobodyorother 9y agoThe trouble with these code snippets is that they condense very complex and squishy social structures into what incorrectly appears to be simple binary decisions. Creative Commons spent years defining what "commercial" means. It's obviously a commercial use if I'm using your items to make money... But, what if I'm a charity? What if it's hosted on a website that runs banner ads? What if I don't turn a profit? This was a years-long discussion that you can review https://wiki.creativecommons.org/wiki/NonCommercial https://wiki.creativecommons.org/wiki/NonCommercial Code emphasizes what consensus we need to come to, the consensus that those complex legal documents define. For example, that's part of why the GPL is so long, it's specific.
- kemitchell 9y agoL0-NC uses CC's language defining "commercial".
- TheCoelacanth 9y agoAlso, how do you define "contributing"? Is one commit enough to get perpetual use? Do I need one commit a year/month? I can't think of a single definition that wouldn't either allow users who aren't making a significant contribution to cheat or screw over some legitimate contributors.
- hk__2 9y agoAgreed; that was helpful in understanding how it works. However the large imbricated `if`s make it harder to understand than a refactored version with early return's: def public_license (paid_available, commercial, contributing): if not paid_available: return 'standard, Open Source, two-clause BSD' if not commercial: return 'noncommercial, BSD-like license' if contributing: return 'contribution-enabling, BSD-like license' return '90-day free trial, then you have to buy a license'
- kemitchell 9y agoThanks for this. I did, actually, laugh out loud. Pity me, brother. For functional programming ruined my young mind. And then I went to law school ;-P
- c-smile 9y agoUnfortunately "contribution" is quite hard to formalize. As they say in Russian "три яблока это куча или нет?". (Loose translation: is three apples a lot of apples?) It depends...
- kemitchell 9y agoWe need a День контрибютора. Then everyone will understand...
- shabbyrobe 9y agoWhat if "paid_available == False" the first time, but later, "paid_available == True"? Is the "standard, Open Source, two-clause BSD" license that applies at first invalidated?