←back to thread

79 points seg_fault | 9 comments | | HN request time: 0.681s | source | bottom

Since there is so much interest on HN in floats lately and their software implementations, I wanted to show mine. It has no use and is just for teaching me floats and C++. Give me your thoughts.
1. rurban ◴[] No.41908916[source]
It's copyrighted so I should not even look at it, and therefore not comment on it.
replies(5): >>41910877 #>>41911220 #>>41911473 #>>41911659 #>>41911746 #
2. recursive ◴[] No.41910877[source]
And yet...
replies(1): >>41911167 #
3. rurban ◴[] No.41911167[source]
The API looks fine, well
4. syockit ◴[] No.41911220[source]
It's copyrighted, but nothing stops you from looking at it. It's akin to looking a t a mural painted at someone's house. You can also comment as long as you don't post snippets of the code (except for when fair use is applicable).
replies(1): >>41944134 #
5. dahart ◴[] No.41911473[source]
All creative works are copyrighted by default in the U.S. and any countries adhering to the Berne convention, unless copyrights are explicitly waived (which is not always an option). This is true regardless of what copyright notices exist, so by that standard you shouldn’t look at or comment on anything. ;) But, it’s legal to look at something copyrighted, you just can’t copy & distribute it. Just curious, did you mean that it lacks an open source license and you only look at open source, or was this just a joke that went sideways, or something else?
6. seg_fault ◴[] No.41911659[source]
Removed it.
replies(1): >>41914404 #
7. sebtron ◴[] No.41911746[source]
I suppose you do not read books or watch movies either
8. dahart ◴[] No.41914404[source]
You should put the copyright notice back and (optionally) add a license. Removing the notice from your code changes nothing, that does not waive or remove your copyright. You still have the copyrights to your code by default, and you should. Don’t react to silly comments on the internet by feeding them.

If you really don’t want the copyrights, you can use the CC0 license from Creative Commons. That would allow people to use your code any way they want with no restrictions (which means they are legally allowed to use it commercially, remove the author notice, re-license modified versions, redistribute the code, etc.). However, you do not need to waive your copyrights entirely in order to license your code as open source. You can choose between a variety of licensing terms, while still being very open and liberal about sharing. Try the Creative Commons license chooser https://chooser-beta.creativecommons.org/. Or look through open source licenses. Standardized SPDX IDs are gaining popularity since it helps with some automation workflows. https://opensource.org/licenses https://spdx.org/licenses/

Since you left the author note, maybe you would like an attribution license like one of these popular choices (both available with SPDX IDs): https://opensource.org/license/bsd-3-clause https://creativecommons.org/licenses/by-sa/4.0/

If you don’t add a license, then your code remains under strict copyright and people are not legally allowed to use it in their own projects, regardless of whether you have a copyright notice in the comments. Leaving out the copyright notice might be confusing, especially given this thread. The recommended practice is to include both the copyright notice and the license in comments or a license file.

9. rurban ◴[] No.41944134[source]
Legally yes, but in reality not. In most companies or projects legal tells me not to look at it all, esp. the FSF. I can look at the API, but not the implementation.

That's why it's called https://en.wikipedia.org/wiki/Clean-room_design.