GPL license for libraries (#154)

I reworded the part on licenses in the README file:

Licenses for ATS2

The Compiler (ATS/Postiats): GPLv3
The source for Libraries (ATSLIB/{prelude,libc,libats}): GPLv3
The object code for Libraries (ATSLIB/{prelude,libc,libats}): LGPLv2.1
There is a separate release under the BSD license for the C header files of
the Libraries, which one can freely insert into the C code
generated from ATS source code.On Wed, Jan 27, 2016 at 8:34 AM, Kiwamu Okabe notifi...@github.com wrote:

Thanks. It should be noted in the main README which has contradictory
terms.

Ah… You are right… But it’s Hongwei’s issue…


Reply to this email directly or view it on GitHub
https://github.com/githwxi/ATS-Postiats/issues/154#issuecomment-175630663
.

Given that we are talking about licenses here, I want to reiterate
that ATS can be considered a no-runtime and no-library language.

The no-runtime part is easy to understand. ATS is a no-library language
in the sense that one can easily write ATS programs that do not need to
be linked to any ATS library code. I often have a mylib.dats file in a
project.
For instance,

https://github.com/githwxi/ATS-Postiats-contrib/blob/master/projects/SMALL/Calculator/calculator_mylib.dats

The following lines are taken from calculator_mylib.dats:

local
//
#include
“prelude/DATS/filebas.dats”
//
in (* in of [local] *)
//
// HX: it is intentionally left to be empty
//
end // end of [local]

These lines allow the compiler to generate the code for some needed ATS
library functions.
We can afford this style because the vast majority of ATS library functions
are templates, which
do not get to be compiled into object code directly.On Thursday, February 11, 2016 at 4:37:30 AM UTC-5, anonymous anonymous wrote:

What do you mean? LGPL let’s you link to LGPLed software however you want,
but you can’t change the LGPLed software licence and should provide source
for the LGPL software (It applies to LGPL software only). Other parts,
for example your code, could be covered with any licence you want. You also
can release your software under LGPL or compatible licence. So what’s the
problem?

On Thursday, February 11, 2016 at 8:41:10 AM UTC+2, Yannick Duchêne wrote:

Le mercredi 27 janvier 2016 15:30:59 UTC+1, gmhwxi a écrit :

The object code for Libraries (ATSLIB/{prelude,libc,libats}): LGPLv2.1

So statically linking to the standard ATS library is not possible?

LGPL is contaminating through static linking. To allow static linking, it
needs a special exception which must be explicitly stated.

Could you show me how this special exception is usually stated?On Thu, Feb 11, 2016 at 9:30 AM, Yannick Duchêne yannick...@yahoo.fr wrote:

Le jeudi 11 février 2016 10:37:30 UTC+1, anonymous anonymous a écrit :

What do you mean? LGPL let’s you link to LGPLed software however you
want,

LGPL is contaminating through static linking. To allow static linking, it
needs a special exception which must be explicitly stated.


You received this message because you are subscribed to the Google Groups
“ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/0c681f41-99ce-4918-9690-779964c812dc%40googlegroups.com
https://groups.google.com/d/msgid/ats-lang-users/0c681f41-99ce-4918-9690-779964c812dc%40googlegroups.com?utm_medium=email&utm_source=footer
.

Thanks for all this!

The following exception is now mentioned explicitly:

  • As a special exception for Libraries, if other files instantiate
    templates from
    this unit, or you link this unit with other files to produce an
    executable, this
    unit does not by itself cause the resulting executable to be covered by
    the GPLv3.
    However, this exception does not invalidate any other reasons that may
    result in
    the executable file being covered by the GPLv3.On Thu, Feb 11, 2016 at 2:19 PM, Yannick Duchêne yannick...@yahoo.fr wrote:

Le jeudi 11 février 2016 17:58:07 UTC+1, anonymous anonymous a écrit :

I greatly apologize for my first naive reply. […]

Don’t mind, you do not need to. There are at some places,
oversimplifications of what the GPL and LGPL are about, which make a lot of
people overlook most part of it (and even when one carefully read all of
it, that’s still hard).

Le jeudi 11 février 2016 18:06:38 UTC+1, anonymous anonymous a écrit :

Ocaml makes a special exception for its LGPL covered library (
Welcome to a World of OCaml). It’s right before the heading of
The Q Public License, version 1.0. I don’t know if it is something that you
and Yannick Duchêne ask but it seems that way. I am just afraid to
misinform you again.

Best regards,
anonymous

Indeed, static linking exceptions are not rare with LGPL (less with GPL,
except in the Ada world, where its near to systematic, for historical
reasons). Another point not directly related to this one, if I may, is that
anyway, a contaminating license is not well suited for a dynamically linked
library, which by definition, can be replaced by anything fulfilling the
same interface. This would in turn require the dynamic loader or the
application, to check the license of the concrete library found at run
time. That’s in my opinion one of the biggest bug in the GPL which states
to apply to DLL too, while technically, this makes no sense (unless the
dynamic loader of the application checks for it at runtime and refuse to
start if the license does not match). The LGPL does not suffer from this
issue and is good for that, as it get ride of this paradox, by allowing
dynamically linking to anything (which is what DLL are for), hence in my
opinion, DLL can (or should) only be LGPL, not GPL. The only issue
remaining with LGPL, is when static linking or embedding is technically
mandatory, and that’s the case of ATS prelude and its peers, as an example,
as no ATS program can work without it. That’s also the case with all
runtimes or anything playing the same role.

I don’t mind excessively, as I believe to understand Hongwei’s intent, he
clearly stated multiple time he don’t wish to prevent ATS to be used for
commercial applications, except the compiler it‑self, as he own the
compiler. But from a legal point of view, this is still an issue, and
authors who invest a lot of themselves in something, generally care a lot
about legal issues, where supposed intent not explicitly written weight
nothing.

If I pointed at this, that’s because I believe a lot of the people
interested in a language like ATS, are authors of actual of future
commercial applications.


You received this message because you are subscribed to the Google Groups
“ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/0e0e4450-0d68-4848-b318-f8ae1303275d%40googlegroups.com
https://groups.google.com/d/msgid/ats-lang-users/0e0e4450-0d68-4848-b318-f8ae1303275d%40googlegroups.com?utm_medium=email&utm_source=footer
.

What do you mean? LGPL let’s you link to LGPLed software however you want,

LGPL is contaminating through static linking. To allow static linking, it
needs a special exception which must be explicitly stated.

I greatly apologize for my first naive reply. […]

Don’t mind, you do not need to. There are at some places,
oversimplifications of what the GPL and LGPL are about, which make a lot of
people overlook most part of it (and even when one carefully read all of
it, that’s still hard).Le jeudi 11 février 2016 18:06:38 UTC+1, anonymous anonymous a écrit :

Ocaml makes a special exception for its LGPL covered library (
Welcome to a World of OCaml). It’s right before the heading of The
Q Public License, version 1.0. I don’t know if it is something that you and
Yannick Duchêne ask but it seems that way. I am just afraid to misinform
you again.

Best regards,
anonymous

Indeed, static linking exceptions are not rare with LGPL (less with GPL,
except in the Ada world, where its near to systematic, for historical
reasons). Another point not directly related to this one, if I may, is that
anyway, a contaminating license is not well suited for a dynamically linked
library, which by definition, can be replaced by anything fulfilling the
same interface. This would in turn require the dynamic loader or the
application, to check the license of the concrete library found at run
time. That’s in my opinion one of the biggest bug in the GPL which states
to apply to DLL too, while technically, this makes no sense (unless the
dynamic loader of the application checks for it at runtime and refuse to
start if the license does not match). The LGPL does not suffer from this
issue and is good for that, as it get ride of this paradox, by allowing
dynamically linking to anything (which is what DLL are for), hence in my
opinion, DLL can (or should) only be LGPL, not GPL. The only issue
remaining with LGPL, is when static linking or embedding is technically
mandatory, and that’s the case of ATS prelude and its peers, as an example,
as no ATS program can work without it. That’s also the case with all
runtimes or anything playing the same role.

I don’t mind excessively, as I believe to understand Hongwei’s intent, he
clearly stated multiple time he don’t wish to prevent ATS to be used for
commercial applications, except the compiler it‑self, as he own the
compiler. But from a legal point of view, this is still an issue, and
authors who invest a lot of themselves in something, generally care a lot
about legal issues, where supposed intent not explicitly written weight
nothing.

If I pointed at this, that’s because I believe a lot of the people
interested in a language like ATS, are authors of actual of future
commercial applications.

The object code for Libraries (ATSLIB/{prelude,libc,libats}): LGPLv2.1

So statically linking to the standard ATS library is not possible?

I re-read the “special exception” many times.

Following is the current version:

As a special exception, if you link the object code for Libraries with
other files to create an executable,
then the linking does not by itself cause the executable to be covered by
LGPLv2.1. However, this exception
does not invalidate any other reasons that might result in the executable
being covered by LGPLv2.1.

Based on my understanding of GPL, it is a logical consequence (rather than
an exception) that the code
generated from ATS source fully belongs to the author of the source,
regardless whether templates in ATSLIB
are instantiated in the source or not. This is due to the generated code
containing no ATS source code for the
involved templates.

After this exercise, I think I have gained much better understanding of GPL
and LGPL. There are definitely some
gray areas :)On Thursday, February 11, 2016 at 3:35:03 PM UTC-5, gmhwxi wrote:

