Live data from Hacker News

GitHub Copilot available for JetBrains and Neovim

github.com

201–210 of 446 posts

Re: GitHub Copilot available for JetBrains and Neovim

#201
I have many thoughts about Copilot, but here are two.

First, as much as I don't like the idea of Copilot, it seems to be good for boilerplate code. However, the fact that boilerplate code exists is not because of some natural limitation of code; it exists because our programming languages are subpar at making good abstractions.

Here's an example: in Go, there is a lot of `if err == nil` error-handling boilerplate. Rust decided to make a better abstraction and shortened it to `?`.

(I could have gotten details wrong, but I think the point still stands.)

So I think a better way to solve the problem that Copilot solves is with better programming languages that help us have better abstractions.

Second, I personally think the legal justifications for Copilot are dubious at best and downright deception at worst, to say nothing of the ramifications of it. I wrote a whitepaper about the ramifications and refuting the justifications. [1]

(Note: the whitepaper was written quickly, to hit a deadline, so it's not the best. Intro blog post at [2].)

I'm also working on licenses to clarify the legal arguments against Copilot. [3]

I also hope that one of them [4] is a better license than the AGPL, without the virality and applicable to more cases.

Edit: Do NOT use any of those licenses yet! I have not had a lawyer check and fix them. I plan to do so soon.

[1]: https://gavinhoward.com/uploads/copilot.pdf

[2]: https://gavinhoward.com/2021/10/my-whitepaper-about-github-c...

[3]: https://yzena.com/licenses/

[4]: https://yzena.com/yzena-network-license/

Re: GitHub Copilot available for JetBrains and Neovim

#202

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…

I'm surprised no one has suggested using `requests` considering how easy, safe and readable it is:

    >>> import requests, pprint
    >>> 
    >>> 
    >>> url = "https://en.wikipedia.org/w/api.php"
    >>> resp = requests.get(
    ...     url, 
    ...     params=dict(
    ...         action="query",
    ...         list="geosearch",
    ...         format="json",
    ...         gsradius=10000,
    ...         gscoord=f"{latitude.value}|{longitude.value}"
    ...     )
    ... )
    >>> 
    >>> pprint.pprint(resp.json())
    {'batchcomplete': '',
     'query': {'geosearch': [{'dist': 26.2,
                              'lat': 37.7868194444444,
                              'lon': -122.399905555556,
                              'ns': 0,
    ...

Re: GitHub Copilot available for JetBrains and Neovim

#203
post #196

Earlier quoted context omitted.

Wait til stackoverflow sues everyone into oblivion! Letting your intern blindly commit to your code base seems like the bigger issue here. The entire purpose of an internship is to learn and to be guided by professionals, not to be treated as a cheap laborer. You don't hire interns, you train interns. Have you used copilot or are you speculating?

If the analogy works better, imagine that you hired a developer who copy&pasted GPL'd code throughout your system. (And people couldn't tell in code reviews, nor on other occasions to see the code, since it's not normal to recognize GPL'd code on sight; everyone just assumed the developer was productive.)

I think people should be a lot more concerned about the possibility of accidentally deriving your work on something with an AGPL license.

Re: GitHub Copilot available for JetBrains and Neovim

#204
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?"…

btw the `mwclient` library makes querying the Wikipedia API a breeze!

Re: GitHub Copilot available for JetBrains and Neovim

#205
post #72

Earlier quoted context omitted.

The example i usually give [1] in javascript is say you have function (x,y) => x + y Orgs targeting code coverage write a test for 1,2 => 3 and get 100% coverage and then stop as there is no incentive to go further. They don't write tests for say (1,null) (null,null) ('x',1) (NaN, Infinity) and so on.. these additional tests will improve coverage of scenarios and code coverage will not move. I have seen projects wher…

I don't think there's Infinity in my language, what do you use it for except maths?

If you are seeking a minimum value within some complicated iteration, it’s easier to start your min accumulator as Inf than null with extra null checks.

Re: GitHub Copilot available for JetBrains and Neovim

#206

Anyone know how long the waitlist is?

I joined the waitlist at the end of June and got an invite yesterday. So 4 months? However, I imagine a lot of people signed up just before me, so I was probably at the end of a long list. The wait wouldn't be this long if you sign up today, I reckon. I'm just guessing though.

I signed up copilot on june... still received nothing unfortunately!!!

Re: GitHub Copilot available for JetBrains and Neovim

#207
post #196

Earlier quoted context omitted.

If the analogy works better, imagine that you hired a developer who copy&pasted GPL'd code throughout your system. (And people couldn't tell in code reviews, nor on other occasions to see the code, since it's not normal to recognize GPL'd code on sight; everyone just assumed the developer was productive.)

I think people should be a lot more concerned about the possibility of accidentally deriving your work on something with an AGPL license.

If the analogy works better, imagine that you hired a developer who copy&pasted whatever-license-your-company-is-most-afraid-of-and-is-highly-likely code throughout your system. :)

Re: GitHub Copilot available for JetBrains and Neovim

#208
post #187
post #77

Earlier quoted context omitted.

This reaction is why we can’t have nice things :( after trying copilot I’m convinced that this kind of feature is going to bring the world to a next phase. Open source was part 1, this is part 2.

I understand a lot of people are ok with this and that's fine. There's still no good reason I cannot opt my code out of it.

I would seriously consider opting in so long as my authorship was acknowledged and my license was upheld. FWIW I tend to release things under permissive licenses (although I think if I was copyleft-inclined I might feel the same way: just match my license).

But stripping my copyright, copying my work without my permission and presenting it to users on terms I did not agree to, all of that is unacceptable.

Re: GitHub Copilot available for JetBrains and Neovim

#209

Earlier quoted context omitted.

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...

They would also have to exclude virtually all code that isn't public domain, too. MIT and Apache-2.0 and BSD all require that the copyright notice and license text is preserved in downstream use.

Re: GitHub Copilot available for JetBrains and Neovim

#210
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.

Copilot may be the first of many computer dictionaries and thesauruses.

Oxford English Dictionary, for example, is a human version of defining language and a thesaurus is a completion engine.

Human language didn't suffer by having a dictionary and thesaurus. Computer language doesn't suffer either.

Post reply on HN