🌉 Live from SF w/ Josh Bleecher Snyder: Divide and Slog, Sponsored by Antithesis and Ardan Labs
This show is supported by you. Stick around till the ad break to hear more about that. Is Cup This o' Go for 03/26/2026. Keep up to date with the important happenings in the Go community in about twenty minutes per week. I'm Shay Nehmad.
Josh Bleecher Snyder:I am Josh Bleecher Snyder.
Shay Nehmad:And we are live here at the beautiful Antithesis offices. We will hear more from beautiful sponsors in the ad break pretty soon. Wait a minute. You're not Jonathan. But I am bald.
Shay Nehmad:A long, long, long time listeners of the show may remember Josh from his appearance on the August 11 episode twenty twenty three, where we interviewed you for the first time. That's the first time I met you.
Josh Bleecher Snyder:My name is Josh Bleecher Snyder. I have spent, an inordinate amount of my life hacking on the Go compiler tool chain runtime and being generally involved in the project. I started using Go around Go one two, started contributing actively around Go one four, and sort of retired a couple of cycles ago.
Shay Nehmad:Since then, I have moved to the Bay Area where you are also located, and now we're here in the same meat space, which is really cool.
Josh Bleecher Snyder:It's very exciting, and also it must have been really painful if you still remember the date. I'm sorry.
Shay Nehmad:No. I just looked it up and also in my nightmares. So we have a few two proposals to dig into and then one short blog post to not dig into too much. In the live episode, this is part of the Go SF meetup and it's getting late. People are glazed over, so we're gonna try and do it kinda fast.
Shay Nehmad:You wanted to share a proposal about math.
Josh Bleecher Snyder:More precisely, Math Big. It is probably not something that any of the listeners will actually need to use, but it's exciting. So MathBig is for doing things with very large integers, very large floats, etcetera, cryptography, etcetera. And the proposal is to add a new int dot divide. So if you're dividing large integers, and in particular, you're doing you want to do a remainder and divisor.
Josh Bleecher Snyder:Sounds obvious. Now there's this question, which is, well, for the remainder, do I want the the low remainder, like the floor, or do I want the high remainder, like the ceiling? Effectively, I want a rounding mode. So let's talk about rounding modes for just a second. We all learned how to round.
Josh Bleecher Snyder:Right? 4.5 becomes five. 4.49999 becomes four. But there's multiple different rounding modes.
Shay Nehmad:How comes there are multiple rounding modes? Sounds to me like you just defined it. If it's closer to the higher number, you go to the higher number. If it's closer to the lower number, you go to the lower number. What do you mean there are modes?
Josh Bleecher Snyder:Well, you need a tiebreaker. If it's exactly at four and a half, you could either go to Right. Four or to Oh, shit. Right. He says.
Josh Bleecher Snyder:So there are some Mike. There are some options. When there's a tiebreaker, you could go up towards positive infinity. You could go down towards negative infinity. Or you could do my favorite, which is you could round towards the nearest even number.
Josh Bleecher Snyder:And the reason you might want that is because it won't mess up any of your statistical distributions. So why stop at one? Int dot divide gives you all of the rounding modes to choose from. Filippo, can cut this out if it gets too long, I'm gonna tell you a really short story about a bug that I filed very early in GoDays that I was very proud of. There was a bug in the ARM assembly of profiling, and it was triggered by doing divisions.
Josh Bleecher Snyder:I sent a bug. Was like, here's how you do lots of divides. You do a giant int divide. So, I took the continued fraction of pi, and I took a really, really big one, and I ran int divide, you know, big divided by small, it came out with three, obviously. That's the definition of pi because it's an integer divide, but it triggered the bug beautifully.
Josh Bleecher Snyder:Okay. I better get off camera.
Shay Nehmad:No camera. This is just a microphone. So this is a proposal. It's accepted. It's gonna be in 01/27, or is it, like, still up for discussion?
Shay Nehmad:It sounds like just a math thing. Is there any discussion on the API? Do you know what's the state?
Josh Bleecher Snyder:Yes. So I believe it has been accepted. The API coming out of the proposal process looks nothing like the API going in, which is a sign the proposal process is doing its job right. Because after a bunch of refinement, we have a much richer and more powerful and more interesting API.
Shay Nehmad:Cool. So hopefully, we'll see it in 1.27, but since it's not out yet, you know, jump on the proposal, which is gonna be in the show notes. The show notes can be found on our beautiful website, cupo'go.dev. This is an audio show, so this doesn't carry, but I'm actually pointing at a huge screen in front of all the people right now. So, yeah.
Shay Nehmad:Another proposal made it to the meeting minutes. It's I just wanna point it out because it's very, esoteric and I like these sorts of things. Who here use uses or use Git? Okay. Keep your hand up if you also used SVN.
Shay Nehmad:I'm sort of aging myself. TFS also? Just email patches? Alright. Alright.
Josh Bleecher Snyder:Which of the new cool kids uses jujitsu?
Shay Nehmad:And finally, Bazaar? Oh. Really? I work there. Oh, you know what?
Shay Nehmad:That's fair. It is Simon Laifen of the show and Lurker in the channel, I assume, but you don't post a ton. So apparently there's another version control system called Bazaar, which is kind of abandonware. Nobody's touched it since many years. There's actually an issue about dropping support for Bazaar in Go CMD, which is unanimously accepted by everyone.
Shay Nehmad:It was like, oh, yeah, that thing. We can delete it. I actually didn't even know about it. I learned it from the issue. And there is one really tiny detail that I liked where you can look at the proposal and they justify it with numbers.
Shay Nehmad:So, Russ Kah goes here into the numbers, like, git 30 millions and then, like, bizarre 46. An SVN, which is like my personal favorite because that's the first version control system I learned, one. Very, very, very sad. And then in the upcom in the comment right next to it, to answer the obvious this is I'm quoting Russ. To answer the obvious questions that everyone will ask, the lone subversion fetch is svn.reuse svn.com/sadsvn.
Shay Nehmad:It's like giving the URL of who pulled it from svn. So yeah, one twenty seven is gonna drop Bazaar support. If this is a breaking change for you, it's a you problem. Any any comments about that? Have you are you how are you preparing for this deprecation?
Shay Nehmad:I'm upgrading the fossil. Fair. Fair. Fair. So, yeah, the link is in the show notes.
Shay Nehmad:This is actually not I don't it's not accepted yet. This is the final likely accept stage. So, you know, it's like this American wedding scene where it's like speak now or forever hold your peace. This is actually your moment to save it if it's actually important for you. One final thing we wanted to briefly mention, like a few minutes, is a blog post that I found very, very interesting.
Shay Nehmad:It's about Slogbox. We have SLOG, which is relatively new. So what is SLOG?
Josh Bleecher Snyder:Short for structured logging or also SLOG, which
Shay Nehmad:is what logging is. And we also have the flight recorder, which is actually super pretty new. It's from 01/25. The flight recorder, it's a runtime, like a standard library runtime slash trace thing. It's like a black box of an airplane.
Shay Nehmad:It stores like the last bad things that happened. So if the program crashes, you have the flight recorder, which is a super genius idea and I really love that they introduced it into the language. It's super pragmatic. And you keep just the recent stuff that happened in memory and then when the process crashes or your server dies or whatever, you have that buffer. If you stored it somewhere that's persistent, you can look at the black box flight logs and realize what happened before the plane crashed.
Shay Nehmad:Lots of YouTube videos about actual black box recording, which are super harrowing and I don't recommend for anybody, but just looking at a few logs is probably fine. So why are we talking about Slogbox and Flight Recorder? What is this blog post proposing by Alexrios?
Josh Bleecher Snyder:So Flight Recorder gives you a bunch of automated tracing from inside the runtime, which is useful to know what's been happening, what function calls, etcetera. But sometimes you want more curated sort of user detailed things like I put these log or my agent put these logs in here for a reason. It tells me the useful things. I would really like to have that as well, not just the internal traces.
Shay Nehmad:Yeah. So this blog post goes into how Alex built this recorder interface, basically similar concept to the Flight Recorder for your own important user logs in case your process crashes. Goes really deep into how to implement it correctly, including things like ring buffers, which is a cool thing, like, you know, whenever you can bring up a cool algorithms and data structures outside of a job interview, that's always fun. Storing log records instead of strings because it's structured logging. Also details about when are you resolving values, because when you were recording something in a box, you want it to be immutable, so you don't want to wait until you try to read it because then it's too late, so make sure you don't store like pointers or unresolved values or things like that.
Shay Nehmad:Lots of details. You had some issues with this blog post though, so I'll just say in the concept level, I love this idea, but under the hood you had some quarrels?
Josh Bleecher Snyder:Yeah. First of all, if you can't keep up with all of your logs, you're writing too many logs, so why are we only saving the last n? Also, you really once your system goes down, you might not have the opportunity to get your logs anymore. Similar failure mode to the black box recorder, but I learned this from somebody who ran an ISP, and they were like, look. When something goes wrong, your customer is going to walk up and unplug their modem within the next thirty seconds.
Josh Bleecher Snyder:You have thirty seconds to get your logs off. Go quick. And then in the details, they sort of dismissed using channels for communication on the grounds that it requires a coordination between the channels. They seem to have missed that you can use buffered channels where you can drop things off and then keep going very quickly. And instead, they recommend a readwrite mutex.
Josh Bleecher Snyder:So this is my PSA. I say it to everyone who will listen. SyncRwmutex is extremely rarely the right answer. It is way more expensive than a sync. Mutex, so you should usually just start with that.
Josh Bleecher Snyder:And if you really are so worried about read contention, you should probably be using an atomic. Pointer with a separate mutex and using copy on write. So the use case for synced. Rwmutex is extremely narrow, and I don't think this hits it. So it's neat.
Josh Bleecher Snyder:There's lots of neat things to learn from this, but please don't take away to use readwrite mutexes.
Shay Nehmad:Cool. And always, like, when I bring up these blog posts in the show, I dive into the blog itself because people writing on the Internet using their actual typing and sharing code is such a treasured thing. And yeah, this is a really cool blog. It's all about Go. There's a deep dive into the green tea garbage collector if you're into that.
Shay Nehmad:Just like five ways to look at a Go routine. It's just a very cool, cool blog, including all of this person's social links. Again, of course, the links can be found in the show notes. And I think it's time for a quick ad break and call our beautiful sponsors for this week. Like I mentioned at the top of the show, this show is supported by you.
Shay Nehmad:If you'd like to, support the show, the best way to do it is to financially support us through Patreon. This week we have two beautiful new Patreons, Corbin Staben, thank you for subscribing, and another one who's gonna come to the mic right now to tell us about this week's sponsor. This is a live episode. This week was a little too similar to the previous one. Listeners are gonna think it's edited, but it's not.
Shay Nehmad:It was real. So this week is sponsored. We're we're hosted in this beautiful space, and we'll hear more about that in just a second. If you wanna reach us, find the Patreon link, the store link where you can find swag, or the Slack channel where you can talk to other listeners. You can find everything at cupgo.dev.
Shay Nehmad:That is cupo'go.dev. Other than supporting the show financially, the best way to support the show is just to share it with other people. So the people here in this room, you're like, oh, I listened to this podcast. Here's this link. We don't pay to advertise when we don't plan to do it ever.
Shay Nehmad:So the only way we spread the show is from, like, word-of-mouth. So your support means a lot to us. We actually did some deep deep dive into the stats recently and our show is doing really really well. We haven't done anything different, so I don't know what's happening, but I we really appreciate it. And without further ado, our sponsor.
Antithesis:We're super happy to have Cup o' Go at Antithesis this week. We make a platform for ensuring that your code works correctly, even in situations that you did not anticipate. We do that by actually running your whole multi container system in a special virtual machine, injecting realistic faults, and then actively looking for bugs, and then making every bug we find perfectly replayable. So if you're using agents to build mission critical software, check us out at antithesis.com.
Shay Nehmad:I'll say, in addition that actually has been a really good partner in the GoSF meetup scene and has been really good at helping us organize this and generally a really cool guy. And if I didn't have my own startup going on right now, I would really consider this offer.
Josh Bleecher Snyder:And I have to say that's a flight recorder.
Shay Nehmad:Yeah. Other than that, we also wanna thank Ardan Labs who have sponsored this week's sort of meeting. They don't know they're also recording the episode, they're just getting a shout out for free, but they have raffled in the Go SF meetup their Ultimate Go bundle. And I have a lot of friends in Ardan, Bill Kennedy, which was on the show, Miki, and a lot of other people. They're a really good bunch.
Shay Nehmad:So thanks Ardan for helping with the sponsorship as well. Time for the lightning round.
Josh Bleecher Snyder:Lightning round.
Shay Nehmad:The lightning round is just a short part where we give you a bunch of links. Try to spend just a few seconds on them for the things that we wanted to make into the backlog, but just didn't have time. So my thing is JetBrains, if you use Goland, they have a link to a survey. I have a few people that still code in IDEs like it's twenty twenty five in my office, and they use JetBrains. I don't.
Shay Nehmad:I actually moved to Zed if I'm not using VIM. But I think the Goland team, like the JetBrains team, they're actually a really good bunch and they're doing a lot of good work, especially in the Go space. So if you are a JetBrains user, go check out that survey link. This is not sponsored or anything. I just sort of appreciate, you know, DevTools and whatever.
Shay Nehmad:So it's surveys.jetbrains.com/something. You're going to find it in the show notes. What's your item?
Josh Bleecher Snyder:My item is tui. Studio. It's been the year of the Linux laptop, by which I mean Tuis, and, they're delightful. And also, we have great tools in the Go ecosystem for building them, and also still it's a lot of work to build them. So if you wanted to tinker around and have a Figma style experience, try making a TUI graphically, TUI dot Studio as you hooked up.
Shay Nehmad:And they actually allow to export code like Go Bubble Tea code, which is pretty cool. We're actually in this meetup, we saw just a second ago a really cool TUI happening with Brian's share shared with us. I wouldn't be able to build it, but maybe I'll be able to Figma it at least in in TUI Studio. And that's the show. Thanks, Josh, for cohosting with me this week.
Josh Bleecher Snyder:Thanks, Shay, for letting me near
Shay Nehmad:the microphone again. And that's it. Program exited. Goodbye. Program exit up.
Shay Nehmad:Goodbye.
Creators and Guests
