I've spent the past couple months hand crafting a new B-tree map implementation for Go. It's fast. Faster than Rust's BTreeMap. Faster than the fastest C++ (frozenca/btree). And about 2x faster than my current Go btree (tidwall/btree).
I've spent the past couple months hand crafting a new B-tree map implementation for Go. It's fast. Faster than Rust's BTreeMap. Faster than the fastest C++ (frozenca/btree). And about 2x faster than my current Go btree (tidwall/btree).
I've just released a new version of the "sh" #golang module, including initial Zsh support in shfmt, as well as many improvements and fixes to the parser and interpreter π
Finally! No more "dirty" #golang builds because you have untracked files laying around which don't affect the build at all :)
Got an idea buzzing in that brilliant gopher brain of yours? π§
Donβt keep it in the lab; share it with the #golang community! π§ͺ
#GopherCon Call for Speakers closes March 4th.
Submit your proposal β‘οΈ sessionize.com/gophercon-20...
#RoadToGopherCon
(Many of the problems flagged by gopls also come from go vet, and the core Go team maintains an additional set of excellent code analyzers that are also used by gopls, but Dominik's Staticcheck is much broader than either of those.)
Small #golang PSA:
Most of the very nice automatic code problem reports in your editor or IDE come from Staticcheck by Dominik Honnef (@honnef.co).
gopls is the LSP, and it uses many of the rules from Staticcheck.
Suggestion: consider sponsoring Dominik! (Well worth it in my humble opinionπ
)
I'm putting the finishing touches on the Staticcheck update for #golang 1.26. You can expect a release by the end of the week.
Some pretty awesome improvements in 1.26 for compiling/testing typescript-go.
With a clean build/test cache, running the full test suite used to take 3m45s, but now takes just 2m10s.
Go 1.26 is out, and the announcement says:
"Over the next few weeks, follow-up blog posts will cover some of the topics in more detail. Check back later."
So you can wait a few weeks OR you can read my interactive Go 1.26 tour right away:
antonz.org/go-1-26
With Go 1.26, you can easily log to multiple targets (like stdout, a file, or a remote server) using just the standard library.
All thanks to slog.MultiHandler, which sends log records to any number of handlers you configure.
I think some @tangled.org folks are at FOSDEM if you want to talk to them about stacked reviews use case and comparison with Gerrit.
Maybe you could help ever-so-slightly nudge the industry forward on the goodness of Gerrit. π€
(And maybe in parallel you can nerd snipe them into using some CUE π
)
@rog.bsky.social this sounds perfect for testing servers locally, especially with synctest π
github.com/golang/go/is...
This is a fun writeup of using C to implement #golang interfaces (or maybe Rust traits), complete with editable C you can run via your browser.
It pairs nicely with the classic post on the Go interface implementation by @swtch.com from 16 (!) years ago:
research.swtch.com/interfaces
βFloating-Point Printing and Parsing Can Be Simple And Fastβ
The fastest known floating-point printer and parsing algorithms - fixed-width printing, shortest-width printing, and parsing, all in 400 lines of Go.
research.swtch.com/fp
research.swtch.com/fp-proof
Maybe you were thinking of this from earlier this week?
bsky.app/profile/apen...
And to be clear, that's not some backhanded complaint. π
I'm glad folks in academia study FOSS ecosystems, which seems like a treasure trove of interesting research questions, and they cleanly cited everything.
The two main issues I think were:
go.dev/issue/31543
go.dev/issue/32695
There's also this 2021 paper:
arxiv.org/abs/2102.12105
It's more specific to some Go modules transition pains
(For me, reading that paper felt odd because I kept saying "huh, I recognize that example" and then slowly realized large portion of the paper was based on ~3 GitHub issues I had filed π
)
@michael.express and @prattmic.com, you'll likely be pleased to see this π
Very nice!
#golang flight recorder taking off (so to speak)
Also now on stream.place
(so might depend on how broad the definition of βhereβ is π
)
A good way to keep up with the Go project is this starter pack from @mvdan.cc (long-time #golang contributor).
Two other good ways to keep up are subscribing to the Go proposal review meeting GitHub issue:
go.dev/issue/33502
and the Go compiler & runtime meeting notes issue:
go.dev/issue/43930
New blog post, with a perhaps mildly unpopular opinion: jayconrod.com/posts/133/in...
Large chunks of the Go ecosystem do a good job respecting semver, but some pockets don't, which I think is partly why many gophers ~never have problems upgrading but some gophers do.
In other words, it's reasonable to upgrade however works well for you (based on your project's goals, its deps, etc)
Or more precisely, it's fine to use -u as a conscious decision.
The "mistake" I've often seen is gophers not knowing -u is optional (without knowing that 'go get foo' also updates foo but doesn't force upgrade of all foo's deps past the versions foo's authors likely validated when releasing foo).
Related #golang PSA:
Gophers often mistakenly put a -u in 'go get -u foo', when they would have been better off with just 'go get foo'.
'go get foo' says to upgrade foo itself. It's shorthand for 'go get foo@upgrade'
'go get -u foo' says to *also* upgrade all the direct and indirect deps of foo.
30 Years of Programming at 44 Years Old
blainsmith.com/articles/30-...
#Programming #Birthday
Tailscale, AT protocol, #golang, holding hands running through a field
I vaguely recall a core Go team member saying that early on, they thought it worth trying out a different time formatting approach (unlike strftime or similar), but also that with hindsight they might have made different choices, including if they had known at the time how widely Go would be used. π
The time package documentation says:
"The calendrical calculations always assume a Gregorian calendar, with no leap seconds."
pkg.go.dev/time
The Go stdlib is large compared to some ecosystems, but more focused than some others, and it does not try to cover everything:
go.dev/doc/faq#x_in...
That string is the value of the 'time.ANSIC' constant defined in the time package:
pkg.go.dev/time#pkg-con...
Here's a quick playground example showing that pattern in use, along with some other variations (including with and without an underscore in the format pattern):
go.dev/play/p/Gu7bC...