Friday, July 27, 2012

Going Public

I've written about this before and - while I ended up not doing anything specific at the time - it's something I feel sufficiently strongly enough about that I've recently revisited it, consolidated my thoughts, and made a decision.

Certain components of the next release of DirectQ will be fully, 100% public domain.

The license I've chosen for this is the unlicense - mostly because I think the way it states it's intent in legalese is kinda cute, but also because it's patterned after previous public domain licenses that have been proven effective.

In terms of software freedom this is my own preferred approach - unless you are also free to do the wrong thing, how can you even begin to call yourself "free"?  Sorry, but you're not.  This is a problem and contradiction at the heart of the GPL and it's something that I have no small measure of personal doubt over.

Yes, I'm aware of the inherent risk in this.  Yes, I accept it.  No, I don't subscribe to the full-on GPL ideology on account of the question I posed above, among other reasons, and I find no satisfactory answer in the GPL nor in any associated material.

Yes folks, public domain is GPL-compatible.  Let's not have anyone crying about "violation" because they think that the GPL is about what they would like it to be - actually read the thing first, please.

So what components?

As a general rule, where I am satisfied that a module (.cpp file) is 100% authored by me and me alone and with no reasonable traceable ancestry to the original code, I will be making it public domain.  That includes my MDL renderer, my matrix library, my particle system renderer (not the setup), my state manager, my texture manager (but not loaders for certain individual file types), my HLSL manager, my video startup code, and a few other things.

In cases where a module has definite traceable ancestry to the original code it will remain GPL.  An example would be my sky code - the old R_InitSky function is still there and is a sufficiently important part of the code that I cannot in all good conscience do anything other than retain the original GPL license.  Likewise my surface renderer still contains enough that's descended from the original code to require retention of the GPL.

In one or two cases I've been able to shift some lines of code or a function or two to another module in order to satisfy this requirement.  Yayy for "extern" as well...!

Of course I can't revoke any prior GPL releases of the same or similar code, so previous versions will remain as-is, but the move to D3D11 is an appropriate cutoff point beyond which things can be shown to be sufficiently changed, so this now becomes possible.

7 comments:

Ron Jones said...

Great news. I'm a huge advocate of the public domain and believe that most open source developers have simply accepted the GPL as some sort of de facto open source license, despite the restrictions it imposes on those who might make use of that software. It's always nice to see a developer not following the status quo with respect to software licensing.

If you're looking for something perhaps a bit more 'robust' than unlicense, check out Creative Commons' CC0, which is described as a "public domain dedication tool". The legal code provides for a "fallback" license for countries that don't recognize the concept of public domain.

mankrip said...

In the GPL, the freedom is not for the coder, it's for the code.

The intent of the GPL is basically to protect the code from getting lost. This is good for critical systems like operational systems and business applications that may need some revisions in order to stay functioning, but it's not as important in things like games.

Baker said...

You see a lot of fighting over source codes (the "PSP kids", many who have moved up to modding DarkPlaces or FitzQuake now) and those who made what replacement textures.

So that is the low-end.

On the other side, all the high-end issues you work on require extensive collective intelligence and deep knowledge infrastructure and this group of people is highly civilized.

That is the high-end.

Both of these places exist. I think if Quake hadn't been released under the GPL but some other more liberal license most of the fringe engine works would have been closed source vanity projects (with source code long lost).

On the other hand, high end concepts and working code are rather useless in a vacuum. Because you need tons of it to even achieve something of any significance. And the mastery of many different things to even be able to utilize it.

Ron Jones said...

The intent of the GPL is basically to protect the code from getting lost.

Not to turn this into a GPL vs. everything else sort of debate, but it would seem to me that the true intent of the GPL is to help ensure its own success and the success of open source (it being a "viral" license). While this seems noble enough, it's still an agendized pursuit, and it imposes certain restrictions and complexities upon users of the code. Works in the public domain, on the other hand, are subject to no such restrictions.

Anonymous said...

Good for you mh!

Baker, people who actually care about the community would still release their code even if they were not bound by the GPL. You might loose a few projects to the dark side, but those people are generally not active in the community anyway.

mhquake said...

I definitely agree that the primary purpose of the GPL is to support and perpetuate it's own agenda, but as to what that agenda is, I see it as having deep deep roots in late 70s/early 80s computing academia rather than in the more practical world we live in today. The FSF was born out of a need to ensure/enforce code sharing among academic research communities, so the type of computing it supports is not really to be considered "open" in the first place - these academic communities were very closed, very insular, the domain of the privileged few who could have access to computers. They don't have much in common with the concept of "a computer in every home".

Since the 90s it's had this strange metamorphosis from being primarily about "freedom" (as they define it) to being primarily about Unix. (Windows as we know it today didn't even exist back when the FSF was formed, and MS were just a runt in the market.)

Both Baker and Mankrip make good points about preventing the code from getting lost; that was the specific reason why Carmack chose the GPL for Quake's release. I don't believe that he did so with the intent of fostering some kind of GPL ecosystem around Quake though; I'm reasonably sure that his intent was to help prevent loss to the Quake community. Evidence for this is in the readme that accompanied the original source release.

I'm fairly certain that in the event of myself ever deciding to quit this project, I'd just throw open my SVN to the public, but I obviously can't speak for everyone else here.

The code that I am able to make public domain is rather useless without the rest of the engine code, which must remain GPL, so anyone who decides to use it unethically (if such a concept exists for a public domain work) is going to have some degree of "fun" with it.

shiningwhiffle said...

unless you are also free to do the wrong thing, how can you even begin to call yourself "free"?

Every day I lament my lack of freedom to torture small animals and drive on the wrong side of the road.

(Public domain is simpler and I really like it, but this particular argument/rhetoric is silly.)