

Ask HN: Open-source license for self-documenting code? - ISL

Hi!<p>I&#x27;m about to release my Physics PhD thesis. My thesis is automatically generated from prose, code, and raw data, going from raw data to a complete document without human intervention. The codebase spans thousands of lines of Octave, Gnuplot, LyX, Make, and many other GNU-licensed tools. I&#x27;d like to make it freely available, certainly for inspection and most likely under modification and sharing terms similar to the GPL.<p>The trouble is that the single git repo is both a document and code. The document is meaningless without the code, and the code is meaningless without the document. It seems that GPL-like licensing is inappropriate for documentation, and documentation licensing like the FDL is inappropriate for code.<p>Are there licenses that treat code on equal footing with documentation?<p>Thanks!
======
brudgers
[IANAL]

GPL comes into play if the source code of a GPL's application is modified. For
example, it applies if you modified the source code for Octave.

The source code that you write for Octave to execute is typically not subject
to GPL. Considering the case where you typed in code from a textbook for a
course is illustrative. Typing in the code doesn't make it GPL'd and the
copyright remains as before. This means that unless your thesis contains code
that modifies GPL'd programs, GPL doesn't come in to play. [1]

If that's the case, I'd recommend considering something like Creative Commons
unless you have a strong desire to actually enforce a more restrictive
licence. However, sponsors ans/or your university may also have license
requirements, so you may want to consult an attorney.

Good luck and congratulations.

[1] and in that case you are well on your way to making the modifications
available.

~~~
ISL
Agreed on all points. In this case, I'm actually interested in a share-alike
license. I'm making this code available because it makes the research world
stronger. If someone else extends it, I'd like to encourage them to share the
code back to the community. So, the GPL comes up of my own volition.

In the case of prose, though, I want people to be clear whose words are whose.
Even changing a word or two can change the meaning of the document
significantly. The GNU FDL appears to address this sort of thing, but doesn't
apply to code.

In this case, the prose is laden with included code, so I'm sitting between
licenses.

~~~
brudgers
One of the issues with open sourcing projects after their done is that it's
often a lot of work to clean things up.

But to me, it comes down to enforcement. If you're not willing to lawyer up,
it's rather pointless to get involved in enforceable licenses that lie between
all-rights-reserved and do-whatever-you-want. To put it another way, if hiring
a lawyer for advice on licensing seems like overkill, how much does the
licensing really matter deep down where push comes to shove?

Considering that in any academic setting, people should cite you regardless of
license and those who don't wouldn't even with all-rights-reserved, why make
it harder for the good guys?

~~~
ISL
I'm primarily concerned with encouraging code-sharing. If it's explicit in my
act of sharing that "I'm sharing code with you with the understanding that
you'll share with me", then perhaps it's more likely that other research
groups will share openly, too.

Our field is on the verge of developing an open code-sharing culture; this is
a chance to define it.

~~~
brudgers
GPL is conditional sharing. Those conditions can impede acceptance of the
offer.

Don't get me wrong, I like GPL and admire Stallman's position. I just don't
have the dogma in me to believe that lawyering up is always worth the bother
of threatening to do so.

------
eliteraspberrie
The BSD licenses mention code and documentation together ("this software and
associated documentation files") so I assume any of those would provide you
the same protection for your entire work. I don't know much about the GPL.

You could always make the source (of both code and documentation) public but
non-free, and make the generated code and documentation available separately
with their own liberal licenses.

By the way, did you use literate programming? I'm always curious about large
programs made in that style, it's very rare.

~~~
ISL
Alas, I'm not so formal as to do anything so beautiful as literate
programming. This is perhaps just slightly higher quality than your usual
physicist spaghetti code. It runs, it works, and it's reproducible.

I can't figure out if the non-free "No License" option on GitHub is truly non-
free. The GitHub terms of use grant the right to view and "to fork" without
any clear definition of what "forking" means in that context. Is that "fork so
you can see what it looks like" or "fork so you can use it and incorporate it
into your own analysis without sharing"?

If it's the former, I'll just throw it up on GitHub unlicensed or with an "all
rights reserved" tag, as making the guts of the code visible is my highest
priority. I'd be very happy to table for later the actual issue of selecting a
license (and appending it to the header of files in >5 different
interoperating computer languages).

Thanks!

