Hacker News with Generative AI: Go

Cogentcore: Open-source framework for building multi-platform apps with Go (github.com/cogentcore)
Cogent Core is a free and open source framework for building powerful, fast, elegant 2D and 3D apps that run on macOS, Windows, Linux, iOS, Android, and web with a single Go codebase, allowing you to Code Once, Run Everywhere (Core). See the Cogent Core Website for more information, including extensive documentation and interactive examples you can directly edit and run. The website itself is a Cogent Core app running on the web using wasm.
Leak and Seek a Go Runtime Mystery (cyolo.io)
"We think we have a problem." That's how the conversation with the customer success team started: A polite heads-up about a potential memory leak by the platform team. Little did we know, we were about to embark on a debugging adventure worthy of any great detective novel. Within hours, three of our largest customers were reporting significant performance issues. Clearly, this wasn't just "a problem." It was a full-blown crisis.
Hunting down a C memory leak in a Go program (2021) (medium.com)
Over the last few years at Zendesk, both Go and Kafka have been increasingly growing in importance in our architecture.
Proposal: Add bare metal support to Go (github.com/golang)
I propose the addition of a new GOOS target, such as GOOS=none, to allow Go runtime execution under specific application defined exit functions, rather than arbitrary OS syscalls, enabling freestanding execution without direct OS support.
Linux wiper malware hidden in malicious Go modules on GitHub (bleepingcomputer.com)
A supply-chain attack targets Linux servers with disk-wiping malware hidden in Golang modules published on GitHub.
Runtime: Green tea garbage collector (Go) (github.com/golang)
This issue tracks the design and implementation of the Green Tea garbage collector. As of the last update to this issue, development of Green Tea is still active. We'll produce more detailed design document once we're ready to commit to a design. For now, Green Tea is available as an experiment at tip-of-tree and is planned as to be available as an opt-in experiment in Go 1.25, once it releases. We encourage teams to try it out.
Show HN: Self-Hosted HTTPS Tunnel in 300 LoC with Go, Caddy, and Cloudflare (nexo.sh)
TL;DR: I built a lightweight, self-hosted HTTP tunnel that turns localhost into a public HTTPS URL. No paid plans, no secret black boxes. Just one Go binary, Caddy with wildcard TLS, and a $0/month Oracle Cloud VM. GitHub repo
Building Small Go Containers? (github.com/randomizedcoder)
This is an example repo with a relatively simple go program.
Goenums: Type Safe Enum Generator for Go (github.com/zarldev)
goenums addresses Go's lack of native enum support by generating comprehensive, type-safe enum implementations from simple constant declarations.
Show HN: Fullstack Go app (SSRfront end+APIback end+Docker) with clean structure (github.com/norbix)
Demo application containing fullstack solution in pure Golang.
Cheating the Reaper in Go (mcyoung.xyz)
Even though I am a C++ programmer at heart, Go fascinates me for none of the reasons you think. Go has made several interesting design decisions:
HTTP/0.9 from Scratch (2024) (kmcd.dev)
Welcome to the first installment of our “HTTP from Scratch” blog series! In this series, we’ll embark on a journey through the evolution of the Hypertext Transfer Protocol (HTTP), the backbone of the World Wide Web. By building simple implementations of each major HTTP version in Go, we’ll gain a deep understanding of how this essential protocol has shaped the internet we use every day and how it has evolved to what we have now.
Layered Design in Go (jerf.org)
This post will describe how I design my programs in Go. I needed this for work, and while I searched for a link, nothing quite fits my coding practices out there. The word “Layered” can pull up some fairly close descriptions, but I want to lay out what I do.
Optimizing Heap Allocations in Go: A Case Study (dolthub.com)
Last month, a commit that was supposed to be a no-op refactor caused a 30% regression in sysbench's types_scan benchmark.
Ask HN: Writing an Interpreter in Go or Crafting Interpreters? (ycombinator.com)
I'm thinking of learning about compilers and am pleased to find that there seems to be at least two very accessible choices, "Writing An Interpreter In Go" and Crafting Interpreters. Curious if folks here have experience with either and could provide recommendations?
Ten Commandments of Go (bitfieldconsulting.com)
As a full-time Go teacher and writer, I spend a lot of time working with students to help them write clearer, better, and more useful Go programs. I’ve found that a lot of the advice I give them can be reduced to a fairly small set of general principles, and here they are.
Rust is easy? Go is hard? (medium.com)
I recently had a project pop up where I thought Go would be a really good fit. It’s been a while since I actually have used Go for anything, so I also thought it’d be a fantastic opportunity to practice and not lose those skills. It turns out, Rust is actually easier to use than Go. Here is the story.
Using Signals with Go (calhoun.io)
Signals are messages that can be sent to running programs, and are often used to request that a program performs a specific behavior. The most common signal is likely the SIGINT signal, which is sent when a developer presses Ctrl+C in the terminal. This signal tells the program to stop running, and is how we terminate a running process.
Rust vs. Go (bitfieldconsulting.com)
Which is better, Rust or Go—and does that question even make sense? Which language should you choose for your next project in 2025, and why? How does Rust compare with Go in areas like performance, simplicity, safety, features, scale, and concurrency?
In Two Moves, AlphaGo and Lee Sedol Redefined the Future (2016) (wired.com)
SEOUL, SOUTH KOREA --- In Game Two, the Google machine made a move that no human ever would. And it was beautiful. As the world looked on, the move so perfectly demonstrated the enormously powerful and rather mysterious talents of modern artificial intelligence.
Container CPU requests and limits explained with GOMAXPROCS tuning (victoriametrics.com)
In this article, we’re going to cover a few things that might’ve puzzled you if you’ve been running your applications, especially Go applications, in Kubernetes:
Unit testing using mocks in Go (golangbot.com)
I generally prefer testing my code without using mocks. For example, if the code is integrated with Elastic Search, I prefer to run a elastic search container locally and test the Go code against that container. But there are some cases where creating a local environment for testing is not possible. This usually happens when integrating with cloud providers. Let’s take the case where the code is creating a AWS s3 bucket.
The Story Behind “100 Go Mistakes and How to Avoid Them” (thecoder.cafe)
Hello! Today, I’m going to share the story of the process behind writing my book.
Why did just have to update the AWS Go SDK to v2? Annoying (github.com/nathants)
aws is amazing, but it's hard to ship fast unless you're an expert.
Show HN: Minimal MCP server in Go showcasing project architecture (github.com/TuanKiri)
A lightweight Model Context Protocol (MCP) server that enables AI assistants like Claude to retrieve and interpret real-time weather data.
Faster Shuffling in Go with Batching (lemire.me)
Go’s rand.Shuffle is a solid baseline, but batching random integer generation can make it much faster. By generating multiple random numbers from a single 64-bit value, we can boost efficiency—by over 2x in our benchmarks.
My pessimism about changes to error handling in Go (but they'll happen) (utoronto.ca)
I've said in the past that Go is not our language, and I still stand by that. At the same time, the Go developers do eventually respond to the clamour from the community, which I maintain that we've seen with both Go's eventual addition of generics and the change to Go modules and Go dependency handling (where Go started with one story until it clearly didn't work and they had to change). This leads me to two related views.
Faster interpreters in Go: Catching up with C++ (planetscale.com)
The SQL evaluation engine that ships with Vitess, the open-source database that powers PlanetScale, was originally implemented as an AST evaluator that used to operate directly on the SQL AST generated by our parser. Over this past year, we've gradually replaced it with a Virtual Machine which, despite being written natively in Go, performs similarly to the original C++ evaluation code in MySQL.
Show HN: Benchi – A benchmarking tool written in Go (github.com/ConduitIO)
Benchi is a minimal benchmarking framework designed to help you measure the performance of your applications and infrastructure. It leverages Docker to create isolated environments for running benchmarks and collecting metrics.
Golang sync.Pool is not a silver bullet (wundergraph.com)
When it comes to performance optimization in Go, sync.Pool often appears as a tempting solution. It promises to reduce memory allocations and garbage collection pressure by reusing objects. But is it always the right choice? Let's dive deep into this fascinating topic.