News for hackers. Stuff that matters.
Re:Ask HN: Software licensing excluding military use? by dsr_ on Thursday July 27, 2017 @07:37AM (#14864285)
No. However, there's nothing preventing you from taking the BSD license and adding a fourth clause:

4. This software cannot be used for military purposes under this license. You must negotiate for a license from the original author, AUTHOR NAME.

Re:Ask HN: Software licensing excluding military use? by hiq on Thursday July 27, 2017 @08:03AM (#14864439)
There is also nothing preventing you from rolling your own crypto. It doesn't mean you should do it. Actually in both cases, you should not, for pretty much the same reasons: if you have no idea about what you are doing, it is likely you are doing it wrong, with bad consequences looming.
Re:Ask HN: Software licensing excluding military use? by 43224gg252 on Thursday July 27, 2017 @07:40AM (#14864300)
Couldn't you ad another clause to any license?
Re:Ask HN: Software licensing excluding military use? by struppi on Thursday July 27, 2017 @07:56AM (#14864390)
I guess that would become harder the longer the license gets.

Say you wanted to add a clause to the apache license (AL2) or GPLv3 - Then you would also have to make sure that your new clause does not contradict anything in the rest of the license.

Edit: And that clause would probably prevent even others who are not in the military from using your code. Just because there's a chance your license is incompatible with the GPL.

Re:Ask HN: Software licensing excluding military use? by dsr_ on Thursday July 27, 2017 @09:29AM (#14865025)
Very much this.

The longer the license, the more likely it is that you have not understood the effects.

The simplest license is abandonment to the public domain; that won't work. You need something that establishes that you are the original author (so that you own the rights) and that you are offering certain specific rights to most people (now it's open source, though not Open Source) and that keeps the same restrictions for people making derivative works -- and now you have the BSD 3-clause.

So that's the simplest license which can possibly work for the OP's purposes.