go2 generics experiment in building generic augmented BTree data structures (by ajwerner)
github.com/ajwerner/btree provides go1.18 generic implementations of CoW btree data structures including regular a regular map/set, order-statistic trees, and interval trees all backed by a shared, generic augmented btree implementation. Given go 1.18 hasn't been released yet and it hasn't been heavily tested, don't use it yet. Benchmarks and a deeper discussion on the patterns and experience to follow.
CockroachDB - the open source, cloud-native distributed SQL database.
Recently a colleague, Nathan, reflecting on CockroachDB, remarked (paraphrased from memory) that the key data structure is the interval btree. The story of Nathan’s addition of the first interval btree to cockroach and the power of copy-on-write data structures is worthy of its own blog post for another day. It’s Nathan’s hand-specialization of that data structure that provided the basis (and tests) for the generalization I’ll be presenting here. The reason for this specialization was as much for the performance wins of avoiding excessive allocations, pointer chasing, and cost of type assertions when using interface boxing.
Deliver Cleaner and Safer Code - Right in Your IDE of Choice!. SonarLint is a free and open source IDE extension that identifies and catches bugs and vulnerabilities as you code, directly in the IDE. Install from your favorite IDE marketplace today.
The Go programming language
As we all know, generics are coming in go1.18. So what better time for an experience report building some real things with it? This post will explore github.com/ajwerner/btree, a library leveraging go1.18's parametric polymorphism to build an abstract augmented btree which offers rich core functionality and easy extensibility.
Saving a Third of Our Memory by Re-ordering Go Struct Fields - Qvault
3 projects | reddit.com/r/golang | 2 Nov 2021
Reading database metadata (schema)
2 projects | reddit.com/r/golang | 29 Apr 2021
My Go Executable Files Are Still Getting Larger (What's New in 2021 and Go 1.16)
5 projects | news.ycombinator.com | 16 Apr 2021
What I'd Like to See in Go 2.0
4 projects | reddit.com/r/golang | 16 Jan 2022
Local library development
1 project | reddit.com/r/golang | 16 Jan 2022