Hacker News new | ask | show | jobs
by ases 1087 days ago
All the code examples on this page are doubling any brackets ([], {}, ()). How have they managed that? Not a fantastic first impression of its capabilities...
3 comments

Not only that, but the Golang example is full of errors. Parameter definitions don't have colons between name and type. The map for seen elements is declared as a, but later referenced to as m. The append instruction references uniques, which is undefined. The return statement also references uniques.
ah yes, so a typical example of generative AI output
The Go code shown now is both syntactically valid and semantically correct: https://go.dev/play/p/GDki9v78jMM

I can't check how it looked 15 hours ago.

Makes me wonder if it was manually corrected and is thus a fake example now.

I'm going to give them the benefit of the doubt and assume this is a marketing site problem and not a product problem, but either way, not a good look. Reminds me of Google's big Bard announcement including a wrong answer in the image.
Gitlab is using Google's Vertex Codey models/API for the code completions.

Showcasing innacuracies in AI responses must be a Google requirement.

GitLab team member here. Thanks for flagging.

Our web team is working to resolve this issue here: https://gitlab.com/gitlab-com/marketing/digital-experience/b...