I wonder how much worse or better simply automating a stackexchange search and pasting the results is...
Searching SO and converting the highest rated answer's code that doesn't syntax error to a Python module is about 150 LoC[0]. [0]: https://github.com/drathier/stack-overflow-import
The Good and the Limitations of Github Copilot
51–60 of 144 posts
Re: The Good and the Limitations of Github Copilot
#52> Can help you with Email Validation and API Calls It generates a nastily complex regular expression that is hopelessly wrong. Visible at https://www.youtube.com/watch?v=9Pw-Roo_duE&t=404 , here transcribed: /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/ For the local part, it requires [\w-\.]+, which excludes many valid characters like everyone’s favourite, +.…
> [...]
> The author makes no comment on how hideously bad it is[...]
I mean, it's coming up with a solution that's about as good as the average programmer who's going to validate E-Mail with regexes would, so as a crowd-sourced machine learning solution it's not too bad if you think about it.
In other words, Having a co-pilot doesn't mean you're guaranteed to get Chuck Yeager.
Re: The Good and the Limitations of Github Copilot
#53> Can help you with Email Validation and API Calls It generates a nastily complex regular expression that is hopelessly wrong. Visible at https://www.youtube.com/watch?v=9Pw-Roo_duE&t=404 , here transcribed: /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/ For the local part, it requires [\w-\.]+, which excludes many valid characters like everyone’s favourite, +.…
> It generates a nastily complex regular expression that is hopelessly wrong. > [...] > The author makes no comment on how hideously bad it is[...] I mean, it's coming up with a solution that's about as good as the average programmer who's going to validate E-Mail with regexes would, so as a crowd-sourced machine learning solution it's not too bad if you think about it. In other words, Having a co-pilot doesn't mean…
Re: The Good and the Limitations of Github Copilot
#54Earlier quoted context omitted.
I think Copilot should report the matching source URL to allow the user to visit the page and see the context and license. This move would also placate some copyright questions because it would be like searching StackOverflow or Github for inspiration. The problem of content attribution (exact and fuzzy match) has been studied before under the task of plagiarism detection for student essays. Funny thing is that a pla…
> I think Copilot should report the matching source URL That's the problem. The output of a GAN like Copilot usually can't be traced directly back to a single input.
And fuzzy code matching could be easily implemented by using the a model similar to CLIP (contrastive) to embed code snippets.
Re: The Good and the Limitations of Github Copilot
#55Earlier quoted context omitted.
This has been discussed at length several times before and the answer to why you use a regex like that to validate emails is because you aren't trying to validate against a standard, but against a subset of email formats. You want a "normal" simple email. No "+" domains etc. Because it doesn't matter if you annoy the 0.01% of your users that would be negatively affected by that, it's better to have their simple/canon…
How is it better to have "simple" emails?
Re: The Good and the Limitations of Github Copilot
#56Re: The Good and the Limitations of Github Copilot
#57If they are using my code anywhere I expect to be compensated.
If you read the license you put on your project (and/or the GitHub Terms of Service), you wouldn't expect that.
Re: The Good and the Limitations of Github Copilot
#58> Hey Stephen, If you are reading this, please follow me on hashnode .
God, that's obnoxious...
Re: The Good and the Limitations of Github Copilot
#59A fun issue I keep hitting with Github Copilot in Python is that it's a coin flip whether it will give me a Python 3-style print statement or a Python 2.7 style print statement.
Re: The Good and the Limitations of Github Copilot
#60Earlier quoted context omitted.
This has been discussed at length several times before and the answer to why you use a regex like that to validate emails is because you aren't trying to validate against a standard, but against a subset of email formats. You want a "normal" simple email. No "+" domains etc. Because it doesn't matter if you annoy the 0.01% of your users that would be negatively affected by that, it's better to have their simple/canon…
How is it better to have "simple" emails?