News for hackers. Stuff that matters.
Re:GitHub Copilot by nemetroid on Tuesday June 29, 2021 @05:27PM (#27681939)
It also doesn't list the files. It prints all matching lines (and their line numbers), without the corresponding filenames.
Re:GitHub Copilot by cbsks on Tuesday June 29, 2021 @09:00PM (#27683732)
You are right! I missed that. The number of bugs to lines of code ratio is approaching one.
Re:GitHub Copilot by thangalin on Wednesday June 30, 2021 @01:35AM (#27685260)
The following line is quite widespread in use, but not as portable as it could be:

    #!/bin/bash
For increased portability, respect users' PATH environment variable using:

    #!/usr/bin/env bash
Using #!/bin/bash could lead to subtle bugs on systems with more than one version of bash installed, or outright breakage on systems where bash isn't installed at /bin/bash. (OpenBSD is known to use /usr/local/bin/bash, for example.)
Re:GitHub Copilot by mkl on Wednesday June 30, 2021 @04:29AM (#27686288)
That isn't a Copilot bug though, it was typed by a person.
Re:GitHub Copilot by cbsks on Wednesday June 30, 2021 @09:50AM (#27688492)
I wonder if copilot would have produced better code if the user had used /usr/bin/env instead. If you already have buggy code, will copilot also suggest buggy code?