this post was submitted on 20 Aug 2025
52 points (98.1% liked)

No Stupid Questions

43026 readers
480 users here now

No such thing. Ask away!

!nostupidquestions is a community dedicated to being helpful and answering each others' questions on various topics.

The rules for posting and commenting, besides the rules defined here for lemmy.world, are as follows:

Rules (interactive)


Rule 1- All posts must be legitimate questions. All post titles must include a question.

All posts must be legitimate questions, and all post titles must include a question. Questions that are joke or trolling questions, memes, song lyrics as title, etc. are not allowed here. See Rule 6 for all exceptions.



Rule 2- Your question subject cannot be illegal or NSFW material.

Your question subject cannot be illegal or NSFW material. You will be warned first, banned second.



Rule 3- Do not seek mental, medical and professional help here.

Do not seek mental, medical and professional help here. Breaking this rule will not get you or your post removed, but it will put you at risk, and possibly in danger.



Rule 4- No self promotion or upvote-farming of any kind.

That's it.



Rule 5- No baiting or sealioning or promoting an agenda.

Questions which, instead of being of an innocuous nature, are specifically intended (based on reports and in the opinion of our crack moderation team) to bait users into ideological wars on charged political topics will be removed and the authors warned - or banned - depending on severity.



Rule 6- Regarding META posts and joke questions.

Provided it is about the community itself, you may post non-question posts using the [META] tag on your post title.

On fridays, you are allowed to post meme and troll questions, on the condition that it's in text format only, and conforms with our other rules. These posts MUST include the [NSQ Friday] tag in their title.

If you post a serious question on friday and are looking only for legitimate answers, then please include the [Serious] tag on your post. Irrelevant replies will then be removed by moderators.



Rule 7- You can't intentionally annoy, mock, or harass other members.

If you intentionally annoy, mock, harass, or discriminate against any individual member, you will be removed.

Likewise, if you are a member, sympathiser or a resemblant of a movement that is known to largely hate, mock, discriminate against, and/or want to take lives of a group of people, and you were provably vocal about your hate, then you will be banned on sight.



Rule 8- All comments should try to stay relevant to their parent content.



Rule 9- Reposts from other platforms are not allowed.

Let everyone have their own content.



Rule 10- Majority of bots aren't allowed to participate here. This includes using AI responses and summaries.



Credits

Our breathtaking icon was bestowed upon us by @Cevilia!

The greatest banner of all time: by @TheOneWithTheHair!

founded 2 years ago
MODERATORS
 

In my understanding, GPL is a copyleft license where your code can only be used in open-source projects (vs permissive licenses where your code can be used in closed-source projects).

Based on a few quick searches and my general understanding, it seems that AGPL is a more restrictive license where closed-source projects can’t depend on your code at all (?) and LGPL is a more permissive license where your code can be used in closed-source projects (?).

edit: After a bit more searching, I found that LGPL is still a copyleft license but a “weak” one. It looks like LGPL code used in other projects, if in their original form, can be closed-source but must be open-source if there are any changes. What constitutes as a change? Do ports count? How about updating syntax, like Python 2 to 3?

Also, it seems that AGPL might be almost the same as GPL (both are “strong” copyleft licenses) where AGPL just has a clause for source code sharing when it is shared over a network. In that case, why use GPL over AGPL, and vice versa? There seems to be many projects using GPL, so what is the downside to AGPL? Is the network sharing thing a bad restriction for some people, and why?

(back to original post from here)

I could be wrong on some or, more likely, all of those points. I also have a few questions. What is the difference between GPLv2 and GPLv3? If LGPL is more permissive, what are its differences compared to a license like MIT? Why would you go for one or another? And for AGPL, why would you prefer one over another? Is it simply how much (or really, how little) you want your code to be used in closed-sourced projects? And how do all these licenses interact with each other? Can you use GPL code in AGPL projects, and vice versa? What about LGPL code, is that too permissive for GPL or AGPL or can it be used in those projects?

you are viewing a single comment's thread
view the rest of the comments
[–] rikudou@lemmings.world 22 points 3 days ago (2 children)

GPL = whenever you distribute software which contains GPL code or libraries, your code must also be distributed as GPL or compatible. V2 vs v3 differences are mostly in v3 clearing up some ambiguities.

AGPL = same as GPL, except it applies even if you simply provide your code as a network service

LGPL = same as GPL except it makes it possible to distribute closed source components (or with incompatible license) as long as the user is able to replace the LGPL libraries.

MIT = you can do whatever with the code

So, GPL only concerns you if you distribute your application as a binary to users, think like Photoshop or Microsoft Office. Your code is effectively GPL even if you don't distribute it, but there's no requirement to make the source available to everyone, only to those who you distribute the software to.

With AGPL even having the application accessible over the network is considered as distribution to users. You basically cannot have an effectively closed source application with AGPL.

LGPL is usually used with dynamically linked libraries where you can distribute your application easily as long as user can replace those. For example Qt is LGPL and you can sell your app without providing source code as long as the user can replace the Qt framework dll/so libraries.

And with MIT anything goes, you can use it in a closed source product, in fact of those four it's the only one that allows you to have a truly closed source codebase.


As for how they're compatible, the most strict license usually applies. All of these four are compatible to some degree, but you can't simply take a GPL code into a MIT codebase and make it more permissive suddenly.

Your code can be MIT, but the original still is GPL. Meaning that when you distribute the application, it's effectively GPL. Same with all license combinations.


As for why would you choose one or the other, it's pretty much about how much you want your users to give back.

With GPL, you want any modifications to be able to be included in your project. With LGPL as well, but you're not forcing people to open source their whole app, only direct modifications to your code. With AGPL you're basically forcing everyone to open source their app if they use your project at all. With MIT you don't care at all, you just give your code to the humanity to do whatever with it.

[–] sbeak@sopuli.xyz 4 points 3 days ago* (last edited 3 days ago) (1 children)

Thanks for the thorough explanation, that was really helpful! So AGPL means it MUST be open-source and GPL means it only needs to be open-source for people you are “distributing” to (but not necessarily everyone). And if you make, for example, something like a webapp or website, then there is a clearer distinction between AGPL and GPL while it doesn’t really matter for standard binary apps.

Interesting that the LGPL licensed parts of a project have to be “replaceable” (meaning updatable with a new version or fork? or does it mean something else?), even if the project in question is closed-source.

And projects that include GPL code must be GPL licensed themselves or have a compatible license (like AGPL?). But what if you want to both use this set of GPL code but with a different license (either a permissive license like MIT or a different, non-GPL copyleft license), that would mean that you wouldn’t be able to use the code. I guess that’s the tradeoff between copyleft and permissive licenses.

[–] rikudou@lemmings.world 5 points 3 days ago* (last edited 3 days ago) (1 children)

For your first paragraph: yes, exactly. For software you distribute in binary form to customers, GPL and AGPL are effectively the same thing. For SaaS you can easily use GPL and not share your source code. Though beware if your ever need to deploy your SaaS on the customer's premises.

The point of these licenses is to not restrict user's rights, so LGPL doesn't want you to use their code and not let the user do whatever they want with it according to LGPL. So if I create an app and decide to not maintain it, you're still able to pull bug fixes etc. even without my involvement.

Yes, GPL effectively makes your binary GPL as well. And if you provide a library for others using GPL code, projects using your library must be GPL-compatible as well.

But the point is that you cannot restrict the user's rights, so if you distribute the source code you can choose a more permissive license (like MIT) for your code. That could in theory mean that if someone finds a replacement for your GPL dependency and remove it, they could release it under any MIT-compatible license (which is just about anything).


GPL dependencies are often avoided in companies because of its spreading nature where it makes everything it touches effectively GPL. And even if you write SaaS, if you're B2B you'll eventually land a bigger customer with strict software policies and you'll have to deploy on customer's servers, thus having to legally distribute the source code as well.

You don't have to provide it automatically, but shall they ask for it, you have to deliver. And relying on the customer never asking is not the best business decision. See for example here: https://boehs.org/node/truth-social

[–] sbeak@sopuli.xyz 1 points 2 days ago (1 children)

Ah okay, that makes sense. So “replacing” parts of a project would mean switching dependencies from something that’s GPL to something else (e.g. one that is MIT licensed).

Thanks for that explanation, @rikudou@lemmings.world!