News for hackers. Stuff that matters.
Re:Things to Know About GNU Readline by mikekchar on Thursday August 22, 2019 @06:11PM (#20772858)
Imagine you are a photographer. You take a photo of something. The photo is covered by copyright. I can't use it without your permission.

Now imagine that I write a book and I include your photo in it. This is an infringement of copyright. I can't distribute my book, containing your photo, without infringing copyright. It doesn't matter how much your photo contributes to my book -- including it in my book and distributing it is infringement. You might even be able to get an injunction to stop me from distributing my book without removing your photo.

Now imagine that you put your photo under a CC "share alike" license. What it says is that, while I don't generally have the right to use your photo in my book, if I decide to license my book using a CC "share alike" license, then you will give me permission to use your photo. To make things simple, you give blanket permission to anyone to use the photo as long as whatever is including the photo is licensed as CC "share alike" -- in that case it is not necessary to get specific permission to use it. Finally, let's say that you make the offer that if I infringe your copyright by including the photo in my project that you will forgive that infringement if I agree to re-license the project under CC "share alike".

Exactly same thing.

Re:Things to Know About GNU Readline by sokoloff on Thursday August 22, 2019 @07:13PM (#20773227)
Imagine instead that you sold a book of pictures with a few blank spaces/pages where a book owner could optionally put other pictures in that space.

That book, standing alone, does not infringe on others' copyright, which (IMO) is closer to "exactly the same thing".

Re:Things to Know About GNU Readline by mikekchar on Thursday August 22, 2019 @07:20PM (#20773263)
Yeah... I realised that later. I've added my opinion on that situation in a sibling post.
Re:Things to Know About GNU Readline by lwf on Thursday August 22, 2019 @08:06PM (#20773537)
CC does allow for "collections"[1]:

> All Creative Commons licenses (including the version 4.0 licenses) allow licensed material to be included in collections such as anthologies, encyclopedias, and broadcasts. You may choose a license for the collection, however this does not change the license applicable to the original material.

IANAL, so whether a book using a photo as an illustration would count as a collection is beyond me, but e.g. an encyclopedia or photo book seems to be within scope.

https://creativecommons.org/faq/#if-i-create-a-collection-th...

Re:Things to Know About GNU Readline by emilfihlman on Thursday August 22, 2019 @07:45PM (#20773418)
Now imagine I go there and take the exact same photo myself, and replace the original.

Which is exactly why license tainting like that is not a thing and never been proven to be. If I break rules, I don't lose rights to my own works, I just pay with money and paying reparations is an entirely different thing.

Re:Things to Know About GNU Readline by mikekchar on Thursday August 22, 2019 @07:52PM (#20773451)
Yes, you are correct. Infringement is infringement. Keep in mind that you are never compelled to license your work under the GPL even if you infringe the copyright of GPL code. It is an offer to remedy the infringement. You can accept the offer or you can decide not to accept the offer. It's your choice. However, even if you replace the infringing use with a non-infringing use, you still have to deal with the original infringement. You can't really escape that.
Re:Things to Know About GNU Readline by mikekchar on Thursday August 22, 2019 @07:19PM (#20773255)
I was on my walk and I realised that I completely missed the interesting part of this discussion (which was hinted at by the OP). So I'll do my best now (with the caveat that this is a very complex legal issue and I am not a lawyer).

One of the most crucial things about the GPL is that it is only triggered on distribution. You are specifically granted permission to use the software for any purpose (freedom 0). This includes embedding it in another piece of software. As long as you don't distribute the result, then you are 100% OK ("distribution" has a specific definition which is stated in the license, so refer to that if you have any questions about how that works).

The "anti-GPL hack" that some people use is that they say, "Well, if I don't distribute a library that I use, then I am not infringing on the license -- because the license only kicks in on distribution. If the user links the software, then it's 100% OK because they are specifically given permission to use the software for any purpose in the license. Whoo hoo!"

This is where the argument of "derived work" comes in. Imagine that you write a poem. I then write a critique of that poem. I don't include the poem in my critique because I don't have the right to distribute it. Just referencing your poem is not an infringement of copyright. Just because I describe your poem doesn't mean it's a derived work.

However, imagine that I decide to distribute my critique in a web page. Many of the things I say depend on the actual text of the poem, so I'd really like to add it to my text. But I can't distribute the poem. What to do? You are distributing your poem on the internet too, but you have a license that doesn't allow me to use it directly. Maybe I can be a bit clever here.

What I'll do is write a web page that deep-links to the poem. I'll write some javascript that allows the user to press a button and it will copy the text of the poem into my document. That way I can refer to the poem without actually distributing it. My document won't make any sense if the user doesn't press the button to link to the original text, but the user will be doing that, not me.

Is my website a derived work of the poem? This is a good question. I think it probably is. My document does not "work" without the original poem. It depends on the actual structure of the poem in non-trivial ways. However, I am sure there are also good arguments for the opposite. Given the outcome of Oracle vs Google where the judge decided that APIs are copyrightable, I feel fairly comfortable in my position, but as far as I know it has never been decided in court. Your guess is as good as mine (and better if you are a lawyer ;-) ).

But just to reiterate -- it does not matter how much of the program infringes. If any of the program infringes than it all infringes. You can't legally distribute it. So while it might seem weird that a very small part of your code might be deemed to be a derived work of some other code and therefore you can't distribute it -- that's how it works (and, to be honest, I can't see a reasonable way of proceeding if it didn't work that way).

Re:Things to Know About GNU Readline by sokoloff on Thursday August 22, 2019 @07:32PM (#20773338)
IIRC, clisp worked just fine without GNU readline. https://www.gnu.org/software/clisp/impnotes/readline-mod.htm...

If Lispworks writes a compatibility layer that allows SLIME to work with Lispworks, they are not causing Lispworks to infringe on the Emacs software license.

(Side note: for your hypothetical website critiquing another copyrighted work, there is a somewhat unclear [in the sense that it's facts and circumstances dependent] fair use doctrine in the US that almost surely allows genuine critique of that work to include relevant snippets [while disallowing copying the work in its entirety under guise of critiquing it]. https://en.wikipedia.org/wiki/Fair_use#U.S._fair_use_factors )

Re:Things to Know About GNU Readline by mikekchar on Thursday August 22, 2019 @07:46PM (#20773423)
It doesn't really matter if the code as a whole worked without readline. What matters is if the code that linked to readline worked. It's that tiny bit of code that may or may not be a derived work. If it is, then you can't distribute it. No matter how tiny it is, if you can't distribute it, then you can't distribute it.

Keep in mind that agreeing to license your work under the GPL is an offer for remedying infringement. You don't have to accept. If you don't accept, then you have to deal with the consequences just like any other infringement case.

For the side not: It is true :-) However, just to be a bit playful, I should point out that fair use is not a defense in US copyright law. If your use is fair use it is still infringing. Fair use kicks in when determining damages. So your infringing use will suffer no damages because it is fair use. However, you should always be careful when relying on fair use because it is not a defense -- your infringement case can go to court and you still have to pay your lawyers!

Re:Things to Know About GNU Readline by sokoloff on Thursday August 22, 2019 @08:34PM (#20773668)
From what I've read/studied (though I am not a lawyer), fair use is an affirmative defense against copyright infringement in the US.

I'll have to think more about the readline interface bit you raise. My gut instinct suggests that's not quite right, but my rational brain isn't able to label/ID/argue why, so your point has some merit. I'll need to think about it some (so thanks for that [seriously]!)

Maybe there's another line input library with a compatible binary interface and MIT licensed and clisp is written to interface to that library. That would seem like it might fly.

Re:Things to Know About GNU Readline by mikekchar on Friday August 23, 2019 @03:08AM (#20775147)
Also not a lawyer, but if you happen to run across a reference to fair use being an affirmative defense, I would definitely be interested in seeing it.

Edit: I always thought that was why "fair dealing" was considered better, but it's definitely possible I've got it wrong.

Re:Things to Know About GNU Readline by cat199 on Thursday August 22, 2019 @11:25PM (#20774297)
libedit was written for just this purpose

https://github.com/NetBSD/src/tree/trunk/lib/libedit (cvsweb appears down)

https://www.thrysoee.dk/editline/

Re:Things to Know About GNU Readline by brianjhanfox on Friday August 23, 2019 @02:19AM (#20774950)
Interestingly enough, neither of these libraries are as objectively as good as readline. For example, they do not implement a true kill ring. They aren't macro programmable. I find it almost amusing that the authors were too lazy to actually reimplement all of the extremely well documented behavior in libreadline and libhistory.
Re:Things to Know About GNU Readline by sokoloff on Friday August 23, 2019 @07:07AM (#20776279)
If the purpose is "plausible deniability" to allow GNU readline to be linked by users, that seems perfectly reasonable. Why work harder than needed?
Re:Things to Know About GNU Readline by cat199 on Saturday August 24, 2019 @06:36PM (#20790142)
or 80/20.

really I just want to be able to find my previous command, and multi word-level edit it.

Re:Things to Know About GNU Readline by aidenn0 on Thursday August 22, 2019 @07:39PM (#20773376)
Except clisp is quite useful without readline; cmucl (a contemporary lisp implementation) lacked any readline support.

Extending this, if someone made an API compatible BSD licensed readline clone, and the configure script will link with either that or the GNU readline, depending on what is in the system, would that still need to be GPL'd?

clisp itself ended up being moot because the author was happy to use the GPL and if they hadn't they could have just removed the readline support, but it is an interesting corner case of the law.

Re:Things to Know About GNU Readline by dragonwriter on Thursday August 22, 2019 @07:43PM (#20773404)
> Extending this, if someone made an API compatible BSD licensed readline clone

If APIs are protected by copyright, such a clone could be a copyright violation (depends on how fair use analysis applies.)

So, wait on appeals to be exhausted in Oracle v. Google to have a clue on the answer.

Re:Things to Know About GNU Readline by kazinator on Thursday August 22, 2019 @08:54PM (#20773745)
If API's are protected by copyright, and GNU takes action on such a thing, then that would be very hypocritical, giving all the proprietary API's cloned in GPL-ed software, including GNU projects.