3 ms·
With just that prompt, Copilot keeps writing a comment about the function but never actually writes the function. Prompting to actually write the function by st
by smitop 5y ago
With just that prompt, Copilot keeps writing a comment about the function but never actually writes the function. Prompting to actually write the function by starting it with `func` gives:
// A Go function to swap the sixth bit and seventeenth bit of a 32-bit signed integer.
func swapBits(x int32) int32 {
return ((x & 0x0F) << 28) | ((x & 0xF0000000) >> 28)
}
- 37ef_ced3 5y agoTotally wrong, it's garbage. And there you have it, the difference between real intelligence and regurgitation. This is the kind of numerically specific coding that could be the basis of a CAPTCHA that CoPilot can't solve. Sixth bit, sixth byte, seventeenth bit, seventeenth byte, etc.