gskinner / regexr

RegExr is a HTML/JS based tool for creating, testing, and learning about Regular Expressions.
http://regexr.com/
GNU General Public License v3.0
9.88k stars 972 forks source link

Should RegExr be open source again? What license? #204

Closed gskinner closed 6 years ago

gskinner commented 6 years ago

I'm a firm proponent of open source, but it provided negligible benefits for the project, and formed the foundation for a number of competitive sites, many of which did not open source their own work. This wasn't a requirement by any means, but it created a value imbalance. RegExr will probably be open sourced again in the future, but I am considering releasing it under GPL to encourage people building on it to share alike.

Feedback is welcome.

TheFiZi commented 6 years ago

I'd appreciate if it remains open source so it can be self-hosted. I run a copy internally for testing regex's against sensitive data I can't copy/paste into a publicly hosted website.

Nightfirecat commented 6 years ago

If aiming to ensure derivative projects be open-sourced as well, I'd advise GNU-GPLv3; it's a copyleft license that should achieve that goal.

gskinner commented 6 years ago

Cool. Good to know that use case. Would tossing a minimized version under GPL solve your immediate needs @TheFiZi ?

@Nightfirecat - Thanks, yes, that's the most likely path forward I think.

TheFiZi commented 6 years ago

@gskinner I'm currently running 2.1 Beta in house. I can wait until you're ready to release 3.0. No rush.

I don't even know what the new features of 3.0 are :)

gskinner commented 6 years ago

RegExr v3.0 is live now. I'm working on a write up of new features, but here's a quick list:

TheFiZi commented 6 years ago

@gskinner Sounds awesome.

ghost commented 6 years ago

Thanks! Also, about that, the problem is solved in this version.

Brawl345 commented 6 years ago

If you want to use GPL you should use AGPL because it also covers Network Use (installed on a server): https://choosealicense.com/licenses/agpl-3.0/

koocies commented 6 years ago

I'd prefer to see more software under BSD or MIT. I feel the GPL is too forceful and restrictive in what others can do with the software. (that's my 2 cents).

wheelerlaw commented 6 years ago

+1 for open sourcing the project and using AGPL instead of just GPL. I'd like to see this open-source'd because I was interested in contributing support for Java regex syntax.

jeff-hykin commented 6 years ago

I support AGPLv3 along with @Brawl345 and @wheelerlaw
I originally agreed with GNU-GPLv3 until I looked into the AGPLv3 and agree that its more applicable because of RegExr.com

I'm pretty sure none of MIT, GPLv3, AGPLv3, are capable of stoping knock-off RegExr websites from existing. But, AGPLv3 should require all those sites to open source all of their programs that used RegExr code. GPLv3 likely won't because websites are not binaries. MIT definitely will not. Source: https://opensource.stackexchange.com/questions/4221/how-can-i-forbid-shady-resale-practices

AGPLv3, Can companies use Regexr

Under AGLPv3 people could use RegExr (as program executable) in their company, even modified versions of RegExr without ever open sourcing anything. So @TheFiZi could self-host even for business stuff. But, if the company makes a product (or hosts a website) with RegExr code in it, then that whole product basically has to become open source.

Can be changed later?

AGPLv3 and GPLv3 are supposed to be irreversible.
You can change away from them so long as no one cares/notices. But, if you were using GLPv3 and then changed away to MIT someone else with the old RegExr_with_GPLv3 copy could theoretically take legal action (unlikely though).

Selling Regexr

If you ever wanted to sell Regexr under GLPv3, you could (anyone could try) but you'd have to release the source for every version you sold, and people could buy Regexr and then turn around and give that source away for free and you wouldn't ever be able to change your license to stop them from doing that. (Not a very good business model)

Downside

The only real downside I see, is that if I wanted to use some of the Regexr code (lets say the regex highlighting) in a much larger commercial product, doing so would basically ruin the entire commercial product forever because anyone could give away source code copies of the whole product for free.

Overall from what I understand, AGPLv3 says

  1. Anyone can sell or give (for AGPL hosting a website counts as 'giving') RegExr (an executable program) to someone, but the seller/giver must also offer the receiver a copy of the source code for the same price.
  2. If someone makes a derivative of RegExr from the source code, then when the they give/sell their derivative (executable program) to someone, the giver/seller also must offer their derivative source code to the someone for the same price.
  3. If person A buys (or gets for free) a source code copy of the RegExr code, then person A has the right to give that code away for free to anyone they want.
  4. Same as 3 but for all derivatives of RegExr.
  5. If someone makes a program A, where RegExr source code is a part of program A's code, all the code in program A has to follow these rules (basically program A is considered a derivative of Regexr)
  6. Copyleft: Derivatives-of-derivatives or derivatives-of-derivatives-of-derivatives, etc must all follow these rules.
wheelerlaw commented 6 years ago

The only real downside I see, is that if I wanted to use some of the Regexr code (lets say the regex highlighting) in a much larger commercial product, doing so would basically ruin the entire commercial product forever because anyone could give away source code copies of the whole product for free.

@jeff-hykin Not necessarily, if you dual license RegExr with the AGPL and a proprietary commercial license. For example: if I wanted to use RegExr in a much larger commercial product, then I would have to release the source code of both RegExr (and any changes I might have made) and my application or product that uses RegExr, or I can pay money for the RegExr source that has a license that permits me to not have to release my source code. You could even go as far as specifying in the license that if I buy RegExr source under said license, I don't have to release the source of my application, only that of RegExr's (and any changes I made to it). That way you preserve the open source nature of the project while also still funding its development efforts.

AdamDanischewski commented 6 years ago

