25

I have recently put together a package in response to a question I posted on Importing HDF5 with compound data and I want to make it available for use and collaboration. I have two questions (there maybe others I should be asking so feel free to point them out):

1) Where to post the package?

Obviously posting the package here in an answer, or on a website in a conical list of packages, or on my own website will facilitate access to the package, but not collaboration. A hosted source code repository like github would facilitate both access and collaboration. Does any one have any recommendations for a hosted source code repository for Mathematica work? Bonus if they have the ability to execute MUnit tests as part of the commit/check in process.

2) Which software license should the work be licensed under?

  • I want to protect the collaborators from liability.
  • I want to encourage collaboration.
  • I want the collaborators to be recognized for their contributions.
  • I do not want to exclude anyone from using the work.
  • I want to prevent the work from being copied and charged for.

Is there a software license friendly to Mathematica work?

migrated from mathematica.stackexchange.com Apr 13 '12 at 17:18

This question came from our site for users of Wolfram Mathematica.

  • @mmorris I think this is a good question but I also think it belongs on Meta. As to your concern as to how many people use Meta, I guess we'll find out. – Mr.Wizard Apr 13 '12 at 17:20
  • 2
    For question 2, if you use code significantly from this site, I think you should license it under a license that is compatible with CC-BY-SA, because that's what the contents of this site are licensed under. If it's code you've written and want to make it available, I guess you can choose what you want, but by posting code here, it automatically becomes CC-BY-SA. So if you want to retain your chosen license, you should probably just describe it, give a brief overview/examples and link to the code. But, I'm not a lawyer, nor have I ever licensed anything out, so I'm not posting it as an answer. – rm -rf Apr 13 '12 at 17:32
  • 3
    In addition to the excellent answer by @Oleksandr R., just want to mention this question, in the answer to which I did recommend GitHub, and also that, when I was researching these issues for my Mathematica code formatter, I ended up with an MIT license, which is both simple and effective, and free of the GPL limitations. – Leonid Shifrin Apr 14 '12 at 16:57
  • @LeonidShifrin Thanks for posting that. I missed it completely as I did not search meta, go figure. – mmorris Apr 14 '12 at 19:00
21

I'm just going to address the second part of your question about licences. Incidentally, I will say that this having been moved to Meta has provided an incentive for me to answer, since it's appropriate here to give personal views and opinions, whereas on Main it's not.

Probably by far the best known licence for open source work is the GNU GPL, and the fact that it's so well-known undoubtedly contributes to its continuing popularity. However, I consider this unfortunate in some ways, because of its (quite deliberate) almost total incompatibility with any other licence and expansive definitions of "linking" and "combined works".

For example, if one program produces any output (e.g., a file on disk) that another program reads and processes in an automated way, these programs are considered linked for the purposes of the GPL. Obviously, this is highly divergent from the ordinary concept of linking in software engineering (which is precisely the LGPL's reason for being, in that it reflects the typical meaning rather than this broader sense). Furthermore, if these two programs are distributed together in a non-incidental way (which by itself results in them constituting a "combined work"), if either one of them is licensed under the GPL, then the combined work must be also.

The net effect of these factors is to render the GPL highly inconvenient to use for any project that incorporates, even indirectly, commercial/closed-source ("proprietary") code; this certainly applies to Mathematica, for which the interpreter, runtime environment, and standard library all form part of a closed-source commercial product that is implicitly required by all Mathematica-language code. In my opinion, the fact that WRI asserts that the language itself is proprietary also calls into question whether the GPL can be applicable to any Mathematica project due to its absolute exclusivity toward other licences. The LGPL doesn't really help us here except if we limit ourselves to distributing LibraryLink programs (in source form only, as the LibraryLink headers aren't GPL-compatible). Mathematica does incorporate some libraries licensed under the LGPL--for example, GMP--but this is of little consequence to us as users seeking to distribute our own code. The legal issues are overall so problematic that personally I would be willing to contribute code to any GPL or LGPL-licensed Mathematica project only in the narrowest of circumstances.

So, having argued that we shouldn't use the GPL or LGPL if we wish to avoid making things unduly difficult for ourselves and other contributors to our projects, what options are still open to us? For this I think the OSSCC's licence list is a very useful resource. Their suggestions are:

  • If you want a licence with strong copyleft provisions, choose the CDDL
  • If you want a permissive licence, use the Apache License 2.0

Of these, I would personally prefer the latter, but I think the choice between copyleft and permissive is mainly guided by one's own political views, so legitimate disagreement is possible.

One caveat: the Apache License is long, and this level of legal detail might put some potential contributors (or even users) off. The main difference between the Apache License and the much shorter MIT License or New (2-clause) BSD License is that the former requires contributors to grant a licence to any patent rights they may have in their contributions, so as to avoid patent trolling. Where this is not an issue--for example, in code you've written yourself and just want to distribute to the community--I would probably prefer to use one of the shorter permissive licences as a matter of convenience.

Edit

Sjoerd asks:

What about SE's license?

