

On Open-Sourcing Libraries - couac
http://williamdurand.fr/2013/07/04/on-open-sourcing-libraries/

======
antoncohen
I would like to add that when open sourcing a library, meaning software
designed to be included within or used by other applications, please don't
license it under the GPL. Of course you can license it under whatever you
want, it's your code, but you need to understand the consequences. If the
library is GPL it can only be used by other GPL applications (if the
application is distributed), which excludes major open source projects like
Rails (MIT) and Django (BSD). It seriously limits amount of people that can
use your library, and hopefully you are open sourcing a library because you
want to help as many people as possible.

Even the LGPL doesn't make sense for interpreted languages or compiled
languages that don't link like C. The wording of the LGPL is pretty ambiguous
when it comes to languages that 'include' libraries into their code instead of
linking against complied libraries. FSF argues it's not ambiguous [1], but
that fact that they even have to make that argument proves it is. As the
original author of Twisted Python wrote "It would be a halfway accurate
statement that I selected the LGPL exactly because it doesn't make any sense."
[2] Twisted is now MIT licensed

[1] [https://www.gnu.org/licenses/lgpl-
java.html](https://www.gnu.org/licenses/lgpl-java.html)

[2] [https://twistedmatrix.com/pipermail/twisted-
python/2004-May/...](https://twistedmatrix.com/pipermail/twisted-
python/2004-May/007946.html)

~~~
shizzy0
> It seriously limits amount of people that can use your library

Yes, it does seriously limit the amount of people that can use your library--
without giving anything back.

> hopefully you are open sourcing a library because you want to help as many
> people as possible.

Help as many people as possible do what? Get rich by composing together a
bunch of liberally licensed software to do a task and then close sourcing it.
No, thank you.

I see licensing as a Hawk-Dove-Retaliator game[1] for modeling resource
competition. Each kind behaves differently: The Dove never fights and always
flees. The Hawk always attacks and never flees. The Retaliator only attacks if
attacked. Pay off matrices describe in detail how well each kind does against
the other. Dove vs. Dove both do well; they share. Hawk vs. Dove, the Hawk
wins everything. Hawk vs. Hawk, the beat each other up; both lose. Retaliator
vs. Dove, just like Dove vs. Dove. Retaliator vs. Hawk, like Hawk vs. Hawk.

My analogy is this: The BSD licensor is a Dove, the proprietary licensor is a
Hawk, and the GPL licensor is a Retaliator. If you want to be nice but make
yourself vulnerable to exploitation, be a Dove; Doves like Doves, and Hawks
love Doves--it's popular. If you want to get rich, then exploit all the Doves
and be a Hawk; Doves worked hard, so you don't have to. If you want to have
your work respected rather than exploited, be a Retaliator: happy to cooperate
with those who cooperate, but willing to punish those who defect and refuse to
cooperate. Which of these strategies is stable in the long-term? See the links
below for a more detailed answer, but Doves certainly aren't.

Doves may enjoy a wonderful period of peace and cooperation, but they're so
easily exploited that it makes one wonder how long it will last. In a
population of Doves, it's best to be a Hawk. However, a population of pure
Hawks does terribly. A population of Retaliators though is nearly immune from
invasion.

Note: There are many salient differences between licensing and this animal
behavior model. I don't contend that it is a perfect analogy, but I think it
is worthwhile for considering long term trends.

[1]: [http://en.wikipedia.org/wiki/Chicken_(game)#Hawk-
Dove](http://en.wikipedia.org/wiki/Chicken_\(game\)#Hawk-Dove) [1]:
[http://www.oocities.org/hawkdovegame/strategies.htm](http://www.oocities.org/hawkdovegame/strategies.htm)

~~~
tjr
See also:
[http://zedshaw.com/essays/why_i_gpl.html](http://zedshaw.com/essays/why_i_gpl.html)

------
eksith
I've been racking my brain trying to come up with a basic, concise readme to
include with my code as well as a cabin design I've been working on. At first
glance, these are wildly differing things, so one license type E.G. creative
commons had too many options.

Finally, I came up with one single readme file I can include in almost all my
work (except where I have to combine other stuff under different licenses).
It's basically a variant of the ISC license.

Feel free to use this for whatever...

    
    
      Introduction...
      Things your whatchamacallit does
      
      ___________________________________________________________________________
      README
      
      
      Important stuff about the project.
      Requirements, preconditions, defaults etc...
      
      ___________________________________________________________________________
      CONTACT
      
      Twitter	:	@eksith
      
      Website	:	http://eksith.com
      
      Email		:	Eksith Rodrigo <reksith at gmail dot com>
      ___________________________________________________________________________
      COPYING / LICENSE
      
      The contents of this package are licensed under the following unless 
      otherwise noted.
      
      
      Copyright (c) $YEAR, Eksith Rodrigo
      
      
      Sources, libraries, binaries, diagrams and/or images and documentation 
      included with this package are hereby referred to as "materials".
      
      
      Permission to use, copy, modify, and/or distribute these materials for 
      any purpose with or without fee is hereby granted, provided that the 
      above copyright notice and this permission notice be included in all copies 
      in an applicable and appropriate format.
      
      
      THESE MATERIALS ARE PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 
      WARRANTIES WITH REGARD TO THESE MATERIALS INCLUDING ALL IMPLIED WARRANTIES 
      OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 
      ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 
      WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 
      ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 
      IN CONNECTION WITH THE USE OR PERFORMANCE OF THESE MATERIALS.
      
      
      END.

------
mwfunk
I would add, please use a known and widely-used license (IMO, preferably a
2-clause BSDL variant or LGPLv2, depending on your attitude towards derived
works). Don't make up your own or just state that it's public domain. Public
domain is actually not a well-defined concept internationally, and means
different things in different countries.

~~~
yoklov
[http://creativecommons.org/choose/zero/](http://creativecommons.org/choose/zero/)
is a good alternative/method to releasing into the public domain, and is (to
my knowledge, IANAL) unambiguous internationally.

~~~
kibibu
[http://www.wtfpl.net/](http://www.wtfpl.net/) is pretty cool too, if only
because any court transcripts involving disputes would be pretty hilarious.

------
alexchamberlain
The most important thing on that list is the Licence. No licence and most
people can't use it.

~~~
freework
Its becoming less of an issue as more and more as software migrates to being
"as a service". A webapp is not distributed, so the license doesn't matter at
all.

~~~
alexchamberlain
Errrr I present AGPL

------
zalew
he didn't mention the most important - write the docs
[http://www.youtube.com/watch?feature=player_embedded&v=KEakc...](http://www.youtube.com/watch?feature=player_embedded&v=KEakc8r4r7M)

------
jorgecastillo
I will make a small off-topic question. I really like the ISC license but for
a small snippet of code I think that it's still to big. I choped some parts
and got it to this:

Copyright (c) 4-digit year, Company or Person's Name

Permission to use, copy, modify, and/or distribute this software for any
purpose is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE.

Would this be a valid open source license?

I am not using this license for anything big. Most of my code is pretty much
useless and for the code I consider more useful I use the ISC license.

~~~
rogerbinns
It is generally a bad idea to make your own, since you won't be aware of
international issues. Similarly since your license is non-standard, anyone
using the code now has to a do legal review to make sure things are ok,
instead of looking in their list of standard approved ones.

Pick one from the top of
[http://opensource.org/licenses](http://opensource.org/licenses) At the bottom
of my LICENSE file I add "Alternatively you may strike the license above and
use it under any OSI approved open source license such as those listed at
[http://opensource.org/licenses/alphabetical"](http://opensource.org/licenses/alphabetical")

See also
[http://creativecommons.org/choose/](http://creativecommons.org/choose/)
although they are rarely used for code.

------
_sabe_
I think it's interesting that in this time of fancy collaborative tools like
github, the trend no longer seems to be collaboration but to reinvent
everything as a "one man show". And it becomes apparent with new technologies
like Go and redis where there are like 10 different implementations of the
same database libraries at any given time, but they are all gone within a
month...

~~~
couac
Yes, because things are easier than ever for people that want to contribute
but also for those who want to create new projects. Maybe GitHub could suggest
existing projects to contribute on before creating a new repository :)

------
dakimov
Platforms.

