I want to share the code of a research project, for academic purposes, in Bitbucket and Matlab's FileExchange.
The code is in both Matlab and Mathematica, and I want to restrict its use for commercial purposes. I don't know if I can use Affero GPL for this, as both Matlab and Mathematica are commercial software.
This is the most direct response from the terms of GPLv3 that I've found:
If a programming language interpreter has a license that is incompatible with the GPL, can I run GPL-covered programs on it? (#InterpreterIncompat)
When the interpreter just interprets a language, the answer is yes. The interpreted program, to the interpreter, is just data; the GPL doesn't restrict what tools you process the program with.
However, when the interpreter is extended to provide “bindings” to other facilities (often, but not necessarily, libraries), the interpreted program is effectively linked to the facilities it uses through these bindings. The JNI or Java Native Interface is an example of such a facility; libraries that are accessed in this way are linked dynamically with the Java programs that call them.
So if these facilities are released under a GPL-incompatible license, the situation is like linking in any other way with a GPL-incompatible library. Which implies that:
If you are writing code and releasing it under the GPL, you can state an explicit exception giving permission to link it with those GPL-incompatible facilities.
If you wrote and released the program under the GPL, and you designed it specifically to work with those facilities, people can take that as an implicit exception permitting them to link it with those facilities. But if that is what you intend, it is better to say so explicitly.
You can't take someone else's GPL-covered code and use it that way, or add such exceptions to it. Only the copyright holders of that code can add the exception...
What license is compatible with these requirements in Matlab / Mathematica?
- Allowing academic usage
- Requiring attribution for academic usage
- Restricting commercial usage (the program's output -processed images- should not be sold)