News for hackers. Stuff that matters.
Re:GitHub Copilot by fzaninotto on Tuesday June 29, 2021 @11:11AM (#27676956)
It shows the suggestions line by line, and only shows the best guess. It's not more intrusive than Intellisense.

You can actually see all the code blocks Copilot is thinking about if you want to, but that is indeed a distraction.

Re:GitHub Copilot by fabiospampinato on Tuesday June 29, 2021 @11:24AM (#27677185)
The problem I see with that is that's not possible for it to understand well which code is the best, GPT-3 is trying to mimic human writing in general, the thing is most human code is garbage, if this system was able to understand how to make code better you could keep training it until you had perfect code, which is not what the current system is giving you (a lot of the times anyway).
Re:GitHub Copilot by fzaninotto on Tuesday June 29, 2021 @11:36AM (#27677399)
I guess you miss the point. It's not trying to suggest the perfect code. Only you know it. It's saving you time by writing a good (sometimes perfect) first solution based on method/argument names, context, comments, and inline doc. And that is already a huge boost in productivity and coding pleasure (as you only have to focus on the smart part).
Re:GitHub Copilot by fabiospampinato on Tuesday June 29, 2021 @11:40AM (#27677455)
Maybe you are right, in my experience either the code you have easily available to you (either because another person or a computer wrote it) is perfect for your use case (to the best of your knowledge anyway) or rewriting it from scratch is usually better than morphing what you have into what you need.
Re:GitHub Copilot by drusepth on Tuesday June 29, 2021 @03:08PM (#27680338)
>if this system was able to understand how to make code better you could keep training it until you had perfect code

Based on the FAQ, it looks like some information about how you interact with the suggestions is fed back to the Copilot service (and theoretically OpenAI) to better improve the model.

So, while it may not understand "how to make code better" on its own, it can learn a bit from seeing how actual devs do make code better and theoretically improve from usage.

Re:GitHub Copilot by Trollmann on Tuesday June 29, 2021 @03:22PM (#27680529)
You're missing the problem he stated: Code written by humans is usually bad so the model is trained on garbage.
Re:GitHub Copilot by Jeff_Brown on Wednesday June 30, 2021 @10:56AM (#27689296)
The proof is in the pudding. I was skeptical too but the testimonials here are impressive.
Re:GitHub Copilot by apexalpha on Tuesday June 29, 2021 @11:27AM (#27677224)
The animated example on https://copilot.github.com/ shows it suggesting entire blocks of code, though.
Re:GitHub Copilot by verst on Tuesday June 29, 2021 @11:36AM (#27677406)
It does actually suggest entire blocks of code. I haven't quite figured out yet when it suggests blocks or lines - if I create a new function / method and add a doc string it definitely suggests a block for the entire implementation for me.
Re:GitHub Copilot by ehsankia on Tuesday June 29, 2021 @12:24PM (#27678119)
I see, I think the most useful case for me would be where I write a function signature+docstring, then get a list of suggestions that I can browse and pick from.

Do you have examples of what the line ones can do? The site doesn't really provide any of those.

Re:GitHub Copilot by verst on Tuesday June 29, 2021 @12:52PM (#27678514)
Take a look at this minimal example I just created where I did just that -- created a new function and docstring. This example is of course super simple - it works for much more complex things.

https://gist.github.com/berndverst/1db9bae37f3c809e5c3f56262...

Re:GitHub Copilot by vitus on Saturday July 03, 2021 @04:51PM (#27724815)
Is there actually a search.json endpoint?

https://github.com/HackerNews/API doesn't list this as a valid endpoint. Indeed, when I try to access it via curl, I get a HTTP 405 with a "Permission denied" error (same result when I try to access nonexistent-endpoint.json).

Based on the HN search on the website, I'd expect the correct autocomplete to involve hn.algolia.com [0].

[0] https://hn.algolia.com/api points at https://hn.algolia.com/api/v1/search?query=...

To me, this points at the need for human input with a system like this. There is a Firebase endpoint, yes, and Copilot found that correctly! But then it invented a new endpoint that doesn't exist.

Re:GitHub Copilot by grumple on Tuesday June 29, 2021 @01:27PM (#27679024)
Even snippets are so bad I have to turn them off. I can't even fathom how bad the suggestions are going to be for full blocks of code. But I guess I'll see soon...