Earlier quoted context omitted.
> And these are the hand picked examples. This product seems like it needs some more thought. Everyone's self-preservation instincts kicking in to attack Copilot is kinda amusing to watch. Copilot is not supposed to produce excellent code. It's not even supposed to produce final code, period. It produces suggestions to speed you up, and it's on you to weed out stupid shit, which is INEVITABLE. As a side note, Excel a…
So how do you know if the code that Copilot regurgitates is almost a 1:1 verbatim copy of some GPL'ed code or not ? Because if you don't realize this, you might be introducing GPL'ed code into your propiertary code base, and that might end up forcing you to distribute all of the other code in that code base as GPL'ed code as well. Like, I get that Copilot is really cool, and that software engineers like to use the la…
Copilot regurgitating Quake code, including sweary comments
151–160 of 672 posts
Re: Copilot regurgitating Quake code, including sweary comments
#152... and the example is mathematically- and floating-point-spec obtuse enough that it was incomprehensible at the time it was written. (As evidenced by id comments)
Re: Copilot regurgitating Quake code, including sweary comments
#153From the GPLv2 licensed code: https://github.com/id-Software/Quake-III-Arena/blob/master/c... copilot repeats it word for word almost, including comments, and adds an MIT like license up the top
Actually the indentation of the first comment and the lack of preprocessor show it's not copied from this code directly but from Wikipedia ( https://en.wikipedia.org/wiki/Fast_inverse_square_root#Overv... ) So It could be that the Quake source code is not part of the training set but the Wikipedia version is.
Re: Copilot regurgitating Quake code, including sweary comments
#154Earlier 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?
Depends what you’re doing. In fact it’s not always wrong to use floats for currency. For accounting you should probably use a fixed-precision decimal type.
Also I'm hard pressed to come up with a case where floats would work. Can you give an example?
Re: Copilot regurgitating Quake code, including sweary comments
#155Earlier quoted context omitted.
> And these are the hand picked examples. This product seems like it needs some more thought. Everyone's self-preservation instincts kicking in to attack Copilot is kinda amusing to watch. Copilot is not supposed to produce excellent code. It's not even supposed to produce final code, period. It produces suggestions to speed you up, and it's on you to weed out stupid shit, which is INEVITABLE. As a side note, Excel a…
>As a side note, Excel also uses floats for currency It's still problematic, but the defaults and handling there avoid some issues. So, for example: Excel: =1.03-.42 produces 0.61, by default, even if you expand out the digits very far. Python: 1.03-.42 produces 0.6100000000000001, by default.
Re: Copilot regurgitating Quake code, including sweary comments
#156Backstory? WTF is "Copilot"?
Re: Copilot regurgitating Quake code, including sweary comments
#157Re: Copilot regurgitating Quake code, including sweary comments
#158I hate to be the one that says this but I think it‘s true: "So you are an SWE and you take a break from work to go to Hackernews to complain that Github's Copilot, which is an AI-based solution meant to help SWEs, is utter shit and completely unusuable. And then you go back to writing AI-based solutions for some other profession. Which is totally not shit or anything.“ Can anybody put this more elegantly?
Re: Copilot regurgitating Quake code, including sweary comments
#159This does make me wonder if this is susceptible to the same form of trolling as that MS AI got. Commit a load of grossly offensive material to multiple repos, and wait for Copilot to start parroting it. I think they're going to need some human moderation.
Offensive code is the least of my worries. What about vulnerable/exploitable code?
Re: Copilot regurgitating Quake code, including sweary comments
#160Earlier quoted context omitted.
Because it's an opaque neural network on the backend, it doesn't know if or from whom it copied code.
Could they handle this by generating a collective attribution file that covers every (permissively licensed) repository that Copilot learned from? Of course this would be massive, so from a practical consideration the attribution file that Copilot generates in the local repository would have to just link to the full file, but I don't think that would be an issue in and of itself.
Almost certainly a link would not suffice, basically every license requires that the attribution be directly included with the modified material. Links can rot, can be inaccessible if you don't have internet access, can change out from underneath you, etc.
(I am not a lawyer, btw)