It works well, I'd like to see the source for it - its useful, I think its professional and polished enough to be a product but I doubt you would be able to move into the market on your own. If you want to try to make money on it before open sourcing it I would shop a few big companies - you never know what they might decide to pick up for a reasonable price (I'd try IBM, Oracle, Microsoft, Google etc). If you don't care that much about the money, then you'd probably be best with a license that allows personal use only and reserves your rights in the context of commercial applications.

jp2masa commented 6 years ago

I agree with @koocies. I don't really need the source code of this website (which is great and I use it frequently), but GPL is a viral license. BSD and MIT are more permissive (derivative works only need to distribute a copy of the copyright notice). Microsoft uses MIT for most of their open source projects.

exx8 commented 6 years ago

@gskinner any plans to revive this branch soon? Is there a date?

Tim-Nosco commented 6 years ago

I am not an expert on licensing, but would like to host RegExr on an air-gap network.

hpoul commented 6 years ago

If you are unsure you could always go for GPL first—which is one of the most restrictive OS licenses (I think for such a tool it very much makes sense, since it is not intended to be embedded in other software). You could/should add a contribution agreement that everyone who contributes code gives you full rights to the code, so if you later decide to use a more permissive license (BSD, etc.) you could do so without removing all contributed code.. (if any) - for example http://contributoragreements.org contains:

  1. License obligations by Us We agree to (sub)license the Contribution or any Materials containing, based on or derived from your Contribution under the terms of any licenses the Free Software Foundation classifies as Free Software License and which are approved by the Open Source Initiative as Open Source licenses.

which should allow you to change the open source license at any time you'd like.. (You could probably even go as far as licensing it to yourself as BSD and use a proprietary fork on your website, but only make it available as GPL to everyone else, but IANAL and legal texts just make me dizzy)

(FWIW, check https://cla-assistant.io/ which is a tool to basically make sure everyone creating PRs has signed the CLA)

saxbophone commented 6 years ago

A bit late to the party here, but I am in firm agreement with the previous commenters who have suggested AGPL-v3 for a future open-source license, on the grounds that this license was created to solve exactly the problem you're faced with (others copying your work, hosting on their sites and not sharing-alike).

You could also opt for MPL-2.0 if you wanted to only require users of the code to share back changes to this code (this avoids the implication of not being able to use AGPL'ed stuff in any proprietary projects), but as it's a website (AFAIK) I'm not sure there's any benefit to be had here and MPL is a far weaker copyleft than AGPL.

saxbophone commented 6 years ago

Also, not a legal expert here but from my research and understanding there's nothing to stop the original copyright holder (@gskinner) from later changing their mind about the AGPL-licensed version —after all, licenses are for granting rights of usage to others, you can't license software to yourself! The original copyright holder can do anything with their own version of it, but if they accepted submissions from forks whilst it was AGPL'ed and kept these in a new version that was say MIT or BSD, problems would arise (unless the project has a contributor-license-agreement that specifies that contributors grant the maintainer the right to release it under the AGPL as well as License X in the future).

rugk commented 6 years ago

Please open-source it. Don't care for re-makers… At least if you use the (A)GPL you could theoretically use them and they know they could get legal threats… But please do!

It makes no sense to keep the code private to prevent people from re-creating your work.

BTW to clean up some stuff people wrote about licensing:

  1. Yes, open-source is about sharing. It is actually intended that others run their own copy, so you should not try to prevent that in any way.
  2. You can re-license your own creations at any time. However, when others contributed, you need to ask them, whether they accept the re-licensing.
  3. Additionally, you could always change the license to a more restrictive one without asking. (e.g. MIT license can be changed to GPL. MIT license can also be changed to proprietary
  4. GPL makes sure, the one who forks your software, has to open-source and license all changes under the GPL, too. That is known as copyleft.
  5. MIT license is not a copyleft one. It allows anyone to create their own version and do not distribute it under the GPL, so e.g. include it in a
  6. AGPL is just GPL+fixes a small hole in GPL, so that it also applies to server software. (As RegExe seems to run in the client/browser that may not matter here, but it also never hurts to use AGPL instead of GPL.)
  7. Nobody can sue you for using the software you created by yourself.
  8. If there is a license violation, only the copyright holders (i.e. the ones, who created the code) can sue the one, who violates the license.
  9. CLAs are mostly just "I transfer you all rights of my contribution to you." "contracts". Some contributors will not like them, because it could e.g. also allow the one, who get's the rights to distribute their own code under a proprietary license. It seems CLAs are thus mostly used by companies, who may want to do such (evil :wink:) stuff in the future. For usual open-source projects they are not needed. (You may not switch licenses too often, anyways.)

For licensing explained in an understandable way, I'd generally recommend to https://tldrlegal.com and https://choosealicense.com/.

pelizza commented 6 years ago

Hey guys, firstly congratulations for such a nice tool! It is the best online regex tool by far.

I understand all this discussion about open-source it or not. I see you have some really valid concerns. Anyway, I'd like to know if it would be possible to contribute in some other way, since I'd love to see support for Java.

Let me know how could I contribute, I'd be happy to.

gskinner commented 6 years ago

Ok. I've given this some thought, and my plan is to release the RegExr v3.1 source code under GPL v3. This might still take a few days to finalize, because I'd like to try to merge the v3 repo history into this repo if possible. Worst case, I'll just push up the latest v3 code as a stand alone commit. I'll post back here when its done.

gskinner commented 6 years ago

I just pushed the v3.2 front-end code under GPL v3 licensing. The plan is to push up the server code in the not too distant future as well. Closing this, but ongoing feedback is welcome.

rugk commented 6 years ago

Awesome! :tada: