Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> If that means a professor wants to put the work into their course and help to instruct a class with it, that is great too.

Just to be very clear, neither the MIT nor GPL licenses prevent this.



Under a strict interpretation of the GPL, a student who copied code out of a textbook to use in a commercial project would be infringing the license.

I've never come across this with GPL code, but I've been a bit uncomfortable about reading Numerical Recipes too closely because their code is restrictively licensed.


A large portion of programming books are still under neither a FOSS nor a CC license, and hence fully protected by copyright. (I've encountered some where the main text of the book is not under a FOSS license, while the code is, but that's also not universal.) In such cases, you're not allowed to just re-use large code segments from the book (commercially or in an open source piece of code). Hence the case of a book under GPL isn't any "worse" than that, except that you do have the option of using the code in a GPL-licensed codebase.

(Small snippets are obviously not covered by copyright.)


That's a good point. I suppose Numerical Recipes was one case where I was particularly aware of the situation because (a) the license is stated explicitly (b) the code is structured in ways that it WOULD technically make sense to reuse non-trivial portions as is.


If you infringe gpl code though, you're obligated to provide your source. If you infringe some other copyrighted code, you're just liable for damages.

Is this correct at all? Like if Microsoft accidentally included some gpl code in Windows, could they theoretically be required to open source it? Or would just have to stop distributing?


You're never forced to follow the license; you just have to accept that you've committed copyright infringement, and may have to pay statutory damages for each copy, besides stopping the distribution of any more.


No. If you're found violating the GPL, then you have some time (which I don't remember off the top of my head) to provide the source; if you don't do that you'll be treated as having infringed any generic copyright — being liable for damages, having to cease distribution etc.


> Under a strict interpretation of the GPL, a student who copied code out of a textbook to use in a commercial project would be infringing the license.

This interpretation is very surprising to me. Could you point out what language in the GPL you're interpreting in this way?


If the textbook code is GPLed, this applies. Most textbooks seem to be "all rights reserved" so the copyright would be infringed anyway.


It seems pretty straightforward to me that section 5 of the GPL v3, "Conveying Modified Source Versions" (and the corresponding sections of earlier GPLs) would be applicable to this situation (provided that a non-trivial amount of code is incorporated by the student).

What makes you believe otherwise?


A misreading of the section I copy/pasted. :)

I thought because you were responding to my post saying using GPL code in a class, that you were claiming professors couldn't use GPL code in classes (they can). But you weren't saying that--I misread.


Actually, you have it all backwards.

If it is a normal textbook with non-GPL code in it (which includes code taken from an MIT/BSD licenced source), then that's copyrighted, and using that code for anything else, commercial or not, would be copyright infringement.

If the code is taken from a GPL source, though, then at least the code in that book would have to be licenced under GPL as well, in which case you would be free to use it for commercial software, as long as it is licenced under GPL. The GPL does not forbid use in commercial software, it only forbids use in non-GPL software.


> ...(which includes code taken from an MIT/BSD licenced source) then that's copyrighted, and using that code for anything else, commercial or not, would be copyright infringement.

I don't think this is right. The copyright of the BSD/MIT licensed code remains with the original authors who should be attributed in the textbook (as per the license). Since these authors have permissively licensed their code you're free to use it in your own project (as long as you also include the original attribution). Copying other parts of the text book may be a copyright violation, however.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: