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

Owning code snippets sounds ridiculous to me, like can I own this snippet?

    def average(*numbers):
        return sum(numbers)/len(numbers)
if not is it because it is too small? what’s the minimum line number that ownership kicks into? what if I change the function name and the variable names?


If that's under a copyleft license, I can't just copy & paste it under my non-copyleft licensed code and call it mine.

That's as simple as that.


It can’t be that simple. The function in the GP is not an original idea and is far too simple to merit protection just by slapping a license on it.


I don't expect, or support, licensing that small amount of code, and suing everyone to oblivion.

The point I'm trying to make is if something is under a copyleft license, you can't copy and paste it verbatim to something non-copyleft. It's what the license says.

Also, to be pedantic, the function I'm commenting on is pure maths, and you can't license/patent mathematics.

On the other hand, if there's some magic sauce of doing something, let it be 25 lines, what will you say? It's just 25 lines, so you can't license it? To be more pedantic, I actually have an algorithm, which is around 25 lines and does something novel. I've published a paper on it.

If I license the reference implementation with AGPLv3+, and you use it and close it, and if I can't go after you, what's the purpose of the license?

You can read the paper and try to implement it. It's free in that regard.


It seems rather silly to me that such small innovations would be worthy of legal protections under either a copyright or copyleft license.

Isn’t there already precedent in other forms of IP, such as chord progressions in music, sentence length in literature, etc?


Copyleft isn't really a good example. Let's talk about copyright. That fragment of code is not copyrightable on its own. Too small, too trivial.


Let's say I have 25 line function which does something novel and can be published as research (which I did, BTW, no joke), and I opened its reference implementation with AGPLv3+.

Is it again too trivial?


is 25 lines the limit then? do you count comments? can I codegolf a few lines to get below the limit?


> is 25 lines the limit then?

I don't know. That's my function's length.

> do you count comments?

No comments, no blank lines.

> can I codegolf a few lines to get below the limit?

You bet. But, if you copy my reference implementation, you need to get the license as well.

However, the research is on the open. Read it, implement it. That's no problem.

But, CoPilot is not reading my paper. It's reproducing my function verbatim, which is under a license which has share-alike mechanics.


Not really. You can't copyright a trivial snippet, same way you can't copyright headers.


I've provided a more realistic and logical examples in this thread, please refer to them.


if you write it yourself, it's fine. if you directly copy it from somewhere you arent allowed to copy from, then it is wrong.

There are no rules about the form of the code itself that governs whether or not someone owns it. Common sense applies. Sure you could "steal" very small, common, code snippets and get away with it; but that doesnt make it less wrong.

When a commercial entity explicitly does it, however, some times we can catch them. Like if they do it through algorithms that we more or less know how they work - i.e. the algorithm is using advanced control flow logic to copy and paste from it's training data set and copyrighted material is in that data set


Point is that you can ask 100 programmers to write an average function and probably most of them will come up with this answer verbatim. How can copyright law handle this? There is also the opposite problem, I can copy a complicated snippet and change the variable names. Am I absolved from liabilities now?


If they come up with it on their own, it shouldnt be an issue. Likewise, swapping the variable names does not absolve you from liability.

Copyright really is not only concerned with what exactly is on the page, but also how you got there, and where the knowledge came from to get you there.

What if I read your codebase, and then years later while programming for myself I inadvertently use solutions you came up with while thinking I came up with it myself?

There really are no hard set rules, and this is something that is handled on a case-by-case basis based on whether or not a convincing argument can be made that you copied a novel idea from someone else and claimed it as your own.

We can argue the semantics of it all we want, but the subject area is an active battleground. Typically it only matters when money starts to get involved, since no one usually presses the issue or gets involved with random personal projects. So when an enterprise level company leverages that lack of caring into a proprietary pay-to-use project that operates by copying and pasting code from copyrighted material, then it seems like a case might be able to be made for it.


Someone trademarked the word THE yesterday and a few common musical notes and your video gets banned




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

Search: