License of code posted to the Fortran Discourse

A recent thread raised an important question: How to license the code posted to this forum and can it be reused? It’s important that we discuss this, agree on some solution, and post it as a guide in the sticky “Welcome / Read this First” post.

If you post your code to the forum, you should have the right to claim copyright on it and license it how you want. However, most people just post code and don’t worry about how it’s used. We should have some common (default) baseline on what happens to the code that’s posted without license or explicit instruction about distribution and attribution.

Let’s discuss it. I propose:

  1. By default, the code that you post to any thread on the Fortran Discourse is in the public domain and can be reused in any way.
  2. If you want attribution, or require that the code be used under a specific license, or that the code shouldn’t be reused at all, state so explicitly in the same post. This could be done, for example, by including a Copyright statement in a comment line of the code snippet, including the name and a link to the license, and similar.
  3. Only post code that you know you are allowed to share.
  4. If you want to reuse the code, even if by default posted as public domain, kindly ask the author of the post for permission.
  5. If you do reuse the code, consider giving attribution to the original author, either by name or by including the URL to the original thread where the code was posted.

What do you think? Did I miss anything?

3 Likes

I think this seems to me like a very nice policy. I agree.

These 5 points seems well-thought.

I think there is two faces: a moral one and a legal one.

  • The moral one is that you should cite the author. Courtesy, honesty, acknowledgment…
  • The legal one should not be implicit. And I think, at least in Europe and USA, the copyright is automatic when you write something on the web. You are the author and you have rights, automatically. But as we all know, “IMPLICIT NONE” is better and therefore it must be clearly indicated somewhere on the site which license is used for the content we post.

Just a detail concerning the public domain. A work goes normally into the public domain some decades after the author’s death (70 years in Europe). But be conscious that in some countries you can’t decide yourself that your work is in the public domain: in France, the author has moral rights and patrimonial rights. He can give up his patrimonial rights, but not his moral rights. It means especially that you can’t renounce to the paternity on your work. It is an inalienable right. In terms of Creative Commons licenses, it means that in a country like France, the minimal legal license would be CC-By.

That is why there is also the CC0 license which allows to go as near as possible to the public domain, in the limits of the country laws. With that license you renounce to the maximum of your rights, in the limits allowed by the national law:

P.S. It reminds me that in the mid 90’s many of us thought the Internet was the Cyberspace and that being nowhere (it was considered as a kind of kingdom of the spirit) the Cyberspace was not submitted to any national law (it was really a kind of Far-West, and many people felt literaly outlaws)… But the times they are a-changin’… Data are now thought as being in a physical server in a well defined geographical area.

It is common in forums to specify that code posted is in the public domain. One of many examples is Fortran Wiki code. I agree PD should be the default per site rules, but donations should be encouraged to explicityl specify a PD license in non-trivial posts even though it would be the default.

Note that the Creative Commons CC0 waiver looks like this:

CC0
To the extent possible under law, This Site has waived all copyright and related or neighboring rights to ThisSite. This work is published from: Country.

The last sentence, if compulsory, could be a problem. Which country choose? The country of the organization owning the discourse.group domain?
And do you know that country? I thought it was probably the USA… No, this is the answer:
https://whois.whoisxmlapi.com/lookup-report/zjRXjBGn5r
The unexpected answer is… Panama! :cowboy_hat_face:
In fact:

WhoisGuard is a service that prevents your personal data registered at the time of domain registration from displaying on the Whois database .
What Every Domain Owner Should Know about WhoisGuard

But I have traced the server:

$ ping fortran-lang.discourse.group
PING fortran-lang.hosted-by-discourse.com (66.220.12.139) 56(84) bytes of data.

This tool https://whatismyipaddress.com/traceroute-tool yields:

Country United States
State/Region California
City Calistoga
Latitude 38.5809
Longitude -122.5856

Or should we use the country of the author?

Let’s have a look at some other sites:

It would be interesting to share here more examples.

1 Like

If you want a specific licence, you should be able to chose the country from where you write the post/code.

1 Like

These points look good to me except I would have suggested that the default for code and content is CC-BY-SA (like on stackoverflow) since copyright is assigned automatically and you normally have to expressly state that you are placing work into the public domain.

IMO it seems a little underhand to have contributors implicitly sign away their rights via the discourse terms and conditions when they would otherwise assume they have retained copyright.

With 2. contributors can expressly place code in the public domain or other license as required.

(What would be great is if there was a Discourse plugin that allowed you to select a content license when writing a post.)

1 Like

I have found a Discourse Policy plugin: Discourse Policy | Discourse - Civilized Discussion
but no License plugin…

I have found this post (but no time to read it now… [I miss you Cyberspace :space_invader:…]):

1 Like

Hi,

For open source code, there is a problem with the SA (ShareAlike) aspect of the licence:

" ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original."

If, I understand correctly, if you want to use a code or part of it with this licence, you have to chose this licence for your own code. Then there is a problem if this code has contribution with other licences with the same kind of restriction like ( GNU GPL):

“But if you release the modified version to the public in some way, the GPL requires you to make the modified source code available to the program’s users, under the GPL.”

Then, it becomes difficult to do it right!

PS: for gnu licence, I’ve moved most of my codes with the LGPL licence

Yes, these licenses were explicitly designed to be viral.

For the kind of quite short, and often generic, code that is posted here, my preferences would be:

  • CC0 if the user can not choose,
  • any other license if the user can choose (GNU, Creative Commons…)

Note that I think this discussion is important because “IMPLICIT NONE” is better and because it is better to choose a license having a legal (international) value. But personally, I don’t really care and something like public domain would be OK for the code I may post here.

Although, things are more complicated: we can imagine that we copy/paste some code of one of our project to give an example. In that case, having the possibility to indicate the license (in a comment if there is no other solution) would be necessary.

It seems this discussion should be continued before a decision is made… License issues are complicated.

1 Like

Yes you are right @gardhor this is a problem with SA; sorry I think I was actually thinking of CC-BY which just requires attribution (though it also has a ‘no restrictions’ requirement which may also be overly restrictive for what are essentially just code snippets).

It seems the question to ask is whether the default behaviour is to protect contributor copyright (e.g. CC-BY) or to waive rights as far as possible (CC0).

I’m personally happy for my posts to CC0, but I’m unsure about making this an implicit default.

1 Like

You are right, asking the good question(s) is half the answer.

A preliminary question is:
Is it possible to have a default behaviour, while letting the author choose another one if he wants?

Like many people, I usually don’t really care when posting in a forum. But it seems most of the sites impose a license on the author. I don’t remember having ever posted on a site where I could choose my license, or even suggesting that I could indicate it in my post.

Do you have any example of a site offering such a choice?

P.S. If it does not exist, and if it is legally possible, it is not forbidden to innovate! We are not sheep :sheep:

1 Like

Read in Terms of Service - Fortran Discourse

Content you submit to the forum belongs to you, and you decide what permission to give others for it. But at a minimum, you license the company to provide content that you submit to the forum to other users of the forum. That special license allows the company to copy, publish, and analyze content you submit to the forum.

When content you submit is removed from the forum, whether by you or by the company, the company’s special license ends when the last copy disappears from the company’s backups, caches, and other systems. Other licenses you apply to content you submit, such as Creative Commons licenses, may continue after your content is removed. Those licenses may give others, or the company itself, the right to share your content through the forum again.

Others who receive content you submit to the forum may violate the terms on which you license your content. You agree that the company will not be liable to you for those violations or their consequences.

2 Likes

Indeed, these are the top-level Terms that are default for new Discourse forums, including ours. This seems aligned with what I proposed, except that they don’t specify what the default license should be–it’s up to us to decide.

So let’s discuss which default license could be optimal. I’m okay with either public domain or a CC license.

@vmagnin note that the countries you traced are that of the domain registrant (not Discourse) and the server hosting the site (I bet also not Discourse). The “company” referred to in Discourse Terms refers to the administrators of the fortran-lang instance, but beyond that technicality, it should apply to all of us here (community) and we should thus decide together what will work best.

I don’t foresee practical issues with default public domain, even though there may be technicalities that make it less optimal (like issues raised by @vmagnin). If there are concerns about it, by all means let’s choose a license that works for most (or even write our own).

1 Like

Looks like we all agree that Milan’s points 1. to 5. are good. Now we are just discussing what license to use for the point 1.

Public domain, or CC0 is fine with me. The CC-BY I think is fine too. The CC-BY-SA I think is to restrictive. If users want such more restrictive license, they can use the point 2.

2 Likes

I agree with all those statements.

Note that in the case we choose something like public domain, I think we should use CC0. The Creative Commons licenses were created by experimented lawyers (Lawrence Lessig…), so it is solid ground. They wouldn’t have created CC0 without necessity.

2 Likes

Another option to consider is simply an MIT license (also I believe created by experienced lawyers), with the author of the post as a copyright holder. I think that’s similar to CC-BY, but a much simpler text (compare https://creativecommons.org/licenses/by/4.0/legalcode vs https://opensource.org/licenses/MIT).

2 Likes

I like MIT as well for its simplicity. If we choose that, we may need to slightly modify it so that it applies to all content and not just “software”. Indeed, I named this thread “License of code posted”, but this conversation really applies to all content we post.

1 Like

I would strongly recommend not to create our own license (e.g., by modifying an existing license such as MIT), because that will cause even more work for others (there have been many articles written about this topic, a recent one, e.g., here). I would recommend to choose an existing license, looks like the candidates so far are:

  • Public domain
  • CC0
  • CC-BY
  • MIT

P.S. I thought we were discussing just code. I think MIT would work great, unmodified.

For non-code, i.e., the text in posts here, I do not have an opinion on that, but I am leaning towards not having a default and simply ask a person if you can copy his or her text and under what conditions.

I think most people will be interested in copying code, so that’s where I think we should have some official policy.

2 Likes