Stay up to date with the Go community in about 15 minutes per week
This show is supported by you. Stick around till the ad break to hear more about that and other exciting things. This is CuppaGo for Jan. 31, 2025. Keep up to date with the important happenings in the Go community in about fifteen minutes per week.
Shay Nehmad:I'm Shay Nehmad. I'm Jonathan Hall. And our first interview for 2025 is up. Yay. We have a pretty cool show, a lot of proposals to chew through, and an interview with Anton of the the famous interactive release notes.
Shay Nehmad:Yes. I'm excited about it. It went pretty well. We were doing the magic of editing thing where we already did the interview.
Jonathan Hall:We already did the interview.
Shay Nehmad:We did. How have you been?
Jonathan Hall:I'm pretty good. We're, buying a house in three weeks. We just finished the inspection and all that stuff, asked for a little bit of extra money to help replace the roof. The buyers agreed. So we're doing well.
Shay Nehmad:Replace the roof.
Jonathan Hall:Yeah. It's got an old roof. Buyers are gonna help pay the sellers are gonna help pay for for half of the roof replacement.
Shay Nehmad:Nice. So are like are you replacing half the roof or replacing the entire roof?
Jonathan Hall:We'll replace the bottom half.
Shay Nehmad:That's the important part.
Jonathan Hall:Yeah. I want to put some solar panels on, pretty soon. So, we want to get the roof replaced first, of course.
Shay Nehmad:Nice. That sounds prudent. I just placed a ton of solar panels on my factorial planet, and these work pretty well. They're very important, especially in Gleeba.
Jonathan Hall:Maybe I should have you come put some on my planet, on my house.
Shay Nehmad:I don't know. Maybe.
Jonathan Hall:Well, we're gonna be talking about a lot of proposals, which excites me because I love proposals. It's 1 of my favorite parts of the show. I don't know. I I I like the forward looking into the future telling what what full things Go is gonna have later on.
Shay Nehmad:Yeah. What what later on, we'll discuss what excites you about modern Go. Yes. Let's talk about runtime trace flight recording. Yeah.
Shay Nehmad:Just the name of that proposal sounds good.
Jonathan Hall:It does. It sounds really, I don't know, high-tech or something. So the Java developers among us are probably already familiar with, Java's flight recorder, capabilities. Go is gonna be getting something similar.
Shay Nehmad:What is a flight recorder?
Jonathan Hall:Yeah. What is a flight recorder? So this proposal is a little bit old. It's not that old. It's almost two years old.
Jonathan Hall:So, the idea is sometimes something interesting happens in your program. By interesting, I mean, like, something probably unexpected. Could be a bug or just unexpected behavior, and you wanna maybe debug that. So you want to do some sort of tracing to see, you know, what what was happening. Pretty expensive to have tracing on all the time.
Jonathan Hall:You know, it creates huge amounts of data that you probably almost certainly don't need most of the time. So maybe if you could wait until that interesting thing happened and didn't get a trace, except that you never know when that interesting happened until after it happened. So the idea with flight recording is that it does this tracing for you in a circular buffer. And then when something interesting happens, you can say, okay. Give me the last chunk of this buffer now.
Jonathan Hall:Dump that out to a file, and I can do my investigation. So that's gonna be added in, probably, I'm guessing, go 1.25. There's a fairly detailed API here in the trace package, runtime trace. I haven't looked at it in super detail. This isn't the kind of feature I think most of us are gonna be using a lot, but it's really good that it's there for for those times when we need it.
Jonathan Hall:So I'm I'm kinda looking forward to this. I don't know when I'll use it next, but I'm I'm glad that it will be available when
Shay Nehmad:I need it. What what sort of information does it write? Like, okay. So it's a circle of buffer, but it's a circle of buffer of of what?
Jonathan Hall:Yeah. That's a good question. What kind of data will it give you? It's gonna give you basically the same sort of information you can already get with Go's, tracing support. So, how long it spends in particular Go routines or on certain functions, how many memory allocations, things like that.
Jonathan Hall:The the the main thing is that you don't have to run it in like a you don't have to capture all the data from your tracing to get what's valuable, because of the circular buffer.
Shay Nehmad:So I wonder I just integrated Sentry into a back end just like this week. Mhmm. Wondering if this is good for, like, observability companies, if it's bad for observability companies? Because if if you can do flight recording, what's the point of, like, buying Sentry or or Surajit tools?
Jonathan Hall:I think it's good. And I'll refer back to I think it was the interview I did with John Bodnar. I think he missed that interview, the author of, 1 of the Go books that, that I like. And he was really excited about some of this. I don't know if it was this specific proposal, but he was really excited about some of the real time tracing that Go was hoping to add because it could it make it easier to export some of that data to services like Sentry or Datadog and and things like that.
Jonathan Hall:So I I think it's probably good for them. The alternative is, in many cases, they either write the code themselves or they just can't get access to that data at all. So, I mean, I guess there's an argument argument to be made that, now that I can get the flight recorder by myself, why would I bother with Sentry? But I think, really, Sentry could still make this data much more easy to consume and and digest.
Shay Nehmad:Yeah. That that makes sense. Like, integrated with the rest of their features and whatever. Yeah. Generally, flight recording seems like a super useful technique.
Shay Nehmad:I'm really surprised in in some sense, I'm really surprised it's not implemented already. I feel like the sorts of, events that trigger flight recording, are they just panics? Or can you configure, like, hey, write to a file whenever you want? Like, I'm trying to understand if it's a runtime thing, or if it's a user thing. Like, how how high up is it?
Shay Nehmad:Looks like it's gonna you only have 1 flight recorder and only 1 start is allowed, at least according to the suggested API. And you can even check if it's enabled or not enabled. But I'm just wondering what sort of events might trigger it.
Jonathan Hall:So I think you could decide when to trigger it. I think you just get to call the right to when when you want the data. So it's up to you to instrument that.
Shay Nehmad:So you should have, like, a recover thing on top of all of your web server anyway. Right? Because you don't wanna panic to crash your web server. Yeah. And then in that recovery, you should also call to write to other than doing the rest of your cleanups.
Shay Nehmad:Cool. Cool. Cool. Yep. Seems very useful, and it's been, like, waiting for a long time, and now it's been moved to approved.
Jonathan Hall:Yay.
Shay Nehmad:If you wanna implement it. And at least from the comments here, it looks like they're missing some user experience. Maybe trying to use whatever, like, to change list they have ready could be useful for this, proposal. So it's a very interesting proposal, and it's been accepted. You wanted to take a look at another accepted 1.
Jonathan Hall:Yeah. Speaking of, waiting for cool things to happen, why don't you tell us about this next 1? Okay. As soon as I tell you to go.
Shay Nehmad:Oh, no. I get it. Yeah. It's a proposal from 2016, which is incredible. It's I think what's happening here, and we might, like, only see it now, because there's been, like, a change of the guard in in the proposal ownership.
Shay Nehmad:Right? It was Russ, and now it's Austin. They might be doing, like, a backlog cleanup, sort of thing, going through great proposals from the past. This 1 is I'm I'm not sure I 100% understand it, and it sounds from your joke that you do.
Jonathan Hall:I think I do. So Yes.
Shay Nehmad:The the it's a race condition, right, with weight groups.
Jonathan Hall:Yeah. It's it's a misuse that, of sync weight group that leads to a race condition.
Shay Nehmad:Okay. So let's assume I don't have to understand the specific race condition. What's this proposal about? Like, okay, I can write code that does race conditions even in Go.
Jonathan Hall:So the the this is about sync wait group, and the the proposal isn't to change sync wait group. It's to add a vet check for 1 particular misuse of sync wait group. So if you've used sync wait group, I think it'll make sense to explain this over over audio. You you create a sync wait group, and then you call assuming your wait group is called w g, you call w g add, typically, w g add 1 for every goroutine you're gonna start and then wait for. The common misuse is to call that w g add within the goroutine.
Jonathan Hall:You should call it before you start the goroutine. If you call it within the goroutine, there's a chance, that the wait group will the the wait function on the wait group will return before the goroutine has actually kicked off and started doing things. So that's the that's the potential race condition.
Shay Nehmad:The the main thing that surprised me here in the proposal is that it's not detectable by the race detector. Like, why wouldn't it be detected by the race detector? Isn't isn't that the whole point of the race detector?
Jonathan Hall:The race detector specifically detects, data races, and this is not actually a data race. This is a case of a process finishing before a go routine has has started. So it's a different it's a different kind of race.
Shay Nehmad:The interesting thing, like, this is a pretty old proposal. There's a lot of discussion here. 1 thing I like is, how, it's planning to get resolved. Right? It's not a side of, proposals we discuss a lot, like the implementation.
Shay Nehmad:But at least the the way this looks here is just gonna look like the linter rule is is pretty simple. It's literally going to look for the dot add function call in the first line of a clause. That's it, of a closure closure, I mean. It's simple to implement it from the data they looked at. It has 0% false positive rate.
Shay Nehmad:Right? Even though it's not as elegant as, like, trying to analyze whether you did it correctly or right. It's it's a very I don't wanna say boneheaded, but it's like a very straightforward approach to solving the problem, which I think it's a good, like, eighty twenty trade off. Right?
Jonathan Hall:Yeah. Indeed.
Shay Nehmad:Or or do you think, like, implementing this without, like, parsing the AST and actually trying to figure out what's the path, etcetera, etcetera, all the crazy heuristics? Do you like, do you think it's a good idea or not?
Jonathan Hall:I think it's a good idea. I I I think I I I can think of some cases where maybe if you have Go routines calling Go routines or you're you're doing something weird, you might not catch it. But I don't think that would be a false negative. I don't think you're gonna get false positives very I I can't imagine how you would with with a simple check like this. So I I think it's a good a good thing to add.
Shay Nehmad:The the most fun part is, Alan Donovan, posting the static check analyzer and finding, 57 matches, all of which are true positives for this case from, like, real projects, like Caddy, Go2Byte, and OmniScale, and, like, just real life projects that have this, mistake. So I think that's the strongest argument out of any, like, squabbling you can do in the comments. Hey, I found 57 people who did this wrong exactly in the same way. We should add the linter rule. Although, go go vet is is, like, stronger than a linter rule
Jonathan Hall:Yeah.
Shay Nehmad:Because it comes shipped with the with the Go tool. It's almost as strong as a compiler error. Almost.
Jonathan Hall:Yeah. And and I'll point out that originally, this proposal was to add to change the API or to add to the API of the wait group, type itself. People didn't like that. So it's it's but they they did like the idea of of adding a a go back rule. And I think I agree the go back rules won't be the way to go.
Shay Nehmad:Yeah. Also, they suggested the API wasn't that great anyway. It was very confusing, at least for me.
Jonathan Hall:Although, if you want the the API that he suggested is basically the same API as the, air group has in the x air group package. So if you want that API, you can just use that instead. Cool. Cool.
Shay Nehmad:Cool. So that has been accepted. And with the simple implementation, we we should probably see that in 01/25 as well.
Jonathan Hall:I think so.
Shay Nehmad:Maybe even back ported. Like, why not?
Jonathan Hall:That would be fancy. Cool. 1 other proposal, I wanna talk about. It's not actually a proposal yet. It's not tech I guess it's a it's still in discussion phase, but we we've talked about it before.
Jonathan Hall:So I think it's worth bringing up, and it has reached a new milestone. And that is the new JSON v 2 package. We had Joe Tsai on the show a long time ago, last year, I think, to talk about, JSON v 2 when the the new, discussion topic was created about that. The exciting benchmark is that the official proposal is in draft stage and should become an official proposal very, very soon. So I will have a link in the show notes to the draft proposal to GitHub issue on the JSON v 2 experiment repo, not on the Golang Go repo, but we should be having that pop over to the Golang Go repo pretty soon as an official proposal.
Jonathan Hall:And then I imagine we'll have a a JSON v 2 pretty soon in 01/25 or maybe 01/26.
Shay Nehmad:Yeah. I'm literally seeing, like, I refreshed the page. I'm seeing Daniel Marti, which we also had on commenting on this right now, like, forty minutes ago commented on. And just looking at his comments, I I picked something interesting from this. By the way, like, a 50 lines of of proposal, detailed APIs, etcetera, etcetera.
Shay Nehmad:This is like a proper RFC document, that you can print in order to sleep on. So, 1 interesting thing about the proposed implementation is to do it in x slash JSON
Jonathan Hall:Mhmm.
Shay Nehmad:Module and not just in JSON v 2 in the standard library. Users who are using older versions of Go can still use the v 2. Yeah. And I like that. It will use type aliases to the Go standard library, so you should be you should be good other way.
Shay Nehmad:Like, you don't even I think it would really help with adoption and testing because you don't have to wait until Go releases and RC and, like, get everything in 1 package. You can just pick like, if you really want the JSON v 2 experiment, you can just take it.
Jonathan Hall:Right? Yep. And to be clear, this will be a clone. The go golang.org/x/json will be a clone of the standard library, not an alternative too. So you'll have both options.
Shay Nehmad:Yeah. For sure. So what's the general like, why do I need a JSON v 2? What's wrong with JSON? Just in general.
Jonathan Hall:So I think the most compelling argument for JSON v 2 is it will be much faster. Fewer memory allocations. The the in in my opinion, the biggest weakness of the current, JSON implementation is although it appears to work on byte streams, you know, there's an encoder and decoder that takes an IO reader or uses IO writer, It actually reads in the entire buffer before it starts, iterating through it. So you can't just send it to 2 terabytes of JSON and expect it to do the right thing. It's gonna read that into memory before it starts doing stuff.
Jonathan Hall:The new 1 will actually be having capability of operating on JSON screens properly as you would expect. It has many, many other improvements, but this is the 1 that I think will, will sort of magically improve everybody's life. It'll just make JSON encoding and decoding faster and use less memory. Cool. Cool.
Shay Nehmad:Cool. This sounds like a good, like, big project to join, like, if you wanted to right? Like, a deep project. If you if you're taking a year sabbatical in between startups or something, you plan to develop a terminal emulator, but Ghosty has already done that, doing the JSON v 2 for Go sounds like a great project to join into. Alright.
Shay Nehmad:That does it for proposals. Let's do a quick lightning round.
Jonathan Hall:Let's do it.
Shay Nehmad:Lightning round. Jonathan.
Jonathan Hall:Try.
Shay Nehmad:We just had, problems with, weight groups. Right?
Shay Nehmad:But channels can also be confusing. Closing channels, working with buffer channels, limiting the number of work of workers, not using nil channels. Confusing stuff. Right?
Jonathan Hall:Yeah. I agree. Channels can be confusing.
Shay Nehmad:Don't you worry. Anton Zhivanov, has, his new chapter of his book, The Gist of Go, channels out. And if that name, rings a bell, a, it's because he's on the, probably, the name of this episode. And, 2, because he's the interactive release notes guy. And his book is also filled with interactive examples.
Shay Nehmad:I think it might be the best way to learn. If you're into reading and not doing, I think it's the best way to read, about Go concurrency that exists today, including official documentation, including everything. I highly highly recommend it. It is. You can even stick around, for a few minutes, and we'll get to an actual interview with him.
Shay Nehmad:But it was on the lighting ground backlog, like, forever, and I was like, oh, we find we also talked to him today. So let me take it out of the backlog.
Jonathan Hall:Well, I wanna call out, an article from 1 of our listeners, and he's been on the show before too, Jamie Tanna, who wrote, a little short blog post called Go 1.20 Go tool is 1 of the best additions to the ecosystem in years. It made it around on all the cool places on Hacker News and Reddit, I suppose. It got a little bit of blowback. We'll put links to some of that too. But it's still I think it's a nice overview of this new tool called tool, the the tool tool.
Jonathan Hall:We talked about it long ago, but it's basically a way to track dependencies, go based dependencies that aren't compiled into your code. So if you're using, say, open API generation or or gRPC or something like that that does code generation for you or some other tool, this will help track those versions and and make that, easier for you.
Shay Nehmad:I I think it makes a lot of sense, or I should say it another way. Any other language I use has, dev dependencies. Right? And I developed in Python, so Poetry or UV have the dev dependencies section. And when you program in Node, you have minus minus save dev whenever you install a thing.
Shay Nehmad:So usually, there's a very clear delineation between what do you install for production and what do you install for development generation, tooling, and things like that somewhere in the equivalent of the Go mod file. And in Go, you just don't have that. Always very surprising. And then you have to do this, like, weird ass Go tools file, right, where you do tools.go and you don't have anything in there and all the imports are naked. It's like the root cause might be because it's coming out of Google, and they probably have a script that installs all the tool you need.
Shay Nehmad:Right? Because it's in a corporate setting.
Jonathan Hall:Mhmm.
Shay Nehmad:I had a friend who worked at Google, and he said that's how it works. So I'm just basing my it's, like, secondhand. I might be wrong. It's very clearly missing, so I'm very glad they added it. And Jamie goes into detail about, like, how it impacts binary sizes and things like that.
Shay Nehmad:Right? Mhmm. Cool stuff. What blowback did he get?
Jonathan Hall:So 1 of the limitations actually you touched on is that it this doesn't keep dev dependencies separate from compiled dependencies. So they're all kept in the same list, which means if you have well, let's use an example of a of a project I'm working on, 1 of my open source projects. It targets Go 1.17, but a couple of the tools I use depend on newer version of Go, which means I can't keep them in the same go dot mod file. So it won't solve that particular problem for me. I understand.
Shay Nehmad:So it's
Jonathan Hall:It's still an improvement over the status quo over the situation for today. It's still an improvement, but it's maybe not, the ideal scenario is, it's maybe not the ideal improvement everybody would want.
Shay Nehmad:I think it it doesn't mean, like, that's the final, version of this. Right? Features in Go, evolve and develop.
Jonathan Hall:And something to keep in mind, you can actually specify, if you want to, a separate dot mod file. So you could create a tools dot mod file that you use, to track your tools separately. So there is a workaround. It's just maybe not as ergonomic as maybe people want.
Shay Nehmad:Yeah. I don't like having too many project management files in my root directory and already having 2 in every programming language I work in, which is like the dependencies list and the dependencies lock file, And the readme and like, 100 files to configure linters. Like I'm very happy with go projects where you have Golang cielid config, go mod and go lock, right? And that's it. Versus like other languages I could think about, mhmm, mhmm, node, where you have, like, 15 files at the root of the project just to get your tools, like, configured and going.
Shay Nehmad:My, final thing for the lighting round, this might not be as fast and snappy as we like for lighting round, is, Dreams of Code, which I talked about, last week, came out with another banger, just a short video updating on his course that he's he's building. He's building a new course, which is cool, and he's doing it. He, like, looked at various course platforms where he could sell the thing. Right? Then he didn't like any of them, and he wrote his own, a % in Go, Like a full stack web app, in Go in a stack called goth.
Shay Nehmad:I forgot about the whole thing where you have LAMP stack, right, and, like, acronym based tech stacks. Do you know what I'm talking about? So apparently, there's the goth stack. Have you heard of it? No.
Shay Nehmad:It's Go, Temple, and HTMLX. Okay. The important part, it doesn't have a JavaScript framework. Like, it's not React or Vue or Angular. And he claims he built his whole, like, course platform in it, and he's very happy with it.
Shay Nehmad:So I'm I'm, like, happy that it's an option for people who wanna do it. And, you know, it seems like there's a wave of anti JavaScript frameworks with this and Alpine JS and things like that. But just if you like, Dreams of Code stuff, if you, liked his interview with us or his videos, don't miss out on this 1. It's all it also explains why he hasn't been, like, on top of his release schedule recently, building his own, content platform instead of just, shipping some courses, which honestly, I respect. Like, building your own thing instead of, picking something off the shelf when your thing is being an engineer that, like, tracks on multiple levels.
Shay Nehmad:That does it for the lightning round. Let's move to a quick ad break. And after that, we have, like I said, a million times already, an interview with Anton that I'm pretty jazzed about.
Jonathan Hall:Shai, I am so excited. We have, as of right now, as of for this recording, 99778 downloads of our podcast, which means that tomorrow with release of this episode you're listening to right now, we will hit 100000 downloads.
Shay Nehmad:Damn. That's cool. I'm wondering how many dishes that translates
Jonathan Hall:to. Because I
Shay Nehmad:think our podcast is the perfect podcast to do dishes with. Right? Because it's like you wanna be concentrated. I don't want people to be driving and trying to imagine, like, okay, wait wait groups and whatever just to be imagining them veering into the second lane. But it's I think it's exactly, like because doing the dishes should take you about, like, fifteen minutes.
Shay Nehmad:Right? And then while we clean off, the ad rate goes on. And then if you care about the interview, you can check that out. And if we're talking about a hundred thousand downloads, right, we have a hundred thousand downloads times fifteen minutes. So it's a million and fifth it's one and a half million minutes of just pure news.
Shay Nehmad:Right?
Jonathan Hall:Pure news. How
Shay Nehmad:long does it take you to wait to wash, like, a single plate when you do the dishes?
Jonathan Hall:I don't wash the dishes. I put them in the dishwasher.
Shay Nehmad:I'm gonna Olga, my wife, if you're listening, stop listening right now. This is a contentious this is probably the most contentious point in our marriage.
Jonathan Hall:Oh, no.
Shay Nehmad:You you're holding a plate in your hand. Yeah. It's dirty. It has, like, stuff on it, like ketchup.
Jonathan Hall:Okay.
Shay Nehmad:Do you clean it before you put it in the dishwasher so the dishwasher Ketchup, no.
Jonathan Hall:If if it has solid food on it, yes.
Shay Nehmad:I clean it before I put it in the dishwasher with soap.
Jonathan Hall:Then then then just put it in the cupboard. You don't need the dishwasher anymore.
Shay Nehmad:I will die on this hill. It keeps the dishwasher working for longer, and the dishes come out clean.
Jonathan Hall:Yeah. They they come out clean because they go in clean.
Shay Nehmad:Before you had before you had a dishwasher, how long does it take to wash your plate? Like, ten seconds? Nah.
Jonathan Hall:Just a few seconds.
Shay Nehmad:Fifteen seconds.
Jonathan Hall:Yeah. Maximum.
Shay Nehmad:We're talking about 22000000 22 and a half million plates washed.
Jonathan Hall:That's a lot of plates.
Shay Nehmad:Yeah. People need to eat. Thanks for downloading our podcast. It's so cool of you, everybody.
Jonathan Hall:Alright. What else can we talk about on this, not ad break?
Shay Nehmad:How can people reach us?
Jonathan Hall:Yeah. You can just talk
Shay Nehmad:to us.
Jonathan Hall:Yeah. Cupofgo.dev is the website where all the other links are. You can email us news@cupofgo.dev. You can find our Patreon there. Support us on Patreon.
Jonathan Hall:It helps to pay to produce a show. You can find us on Slack. We're the cupago Slack on the Gopher's Slack cupago channel on the Gopher's Slack. We've got LinkedIn. We've got
Shay Nehmad:If you wanna get technical, it's the cupago channel on the Gopher workspace. Oh. Yeah. I got really into Slack, non maculature when I worked at the Reco because it was, like, AI protection on SaaS applications. And I found that nobody cares about whatever product managers decide to call things.
Shay Nehmad:Oh, these are channels. These are threads. These are workspaces. Nobody cares about these words. They're just gonna call it the the Mhmm.
Jonathan Hall:Makes sense. Anyway, yeah. Get a hold of us. We'd love to hear from you.
Shay Nehmad:Yeah. You can email us at capago dot dev, that is @newsatcapago.dev, I mean. And we love to get your emails as well. So far, they've been nice. Last thing we wanna update you about before we jump to the interview is our one hundredth episode.
Shay Nehmad:So in just two weeks' time, we're planning to have our one hundredth episode, celebration. It's gonna be live, live in the sense that you can join the recording. Feb. 13, right before Valentine's Day, we plan to do it at, 8PM Israel time, which is like 6PM UTC. So I think most people in Europe could easily join.
Shay Nehmad:And if your morning gets sort of free, in The US, if you can get a bit later into work or if you wanna join from work, right, and grab a conference room and some coffee, bring some bagels, that could be cool if you're running the back end guild at work or something. Yeah. We're gonna do news. We're gonna go through a few proposals. We're gonna try to keep it very, opinion light and content heavy.
Shay Nehmad:And then instead of doing an interview, we're just gonna do a live chat, open microphone, and and we we're gonna have some questions and some fun stuff, maybe even some activities. We'll see what we manage to scrunch up. We really would like y'all to join us because we've been talking about the live episode forever. We really wanted to do it for a long time. And this show, I I wouldn't go as far and as influency to say it wouldn't happen without y'all, but definitely wouldn't have lasted that long without, like, the community and all the interesting people that came on to interview and all the responses and the and the support we got.
Shay Nehmad:So we would really like to to share this experience of, like, recording an episode with, everybody. And if it's fun, maybe we'll do it, like, we don't have to wait a hundred episodes to do it again. But let's try to do it once and try to do it right. Did we cover everything?
Jonathan Hall:I think we did. I think we should get on to the interview.
Shay Nehmad:To the interview
Jonathan Hall:Sean, are you excited about Go 1.24?
Shay Nehmad:I'm excited about it, definitely. I saw all of the
Jonathan Hall:Excited about reading reading all of the release notes, and And that's probably all you're gonna do. Right? Just read the release notes?
Shay Nehmad:Nah, man. I'm I'm skipping all that. I I read the source code and just try to understand what happened.
Jonathan Hall:Okay. That's cool. Yeah. No no no need to interact with it at all.
Shay Nehmad:No. I just I read, and I think I understand it. Why? Do you have any other suggestion?
Jonathan Hall:Well, I mean, I I don't know. I've I've been doing the same thing for for most, you know, most of my programming career. I just read books about programming and call myself a programmer. I don't really do anything with it. But I've been wondering
Shay Nehmad:That's why you find grammar problems in me.
Jonathan Hall:Maybe I should try interacting with these languages. I wonder if there's any way we could, you know, get some interactive, I don't know, documentation, maybe even release notes. That would be cool.
Shay Nehmad:That sounds impossible. Anton, what do you think?
Jonathan Hall:Anton, welcome to the show.
Anton:Hi, guys. Thank you for inviting me. Yes.
Jonathan Hall:And thank you for your interactive release notes and all the other contributions you've made. Before we talk about those things, though, why don't you tell our listeners a little bit little bit about who you are and what you do?
Anton:Okay. My my name is Anton. I do some open source stuff, and, I write, interactive maybe I can call them guides or books and interactive articles on my blog. That's mostly what I do in my free time. So that's it.
Shay Nehmad:These are calling them just, interactive, blog posts or guides makes them sound way less important than they are. I think they, just gave a lot of people, excitement about the new, versions of Go because now they can finally understand what it means, from, like, a thousand comments on a discussion, on, like, a proposal with super smart people that definitely understand what they're writing, but I don't. Hey, click run here, and it's gonna work. And actually, I wanna I wanted to ask you about this first, the interactive like, the little interactive windows you have on your site, that's your thing. Right?
Shay Nehmad:It's not a different library.
Anton:Yes. That's right. That's, actually 1 of my open source projects. So the idea behind it is very simple. I think that 1 of the most important, things in in technical writing, like, blog posts or documentation, is examples.
Anton:Because, I think that, we, people, generally learn best from examples and stories, because, that's how our brain works. It's just wired to, you know, to stick to examples and stories. And what can be better than just examples, only interactive examples? So that's what I think. So I've made this tool, which is a code sandbox, and also a tool for creating interactive examples in any kind of technical writing, like courses, and blogs, and things like that.
Anton:And I use it personally all the time for my blog, and I try to encourage other people to use it without much success, unfortunately. But, well, I try.
Shay Nehmad:Well, it's called Codapi. It's c0dapi.org. And definitely, if you do any kind of technical writing, blog posting, I think specifically if you're, like, a development tooling company. Right? If you have a library, your AI agent, blah blah blah, all these sorts of things.
Shay Nehmad:And SDK generation companies, right, all these things, they always have code examples on their side. And I always don't believe the examples because they just look a little bit too perfect. And I'm like, it actually lowers my trust when I see code that I can't just copy into my editor because, you know, the imports are missing or it it has a tiny syntax error. My outlook on it would definitely change if I had these, executable snippets on your site. So anybody here who listens and works in dev tooling, go check out the c0dapi.org.
Shay Nehmad:And these little snippets of, like, executable code are thing that you they are the way you build the interactive release notes, right, for every version.
Anton:Yeah. Sure. That's what I do.
Shay Nehmad:How long have you been doing the interactive release notes now that I think about it?
Anton:I think the first one was, something for Go 1 20. It was not the full release notes. It was kinda, you know, like, cherry picks from Go one twenty. And, I think the full 1 was for 01/22, '20 03/00, and now '24. So that's, last 3 releases.
Anton:And do you
Shay Nehmad:know I don't know. Maybe you have analytics or or something. How many people read these? I've seen them on every single I've seen them on every single feed of Go stuff that I I'm a part of. Obviously, our own, but that's biased.
Shay Nehmad:But Golang Weekly and Golang's Slack channel in the Slack workspace where Jonathan and I met, the rants, rants and repose, Slack and in Twitter and on, the links in, like, Telegram. I I've seen it every single play on Reddit, the Golang Reddit. Every single place that's a Go community, I've seen these, interactive release notes. Do you know how many people actually read them?
Anton:I'm afraid not very many people read them. I'm afraid people don't read much at all. Usually, what they do is they like it on social media. Sometimes they repost it, but, I think very few people, read such long blog post. But I suspect that even less people read the official release notes
Jonathan Hall:That's probably true.
Anton:To the end. I mean To the end. Maybe they open them and read the beginning, but, well, I'm not sure many people read them to the end.
Jonathan Hall:If that's what we're saying, I'm guilty. I mean, with both your interactive ones and the official ones, I tend to skim the highlights. But, like, on yours, I've I've really enjoyed yours the last, couple times. Because although I don't read them top to bottom, I pick the ones I'm interested or or in particular, the 1 I'm most confused about. And then your little examples are a great place to to to to clear up that confusion because I can whatever the thing is, I can play with it, and then I can change the code around it.
Jonathan Hall:I can, you know, hit run a few times. So, I mean, I yeah. I don't read straight through. I certainly wouldn't read straight through the release notes if it weren't for the show. I probably read them more thoroughly than I would otherwise for the show.
Jonathan Hall:But, yeah, I I read through to pick the things that are most interesting to me. I skim over anything about macOS or Windows. I skim over anything about libraries I don't use, etcetera, etcetera. But, yeah, when there's something confusing, your interactive release notes have actually helped me. For the last 2 releases, I think I was aware of it with one point one point twenty three, and then certainly 1.24.
Jonathan Hall:So so thank you. Even if I don't read it clear through, it's it's still a valuable resource for me.
Anton:Thank you, Jonathan.
Shay Nehmad:Does it work? Like, the the history of this show is basically, we started it Jonathan did some podcast before. Like, this is my third pod podcast. But the the main driving force behind doing the show is learning about Go and making sure we're, like, knowledgeable about what's going on so we're better, backend programmers or Go programmers. I feel like in order to write these, release notes, you probably understand the release a lot better once you finish the blog post.
Shay Nehmad:Right?
Anton:Sure. That's how it works. Yeah. Best way to learn is to write about something.
Jonathan Hall:Yeah. Cool.
Shay Nehmad:Any any specific things about 01/24 that were hard for you to, like, figure out and write about? Like, I know, synthetic times or directory scope or the cleanup stuff, anything that, like, writing the example really gave you in, like, moment? They were like, oh, now I understand. Now I understand what this proposal actually means.
Anton:Well, I think, the most confusing 1 was the 1 with test context. Because I I for a long time, I just I didn't get why would we need a helper here. So you can just, you know, create a context and cancel it. And, by reading the proposal and the comments below it, I understood that, basically, that's a kind of synthetic, syntactic sugar, so to say. It's basically just the context which is attached to the test, which create which, exists inside the test until the test, completes.
Anton:And then just before the test completes, it cancels. And it's just handy so that you don't, forget to create a cancelable context yourself and, defer cancel it. It's just a simple thing, but, it took me some time to understand the logic behind it because I think it was obvious to the person who proposed it, Mhmm. But it was clearly not obvious, to me as I read it and I read the comments. Somewhere in between the long very long discussion, I finally find an example, just a small example, of code, that made me understand, the point of of the test context.
Shay Nehmad:I think the best proposals we we I definitely read a lot of, proposals a lot more than I should because of this show. Right? Because I tried to find interesting ones. The ones that don't include, like, an example, just like the first after the first few lines, they have a line of code that says, here's the problem, and here's after the my proposal, here's the solution. The ones that don't include that, usually, I need to write read like 3 or 4 times.
Shay Nehmad:And then, like five minutes before the show, I go to our ticket backlog and I switch the user from myself to Jonathan and like, oh, no. You're you're explaining this 1 this week, not me. Just to get out of it. So, again, I I just can't stress enough that how, cool the, interactive release notes are, and I really hope that there will be a lot of content in Go one twenty five so you'll have a very cool, interactive release notes then because I already read, the one twenty four one. Other than the interactive release notes, though, we mentioned at the top of the show that you were working, like, on a ton of stuff.
Shay Nehmad:I think the highlight is, the, gist or gist of go book. Right?
Anton:Yeah. That's, currently the book I'm working on. It's, gist of Go concurrency. And the the motivation, for the book is, it's similar to the other kind the other stuff I I write. When I first learned to go concurrency, I I read a book.
Anton:It's, well, it's a good book. It's actually actually, it's a great book, but, it was very difficult for me again to, to get through it. And, well, when you read about, concurrency primitives, like channels, and select, and goroutines, it all seems easier, right? It's simple stuff. But when you try to understand how to really apply it, even in toy programs, it can be quite confusing.
Anton:And usually the books, well, they don't help very much with that. So I thought about writing a book, very heavy on examples, as usual, and, of course, to make them interactive, so that people can, run them and change something, and see how, things change when you, you know, run more Goroutines or, introduce mutexes or remove mutexes and stuff like that. So that's, what I'm working on currently.
Shay Nehmad:And you're sort of halfway through it. Right? You're it's not finished
Anton:yet? Well, yes. I have all the all the material, but, I only published currently. Half of it, the first half is about the high level concurrency primitives like select and coroutines and context. And the second half is more low level stuff like synchronization, mutexes, and condition variables, and stuff like
Shay Nehmad:that. Very, very cool. Just to give our, listeners a call to action, if you like the interactive release notes and you wanna learn more about concurrency, they can preorder it right now. Right?
Anton:Yeah. Sure. Just, they can visit, my website, which is Antonz.org. And, it's all there. All the books are available to read on the website.
Anton:And if, if they want to to, you know, support my work, sure, they can preorder, the book, or they can just, read it for free on the website. It's also a possibility.
Jonathan Hall:Is is your technical writing your your main source of income, or are you working as well? I'm sorry if that was already discussed.
Anton:My my work, with, writing and the the open source projects definitely is is not a source of income. Well, it, it earns me some money, but not much. Yeah, I I work for a commercial company. I program
Jonathan Hall:just Very good.
Anton:Just as a professional programmer. Well, I mostly program in Python. And
Jonathan Hall:Oh, really?
Anton:Yeah. That's it. Maybe 10% of my time, I program in Go.
Shay Nehmad:I don't wanna sound too too negative, but I hope you have more Go in your professional life as well.
Anton:Well, you know, it's it's an interesting combination, like Python and Go. I think they I think they complement each other pretty well because of how different they are. Yeah. It's so having, both Python and Go in your tool belt, you can, solve nearly any problem with the language which is best suited to the problem. Well, excluding, of course, the front end stuff, which is Yeah.
Anton:Another topic.
Shay Nehmad:The what I've found, like, I think it was yesterday, the person I think is called Charlie Marsh, said that they're gonna release a Rust based type, thing instead of mypy. And they already released the UV for instead of, like, poetry or pip. And they already released rough instead of black and eyesort and all these tools. So the moment the entire Python tooling tool stack is gonna be replaced with, like, native code, then I'll be happy to use it. But I've I've just spent so much time debugging people's virtual environments and debugging, like, stupid problems that Go doesn't have.
Shay Nehmad:My instinct is, like, Python, ugh. But, obviously, you're correct. There's different tools for different jobs that makes a lot of sense. So we we have the all the content. We have the book.
Shay Nehmad:We have the interactive release notes. You certainly, made a lot of people excited about the things that have been released. For sure, I'm, like, looking forward to the next releases just to know that just because I know I'm more equipped to deal with what they what they bring. There is this notion of, like, modern Go. Go 1 and Go one twenty four does don't they look similar.
Shay Nehmad:They're not that different, but they they are relatively different. How do you see that, like, difference in the future going forward? What are you excited about in, like, modern Go?
Anton:Well, it's an interesting thing. Just listening to I think it was your previous episode, I heard about 2 of the proposals made by, Jan. One for about error handling, and another 1 is about sync v 2. So I think both are interesting examples of the, current, Go development. So basically, what I've discussed, with Jan and, what he, added to the, sync v 2 proposal after, some discussion, additional discussion, is, as I read it, basically, every package which uses any is a potential candidate for v2 in the standard library.
Anton:That's, basically what he said, as far as I understand it. So I think, in the years to come, we will see a lot more v2 packages with generics and iterators, which are 2 things the Go team seem to be very enthusiastic about. Personally, I'm not so, so much enthusiastic about these things, but, I understand, of course, their position, and how they see the language should evolve, and the standard library should evolve. So I think the modern goal is, you know, is going to introduce more and more generics, more and more iterators. I hope it won't introduce anything about error handling because I think we should leave it alone.
Anton:It's it is verbose, it is boilerplate heavy, but that's that is just the Go way. Go is verbose, and that's okay. And error handling is also verbose, but it's okay. I hope this won't change. As for, other things, I think, more generics or iterators.
Shay Nehmad:So so more v 2, to bring, like, generics and and, like, things we agreed we can improve, improve across everything. If we agreed we're doing generics and it's already in, do it for everything. But if we agreed error handling looks like this, keep it the way it is. Cool. Yep.
Shay Nehmad:Jonathan, what what are you excited about in modern Go?
Jonathan Hall:I'm actually excited about the new, context and testing. I'm gonna use that a lot. It'll it'll I mean, it's not a big deal, but it'll make my tests just ever so slightly, less boilerplate y, I guess.
Shay Nehmad:Nice. My my thing the thought process for such a question is so different. I was like, oh, what am I excited about in Modern Go? Well, it's because it's all formatted the same, it has a slight edge in LLM code generation. So I really hope it becomes more popular because the code is better the generated code is better because it uses tabs for white space versus spaces like Python.
Shay Nehmad:So it uses less tokens, these sorts of, things. But honestly, the the honest answer is that, the thing I'm excited about in the in modern Go is the people working in it. Like, I'm really excited to meet people doing cool stuff. Usually, when you work in in at least from the last two years, I felt that people who are attracted to this technology tend to have another quirk that's cool. The average Go programmer also have something cool that they do, whereas the average just back end developer that uses whatever languages, their company had sometimes have less, passion or depth.
Shay Nehmad:I'm really excited about more people getting into this language and getting to know them. And I think that leads us pretty well to our, stumper question. So we talked about this at the beginning of the year, but our the first year of doing the show, we asked people what feature would you remove and what feature would you add? By the end of the year, we had 2 lists full of all the features, both to remove and to add. People want to remove all the features and add all the features.
Shay Nehmad:So we switched that question. Second year, we had what was the question second year? I'm I'm blanking.
Jonathan Hall:What was the biggest surprise or challenge of learning Go?
Shay Nehmad:Yeah. Like, when you learned what was very difficult for you? This year, we we have a new question. Who was the person who influenced you the most in the Go community? Like, when you think about gophers, who do you think about?
Shay Nehmad:It could be, like, someone we know. It could be someone from work. It could be someone from university. Like, it doesn't have to be a famous person, but we would be interested to hear who influenced you, Anton, in your, like, Go development journey the most.
Anton:Well, I think, I won't be very original here. When I learned Go, I, I read a lot the Go blog. I think it's a great source of, learning materials and also the, like, thinking behind the Go language, thinking of the people who created the language, who created, the core, packages. And I think, a lot of blog posts, were written by Rob Pike, at least in the previous years, not so much in the later years. So, probably Rob Pike is the person from whom I learned a lot about Go, about what is, you know, like canonical goal, like things that play at the heart of the language and philosophy, this kind of stuff.
Shay Nehmad:Well, you're definitely original because, I think you might be the first or second interviewee who's answering this question this year. So everybody else is copying you. Don't worry about it. Well, Anton, thanks a lot for coming on the show. We talked about, like, the various, links, but and by the way, listeners, obviously, all the links are in the show notes.
Shay Nehmad:Wherever you listen to this podcast, you can find them there. But just 1 last time, if people wanna find you or your books or your open source stuff, where can they find you, and where can they talk to you?
Anton:It's, antonz.org, and, everything is there, all of my works and the links to the all kinds of social networks. Everything is there. So that's it.
Jonathan Hall:Cool. Cool. Cool.
Shay Nehmad:Thanks a lot for coming on. I can't wait to get the next interactive release notes. Maybe you think not a lot of people read them, but, Jonathan and I do, and we very much enjoy doing that.
Jonathan Hall:Thanks for coming on, and keep up the good work.
Anton:Thank you.
Shay Nehmad:Exit up. Goodbye.