Live data from Hacker News

GitHub Copilot Labs

github.com

11–20 of 72 posts

Re: GitHub Copilot Labs

#11
post #10
post #4

Is this the same backend that is powering https://denigma.app ?

Almost certainly not --- That was also the first time I had heard of denigma.app and their tagline of We stress-tested it on the worst, most obscure code we could find. That's why we're confident it will work on your complex codebase. gave me a good chuckle since just trivially modifying their example ... sort of worked Given: RUN apt-get update && exit 1 && apt-get install -y libnss3 libgtk-3-0 libx11-xcb1 libxss1 l…

I think having it produce good output on nonsensical / obviously wrong code would be a very different target than explaining commonly found code, so your expectation is a little unreasonable at this point.

Re: GitHub Copilot Labs

#12
post #10

Earlier quoted context omitted.

Almost certainly not --- That was also the first time I had heard of denigma.app and their tagline of We stress-tested it on the worst, most obscure code we could find. That's why we're confident it will work on your complex codebase. gave me a good chuckle since just trivially modifying their example ... sort of worked Given: RUN apt-get update && exit 1 && apt-get install -y libnss3 libgtk-3-0 libx11-xcb1 libxss1 l…

I think having it produce good output on nonsensical / obviously wrong code would be a very different target than explaining commonly found code, so your expectation is a little unreasonable at this point.

Well, they're the ones that said "worst" and "most obscure," that wasn't me paraphrasing

But my heartburn is the intersection of these two bullet points: "and exit 1 is used to stop any further commands from running", followed by _any other claim_

> obviously wrong code

Based on my experience with code reviews, I'd bet $5 I could put (or leave) "&& exit 1 &&" in the middle of a sea of RUN commands and it'd go unnoticed. So I guess it depends on who the target audience is for both this and the absolutely laughable Labs output: people who don't want to read what an if statement does, or people looking for the _meaning_ of the code?

Re: GitHub Copilot Labs

#13

What's the use-case for this? Hopefully not for commenting code. This only seems to be able to explain syntax, which seems pretty useless for anyone who isn't new to the language they're using. Am I missing something?

I'm wondering the same thing. There is one example in the discussion where explaining syntax seems useful, a regular expression. There's a bunch of existing solutions for that, and the explanation generated by Copilot is wrong.

Re: GitHub Copilot Labs

#14
when i first used copilot i thought it wasn’t very useful. But as i’ve used it more i realize it helps a lot. A surprising amount of code is just boilerplate, e.g. a single if-statement is 3 lines but you’re not going to abstract all your if statements, so you write similar if statements over and over again.

It especially helps when i’m programming in a language or library i’m not familiar with, because i don’t quite understand the syntax but copilot does.

Re: GitHub Copilot Labs

#15

What's the use-case for this? Hopefully not for commenting code. This only seems to be able to explain syntax, which seems pretty useless for anyone who isn't new to the language they're using. Am I missing something?

It's a pretty straightforward, understandable task - which then leads you towards making your own tweaks to it / writing something new.

It may also just be an interesting attempt at something that could be great depending on how well it worked - it's an experiment. A general "explain to me what this code does" that was as good as a human explaining overall what is going on could be very useful in more complicated parts of a codebase.

My final thought is that being new to a language and needing to dig around in a codebase is something I do quite a lot and so it could be useful even if it's quite basic.

Re: GitHub Copilot Labs

#16

when i first used copilot i thought it wasn’t very useful. But as i’ve used it more i realize it helps a lot. A surprising amount of code is just boilerplate, e.g. a single if-statement is 3 lines but you’re not going to abstract all your if statements, so you write similar if statements over and over again. It especially helps when i’m programming in a language or library i’m not familiar with, because i don’t quite…

I've found the same. Particularly coming in nicely when I add some kind of parsing in and out of a data structure and it auto fills in all the parameters.

Re: GitHub Copilot Labs

#17

when i first used copilot i thought it wasn’t very useful. But as i’ve used it more i realize it helps a lot. A surprising amount of code is just boilerplate, e.g. a single if-statement is 3 lines but you’re not going to abstract all your if statements, so you write similar if statements over and over again. It especially helps when i’m programming in a language or library i’m not familiar with, because i don’t quite…

I've been finding it amazingly useful from the outset. It's like it reads my mind generating whole correct functions just from a small comment or example, and it's great at extrapolating repetitive increments/transformations. Write a small comment telling it what you want and it's uncanny what it can spit out.

Re: GitHub Copilot Labs

#18

What's the use-case for this? Hopefully not for commenting code. This only seems to be able to explain syntax, which seems pretty useless for anyone who isn't new to the language they're using. Am I missing something?

The use case is exactly what is stated on the box. You select a bit of code in a language/syntax that may be unfamiliar to you, and it tries to explain it better in English.

Re: GitHub Copilot Labs

#20
Most (all?) of the commenters here seemed to miss the entire point of this feature:

"Create custom prompts

We provide a few preset prompts to get you started: three that explain what a particular block of code does, and another that generates example code for calling a function.

You can customize the prompt and stop sequence of a query in order to come up with new applications that use Codex to interpret code. Creating these can feel like more of an art than a science! Small changes in the formulation of the prompt and stop sequence can produce very different results. The three different “explain” examples showcase strategies that tend to produce useful responses from the model, but this is uncharted territory! We’re excited to see what you use this for."

This isn't for explaining code. That's just an example. This lets us create custom prompts for the OpenAI API using the codex model.

Post reply on HN