Live data from Hacker News

Copilot regurgitating Quake code, including sweary comments

twitter.com

171–180 of 672 posts

Re: Copilot regurgitating Quake code, including sweary comments

#171
post #30

They have 4 hand picked examples on their homepage: https://copilot.github.com/ One has the issue with form encoding: https://news.ycombinator.com/item?id=27697884 The python example is using floats for currency, in an expense tracking context. The golang one uses a word ("value") for a field name that's been a reserved word since SQL-1999. It will work in popular open source SQL databases, but I believe it would bom…

> The golang one uses a word ("value") for a field name that's been a reserved word since SQL-1999. It will work in popular open source SQL databases, but I believe it would bomb in some servers if not delimited...which it is not.

In their defense they created the table with this column before invoking the autocomplete, so they sort of reap what the sow here.

It could at least auto-quote the column names to remove the ambiguity, but it's not a compiler, is it.

Re: Copilot regurgitating Quake code, including sweary comments

#172

Earlier quoted context omitted.

Hm odd takes here. It's really weird for software engineers to judge something by its current state and not by its potential state. To me, it's clearly solvable by Copilot filtering the input code by that repository's license. It should only be certain open source licenses, maybe even user-choosable, or code-creators can optionally sublicense their code to Copilot in a very permissable way. Secondly, a way for the cr…

I've been in the business a long time and I just don't believe in generalized AI at all. Writing code requires general (not artificial) intelligence. All of these "code helping" tools break down quickly because they may be searching for and finding relevant code blocks (the "imperative hell" referred to by another commenter), but they don't understand the context or the overall behavior and goals of the program. Writ…

If we're coming up with potential uses, I think they got the direction wrong.

Don't tell me what to do, tell me what not to do. "this line doesn't look like something that belongs in a code base", "this looks like a line of code that will be changed before the PR is merged". Etc.

Re: Copilot regurgitating Quake code, including sweary comments

#173
post #170

Earlier quoted context omitted.

Every front office finance project I have ever worked on has used floating point, so take the dogma with a grain of salt. It depends entirely on the context.

And the all suffer from rounding error problems? I mean, fixed point and a specific type for currency (which also should include the denomination, while we are at it) are not rocket science. Spreadsheets get that right, at least.

Excel uses IEEE-754 floating point, so I don't get what you mean with the spreadsheet comment. It has formatting around this which rounds and adds currency symbols, but it's floating point you're working with.

Rounding error doesn't matter on these types of financial applications. It's the less glamorous accounting work that has to bother with that.

They're not rocket science, but they're unnecessary, and would still be off anyway. Try and calculate compound interest with your fixed point numbers.

Re: Copilot regurgitating Quake code, including sweary comments

#174
post #14

I’m really dumbfounded by the Copilot team decision to not exclude GPL licensed code. Why was this direction chosen? Is the inclusion of GPL really worth the risk and potential Google v. Oracle lawsuit? I’d like to know the reasoning.

Why would excluding GPL'd code be enough to not violate licenses? I don't understand why people think MIT or other licenses are free for alls to take code as they wish. The MIT license includes an attribution clause. And, as the linked video shows, Copilot is more than happy to take its code and put your pet license and copyright notice on instead. Isn't that equally as infringing as stealing GPL code? The idea of mi…

At some level though, this suggests that the only way to be safe if you're writing a program (outside of a Copilot context) is probably simply not to look at GitHub (or maybe Stack Overflow and other code sources) except for, perhaps, using properly attributed entire functions. If you take a couple lines of code and tweak it a bit are you now required to attach copyright attribution? IANAL, but I'm guessing not.

Re: Copilot regurgitating Quake code, including sweary comments

#175

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?

Every front office finance project I have ever worked on has used floating point, so take the dogma with a grain of salt. It depends entirely on the context.

They probably just accumulate the rounding errors into an account and write it off periodically without even realising why it happens.

Re: Copilot regurgitating Quake code, including sweary comments

#177
post #20

I get why marketing calls machine learning “AI”. I don’t get why engineers would think this is. Dumb.

> I don’t get why engineers would think this is.

This claim that "AI" only means artificial general / human-equivalent intelligence completely ignores the long history of how that term has been used, by computer science researchers, for the last 70-odd years, to include everything from Shannon's maze-solving algorithms, to Prolog-y systems, to simple reinforcement learning, and so on.

https://web.archive.org/web/20070103222615/http://www.engagi...

It's true that there has been linguistic drift in the direction of the definition getting narrower (to the point where it's a joke that some people use 'AI' to mean whatever computers can't do _yet_). And you can have reasons to prefer your own very-narrow definition. But claiming that your own definition is the only valid one to the point that anyone using a wider definition (one that has a long etymological history, and which remains in widespread use) are "dumb" is... not how language works.

Re: Copilot regurgitating Quake code, including sweary comments

#178
post #60

From 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

It's up to the end user to accept the suggestions.

And it is completely impossible for the user to do so.

So, the tool is worthless if you want to use it legally.

Re: Copilot regurgitating Quake code, including sweary comments

#179

Earlier quoted context omitted.

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...

It has the same issue that the other suggestion of your parent comment had: it can’t deal with fractions of cents, which is an issue you will most likely run into before you will into floating point rounding issues.

Re: Copilot regurgitating Quake code, including sweary comments

#180
post #69

Earlier quoted context omitted.

Why would excluding GPL'd code be enough to not violate licenses? I don't understand why people think MIT or other licenses are free for alls to take code as they wish. The MIT license includes an attribution clause. And, as the linked video shows, Copilot is more than happy to take its code and put your pet license and copyright notice on instead. Isn't that equally as infringing as stealing GPL code? The idea of mi…

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

Then name a usage of the tool that is legally sound. I can not think of one.
Post reply on HN