I found two nice functions on Stack Overflow that I would like to use (slightly modified) in my software. The software will be GPL-licensed (I link against GPL-libraries, so there is no choice). Unfortunately the code here is released as cc by-sa, which is not GPL-compatible. An answer on Meta Stack Exchange said I would need to contact the authors and ask if I´m allowed to use their software under the terms of the GPL, that´s why I registered here. Unfortunately there is no way to contact a Stack Overflow-user, so I tried to ask in a comment, but for that I need 50 reputation. I don´t like reinventing the wheel, so what should I do?
-
Would it help if you added a link to this particular code snippet? That way, its poster could contact you (that is, if you had some contact information in your profile), or possibly you could discuss it in a chat room.– JongwareCommented Sep 12, 2014 at 22:56
-
3That are the functions I use: A CSV Parser and a stdout/stderr redirector– StefanCommented Sep 12, 2014 at 23:23
-
16Users with 50 rep or more can leave comments below the post, so if you don't have a contact email or some other way to contact the user, then earn 50 reputation and leave a comment.– Robert Harvey ModCommented Sep 13, 2014 at 21:16
-
4In the mean time those 2 answers have received a comment, asking the posters to look over here. Just wait a bit.– JongwareCommented Sep 14, 2014 at 0:34
-
6As stated in my answer to the question 'stdout/stderr redirector', the code listed in my answer is absolutely free to use by whomever wants to. I can attach a BSD or GPL liscense if necessary although I probably will not be able to until tomorrow.– Sir Digby Chicken CaesarCommented Sep 14, 2014 at 3:09
-
13This is why I have a comment on my profile that all my code in the Stack Exchange websites is public domain.– asmeurerCommented Sep 14, 2014 at 6:40
-
5Neither CC nor PD are good licenses for releasing code (the disadvantages of which have already been analyzed elsewhere on the intertubes). I believe something like the X11 license would have been a much much better default. Personally, ever since I started caring about licensing, I simply consider any fragments from SO to be unusable. Of course, I can partially understand why the choice was made and what other difficulties would arise from making another choice.– Theodoros ChatzigiannakisCommented Sep 14, 2014 at 11:41
-
@Sir Digby Chicken Caesar - if you attach GPL license to it, it can only be used in GPL. I suggest you'd better attach LGPL license.– Remigijus PankevičiusCommented Sep 15, 2014 at 6:49
-
2Read it, learn from it, and write your own. Chances are, you'll find that your own code needs to do something slightly different, anyway.– PaulCommented Sep 15, 2014 at 9:04
-
1Line 192 of github.com/DrPaulBrewer/html5csv/blob/master/html5csv.js has a RF4180 CSV Parser in Javascript. GPLv3, untested, but no complaints so far. It also has to scan one char at a time, and looks like it could be rewritten in C without too much trouble.– PaulCommented Sep 15, 2014 at 9:08
-
4@asmeurer. For various legal reasons, WTFPL may be a better choice for you. Another option, closer to what you have now, might be PD-Self.– TRiGCommented Sep 15, 2014 at 10:10
-
I think CC0 should be mentioned in a discussion like this. Thank you for reminding me of adding a disclaimer to that effect to my SE profile.– DevSolarCommented Sep 15, 2014 at 10:31
-
@r.pankevicius LGPL can still only be used from (L)GPL. If you want anyone to be able to use it, make it MIT or CC0.– asmeurerCommented Sep 15, 2014 at 15:33
-
2You can link against LGPL libraries in non-(L)GPL code. But if you copy-paste code from StackOverflow, that's not linking, that's reusing, and so by the LGPL terms your code has to be (L)GPL.– asmeurerCommented Sep 15, 2014 at 20:11
-
1Spoiler alert: it's offtopic. I entered phrase in my favourite search engine: last line of code richard stallman and found it interesting: github.com/github/hubot-scripts/blob/master/src/scripts/…– Remigijus PankevičiusCommented Sep 16, 2014 at 18:47
2 Answers
Creative Commons created a special exception for CC-BY-SA-4.0 to reuse CC-BY-SA-4.0 code in [L|A|]GPL-3 licensed code. Hence, when/if StackOverflow change to using CC-BY-SA-4.0 it would be possible. CC-BY-SA-3.0 doesn't include the special exception for GPL3 in its (currently empty) list of exceptions and may not be compatible with any(?) other license except CC-BY-SA-3.0.
https://www.gnu.org/philosophy/license-list.html#ccbysa
Update: Actually, as @Deduplicator says in a comment below, CC-BY-SA-3.0 licenses are forwards compatible and can be updated to CC-BY-SA-4.0 by users so it already works
-
2cc licenses can generally be ported to a newer version of the same license. That way the specific edorsement of [L|A|]GPL-3 already works with one extra-hop. Commented May 11, 2016 at 1:30
-
I'm not so sure that StackOverflow posts can be arbitrarily relicensed from CC BY-SA 3.0 to CC BY-SA 4.0. This source suggests that the author of the post must give permission to relicense. wiki.creativecommons.org/wiki/4.0_upgrade_guidelines Commented Aug 29 at 21:03
I'll write an answer for you if nobody else can't do it.
1st I must admit that I don't have any experience in writing GPL software so it shouldn't be the best answer. Remember it, upvotes and downvotes simply do not matter in place like this. RMS won't be here to defend or blame me simply because stackoverflow doesn't run a software that gives 4 essential freedoms to use it. Simplified: stackoverflow isn't compatible with GPL.
So (and what I learned from this discussion with the help of people who commented your good question) : if some nice guy pastes some good code here... it's put under cc by-sa 3.0 license automatically. (cc by-sa 3.0 isn't compatible with GPL; that's what GPL religion leader(s?) say) So watch out what you paste!
It seems that it's better to paste code in more safe place (pastebin (needs to be verified)), github, etc. and just give a link to your code in stackoverflow.
Aftermath: I think this is the best and safest answer in your situation now:
Read it, learn from it, and write your own. Chances are, you'll find that your own code needs to do something slightly different, anyway. – Paul 2 days ago
(And upvote Paul's comment, of course.)
LEGAL NOTICE: You shouldn't trust my advice without consulting with a lawyer. Today lawyers know about software much more than programmers do.
-
1Oh, come now. If you put SO code in a GPL project and have a link to the question, that should be all right. Don't link to the full long URL; it's too big, just cut it down to the minimum. e.g.
http://meta.stackoverflow.com/questions/271293/
and nothttp://meta.stackoverflow.com/questions/271293/use-stack-overflow-answer-in-gpl-software-how-to-ask-for-permission
. That is about as compatible as I can think you can get: attribution, sharealike. Commented Jan 4, 2015 at 16:43 -
1"Today lawyers know about software much more than programmers do." wat? Commented Aug 1, 2016 at 13:43