#544 — March 5, 2025
Go Weekly
Faster Go Maps with Swiss Tables — One of Go’s newest features is a revamped map implementation powered by a new hash table algorithm called Swiss Table that boosts map operations up to 60% faster in microbenchmarks, while reducing memory overhead. Here’s a look at how it works.
Michael Pratt
Tips to Debug Hanging Go Programs — Next time your Go app becomes unresponsive, these tips can help you find the issue by forcing a stack trace or using Delve to attach to the process (or core dump) and revive the program.
Michael Stapelberg
Keep Postgres Maintenance from Slowing Down Your Go App — Secure your spot to learn the proactive maintenance practices that uncover hidden database performance risks, like slow queries, checkpoint behavior, & connection issues, before they escalate.
pganalyze sponsor
The Cost of Go's panic and recover — When something goes unexpectedly and critically wrong in a Go program you might use panic to abort things quickly, but did you know you can use recover to manage what happens after a panic? This means you could use it as a sort of control flow mechanism, if you were in a particularly unorthodox mood..
Julien Cretel
💡 This post led to a rather extensive discussion on Hacker News.
IN BRIEF:
-
🇬🇧 GopherConUK returns to London this August and its call for papers has just opened if you'd like to speak. You can submit a talk up until May 17.
-
go-attention is an attempt to create a pure Go implementation of attention mechanisms and transformer layers, such as used in modern LLMs.
Calling Rust from 'Cursed' Go — Cgo is Go’s mechanism for calling external/foreign functions but its performance often causes consternation. Enter purego, a still-in-beta way to make such calls without Cgo.
Preston Thorpe
Nil Channels in Go — Nil channels seem to baffle many Gophers, so Vishnu went on a quest to figure out why in a particular case. This led him to the wisdom of a new Go proverb: "Init when you split; Nil when you merge."
Vishnu Bharathi
The Magic of Small Engineering Teams — How PostHog uses small teams to ship fast and scale at the same time.
PostHog sponsor
📄 Minesweeper with Raylib Go Bindings – Alex reflects on the joys of basic game development in Go with Raylib and he shares his code too. Alex Pliutau
📄 We Switched from Java to Go and Don't Regret It Miglinci, Steiner, and Enne (Glasskube)
🛠 Code & Tools
Gore 0.6: A Full Featured Go REPL Environment — You get all the niceties you’d expect like line editing, history, multi-line input, the ability to import packages, and, in this latest build, gopls-powered code completion too.
motemen
Go Clean Template — Inspired by Uncle Bob’s ‘Clean Code’ principles, this repo attempts to provide a ‘clean architecture template’ for building Go-powered services that are well organized and won’t turn into a mess. You be the judge.
Evrone
go-git 5.14: An Extensible Git Implementation in Pure Go — "Manipulate git repositories at low level (plumbing) or high level (porcelain), through an idiomatic Go API." Now requires Go 1.23+.
go-git
sqldef 1.0: Idempotent Schema Management for Databases — A Go-powered CLI tool and WASM library for diffing SQL schemas (demo here). Supports MySQL, Postgres, SQLite and SQL Server. Built by one of Ruby’s core team members, too.
Takashi Kokubun
-
⭐ TinyGo 0.36.0 – The much celebrated Go compiler 'for small places' gains Go 1.24 and LLVM 19 support, as well as support for several new boards.
-
MongoDB Go Driver v2.1 – Officially supported driver to work with MongoDB. Now supporting MongoDB's new bulk write API and BSON vector datatype.
-
gocron v2.16.0 – Job scheduling package for running Go functions at specified intervals.
-
Wait4X 3.0 – CLI tool for waiting on various ports or services to reach a specified state.
-
pgroll v0.10 – Tool for zero-downtime, reversible schema Postgres migrations.
-
Glow 2.1 – Terminal-based Markdown rendering from the folks at Charm.
-
Pion WebRTC 4.0.13 – Pure Go implementation of the WebRTC API.
-
Sarama v1.45.1 – IBM's Go client library for Apache Kafka.
📰 Classifieds
📌 Faster Deployment – Integrate CarsXE’s API in minutes and get real-time vehicle data with ease. Try it now!
Blacksmith runs GitHub Actions 2x faster at half the cost with a one-line code change. Trusted by 250+ companies like Ashby and Clerk.
📢 Elsewhere in dev
A quick roundup of some of other interesting stories in the broader landscape, in case you've missed them:
-
🤯 Someone managed to implement 90s FPS game Doom entirely in the TypeScript type system.
-
And if you've never quite grokked how TypeScript ticks, Dr. Axel Rauschmayer has a succinct explanation of how it differs from JavaScript in a practical day-to-day tooling sense.
-
🤖 Microsoft and GitHub are getting into the 'AI developer agents' game and have showed off a look at GitHub Copilot 'agent mode' running in VS Code.
-
Is it possible to think about game 'speedrunning' as essentially a form of vulnerability research?