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
Copilot regurgitating Quake code, including sweary comments
211–220 of 672 posts
Re: Copilot regurgitating Quake code, including sweary comments
#212They 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…
We know you can't use StackOverflow upvotes. However, they should have enough signal to identify what snippets of code have been most frequently copy-pasted from one project to another.
Question is whether that serves as a good proxy for good code identification.
Re: Copilot regurgitating Quake code, including sweary comments
#213Even includes the commented out code. Clearly Copilot has gained a deep understanding of code and is not simply the slowest way to make a terrible, opaque search engine ever!
Problem is you don't know whose code you're stealing, which leads to all sorts of legal, security, and correctness issues.
Re: Copilot regurgitating Quake code, including sweary comments
#214Earlier quoted context omitted.
> ...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
#215With apologies to Martin Niemöller[1]: First the automation came for the farmers, and I did not speak out — Because I was not a farmer. Then the automation came for the factory workers, and I did not speak out — Because I was not a factory worker. Then the automation came for the accountants, and I did not speak out — Because I was not a accountant. Then the automation came for me (a programmer) — and there was no on…
Honestly I’ve automated a large chunk of my day job. The trick is keeping it secret!
Re: Copilot regurgitating Quake code, including sweary comments
#216They 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?
I’d just add that if you are building a price prediction model, floats are probably what you need.
Re: Copilot regurgitating Quake code, including sweary comments
#217Earlier 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…
BECAUSE EXCEL SUCKS MY DUDE.
Re: Copilot regurgitating Quake code, including sweary comments
#218This 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?
Hard to say how straightforward it'd be to get it to produce consistently vulnerable suggestions that make it into production code, but I imagine an attacker with some resources could fork a ton of popular projects and introduce subtle bugs. The sentiment analysis example on the Copilot landing page jumped out to me...it suggested a web API and wrote the code to send your text there. Step one towards exfiltrating secrets!
Never mind the potential for plain old spam: won't it be fun when growth hackers have figured out how to game the system and Copilot is constantly suggesting using their crappy, expensive APIs for simple things!? Given the state of Google results these days, this feels like an inevitability.
Re: Copilot regurgitating Quake code, including sweary comments
#219They 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…
> 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!
Re: Copilot regurgitating Quake code, including sweary comments
#220It seems like a very sensible answer from copilot since the prompt includes "Q_" which makes it obvious that the programmer is specifically looking for the Quake version of this function. To me it doesn't show that copilot will regurgitate existing code when I don't want it to, just that if I ask it to copy some famous existing code for me it will oblige.