Live data from Hacker News

I figured out how to get GitHub Copilot to run in the terminal

github.com

31–40 of 105 posts

Re: I figured out how to get GitHub Copilot to run in the terminal

#31
I'm using a slightly different method. Vimwiki diary and a code block runner (runs in another tmux window)... so it's doubling as a (markdown/html) documentation generator of all my work.

I'm actually enjoying it as it's providing a lot of context on the time and notes/discussion on every command I run. Also good for history searches as regular cli history ultimately relies on your own memory.

Still it feels like you need to already have paid your dues... (I'm 20+ years in...) .

Re: I figured out how to get GitHub Copilot to run in the terminal

#32
post #5

Earlier quoted context omitted.

>warp.dev >Our GPT-3 powered AI search will convert natural language into executable shell commands. It's like GitHub Copilot, but for the terminal. First time I'm hearing about this. Looks pretty cool. I think I already have a pretty good grasp on CLI commands, but I'll give it a shot, especially since the other features also seem interesting.

You can already use copilot to write shell scripts.

And with copilot.vim and EDITOR=nvim and C-x C-e this means you can write at the shell!

Re: I figured out how to get GitHub Copilot to run in the terminal

#33
post #27

Earlier quoted context omitted.

Copilot is a crutch that prevents learning. You are not falling behind. "Catching up" by using this tool will only land you in a lawsuit for copyright infringement.

Who copyrights individual bash commands?

No one; I'm referring generally to Copilot and similar tools. But god, who needs an AI to write their fucking shell commands?

Re: I figured out how to get GitHub Copilot to run in the terminal

#35
post #17

By the way, the example snippet given to "echo a random number between 1 and 10" is incorrect, pedantically speaking. It's random, but not uniformly so. It's biased towards lower numbers (1-6).

Why? Wiki doesn't say anything about it and when I run it, the result looks fine

> $ for((i=1;i> rand.txt ; done

> $ cat rand.txt | sort | uniq -c

   1051 1
    932 10
   1012 2
   1042 3
    983 4
   1015 5
   1042 6
   1035 7
    992 8
    995 9

Re: I figured out how to get GitHub Copilot to run in the terminal

#36
post #20

Speaking of copilot, when is GitHub going to support billing for it at the organization level? Right now I would have to do a monthly reimbursement request which is a pain.

Help me understand something. I understand that the company should pay for Copilot in principle. However, is paying $120 per year that much when it helps you in your at least mid-five-figures job? I would ask for the reimbursement if it was annual, but filling out a form to ask for $10 back every month seems a bit over the top. Maybe I'm a spendthrift? Am I missing something here? Would you say I am being irresponsib…

On the flip side a company may want to buy a bulk license so that it is available for free to all their developers.

You don’t want Bob being less productive just because he didn’t want to spend $10 a month.

Re: I figured out how to get GitHub Copilot to run in the terminal

#37
post #17

By the way, the example snippet given to "echo a random number between 1 and 10" is incorrect, pedantically speaking. It's random, but not uniformly so. It's biased towards lower numbers (1-6).

Could someone explain how? I don't grok the command. My best guess is this relates to hexadecimal.

Re: I figured out how to get GitHub Copilot to run in the terminal

#38
post #35
post #17

By the way, the example snippet given to "echo a random number between 1 and 10" is incorrect, pedantically speaking. It's random, but not uniformly so. It's biased towards lower numbers (1-6).

Why? Wiki doesn't say anything about it and when I run it, the result looks fine > $ for((i=1;i > rand.txt ; done > $ cat rand.txt | sort | uniq -c 1051 1 932 10 1012 2 1042 3 983 4 1015 5 1042 6 1035 7 992 8 995 9

`cat /dev/urandom | od -N 1 -An -i` gives you a uniform random number between 0 and 255. The following mod 10 in the awk command introduces "modulo bias", which you can read about here https://research.kudelskisecurity.com/2020/07/28/the-definit...

You can see it quite intuitively if you iterate over all possible numbers between 0 and 255:

  $ (for i in {0..255}; do; echo $i | awk '{print $1 % 10 + 1}'; done) | sort -n | uniq -c
     26 1
     26 2
     26 3
     26 4
     26 5
     26 6
     25 7
     25 8
     25 9
     25 10

Re: I figured out how to get GitHub Copilot to run in the terminal

#39

Earlier quoted context omitted.

I feel like if we don’t keep up and learn this new skill. We will soon fall behind.

Copilot is a crutch that prevents learning. You are not falling behind. "Catching up" by using this tool will only land you in a lawsuit for copyright infringement.

This is the “spell checkers cause bad spelling” fallacy.

People learn by being told they are wrong. When you use copilot you are constantly being given examples that challenge your intuition. Maybe copilot is wrong, maybe you are wrong, either you are learning more with it on than with it off. Countless programmers get stuck in a rut writing the same bad code over and over again because nobody tells them it’s wrong. And it doesn’t matter if you’ve been programming for 1 month or 20 years, we all have something to learn.

Re: I figured out how to get GitHub Copilot to run in the terminal

#40

Speaking of copilot, when is GitHub going to support billing for it at the organization level? Right now I would have to do a monthly reimbursement request which is a pain.

I reckon there's a reason why it's not available yet: legal uncertainty about the training data and generated code in a commercial context.

Right now it's only individual developers, placing the burden on them and preventing any major repercussions for Github.

This changes when (large) companies start using it, and when GitHub gives potentially copyrighed code to companies.

Personally I only use it for personal/OS projects right now, not professionally.

Post reply on HN