Live data from Hacker News

Copilot regurgitating Quake code, including sweary comments

twitter.com

121–130 of 672 posts

Re: Copilot regurgitating Quake code, including sweary comments

#122

Earlier quoted context omitted.

> The python example is using floats for currency. Dumb question, but what is the proper way to handle currency? Custom number objects? Strings for any number of decimal places?

In its base unit. So cents in USD. Which can be an int64 Or if your language has something specific built in, use that.

> Or if your language has something specific built in, use that.

Unless your language is PostgreSQL's dialect of SQL, apparently. https://wiki.postgresql.org/wiki/Don%27t_Do_This#Don.27t_use...

Re: Copilot regurgitating Quake code, including sweary comments

#123
It looks like the author of the linked tweet intended for it to reproduce the Quake code, by using the exact same function name and comment. Whatever the merits of CoPilot, in this case the human intended to write the quake function into their file, and put the wrong license on it.

Re: Copilot regurgitating Quake code, including sweary comments

#124
post #73

Earlier quoted context omitted.

Does GitHub Copilot write perfect code? No. GitHub Copilot tries to understand your intent and to generate the best code it can, but the code it suggests may not always work, or even make sense. While we are working hard to make GitHub Copilot better, code suggested by GitHub Copilot should be carefully tested, reviewed, and vetted, like any other code. As the developer, you are always in charge. https://copilot.gith…

> ...may not always work, or even make sense... Naively, as someone who just heard of this - that sounds worse than useless. If you can't trust its output and have to verify every line it produces and that the combination of those lines does what you wanted, surely it's quicker just to write the code yourself?

Then write the code yourself. It's not like you're forced to use this demo.

Re: Copilot regurgitating Quake code, including sweary comments

#125
post #109
post #97

Earlier quoted context omitted.

Have you met programmers? Even those who care about quality are often under a lot of pressure to produce. Things slip through. Before, it was verbatim copies from Stack Overflow. Now it'll be using Copilot code as-is.

So, nothing new, is your point?

Then why are you complaining? Unless something is new that warrants you getting mad about people getting mad at technology.

Re: Copilot regurgitating Quake code, including sweary comments

#126
License Laundering

Like Money Laundering for cash equivalents, or Trust-Washing for disinformation, but for hijacking software IP.

It might not be the intended use case, but that winds up being the practical result.

(on a related note, it would make me want to fun GPT-* output through plagiarism filters, but maybe they already do that before outputting?)

Re: Copilot regurgitating Quake code, including sweary comments

#127
post #84

Earlier quoted context omitted.

While I accept most of the concerns, it's better than your comment suggests. I see some promise for it as a tool for reminding you of a technique or inspiring you to a different approach than you've seen before. For example, I wrote a comment along the lines of "Find the middle point of two 2D positions stored in x, y vectors" and it came up with two totally different approaches in Ruby - one of which I wouldn't have…

Yeah, but... I mean, I guess we all agree that copying code from, let's say StackOverflow without checking if it really does what you want it to do is a bad thing? Now here we have a tool that basically automates that (except it's copying from GitHub, not StackOverflow), and that's supposed to be a good thing? Even if its AI is smarter, you would still have to check the code it suggests, and that can actually be hard…

[deleted]

Re: Copilot regurgitating Quake code, including sweary comments

#129
post #64
post #29

Earlier quoted context omitted.

It's worth keeping in mind that what a neural network like this (just like GPT3) is doing is generating the most probable continuation based on the training dataset. Not the best continuation (whatever that means), simply the most likely one. If the training dataset has mostly bad code, the most likely continuation is likely to be bad as well. I think this is still valuable, you just have to think before accepting a…

I have no idea how this or GPT3 works or how to evaluate them, but couldn't you argue that it's working as it should? You tell copilot to write a fast inverse square root, it gives you the super famous fast inverse square root. It'd be weird and bad if this didn't happen. As far as licenses go, idk. Presumably it could delete associated comments and change variable names or otherwise obscure where it's taking code fr…

> couldn't you argue that it's working as it should?

Let's say that it's doing exactly what it was trained to do.

Re: Copilot regurgitating Quake code, including sweary comments

#130
post #69

Earlier quoted context omitted.

Copilot is a tool. If you take copilot's suggestions uncritically and push them to Github, - that's on you.

Sure but if you have to audit every suggestion to see if it violates copyright laws that's not a particularly useful tool.

Depends. If you find useful code on Github, Stack Overflow or anywhere else in the internet, you still need to check whether it is suitable with your licensing or not.
Post reply on HN