Hacker News new | ask | show | jobs
by MatthiasPortzel 817 days ago
In my opinion it’s a shame that the GPL is so clearly designed for licensing applications written in C being run by end users. When evaluated on that basis, it makes a lot of sense as a license.

But there’s a lot of confusion around the license because it’s not clear how these concepts transfer to interpreted languages. The GNU FAQ for determining if two programs have been combined into a derived works asks “if the modules are included in the same executable file” and “if modules are designed to run linked together in a shared address space.”

If I’m writing a JavaScript library or a server-side framework or even bare metal microcontroller code, I’m not going to use the GPL, just because it’s not at all obvious how to apply the license.

3 comments

> if modules are designed to run linked together in a shared address space.

How does this not apply to javascript?

That happens after distribution of "unlinked" code. GPL's copyleft doesn't apply to binaries that aren't distributed.
But would bundled and minified JavaScript not be very much like a binary? And isn't it distributed every time someone opens the web page?
Programs written in C is a bit more obvious in how tightly coupled a program is to their libraries. It takes quite a lot of intention, work and design to make a C program independent of their library dependencies. If you remove a library and the work is completely inoperative and will practically never function without reapply the library, then the legal argument that they are independent and separate works start to loose strength.

For programs written in interpreted languages, it is a bit less obvious how tightly coupled a program is to their libraries. It depend a lot on the design, intended use and the environment. Some programs regardless of language is going to be heavy dependent and based on a specific library, rather than a generic API for which any library could implement. The more the program incorporates aspects of the library as part of the program, the stronger the argument is for derivative status.

> The GNU FAQ for determining if two programs have been combined into a derived works asks “if the modules are included in the same executable file” and “if modules are designed to run linked together in a shared address space.”

Does it mean I can put GPL code into a separate binary, communicate with it over RPC and use it in a closed-source product without contributing anything back?

The GNU FAQ addresses this [1]. If the binaries are communicating intimate information, then they are considered combined. If they can function independently or they are based on open protocols, then they can be considered separate. Ask yourself whether a user can realistically swap in their own binary.

[1] https://www.gnu.org/licenses/gpl-faq.en.html#MereAggregation

That should be fine. In this setup you'd essentially have a closed source 'client' talking to a GPL 'server', which is allowed.
I am not so sure about that. I think I remember from a very very old memory that, actually, this specific case has been encountered or discussed and that the answer is no, you aren't allowed to do that. Basically, if you create your own custom protocol etc. You are just reinventing an inefficient wheel, but it's still a wheel. It's still linking.

The whole process could even be automated otherwise, nullifying the gpl effectively.

I am NOT a lawyer. And maybe it depends on the country (it seems USA has a very "what-the-law-say-exactly" while France (and maybe Europe) tend to look at the "spirit" of the law.

EDIT more about this question here ? https://news.ycombinator.com/item?id=15105920

EDIT 2:

(Rpc are listed)

https://www.gnu.org/licenses/gpl-faq.en.html

"Where's the line between two separate programs, and one program with two parts? This is a legal question, which ultimately judges will decide. We believe that a proper criterion depends both on the mechanism of communication (exec, pipes, rpc, function calls within a shared address space, etc.) and the semantics of the communication (what kinds of information are interchanged).

If the modules are included in the same executable file, they are definitely combined in one program. If modules are designed to run linked together in a shared address space, that almost surely means combining them into one program.

By contrast, pipes, sockets and command-line arguments are communication mechanisms normally used between two separate programs. So when they are used for communication, the modules normally are separate programs. But if the semantics of the communication are intimate enough, exchanging complex internal data structures, that too could be a basis to consider the two parts as combined into a larger program."

More or less, it’s what happens to any app that uses a gpl db