---
title: "How and why PlanetScale built a VM in Go"
publication: "Go Weekly"
issue: 547
published_at: "2025-03-26"
canonical_url: "https://golangweekly.com/issues/547"
---

Plus running Go code on the PlayStation 2. |        

#​547 — March 26, 2025 

[Unsub](https://golangweekly.com/leave/*|UID|*)|[Web Version](https://golangweekly.com/issues/547)  

Together with [![Stytch logo\](https://res.cloudinary.com/cpress/image/upload/c_fill,g_auto,e_trim,w_686,h_212/e_make_transparent/co_white,e_outline:17/sxadrfitso54gphepg4p.png)](https://stytch.com?utm_source=go-newsletter&utm_medium=paid_sponsorship&utm_campaign=go-newsletter-03-26-2025&utm_content=primary-listing)   

Go Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/jtyhvxvolvc1b8xlbwlz.jpg)](https://rgsilva.com/blog/ps2-go-part-1/)  

[Go on the PlayStation 2](https://rgsilva.com/blog/ps2-go-part-1/) — If you like tinkering with consoles and shoe-horning Go into new (or old?) environments, this post is for you. It involves TinyGo, C, and a lot of trial and error. 

Ricardo Gomes da Silva   [![\](https://res.cloudinary.com/cpress/image/upload/c_limit,w_480,h_480,q_auto/copm/cda5fbaa.jpg)](https://stytch.com?utm_source=go-newsletter&utm_medium=paid_sponsorship&utm_campaign=go-newsletter-03-26-2025&utm_content=primary-listing) 

[Make Your App an OAuth Provider](https://stytch.com?utm_source=go-newsletter&utm_medium=paid_sponsorship&utm_campaign=go-newsletter-03-26-2025&utm_content=primary-listing) — Use [Stytch](https://stytch.com/docs/quickstarts/go?utm_source=go-newsletter&utm_medium=paid_sponsorship&utm_campaign=go-newsletter-03-26-2025&utm_content=primary-listing) to easily add 3rd party integrations, make your app agent ready, and enable data connectivity. Be your own OAuth 2.0/OIDC Identity Provider with Stytch [Connected Apps](https://stytch.com/connected-apps?utm_source=go-newsletter&utm_medium=paid_sponsorship&utm_campaign=go-newsletter-03-26-2025&utm_content=primary-listing). Check out our [Go quickstart](https://stytch.com/docs/b2b/quickstarts/go?utm_source=go-newsletter&utm_medium=paid_sponsorship&utm_campaign=go-newsletter-03-26-2025&utm_content=primary-listing). 

Stytch sponsor   

[How and Why PlanetScale Built a VM in Go](https://planetscale.com/blog/faster-interpreters-in-go-catching-up-with-cpp) — PlanetScale is a well known cloud based MySQL host that uses the Go-powered [Vitess](https://github.com/vitessio/vitess) MySQL scaler. This article covers the tale of building a virtual machine in Go to work with the SQL ASTs produced by their SQL parser and how it’s as fast (or sometimes faster) as MySQL’s own C++ approach. 

Vicent Martí (PlanetScale)   

**IN BRIEF:** 

- 📘 If you've enjoyed Phuong Le's detailed Go blog posts recently (such as [this one about `unique`](https://victoriametrics.com/blog/go-unique-package-intern-string/)), he has a new book out in early access called [_The Anatomy of Go._](https://www.bytesizego.com/books/anatomy-of-go)
- 🎂 [Go version 1](https://go.dev/blog/go1) was released 13 years ago this week!
- The folks on Reddit's `/r/golang` got to discussing [unusual or unique things they've built in Go](https://www.reddit.com/r/golang/comments/1jk66cp/what_unique_or_unusual_things_have_you_built_in_go/) including things like [▶️ a World of Warcraft bot](https://www.youtube.com/watch?v=5O9EYIISGFA), [an MP3 visualizer](https://github.com/magooney-loon/milkshaker_visualizer), and code for [synthesizing guitar-like sounds.](https://timiskhakov.github.io/posts/programming-guitar-music)   

[The Right Way to Do Data Fixtures in Go](https://brandur.org/fragments/go-data-fixtures) — If you don’t have a strategy for data fixtures from the start, problems can show up in ways that make testing brittle. Here are some tips to get started on the right foot and prevent the need to fix your fixtures later. 

Brandur Leach   

[🔒 Protect Against AI Bots, Fraud, and Abuse in Real Time](https://workos.com/radar?utm_source=cpgo&utm_medium=newsletter&utm_campaign=q12025) — WorkOS Radar protects your app with advanced device fingerprinting — stop fake signups, free tier abuse, bot attacks and brute force attempts today. 

WorkOS sponsor   

📄 [Deep vs Shallow Go Interfaces](https://tpaschalis.me/shallow-vs-deep-interfaces/) – As [they say,](https://go-proverbs.github.io/) the bigger the interface, the weaker the abstraction. Paschalis Tsilias 

📄 [Two Mul or Not Two Mul: How I Found a 20% Improvement in ed25519 in Go](https://storj.dev/blog/two-mul-or-not-two-mul) Egon Elbre 

📄 [How to Include Git Version Information in Go Binaries](https://blog.carlana.net/post/2023/golang-git-hash-how-to/) Carlana 

📄 [Finding a Free Port in Go](https://playtechnique.io/projects/go-lessons-learned/finding-a-free-port-in-go.html) Gwendolyn  

🛠 Code & Tools 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/vcyrrntlhfkbuc4v8ai9.jpg)](https://ldez.github.io/blog/2025/03/23/golangci-lint-v2/)  

[golangci-lint v2: A Fast Linter Runner for Go](https://ldez.github.io/blog/2025/03/23/golangci-lint-v2/) — A tool for running Go code linters ([about 100 of them!](https://golangci-lint.run/usage/linters)), quickly, in parallel, with caching, YAML configuration, IDE integration, and more. There are some helpful [migration instructions](https://golangci-lint.run/product/migration-guide/) if you’re upgrading from v1. 

GolangCI Contributors   [![\](https://res.cloudinary.com/cpress/image/upload/v1743000159/khzfuj82gazk9oml08xf.png)](https://github.com/MuhammadSaim/goavatar) 

[Goavatar: Generate Unique, Symmetric Identicons Based on a String](https://github.com/MuhammadSaim/goavatar) — Given a string (like a username, say), this generates very basic icons in a deterministic way that you could use for a little added visual recognition. 

Muhammad Saim   

[Physix.go: A Simple Physics Engine for Go](https://github.com/rudransh61/Physix-go) — An interesting project from a high school student (who explains the background to this project [here](https://news.ycombinator.com/item?id=43423239)) providing basic physics capabilities when using [Ebitengine](https://ebitengine.org/). 

Rudransh Bhardwaj   

[gocodewalker: A Way to 'Walk' Directories of Code](https://github.com/boyter/gocodewalker/) — If you want to walk through a nested set of directories in a code repo while respecting `.gitignore`, this is for you. 

Ben Boyter   

[go-profile: A Port of Brendan Gregg's eBPF `profile.py`](https://github.com/benbaker76/go-profile) — eBPF opens up a way to do profiling in a faster, more direct way on Linux ([details here](https://www.brendangregg.com/blog/2016-10-21/linux-efficient-profiler.html)) and this is an initial _incomplete_ attempt to port a Python-powered eBPF profiler to Go. 

Ben Baker   

[mus-go: MUS Format Serialization Library](https://github.com/mus-format/mus-go) — [MUS](https://github.com/mus-format/specification) is a binary serialization format focused on simplicity. 

Yuri Zinchenko      

📰 Classifieds   

Secrets are Dead: [Why Machine and Workload Identities are the Future of Cloud Security](https://goteleport.com/webinar-secrets-are-dead/?utm_campaign=brand&utm_content=webinar&utm_medium=partner&utm_source=cooperpress). 

--- 

[Blacksmith runs GitHub Actions 2x faster at half the cost](https://blacksmith.sh/?utm_source=cooperpress&utm_medium=secondary&utm_campaign=mar5&utm_term=go) with a one-line code change. Trusted by 250+ companies like Ashby and Clerk.      

- ☎︎ [phonenumbers 1.6](https://github.com/nyaruka/phonenumbers) – Go port of Google's libphonenumber library for parsing and validating phone numbers.
- [GoCV 0.41](https://github.com/hybridgroup/gocv/releases/tag/v0.41.0) – Bindings for the OpenCV computer vision library.
- [Freeze 0.2](https://github.com/charmbracelet/freeze/releases/tag/v0.2.0) – Generate images of code and terminal output.
- [FrankenPHP 1.5](https://github.com/dunglas/frankenphp/releases/tag/v1.5.0) – Modern Go-powered PHP app server.
- [Gonum 0.16](https://github.com/gonum/gonum) – A set of numeric libraries for Go.
- [Pond 2.3](https://github.com/alitto/pond) – Minimalistic goroutine worker pool.         

Curated by Peter Cooper and [Glenn Goodrich](https://twitter.com/ruprict). 

[Change your email](https://golangweekly.com/edit_subscription/*|UID|*)
[Stop getting this newsletter](https://golangweekly.com/leave/*|UID|*) 

© Cooper Press Ltd · Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom
