←back to thread

79 points seg_fault | 1 comments | | HN request time: 0.219s | source

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.
Show context
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 #
seg_fault ◴[] No.41911659[source]
Removed it.
replies(1): >>41914404 #
1. 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.