Thanks for all this!

The following exception is now mentioned explicitly:

  • As a special exception for Libraries, if other files instantiate
    templates from
    this unit, or you link this unit with other files to produce an
    executable, this
    unit does not by itself cause the resulting executable to be covered by
    the GPLv3.
    However, this exception does not invalidate any other reasons that may
    result in
    the executable file being covered by the GPLv3.

On Thu, Feb 11, 2016 at 2:19 PM, Yannick Duchêne <yannick_…> wrote:

Le jeudi 11 février 2016 17:58:07 UTC+1, anonymous anonymous a écrit :

I greatly apologize for my first naive reply. […]

Don’t mind, you do not need to. There are at some places,
oversimplifications of what the GPL and LGPL are about, which make a lot of
people overlook most part of it (and even when one carefully read all of
it, that’s still hard).

Le jeudi 11 février 2016 18:06:38 UTC+1, anonymous anonymous a écrit :

Ocaml makes a special exception for its LGPL covered library (
Welcome to a World of OCaml). It’s right before the heading of
The Q Public License, version 1.0. I don’t know if it is something that you
and Yannick Duchêne ask but it seems that way. I am just afraid to
misinform you again.

Best regards,
anonymous

Indeed, static linking exceptions are not rare with LGPL (less with GPL,
except in the Ada world, where its near to systematic, for historical
reasons). Another point not directly related to this one, if I may, is that
anyway, a contaminating license is not well suited for a dynamically linked
library, which by definition, can be replaced by anything fulfilling the
same interface. This would in turn require the dynamic loader or the
application, to check the license of the concrete library found at run
time. That’s in my opinion one of the biggest bug in the GPL which states
to apply to DLL too, while technically, this makes no sense (unless the
dynamic loader of the application checks for it at runtime and refuse to
start if the license does not match). The LGPL does not suffer from this
issue and is good for that, as it get ride of this paradox, by allowing
dynamically linking to anything (which is what DLL are for), hence in my
opinion, DLL can (or should) only be LGPL, not GPL. The only issue
remaining with LGPL, is when static linking or embedding is technically
mandatory, and that’s the case of ATS prelude and its peers, as an example,
as no ATS program can work without it. That’s also the case with all
runtimes or anything playing the same role.

I don’t mind excessively, as I believe to understand Hongwei’s intent, he
clearly stated multiple time he don’t wish to prevent ATS to be used for
commercial applications, except the compiler it‑self, as he own the
compiler. But from a legal point of view, this is still an issue, and
authors who invest a lot of themselves in something, generally care a lot
about legal issues, where supposed intent not explicitly written weight
nothing.

If I pointed at this, that’s because I believe a lot of the people
interested in a language like ATS, are authors of actual of future
commercial applications.


You received this message because you are subscribed to the Google Groups
“ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/0e0e4450-0d68-4848-b318-f8ae1303275d%40googlegroups.com
https://groups.google.com/d/msgid/ats-lang-users/0e0e4450-0d68-4848-b318-f8ae1303275d%40googlegroups.com?utm_medium=email&utm_source=footer
.

Given that we are talking about licenses here, I want to reiterate
that ATS can be considered a no-runtime and no-library language.

Well, when I re‑think about it, yes: the ATS source appears nowhere in the
generated C source. But that’s a bit ambiguous as the source is the ATS
source, not the generated C source, so more explicit wording allowing this,
would help to feel assured.Le jeudi 11 février 2016 15:44:27 UTC+1, gmhwxi a écrit :

LGPL is contaminating through static linking. To allow static linking,
it needs a special exception which must be explicitly stated.

Could you show me how this special exception is usually stated?

There is the example of wxWidget :

(in the answer, not in the question). By the way, a special exception may
as much be applied to raw GPL, as
here: Intuitionistic fuzzy sets, logic, numbers, lingustic variables .