In my opinion, while generally appropriate for the site, this is also highly problematic as far as software packages are concerned. The Creative Commons Attribution-ShareAlike 3.0 licence is a copyleft licence intended for literary and artistic works, not computer code, and as a result makes the assumptions that:

  • Licensed works have a single Original Author, and that if adaptations are made then it is practical to credit or not credit each of the contributors in relation to their contributions according to their wishes. For software with multiple contributors who each build on each other's contributions, it can become impossible after a number of revisions have been made to determine who is the legitimate Original Author for each aspect of the project (however "aspect" should be defined). This is in fact the central problem of the original (3-clause) BSD License, which prompted the creation of the New BSD License by removing the "endorsement" clause.
  • The qualitative nature of a licensed work is not substantially changed by any adaptations. For example, while it would certainly violate the spirit of the licence, it's somewhat unclear whether it would be technically admissible to take a work licensed under CC-by-SA 3.0 and "adapt" it as part of a machine-locked, Encoded commercial package, provided that the latter (now rather meaninglessly) adopted the same licence. As copyleft is of little value for software without availability guarantees for the source code, the appropriateness of this licence is called into question.
  • The licensed work is purely artistic, not the embodiment of an invention, and therefore patents cannot apply to it. This leaves open the possibility of patent trolling.

Other miscellaneous problems in attempting to interpret the CC-by-SA 3.0 licence in the context of computer code also arise from the fact that the licence is clearly not intended for this purpose. Therefore, my suggestion would be not to use it for software packages, and if you want to use code presented on this site in a package, to contact the author and ask whether they'll grant you a licence under alternative terms more suitable for the purpose. (I added a notice to my profile specifying my licensing terms; perhaps it would be helpful if others did the same.)

  • Clap clap! A very well reasoned answer. What about SE's license? – Sjoerd C. de Vries Apr 13 '12 at 20:56
  • @Sjoerd I've just added some discussion about that in an edit. – Oleksandr R. Apr 14 '12 at 2:24
  • You obviously know a lot about this topic. So, one last question to bug you with: Can you publish code on this site (which uses the CC license) while still claiming your own license as you do in your profile? Doesn't the act of publishing here override any claims you make? – Sjoerd C. de Vries Apr 14 '12 at 6:55
  • @Sjoerd Well, I'm not a lawyer (as they say; not that it really matters as none of these licences has been tested in court anyway) so the above should be understood as just my opinion. Nonetheless, that's an easy one: the choice of licensing terms is reserved to the copyright holder. Since by posting here we grant StackExchange a licence to our work but don't actually sign over our copyright, we're free to relicense it as we wish. – Oleksandr R. Apr 14 '12 at 12:40
  • @Sjoerd However, per the site terms and conditions, we're obliged to provide links to any posts here from which content (not limited to code) was used. While this may be a bit questionable in the case of content you yourself have posted or that's been licensed to you under alternative terms, it doesn't seem like a particularly onerous or unreasonable request in return for StackExchange hosting our site, given that they have to protect their own interests too. They're within their rights to disable our accounts if we don't comply, so it makes sense to do so. – Oleksandr R. Apr 14 '12 at 13:11
  • 1
    @OleksandrR.: Can you please give a link for evidence to your claim that a GPLed program producing output which another program parses is considered linking under the GPL? Because that's opposite to what I think is the case. As long as the output doesn't incorporate GPLed stuff (like, e.g., the output of bison), writing a file with a GPLed program and then reading it with a non-GPLed program is not prohibited. Otherwise I couldn't see how e.g. code compiled with gcc could ever be proprietary (the support libraries gcc links in have special exceptions, but the compiler itself doesn't). – celtschk Jun 6 '12 at 22:38
  • @celtschk: I saw this interpretation of linking given by an FSF lawyer in response to a question posted on a mailing list. I can't find the link to this post at the moment but will keep trying as I agree it is a surprising conclusion. As for the situation you mention: from my understanding this is not considered linking because code compiled with gcc need not require or otherwise interact with gcc at all after the fact. It's the fact of automated interaction that's taken to determine whether program are linked, not the specific technical mechanism by which it's achieved. – Oleksandr R. Jun 7 '12 at 16:52
  • 1
    This FAQ item says that if the interpreter is under GPL, then the interpreted program does not not need to be under the GPL (we have the inverse situation actually: the program is under GPL and the interpreter is not). This FAQ item suggests that if two programs run as separate processes, then they are not considered "linked". (It doesn't say anything about the means of communication, but sure there must be a limit on that: can I connect to a GPL'd webserver with a ... – Szabolcs Jun 14 '12 at 10:26
  • 1
    ... non-GPL web browser? Also, any plugin must communicate with the host application in some way). I am really not knowledgeable about these things, but that FAQ creates the impression that "linking" should be understood as "run in the same process". – Szabolcs Jun 14 '12 at 10:28
  • @Szabolcs this is a very interesting example; actually the situation of a GPL web server and a non-GPL web browser has been hotly debated. Unfortunately I still didn't find the post I was looking for, but it's worth noting that many attorneys disagree with the FSF here, saying that there's no principle in copyright law by which this could apply. Two of the most interesting articles on this topic are here and here. – Oleksandr R. Jun 16 '12 at 0:28
  • @Szabolcs The above two are, however, strictly applicable to GPLv2 only; GPLv3 is to a large extent legally untested, but to my eyes it looks much more solid than GPLv2. To the extent, even, that some dispute whether documents written using GPL fonts can be released except under the GPL; see e.g. here. It's perhaps interesting that Linus Torvalds and Theodore Ts'o have both vocally come out in opposition to the FSF here--but it doesn't mean that the FSF's interpretation is invalid; just that many don't agree with it. – Oleksandr R. Jun 16 '12 at 0:34
  • @Szabolcs Finally I will just add that, unfortunately, many of the GNU FAQs on that page are legally questionable if not invalid altogether. Most of them are (it would seem) simply Richard Stallman's personal opinion, and while they might in theory have some bearing on how the GPL is meant to be interpreted, they are not based on any accepted legal principle and IMO should be ignored if you want to take the GPL seriously as a legal document. – Oleksandr R. Jun 16 '12 at 0:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .