frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Using go fix to modernize Go code

https://go.dev/blog/gofix
97•todsacerdoti•2h ago

Comments

homarp•1h ago
I really liked this part:

In December 2024, during the frenzied adoption of LLM coding assistants, we became aware that such tools tended—unsurprisingly—to produce Go code in a style similar to the mass of Go code used during training, even when there were newer, better ways to express the same idea. Less obviously, the same tools often refused to use the newer ways even when directed to do so in general terms such as “always use the latest idioms of Go 1.25.” In some cases, even when explicitly told to use a feature, the model would deny that it existed. [...] To ensure that future models are trained on the latest idioms, we need to ensure that these idioms are reflected in the training data, which is to say the global corpus of open-source Go code.

robviren•1h ago
I have run into that a lot which is annoying. Even though all the code compiles because go is backwards compatible it all looks so much different. Same issue for python but in that case the API changes lead to actual breakage. For this reason I find go to be fairly great for codegen as the stability of the language is hard to compete with and the standard lib a powerful enough tool to support many many use cases.
HumblyTossed•1h ago
The use of LLMs will lead to homogeneous, middling code.
awesome_dude•43m ago
I'm not sure if that's a criticism or praise - I mean, most people strive for readable code.
candiddevmike•40m ago
LLM generated code reminds me of perl's "write-only" reputation.
awesome_dude•13m ago
In all honesty I've only used LLMs in anger with Go, and come away (generally speaking) happy with what it produced.
cedws•15m ago
It does. I’ve been writing Go for long enough, and the code that LLMs output is pretty average. It’s what I would expect a mid level engineer to produce. I still write code manually for stuff I care about or where code structure matters.

Maybe the best way is to do the scaffolding yourself and use LLMs to fill the blanks. That may lead to better structured code, but it doesn’t resolve the problem described above where it generates suboptimal or outdated code. Code is a form of communication and I think good code requires an understanding of how to communicate ideas clearly. LLMs have no concept of that, it’s just gluing tokens together. They litter code with useless comments while leaving the parts that need them most without.

munk-a•57m ago
PHP went through a similar effort a while back to just clear out places like Stackoverflow of terrible out of date advice (e.g. posts advocating magic_quotes). LLMs make this a slightly different problem because, for the most part, once the bad advice is in the model it's never going away. In theory there's an easier to test surface around how good the advice it's giving is but trying to figure out how it got to that conclusion and correct it for any future models is arcane. It's unlikely that model trainers will submit their RC models to various communities to make sure it isn't lying about those specific topics so everything needs to happen in preparation of the next generation and relying on the hope that you've identified the bad source it originally trained on and that the model will actually prioritize training on that same, now corrected, source.
BiraIgnacio•36m ago
I definitely see that with C++ code Not so easy to "fix", though. Or so I think. But I do hope still, as more and more "modern" C++ code gets published
kiernanmcgowan•1h ago
Its tooling like this that really makes golang an excellent language to work with. I had missed that rangeint addition to the language but with go fix I'll just get that improvement for free!

Real kudos to the golang team.

jjice•58m ago
There have been many situations where I'd rather use another language, but Go's tooling is so good that I still end up writing it in Go. So hard to beat the build in testing, linting, and incredible compilation.
iamcalledrob•50m ago
Absolutely.

The Go team has built such trust with backwards compatibility that improvements like this are exciting, rather than anxiety-inducing.

Compare that with other ecosystems, where APIs are constantly shifting, and everything seems to be @Deprecated or @Experimental.

retrodaredevil•51m ago
I think tooling that can modify your source code to make it more modern is really cool stuff. OpenRewrite comes to mind for Java, but nothing comes to the top of my mind for other languages. And heck, I into recently learned about OpenRewrite and I've been writing Java for a long time.

Even though I don't like Go, I acknowledge that tooling like this built right into the language is a huge deal for language popularity and maturity. Other languages just aren't this opinionated about build tools, testing frameworks, etc.

I suspect that as newer languages emerge over the years, they'll take notes from Go and how well it integrates stuff like this.

Claude Sonnet 4.6

https://www.anthropic.com/news/claude-sonnet-4-6
256•adocomplete•1h ago•158 comments

Using go fix to modernize Go code

https://go.dev/blog/gofix
103•todsacerdoti•2h ago•13 comments

Gentoo on Codeberg

https://www.gentoo.org/news/2026/02/16/codeberg.html
68•todsacerdoti•1h ago•7 comments

GrapheneOS – Break Free from Google and Apple

https://blog.tomaszdunia.pl/grapheneos-eng/
862•to3k•9h ago•560 comments

Async/Await on the GPU

https://www.vectorware.com/blog/async-await-on-gpu/
68•Philpax•2h ago•11 comments

So you want to build a tunnel

https://practical.engineering/blog/2026/2/17/so-you-want-to-build-a-tunnel
56•crescit_eundo•2h ago•25 comments

Can a Computer Science Student Be Taught to Design Hardware?

https://semiengineering.com/can-a-computer-science-student-be-taught-to-design-hardware/
33•stn8188•1h ago•31 comments

HackMyClaw

https://hackmyclaw.com/
152•hentrep•2h ago•77 comments

Chess engines do weird stuff

https://girl.surgery/chess
69•admiringly•2h ago•24 comments

Trata (YC W25) Is Hiring Founding Engineers (NYC)

1•emc329•2h ago

Show HN: I wrote a technical history book on Lisp

https://berksoft.ca/gol/
65•cdegroot•3h ago•5 comments

I converted 2D conventional flight tracking into 3D

https://aeris.edbn.me/?city=SFO
145•kewonit•4h ago•33 comments

Show HN: I taught LLMs to play Magic: The Gathering against each other

https://mage-bench.com/
47•GregorStocks•2h ago•34 comments

Launch HN: Sonarly (YC W26) – AI agent to triage and fix your production alerts

https://sonarly.com/
13•Dimittri•2h ago•0 comments

Climbing Mount Fuji visualized through milestone stamps

https://fuji.halfof8.com/
17•gessha•1h ago•3 comments

Is Show HN dead? No, but it's drowning

https://www.arthurcnops.blog/death-of-show-hn/
267•acnops•8h ago•233 comments

Don't pass on small block ciphers

https://00f.net/2026/02/10/small-block-ciphers/
15•jstrieb•2d ago•2 comments

Show HN: 6cy – Experimental streaming archive format with per-block codecs

https://github.com/byte271/6cy
18•yihac1•2h ago•1 comments

Show HN: Continue – Source-controlled AI checks, enforceable in CI

https://docs.continue.dev
24•sestinj•2h ago•5 comments

Discord Rival Gets Overwhelmed by Exodus of Players Fleeing Age-Verification

https://kotaku.com/discord-alternative-teamspeak-age-verification-check-rivals-2000669693
41•thunderbong•1h ago•8 comments

Labyrinth Locator

https://labyrinthlocator.org/
20•emigre•3d ago•1 comments

Four Column ASCII (2017)

https://garbagecollected.org/2017/01/31/four-column-ascii/
304•tempodox•2d ago•71 comments

Semantic ablation: Why AI writing is generic and boring

https://www.theregister.com/2026/02/16/semantic_ablation_ai_writing/
138•benji8000•2h ago•125 comments

Students Are Being Treated Like Guinea Pigs: Inside an AI-Powered Private School

https://www.404media.co/students-are-being-treated-like-guinea-pigs-inside-an-ai-powered-private-...
44•trinsic2•1h ago•22 comments

Show HN: I built a simulated AI containment terminal for my sci-fi novel

https://vertex.flowlogix.ai
21•stevengreser•2h ago•8 comments

Sub-Millisecond RAG on Apple Silicon. No Server. No API. One File

https://github.com/christopherkarani/Wax
16•ckarani•3h ago•3 comments

Hamming Distance for Hybrid Search in SQLite

https://notnotp.com/notes/hamming-distance-for-hybrid-search-in-sqlite/
55•enz•2d ago•9 comments

Show HN: Cycast – High-performance radio streaming server written in Python

https://github.com/LukeB42/Cycast
15•LukeB42•3h ago•0 comments

Rise of the Triforce

https://dolphin-emu.org/blog/2026/02/16/rise-of-the-triforce/
398•max-m•21h ago•61 comments

Show HN: Glitchy camera – a circuit-bent camera simulator in the browser

https://glitchycam.com
152•elayabharath•1d ago•20 comments