by freedomben · 4y ago · 0 comments
How well does copilot help with languages like Elixir that are less common? WIth TypeScript it's been remarkable, but that's one of the most popular and surely very familiar to devs and GH, so I would expect less popular like Elixir to not perform as well.
Does copilot work for shell scripts?
I'm a vim person and don't want to use VS code. Is copilot worth the hassle to get installed into vim?
Copilot did pretty poorly when I tried using it with Julia- it kept suggesting Python code. I suspect it would do something similar in Elixir.
I'm also a vim person who doesn't want to use VS code, but I've gotten more than enough value to get into my first IDE (with vim keybindings). A lot of tedious C++ code is getting correctly auto-generated.
“GitHub Copilot is optimized to help you write Python, JavaScript, TypeScript, Ruby, Go, C#, or C++.”
https://docs.github.com/en/copilot/overview-of-github-copilo...
Sometimes, with variable results. I think I've only observed it guess patterns from the current directory
> Does copilot work for shell scripts?
Yes, it gave me this earlier today while editing my .zshrc:
# kill a process on a given port
killport() {
lsof -i :$1 | awk 'NR!=1 {print $2}' | xargs kill
}https://www.warp.dev/blog/replace-git-cheat-sheet-ai-command...
:() { :|: } :&
Thanks copil[user disconnected]. lsof -i ":$1" -Fp | tr -d pOh wow—a language where there are: 20 ways to do something, three of them are common, but only three others actually behave, by any standard, correctly, while being among the least-common in public code, seems like exactly the wrong kind of thing to use this for.
Shell doesn't need machine-learning autocomplete trained on existing shell scripts, it needs a hand-built aggressive linter.
Something like https://www.shellcheck.net/?
My primary usage is shell scripts, as it seems to struggle on complex code, while shell scripts are typically a lot of simple code.