Live data from Hacker News

Copilot regurgitating Quake code, including sweary comments

twitter.com

241–250 of 672 posts

Re: Copilot regurgitating Quake code, including sweary comments

#241
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 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?

Either a fixed-point decimal (i.e. an integer with the ones representing 1/100, 1/1000, etc. of a dollar, or a ratio type if you need arbitrary precision.

Re: Copilot regurgitating Quake code, including sweary comments

#242

I 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?

A variation of the Gell-Mann Amnesia effect?

"Briefly stated, the Gell-Mann Amnesia effect is as follows. You open the newspaper to an article on some subject you know well. In Murray's case, physics. In mine, show business. You read the article and see the journalist has absolutely no understanding of either the facts or the issues. Often, the article is so wrong it actually presents the story backward—reversing cause and effect. I call these the "wet streets cause rain" stories. Paper's full of them. In any case, you read with exasperation or amusement the multiple errors in a story, and then turn the page to national or international affairs, and read as if the rest of the newspaper was somehow more accurate about Palestine than the baloney you just read. You turn the page, and forget what you know."

https://www.goodreads.com/quotes/65213-briefly-stated-the-ge...

Re: Copilot regurgitating Quake code, including sweary comments

#243
post #16
post #5

This is utterly damning. I have already instructed my team that Copilot can never be used for our projects. Compromising the product because of unknowable license demands isn't acceptable in the professional world of software engineering. But if we put the licensing to one side for a moment... 1/ Everything I've seen it generate so far is 'imperative hell'. It is practically a 'boilerplate generator'. That might be u…

Awesome summary and thanks for trying it for the rest of us! Copilot sounded terrible in the press release. The idea that a computer is going to pick the right code for you (from comments, no less) is really just completely nuts. The belief that it could be better than human-picked code is really way off. You bring up a really important point. When you use a tool like Copilot (or copypasta of any kind), you are intro…

Isn't the entire point of this to suggest code you may use, not to just blindly accept is correct without thinking?

Re: Copilot regurgitating Quake code, including sweary comments

#244
post #153

Earlier quoted context omitted.

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.

While I strongly doubt they would use Wikipedia as a training set, has anyone done a search of GitHub code to see if other projects have copied-and-pasted that function from Wikipedia into their more-permissive codebases?

It’s GPT though and the GPT models were trained on data from Wikipedia

Re: Copilot regurgitating Quake code, including sweary comments

#245
post #155
post #140

Earlier quoted context omitted.

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

Excel rounds doubles to 15 digits for display and comparison. The exact precision of doubles is something like 15.6 digits, those remaining 0.6 digits causing some of those examples floating (heh) around.

That depends https://randomascii.wordpress.com/2012/03/08/float-precision...

Re: Copilot regurgitating Quake code, including sweary comments

#246
post #203

Earlier quoted context omitted.

This is a complex topic, mainly for two reasons: 1. it works on two layers (storage and code) 2. there is a context to take care of. [Modern] programming languages have decimal/rational data types, which (within limits) are exact. Where this is not possible, and/or it's undesirable for any reason, just use an int and scale it manually (e.g. 1.05 dollars = int 105). However, point 2 is very problematic and important t…

The problem is also stupid people and companies. My last job they wanted me to invoice them hours worked, which was some number like 7.6. This number plays badly when you run it through GST and other things - you get repeaters. So I looked up common practice here, even tried asking finance who just said "be exact", and eventually settled on that below 1 cent fractions I would round up to the nearest cent in my favour…

Well, they did say to be exact, and you handed them approximations, so...

Re: Copilot regurgitating Quake code, including sweary comments

#247

Earlier quoted context omitted.

> This product seems like it needs some more thought. Maybe a way to comment, flag, or otherwise call out bad output? Wait for your colleagues to use it, fix the bad code in the pull request, and wait for copilot to learn from the new training data you just provided!

This is actually a good idea that is missing from nearly every machine learning product. How do you back propagate lessons from user interaction into future training of the model? It can be done, I can't think of a place I've seen it done though.

It would be viewed as IP theft by most companies to upload private code to this for use by others

Re: Copilot regurgitating Quake code, including sweary comments

#248

I 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?

A variation of the Gell-Mann Amnesia effect? "Briefly stated, the Gell-Mann Amnesia effect is as follows. You open the newspaper to an article on some subject you know well. In Murray's case, physics. In mine, show business. You read the article and see the journalist has absolutely no understanding of either the facts or the issues. Often, the article is so wrong it actually presents the story backward—reversing cau…

I would do this with Reddit posts. I’d see the top comment under something I was familiar with and see it was full of holes or just incorrect but then I’d go to a post about something I didn’t know all that well and take the top comment at face value.

Re: Copilot regurgitating Quake code, including sweary comments

#249
post #198

Earlier quoted context omitted.

And it is completely impossible for the user to do so. So, the tool is worthless if you want to use it legally.

Doubtful. You can be almost certain it’s being widely used or will be widely used shortly. The conversations around copilot are eerily similar to the conversations around the first autocomplete tools

That does not seem like a response to what I just said?

I said that it is impossible for the user to check that the code copilot gives is OK, license-wise, and therefore, they can not be sure that it is legally OK to include in any project.

Re: Copilot regurgitating Quake code, including sweary comments

#250

Earlier quoted context omitted.

If someone asks how to handle money the best answer is integers or fixed precision decimals. There may be a valid case for using floats, but if someone asks they shouldn't be using floats. Also I'm hard pressed to come up with a case where floats would work. Can you give an example?

Most things in front office use floats in my experience, e.g. derivative pricing, discounting, even compound interest. None of these things are going to be any better with integers or fixed-precision, but maybe harder to write and slower.

Yes, the risk management/instrument pricing part in the "Front Office" uses floats, because the calculations involve compound interest and discount rates.

And the downstream parts for trade confirmation ("Middle Office"), settlement and accounting ("Back Office") used fixed precision. Because they are fundamentally accounting, which involves adding things up and cross-checking totals.

These two parts have a very clear boundary, with strictly defined rounding rules when the floating point risk/trading values get turned into fixed point accounting values.

Post reply on HN