This week
- When you start a new project, it feels nice that everything lives in a single main.go file. When things start to grow, you split things into multiple files. We will add tests later, right? Requirements change, someone joins the team, and in the meantime, you swapped SQLite for...
- April 2026 I’ve been having moderate success using an AI agent to help me fix non-trival bugs in GoAWK. But it’s sometimes very indecisive (Mitchell Hashimoto noted this in a tweet just the other day). I asked it the following question (I’m using Claude’s Opus 4.6 with the...
Last week
- Creating a subset of Go that translates to C was never my end goal. I liked writing C code with Go, but without the standard library it felt pretty limited. So, the next logical step was to port Go's stdlib to C.Of course, this isn't something I could do all at once. I started...
Two weeks ago
- What a month! After losing a job at the end of January, I started looking for a new one straight away. Seeking a new job nowadays is very different from how it used to be. Very long, multi-step and mentally draining processes are the new norm. The recent explosion of AI tools...
About a month ago
- Creating a subset of Go that translates to C was never my end goal. I liked writing C code with Go, but without the standard library it felt pretty limited. So, the next logical step was to port Go's stdlib to C.Of course, this isn't something I could do all at once. So I...
- I'm working on a new programming language named Solod (So). It's a strict subset of Go that translates to C, without hidden memory allocations and with source-level interop.Highlights:Go in, C out. You write regular Go code and get readable C11 as output.Zero runtime. No garbage...
about 2 months ago
- How many millions of times have you seen this pattern in Go where a variable is pre-created just to make a pointer to it down the line? There is a high chance your codebase includes a utility to do that. // Something like this a := 123 aPtr := &a // Or like this func Pointer[T...
2 months ago
- I’ve been exploring Go for building small, fast and self-contained binary applications recently. I’m enjoying how there’s generally one obvious way to do things and the resulting code is boring …
3 months ago
- Go has several ways of sending requests, including some convenient methods such as:http.Get()http.Head()http.Post()http.PostForm()However, these don’t let you add headers to requests! If you need customization of the HTTP method or headers, you need to use...
- Basic Usage of time.Sleep()You can use time.Sleep() to pause your program for a predetermined amount of time, similar to most programming languages.First, you should know that the time package has useful constants that allow you to conveniently specify time in units.1 2 3 4 5 6...
- Everyone likes interfaces in Go and traits in Rust. Polymorphism without class-based hierarchies or inheritance seems to be the sweet spot. What if we try to implement this in C?Interfaces in Go • Traits in Rust • Toy example • Interface definition • Interface data • Method...
- Go 1.26 is coming out in February, so it's a good time to explore what's new. The official release notes are pretty dry, so I prepared an interactive version with lots of examples showing what has changed and what the new behavior is.Read on and see!new(expr) • Type-safe error...
4 months ago
- Building a fair, cancelable semaphore in Go and the subtle concurrency issues involved....
- With a fresh set of analyzers and the same backend as go vet....
- Explore different types of leaks and how to detect them in modern Go versions....
- Compiling and running 'Hello, World!' in 20 programming languages....
- Discusses some design choices used in Jubilant: Python subprocess.run to wrap a CLI tool, a code generator to convert Go structs to Python dataclasses, and the use of uv with a simple Makefile to run commands....
- Interactive book on concurrent programming with auto-tested exercises....
- Automatically erase memory to prevent secret leaks....
- CPU cores, threads, goroutines, and the scheduler....
5 months ago
- errors.AsType is a modern alternative to errors.As....
- Export goroutine-related metrics from the Go runtime....
- Checking concurrent operations and time-sensitive code....
- Your computer runs tons of processes in the background, and pulling a plug out of a socket when it is in the middle of something is not a good idea. Doing that to your running service is also pretty risky, but this is precisely what happens when you terminate your running server...
Rows per page