Live data from Hacker News

GitHub Copilot available for JetBrains and Neovim

github.com

171–180 of 446 posts

Re: GitHub Copilot available for JetBrains and Neovim

#171

Earlier quoted context omitted.

I only played around with it on OpenAI but it's the same model as far as I know. It's pretty good at regurgitating algorithms it's seen before. It's not good at all at coming up with new algorithms. It's very good at translating between programming languages, including pseudocode. It can write a lot more valid code much quicker than any human, and in a whole slew of languages. I haven't had the urge to use it much af…

Your response makes me wonder if poisoning the well is possible by submitting code to Github with multiple languages and coding styles. A single file with a function signature written in Javascript and the body written in Python + Ruby. Enough code would surely break the AI model behind it. Unless Copilot has some sort of ingestion validation which wouldn’t surprise.

I don't know if this is true, but I would assume that the tokenizers they used for Codex use actual language parsers which would drop invalid files like this and make this attack infeasible.

When I was playing around a couple years ago with the Fastai courses in language modeling I used the Python tokenize module to feed my model, and with excellent parser libraries like Lark[0] out there it wouldn't take that long to build real quality parsers.

Of course I could be totally wrong and they might just be dumping pure text in, shutter.

[0]: https://github.com/lark-parser/lark

Re: GitHub Copilot available for JetBrains and Neovim

#172
post #76

Copilot is crazy. The other day, I was writing a Python function that would call a Wikipedia API. I pulled from the internet an example of a GET request, and pasted it as a comment in my code. # sample call: https://en.wikipedia.org/w/api.php?action=query&format=json&list=geosearch&gscoord=37.7891838%7C-122.4033522&gsradius=10000&gslimit=100 Then I defined a variable, base_url = "https://en.wikipedia.org/w/api.php?"…

Bit of a dodgy way to form query parameters though. Other than for a quick script.

Speaking as a former pentester, this is a fine way to form query params in this specific case, if lat and long are floats.

They're the only data you can control, and unless they're strings, it's useless for exploitation. Even denormal floats / INF / NAN won't help achieve an objective.

I broadly agree with you, but people are pummeling Copilot for writing code that I saw hundreds of times. Yes, sometimes I was able to exploit some of that code. But the details matter.

Re: GitHub Copilot available for JetBrains and Neovim

#173

Earlier quoted context omitted.

Bit of a dodgy way to form query parameters though. Other than for a quick script.

I'm not against "copying" code. I just looked up "python build url query" The first link describes the `urllib.parse. urlencode` function which takes a dict. So I would build the query like so: from urllib.parse import urlencode urlencode({ "action": "query", "format": "json", ... "gscoord": f"{str(latitude.value)}|{str(longitude.value)}", }) I think this is orders of magnitude clearer code. But that's a parameter th…

This. Code should be optimized for reading, I think this kind of code is OK for exploratory stuff, but needs to be rewritten later.

Re: GitHub Copilot available for JetBrains and Neovim

#174

Earlier quoted context omitted.

Open Source has licenses that must be followed. Copilot strips those off and ignores them.

What if I - a human - read your code, learn from it, and then use that knowledge to write my own code? Am I stripping your license off and ignoring it? Clearly it's not as simple as you imagine.

It is. Machines are running algorithms, which, by definition, are not creative.

Of course, people may argue that people are not creative, but considering that for a recent court case, it was decided that AI cannot be an inventor, it does matter to that court at least.

Re: GitHub Copilot available for JetBrains and Neovim

#175

I have a few questions about copilot. I haven’t gotten a chance to use it yet. Is it irrational that this makes me a little anxious about job security over the longterm? Idk why but this was my initial reaction when learning about this. Given the scenario where copilot and its likes becomes used in a widespread manner. Can it be argued that this might improve productivity but stifle innovation? Im pretty early in my…

> Is it irrational that this makes me a little anxious about job security over the longterm? Idk why but this was my initial reaction when learning about this.

I've been programming since the '80s. It's my opinion that the age of humans writing code is coming to a close. Perhaps another 20 years or so, with the peak in ~10; but I'm less certain about the timeline than the destination. There will still be a long tail, but most of the human work will shift to design and wrangling algorithms. The remnant will be hobbyist, such as Commodore 64 programmers today.

Re: GitHub Copilot available for JetBrains and Neovim

#176
post #79

I tried it on IntelliJ recently. The examples I tested blew my mind. Yet, I think there are two things that need to improve to get me to use it regularly (it will get there!): - less than perfect import/types/var suggestions that LSP in typed languages would've made perfect suggestions for (e.g named import in go would use the package name instead). - latency feels a bit high and my thoughts would get interrupted wai…

> latency feels a bit high and my thoughts would get interrupted waiting for a suggestion to come.

How high? That's interesting.

Re: GitHub Copilot available for JetBrains and Neovim

#177

Earlier quoted context omitted.

Who is realistically going to innovate the boilerplate out of Java if they're stuck using it at work?

I mean, Clojure kinda does that

So the solution to the problems that Copilot tries to solve is "migrate your workplace to Clojure"? Ordinary devs can't do that.

Re: GitHub Copilot available for JetBrains and Neovim

#180
post #95

Earlier quoted context omitted.

That analogy only works if you designed/architected your own house.

copilot's won't suggest anything worth calling plagiarism, just mundane plumbing and maybe textbook algorithm implementations. have you seen it generate anything more glorified than StackOverflow-esque code snippets?

It's dicey according to the GPL FAQ [1]. It goes against what GPL authors want: their work being used in proprietary projects.

This could have been prevented very simply: GitHub avoiding training Copilot on GPL code.

What they can still do is offer a new model excluding GPL code for people who care about it.

[1] - https://www.gnu.org/licenses/gpl-faq.en.html#SourceCodeInDoc...

Post reply on HN