💯 Go 1.24 release party - LIVE SHOW FOR EPISODE 100! 🎙️ - podcast episode cover

💯 Go 1.24 release party - LIVE SHOW FOR EPISODE 100! 🎙️

Feb 14, 20251 hr 11 minEp. 99
--:--
--:--
Listen in podcast apps:
Metacast
Spotify
Youtube
RSS

Episode description

Transcript

Shay NehmadShay Nehmad

This show is supported by you, our listeners, who are joining in this episode live. Woo hoo. Stick around till the ad break to hear more about that.

Jonathan HallJonathan Hall

This is Cup of Go for 02/13/2025. Keep up to date with the important happenings in the Go community in about fifteen minutes per week. I'm Sinek Mahad. And I'm Jonathan Hall. Do you feel

Shay NehmadShay Nehmad

anything, special going on?

Jonathan HallJonathan Hall

This is a unique experience. I mean, I've done some live streams before, but never for a podcast.

Shay NehmadShay Nehmad

It's our live episode. One hundredth episode celebration. If you're listening to this offline, I well, thanks for listening to the episodes normally. If you join the stream, hi, y'all. Thanks for joining.

Jonathan HallJonathan Hall

Jamie just commented. So are you still listening to this at, at

Shay NehmadShay Nehmad

One x speed. Actually, the non live episode, we record the two x speed, and then we ask Filippo to, cut the speed down in half in the editor. Yeah. So we have a pretty cool show, planned for today. It's kind of the same and kind of different.

So we have a bunch of new a bunch of news items to, discuss. Gopher Khan Israel is coming up, some proposals, some blog posts, some new blogs on the Go dev blog. And then we're gonna do a break, the ad break as normal. You might take a few extra minutes just because it's a live show. And then we're gonna do the Go one twenty four release party. They released it yesterday, which was really nice of them, freeing up all the people for Valentine's Day. Right?

Jonathan HallJonathan Hall

That's their that's their motive, isn't it? That's why they won't release it on Valentine's Day. They don't wanna ruin everybody's Valentine's by having people go to the Go party instead of their with their spouse.

Shay NehmadShay Nehmad

Exactly. Their other significant other other than the Go toolchain. Yeah. So, we're gonna sort of we talked about a lot of the features, that have been, planned for Go one twenty four, But this is could this could be your, like, if you don't exactly remember, if you didn't catch these episodes, we're gonna go over, the release notes. I'm actually gonna use the interactive release notes by Anton.

Maybe you'd, as my reference. So we're gonna talk about almost all of the features, like everything that's worth talking about. And because we have our beautiful live stage audience here with us, like Jens, Andy, Frederick, Giuseppe, Jamie, and probably others, we, we're gonna take questions. We're gonna take questions from the audience. You we you shouldn't have discovered that tab, man,

Jonathan HallJonathan Hall

on the app. It's gonna it's gonna ruin the entire show from now on.

Shay NehmadShay Nehmad

No. It's gonna be fine. So without further ado, let's get started. Right? Let's do it. Cool. First up, Gofer Con Israel.

Jonathan HallJonathan Hall

Tell us all about it and why you're not gonna be there.

Shay NehmadShay Nehmad

Yeah. So, unfortunately, I'm not gonna make it

Jonathan HallJonathan Hall

to Gofer Con Israel. Lucky because it's May in Tel Aviv, and by May, I'm not gonna be in Tel Aviv,

Shay NehmadShay Nehmad

because I'm moving. But Gofer Con Israel is always a great event. I know the organizer personally. One of them was here on the show, Miki, our first interviewee ever, actually. And the team, includes some people that I've done other conferences with in the past, like, Nachshon Samarit, who who came to Orca to do a show, and Yerben Leifenfeld, who was also on the show, and like people that, have organized, the conference in the past.

So if you have enjoyed the conference in the past, you should expect, pretty much the same. The conference is still looking for sponsors. So I think that's the best call to action here if you're working at a big Israeli company, that uses Go, think about companies like Ffly or Getexy and all the rest, CrowdStrike, etcetera, etcetera. Please consider becoming a sponsor. You know, there's gold level of sponsorship, which really really puts you front and center at the conference, and it's really not that expensive.

You get an on-site booth and your logo on the conference website and on all the videos and you get five sponsorships, you get, seven tickets, sorry, And there are five available. So you should probably move fast because I find no app slider that already got the first one. And it's great for recruiting, branding, etcetera. Regarding the talks themselves, I don't know if the if, who's exactly, gonna talk yet. There there isn't a docket yet, but usually it's very, very good. It's gonna

Jonathan HallJonathan Hall

be a live conference, in

Shay NehmadShay Nehmad

Tel Aviv, but it's also recorded. So if you're if you will miss it like myself, you can always watch it on YouTube.

Jonathan HallJonathan Hall

And I'm assuming it's gonna be a mixture of Hebrew and English presentations as as usual.

Shay NehmadShay Nehmad

Yes. Yes. Most years, the keynote is in English, and the rest of the talks is, like, depends on the speaker and what's their preference.

Jonathan HallJonathan Hall

Cool.

Shay NehmadShay Nehmad

But most of the talks are in Hebrew. And it's a dual track. I I really hope they do the same this year. All the all the years I've been, it's a dual track thing. So you have two talks and you choose which one to attend. Right? Yeah.

Jonathan HallJonathan Hall

Cool.

Shay NehmadShay Nehmad

So you you get to, like you're not just stuck to whoever's talking or whatever schedule you have. If you're not interested in one topic, you can take the other. And they do a really good good job of, like, separating them. You know what I mean? So you won't have two topics about the same subject, like web development, on the same time slot. So, yeah, go for Khan Israel. It's in May. Make sure to, prep.

Jonathan HallJonathan Hall

And if you're aware of other conferences or or meetups happening, let us know. We love to announce those on the show. I actually saw that Hanover did their meetup, but it just happened yesterday. And I heard it's not announced, like, two days before, so so we didn't have time to mention it on the show. Let us know in advance next time, and we'll mention it on the show. Maybe we can do a daily show. Here we go.

Shay NehmadShay Nehmad

I don't know if there's enough action going on in Go to do a jet daily show. Yeah.

Jonathan HallJonathan Hall

I don't know if I have enough time, even if there were.

Shay NehmadShay Nehmad

Alright. Let's talk about some proposals. Let's do it.

Jonathan HallJonathan Hall

So, attack of the clones or something. This proposal has been accepted, and it is the ability to clone hashes so we can start those clone wars more effectively or more efficiently or something. The basic idea, if you're if you're doing a hash, say, an MP5 or SHA-two 56 or something like that, You basically feed a bunch of data to this hash function that calculates a hash as it's going along. Suppose you had, I don't know, maybe I don't know, I might have a scenario, but let's say you're you're hashing an email for some reason. Right?

And you've hashed the email, you have this hash, and now you have to you wanna create two versions, one that has your signature and one that doesn't have the signature. Prior to this proposal, you'd have to send all that data twice once to get the hash with the signature and then once again to do without the signature. With this new function, you could send this first amount of data without the signature and then clone the hash and then feed it more data to get the one of the signatures. So if you're hashing duplicate data or partially duplicate data, this will, potentially improve your performance significantly. The capability, I guess, was already there.

It just wasn't exposed through the public interface. So now it's gonna be exposed so so anybody can use it.

Shay NehmadShay Nehmad

In what use case do you copy something like you've already hashed instead of just copying the hashed value? Like, if you're only hashing on the first few bytes and then you add some other things to the digest, you can save on some computation. Is that the thing?

Jonathan HallJonathan Hall

Yeah. I mean, I I suppose this would happen like you're doing any sort of blockchain type of stuff, I I imagine. It's not honestly, it's not a use case I've ever needed or or if I have, I've forgotten. So, yeah, I don't know exactly, the real world scenarios where it's useful. Cool.

Shay NehmadShay Nehmad

Who submitted it?

Jonathan HallJonathan Hall

Silippo del Sorda, who we had on the show before.

Shay NehmadShay Nehmad

The usual suspect.

Jonathan HallJonathan Hall

Yes. Yes.

Shay NehmadShay Nehmad

Cool. So if you use, hashes often and you're looking for optimization opportunities, now we can clone hashes. And if not, you can rest easy knowing the people who actually worry and sweat this, these details now have a slightly better API to do so.

Jonathan HallJonathan Hall

Yes.

Shay NehmadShay Nehmad

Instead of us mere mortals. Jonathan, you work on on Gopher JS, right?

Jonathan HallJonathan Hall

Yeah. I'm one of the top engineers. To It it it transpiles Go to JavaScript. Yeah.

Shay NehmadShay Nehmad

Not to WebAssembly. Not to WebAssembly. So the next two items on the docket are are kinda counterproductive, for you.

Jonathan HallJonathan Hall

Well, I I can see why you say that. But, so actually the the original author of Gopher. Js is the one who added WebAssembly support to Go. So they're they're closely related projects. You could say Gopher. Js was the training wheels for for adding WebAssembly to Go.

Shay NehmadShay Nehmad

Oh, yeah. Yeah. So that makes sense. What I was sort of my experience with, WebAssembly was I just tried to write a single web page, using Rust and WebAssembly, using YARH, and it was very, very cool technically and very unproductive compared to like how fast I could whip up stuff with like React which I know pretty well and then I dropped it and that was like four years ago. It seems like a lot of people have been doing WebAssembly since then for like myriad uses, but this is the first like production enterprise SaaS example that I've seen that that makes a lot of sense.

It's Dagger,Dagger.io. Just a comment from chat here. Why did you replace Jonathan with a talking pixel bringing Jonathan back?

Jonathan HallJonathan Hall

Is is my video frozen? It wouldn't surprise me.

Shay NehmadShay Nehmad

It's not frozen. It's just, It's just bad. It's Prince of Persia levels of quality. Right? You look rotoscope and then pixels and then later on. It's it's actually kind of retro in a cool kind of way.

Jonathan HallJonathan Hall

I'll take your word for it.

Shay NehmadShay Nehmad

Yeah.

Jonathan HallJonathan Hall

So I'm I'm on a bad network connection here. I apologize.

Shay NehmadShay Nehmad

So Dagger Dagger replaced the React front end with Go and WebAssembly. Now I know what you're thinking. Oh my god, everybody like how do they have time? What's the benefit? Whatever.

Jumping to the end, they have a paragraph in the blog post called should you do this? And the answer the answer is generally no, right? The answer is generally, they do not recommend making front ends in Go. There are some serious limitations that they had to like deal with. Memory usage because you have a limit of, a hard limit on web assembly applications, two gigabyte, which I didn't I wasn't aware of.

And what Dagger does is like display large traces whatever, but it's a very interesting blog post where they sort of dive to, what's the main reason. The main reason for them, which I think is very different for a lot of other companies that have like, you know, an admin hub or a web UI interface for the users is that Dagger have a terminal UI as well, terminal UI offering for their product. Mhmm. The terminal UI offering is written in Go, and the front end is written in in React, was written in React. But they did exactly the same thing.

Right? Mhmm. Also, they had, performance issues. The web UI couldn't keep up with all the data it had to process, which again is kind of an edge case. Most Web pages just display some text, right, a chart if they're really ambitious, a few images, but they represent, like, super complex events and traces that's, like, their their whole thing.

It's like a pipeline that you run, you know, with their, like, function calls and and modules and blah blah pipelines and it's like pretty complicated. So the big reason is they wanted to have a single code base that does all this, interface work. They had to figure out some stuff to derisk the project. They're going through it here in the blog post, but the most interesting part is that apparently WebAssembly is slow at parsing large amounts of JSON. I think this is related to what we discussed about with, like, JSON v two.

Right?

Jonathan HallJonathan Hall

Yeah. Mhmm.

Shay NehmadShay Nehmad

Do do you remember a few episodes ago, you mentioned that really large JSON objects are slow to dango because of, a reason?

Jonathan HallJonathan Hall

What was that? Basically yeah. Basically, the the I don't know exactly how this translates to to WebAssembly, but, the standard library Go or the standard library JSON marshaler and unmarshaler essentially buffers the entire object before it it starts writing or reading. So if you pass in a gigabyte of JSON, it reads it all into memory before it starts parsing it, basically.

Shay NehmadShay Nehmad

So for for, Dagger, obviously, that, was a no go. So they fixed it by instead of using JSON, they used the Go binary format and used WebSockets to pipe that thing. And, you know, they used some React libraries that they still want to use, so they connected the NPM to their Go, which I assume is kind of ugly, but it did work. And, yeah, the it's really they they rewrote the thing in Go, which is interesting because usually front ends, you don't do Go and in the end, they recommend not doing this generally. When should you do it?

But let me ask you first, like, you haven't read the blog post yet. Like, what's the use case where you could come for example to one of your clients and say, hey, I recommend you rewrite your funding in Go. I think that's the correct choice.

Jonathan HallJonathan Hall

It'd be very rare circumstances. The the main thing would be if you had Go libraries that you need to run-in the front end. There wasn't a reasonable alternative in JavaScript. That would be the main thing I would think of. I suppose, like, you mentioned some corner cases around performance and stuff that that that wouldn't jump to mind as the solution.

Shay NehmadShay Nehmad

Yeah. For sure. They they say that if their UI is very complex and React doesn't scale well for it, then you should do so. If you have a team of very strong Go engineers and that's everybody you have on your team, which tends to happen in like very, like, if you have a very topic centric company. Let's say you have a very AI research type company, everybody there is gonna know Python and just Python.

Right? Because that's what they did in their academic career and that's it. So it makes sense to do the back end in in Python even though there might be technically, like, more standard or better options just because that's who you have. So they're saying everybody on our team is a strong Go developer, so we decided to do it, the front end as well. And also standardization.

Right? If you do the same thing exactly in your back end language and your front end language, the same display, right, the same view, and they did that because they had a terminal UI. So if you're in that circumstance, I would actually reach out to them. They have a Discord as well. So you could probably talk to them and like, hey, should I do this?

I think it's really cool that they've been able to do this because it seems like Go has much better support for web web assembly than I expected. Seems like even though the Go and WebAssembly combination isn't a % mainstream, right, most people don't compile Go to WebAssembly. As we know from the Go survey, it's like good enough to, you know, that it defeated their, bullshit detector. It works. So a cool blog post from, Dagger.

The link is in the show notes. Maybe I should put it in the chat as well, actually,

Jonathan HallJonathan Hall

think about it.

Shay NehmadShay Nehmad

No. I don't want you I don't want you all to leave the tab, so I'm not sending it. You'll have to wait until the episode comes out.

Jonathan HallJonathan Hall

Sneaky. Just like IKEA. Once you enter, you can't leave.

Shay NehmadShay Nehmad

Oh my god. I love IKEA. IKEA, please sponsor us. Can I do a side note? Can I do, like, a Yeah?

A sidebar? Sure. When my wife and I got married, it's in Israel, August, very hot, and we're, like, wearing the suit and the dress, which is very not what you usually wear in Israel because it's very hot, very humid. And my brother-in-law had the amazing idea, do your, like, you know, pictures with with a suit and everything in IKEA. Go to IKEA, and then you have, like, 15 different rooms and and settings and all the props. And, man, that was the best idea ever. Yeah.

Jonathan HallJonathan Hall

I I have this theory. I have have you ever played Diablo? Of course. Yeah. I I have a theory that the the, people who designed IKEA are the same people who designed the Diablo levels. Like, at any at any point you're standing, it looks like a legitimate room, but you walk 10 feet and you're like, wait. This doesn't make any sense. It's just a brawler. Alright.

Shay NehmadShay Nehmad

Back back on track. IKEA, if if anybody here is a software engineer at IKEA, please sponsor the show. Back to even just Swedish meatballs. We don't need money. Just

Jonathan HallJonathan Hall

Alright. So, let let me try the segue here. This is the part you never hear on the on the live show where, like, okay, what's the segue now?

Shay NehmadShay Nehmad

I mentioned WebAssembly and

Jonathan HallJonathan Hall

Yeah. So you you mentioned in in that article they talked about, making calls into some other React libraries and stuff like that. Historically, that has been one of the strong reasons to prefer Go for JS over WebAssembly. It's because it's much, much easier to do that with Go for JS. Because Gopher.

Js transpiles into JavaScript, you literally are running JavaScript. You can call JavaScript functions and vice versa. So your Go code can call JavaScript functions, your JavaScript functions can go Go code. Well, now that's less of a benefit for Go for JS compared to WebAssembly, because with 1.24, they've added this new, Go directive you can add called go colon wasm export, which effectively exports a Go function so that other WebAssembly code can call it. And there's a blog post that just came out today, from the Go team by Cheri Mu Mui, I'm not sure how you pronounce that name, that that talks about it.

It's a pretty short one. So if you're a WebAssembly user, this would be a quick read for you. Yeah. So that's that's nice to have that that,

Shay NehmadShay Nehmad

So if I write Go code and I add this Go directive, I can call it from JavaScript? That's the

Jonathan HallJonathan Hall

From WebAssembly. Oh. Yeah. So it's not it's not quite the same as what Go so you can't just, like, natively call you can't your your rack app can't natively call Go functions. I think you can accomplish that as you mentioned in your article. But it takes it. It's it's a lot more cumbersome than that. It's not as direct. But from another, if you have some WebAssembly that say written in Rust, it could now call Go.

Shay NehmadShay Nehmad

And I assume again, the people this benefits, like the developers that care about this kind of stuff, either work on, like, super high performance front end applications or work on, like, very, small no. Like, if you work on small architectures, do you use the WebAssembly as well, or do you compile to like, very small devices, I mean. Oh, some some will. Yeah. I guess, like, if you're working on Raspberry Pis or or things like that.

Although you I think you can compile Go natively on Raspberry Pis.

Jonathan HallJonathan Hall

True. Yeah. You can. I'm I'm

Shay NehmadShay Nehmad

just wondering, like, I really wanna meet the people who care about this stuff, that don't develop things for web applications. Maybe they have just a a tiny widget in a in a normal web app or something.

Jonathan HallJonathan Hall

I know that companies like Fastly are using WebAssembly sort of on, like, on the edge, if you will, you know, that to to easily and quickly ship router programs or I don't know exactly what they're doing, but, you know, to to or for CDN delivery, stuff like that. So you know, in situations like that, maybe you want to integrate, you know, something some components are written in x y z language and other components in a b c language, and this sort of makes that integration easier.

Shay NehmadShay Nehmad

Okay. I'm looking at their, customer testimonials. The SREs over at Giphy or Jiffy, if you really wanna be that guy, They use, Fastly and they're happy with it. Not sponsored. Right? But if Fastly use, like, WebAssembly and Go

Jonathan HallJonathan Hall

to do that, I'm happy because I'm

Shay NehmadShay Nehmad

a happy Giphy user. It's like my second most used feature in Slack.

Jonathan HallJonathan Hall

I imagine a huge number of websites you use are are using Fastly.

Shay NehmadShay Nehmad

Yeah. It's sort of this weird layer of infrastructure of the Internet that we are just so used to. Everything is on CDN, and everything is fast, and everything is we're just used to it even though it's in reality, it's an amazing engineering effort. Right? So this blog post is an official blog post on the Go dev blog. Right?

Jonathan HallJonathan Hall

Yes. It is.

Shay NehmadShay Nehmad

I really like the the Go blog as a source of, like, okay. This is what they actually care about. They don't post post that often, which I think is a good thing. They could talk about, like, every little thing. Cool.

One last blog post I wanted to talk about before the break, is very near and dear to my heart right now because I'm working a lot on SQL code right now. I'm implementing a lot of back end, you know, views and whatever at work. That's sort of been like my last week. Then I saw this blog post called SQL nulls are weird. Actually, sidebar, how do you say it? Do you say SQL now that I think about it. Right?

Jonathan HallJonathan Hall

I usually say SQL.

Shay NehmadShay Nehmad

Okay. So you are weird as well. It's SQL. So this blog post is not about Go, and I wanna be upfront about that. It's about SQL only. But, the reason, it popped, like, into my feed in the when I search for Go stuff is because the person who wrote it, Raymond, works on, like, two Go projects, a company called Convoy IO, just like a webhook thing, webhook gateway, and another project called Light Queue, which is a test queue over SQLite in Go. Okay.

Jonathan HallJonathan Hall

Yeah.

Shay NehmadShay Nehmad

So you can create, like, a queue over your SQLite, server, which I imagine is very lightweight and you can embed the SQLite into Go and, like, you can build pretty cool stuff with it. It's a very small, like, very clearly a small test project, not a not a real thing yet. But this blog post goes into the fact that nulls are distinct values in SQL. Did you know that?

Jonathan HallJonathan Hall

Yeah. I mean How? Null equals tried it.

Shay NehmadShay Nehmad

One equals one is true. One equals zero is false. And null equals null is null.

Jonathan HallJonathan Hall

Yeah. You have to do distinct from at least in post grads, you have to do this. Like, a is distinct from b if you wanna compare nulls that way.

Shay NehmadShay Nehmad

Yes. But the thing is, if you insert two, like, unique rows, but you put null in one of the values, it will let you do that.

Jonathan HallJonathan Hall

Right. Right.

Shay NehmadShay Nehmad

I was, like, blown away. It it was very puzzling to me and actually was relevant at work at the moment. So whenever I have a blog that's as relevant as this one and, you know, it popped up on Hacker News and whatever, It's a it's a good blog post if you work in, databases right now like me, and then you remember that you have to add these, like, partial indexes to deal with it or a generated column or something like that. Like, something that is not nullable in reality. You basically add wherever you would put null, you put, like, something that looks like not a real value.

Jonathan HallJonathan Hall

Right. Right.

Shay NehmadShay Nehmad

Case in point, today I ordered an appointment for, like, to get my passport renewed for the flight. And then it had, like, add it to your, calendar. And then I clicked on it, and then it said meeting for object object.

Jonathan HallJonathan Hall

Speaking of nulls, I have a notification here in Riverside. It says, issue, has a Riverside tab, has Riverside open in other tabs? Presumably, one of our listeners has Riverside open in two tabs, and it and it displays that with a a null value for their name.

Shay NehmadShay Nehmad

Really? Is

Jonathan HallJonathan Hall

this happening right now? It's happening right now. So, I I do wanna mention some things pulled out, or mentioned here in comments because, because I want to. We have a comment here from Andy. It says not all nulls are created equal. We we also have, on the Josh ads, but all nands are.

Shay NehmadShay Nehmad

The I'll I'll just say all NANs all NANs are empty in their own way. But every every initiated value initialized value is different. Right? You have to leave the media tab.

Jonathan HallJonathan Hall

Yeah. I'm just not making jokes. It's your fault, not mine. Okay.

Shay NehmadShay Nehmad

We're gonna take a short break. This is was the first part of the show. This was news. We're gonna do a short ad break, and then we're gonna do a real, like, two minute break, and then we're gonna do the Go one twenty four release party. Alrighty. But before all that, obviously, we have a lightning round for you.

Jonathan HallJonathan Hall

Oh, yeah.

Shay NehmadShay Nehmad

With lots of stuff to

Jonathan HallJonathan Hall

talk about because we're gonna empty out the backlog. Let me bring that media tab back.

Shay NehmadShay Nehmad

Lightning round.

Jonathan HallJonathan Hall

That's a long, setup. Yeah.

Shay NehmadShay Nehmad

It has a lot of echo. Yeah. So you have the first item here, and I'm excited because I'm seeing, like, one of my favorite URLs, steamcommunity.com. Are we doing Factorio lighting round again?

Jonathan HallJonathan Hall

Something like that. Maybe. So there's this bug reported against Steam. I guess, it's a bug. I mean, it's it's also in the Go feature tracker. But certain Go programs freeze when they are launched via the Steam client. So something I don't know what it is exactly, but something about the Go runtime doesn't play well with with Steam. Steam is doing some interesting weird stuff, I'm assuming, because, like, why wouldn't it? It's Steam.

Shay NehmadShay Nehmad

If Gabe and say says it should Gabe and

Jonathan HallJonathan Hall

The issue is long and full of stack traces and process lists and all sorts of weird archaic stuff, you know, the sort of stuff that, your significant other says, do you understand that when they see it on the screen and you pretend that you do? That's that's this issue. Anyway, I I thought it was kind of interesting to to see this come up, on Steam. Now I don't know that this means that games are written in Go that are produced on or that are distributed with Steam, although it might mean that. But I think the particular case, it's just a little utility program that is part of a much larger game.

So I don't think that the game itself is written in Go. But if it is, it probably doesn't work. Cool. Cool. Yeah. Lighting round. Here we go.

Shay NehmadShay Nehmad

My lighting round well, my first item for the lighting round is another rewrite in Go. I brought a company called Dagger that wrote their front end in Go. Now I'm bringing a company called Lovable, which by the way, if you haven't heard about them, I haven't used them yet. But I think they beat Wiz for the fastest to, 100,000,000, ARR. Don't quote me on that because I might have seen a different company, but they're they're definitely exploding, like a lot of people use them.

It's AI agents, like, just write your app and it builds you it for you, like, automatically kind of thing, which I don't super love, but apparently it's good enough.

Jonathan HallJonathan Hall

Mhmm.

Shay NehmadShay Nehmad

They rewrote their entire Python backend into Go. 42,000 lines of code. And they go

Jonathan HallJonathan Hall

through the one thousand in Python or in Go?

Shay NehmadShay Nehmad

In Python. And I'm

Jonathan HallJonathan Hall

curious how many that translates to in Go if it's more or less.

Shay NehmadShay Nehmad

I assume it's more.

Jonathan HallJonathan Hall

I assume it's more verbose.

Shay NehmadShay Nehmad

So they it's very simple, the blog post. They just say why we shifted to Go, their back end is highly concurrent and parallel. That's like their workload. And they built their own dependency injection framework because apparently they didn't like anything they found in Go maybe or they didn't know it, but, like, it helped them structure their code, which I assume makes sense if they use the DI framework in Python. It's makes it a lot easier to keep the same structure.

Although, I never had to use a dependency injection framework in Go, and I've built pretty complex applications. I don't know if you have.

Jonathan HallJonathan Hall

No. I've I've I've actually wondered why a dependency injection framework is even useful. Like, I've I've I've yet to to imagine a scenario where that's that's beneficial. But, people seem to think it is because they use them.

Shay NehmadShay Nehmad

I I think for them, it makes sense because they have a lot of, like, things popping up and out of the server, very dynamically because the agent is doing a lot of things, so it's very non deterministic, the the back end. But it's just an assumption. I don't actually know anybody yet, lovable. The I think the main number here is that deployments got lowered from fifteen minutes just to three. All request times are faster, 12% on average.

And most importantly, and if there are any, chief financial officers listening or someone who's on cloud cost, they reduced their server instances from 200 to just 10 Wow. Which is pretty amazing.

Jonathan HallJonathan Hall

Yeah. That's pretty cool.

Shay NehmadShay Nehmad

And they say that they're, like, practically, their engineers spend less time on performance bottlenecks than just working on stuff, like features. So for now, at least, it seems like that rewrite was totally worth it. Cool.

Jonathan HallJonathan Hall

Speaking of rewrites, I wanna talk about something that isn't isn't a rewrite, but it helps you rewrite. You ever, write bash scripts and then it's annoying to deploy them because it's it's just annoying? Yes. Or they're slow?

Shay NehmadShay Nehmad

Yes. Yes. A thousand times, yes.

Jonathan HallJonathan Hall

Enter Bunster. Bunster will transpile your shell scripts into Go so that you can compile them into a single executable binary.

Shay NehmadShay Nehmad

Oh, really?

Jonathan HallJonathan Hall

Yeah. It's a pretty cool idea. It's doesn't support all features, yet. Apparently, there's a list of supported features, but it's under active development. And I think that's kinda cool. Cool. Cool. Cool.

Shay NehmadShay Nehmad

Before we move into the last, item on the lightning round, I wanna pull some, things from comments here. First of all, Andy and Andy, I don't know if it's the same Andy. Thank you for putting the lightning icon for for the lightning round. Andy says well, I don't know which one. I have Go oh, I know which one. Alright. Define Andy, Andy Williams, says he has a Go apps on his Steam Deck, and it works great. So Steam Deck is their, like, hand to hand, console.

Jonathan HallJonathan Hall

Oh, yeah.

Shay NehmadShay Nehmad

I did the mistake. Well, if Nintendo wants to sponsor this, episode, Konnichiwa, Arigato. Thank you. But as long as they're not, I bought my wife, the Switch, which is a great console and it's a lot of fun. But then they announced the Steam Deck, like, a week after I bought it. And I was like,

Jonathan HallJonathan Hall

surely there's a refund, period. You could've you could've taken it back.

Shay NehmadShay Nehmad

Yeah. But she likes the switch, and also I bought some games. So but it's a good actually, we discovered it's a good platform for our child. So, it's it's good for like, I'm I'm really building on it for the flight. Right?

Jonathan HallJonathan Hall

So we we have we we settled the question who Andy is. Andy tells us that Andy is Andy is me. So so we've got that settled. It's they're like nulls.

Shay NehmadShay Nehmad

They're they're all the Andys are unique.

Jonathan HallJonathan Hall

They're all unique, and they're all the same at the same time.

Shay NehmadShay Nehmad

Yeah. And Frederic is saying that, he assumes the Go code is three times as as, longer because of if error is different from nil. But I don't know if this is just a signposting for the question mark proposal.

Jonathan HallJonathan Hall

I don't know. I've I've been doing some JavaScript lately, and if I try to do JavaScript the way I do Go, you know, that is check every function call for errors, it's, like, 10 times bigger than Go because you have all these try catches all over the freaking place. It's a Yeah. Yeah.

Shay NehmadShay Nehmad

It's not a lot of fun. And talking about, working in JavaScript, I've been doing back end Go. I've been doing back end JavaScript, TypeScript. That's what I'm doing, at work right now. And I stumbled upon this project. It's actually trending on GitHub. There's a project called NVM Windows. This is a live in ground, so I'm gonna keep it for ten seconds. Jonathan, do you know what NVM is?

Jonathan HallJonathan Hall

Let's see. We're on different versions of, like, Node or or something, doesn't

Shay NehmadShay Nehmad

it? Yes. It's Node version one.

Jonathan HallJonathan Hall

Yeah. Okay.

Shay NehmadShay Nehmad

If you have, like, two project let's say your front end is Node 20, but your back end is already upgraded to Node 22, you have to change your all your shims. Right? Same as Python virtual ends. So you can use pyenv to manage your Python versions or or, UV if you already upgraded. So same for, node.

It's standard for me, it's standard procedure for every node project I work on. I put the nvmrc file there and then I'm not worried about the version. However, apparently for Windows users, which we know on this show we have, like on the Go community we have quite a lot, they don't have nvm that works. NVM is not for Windows. So there's a project called NVM for Windows, who was trending this week.

There's a new release that came out, on January 1. We we kinda missed it, and the fix was very, very funny for me. It's fix for users who wanna install on the drive other than c. Do you remember, like, work dealing with all that stuff, all that nonsense in when the drive letters and COM objects?

Jonathan HallJonathan Hall

Those weird backslashes.

Shay NehmadShay Nehmad

Anyway, so there's a project called, NVM for Windows. If you use NVM in your own Windows, go check it out. The people who are working on it are working on a full time, like, company, environment manager kind of thing. They even have a LinkedIn. So if that this is a real problem for you, you know, consider talking to them.

It's author software on, Twitter, which I found very interesting that it's such a real problem to manage node versions that you need a whole company. But, yeah, it's kind of a pain in the behind. And your last item

Jonathan HallJonathan Hall

is So that's just a yeah. Chi. Everybody remembers Chi. Right? Some of you might still be using it. Chi was my go to HTTP router until six months ago when six months ago, 01/2023 was released with the new improved serve mux in the standard library. So I've actually migrated two or three projects for clients off of Chi since then. But Chi recently released a new version 5.2.1. The only change in this is they dropped support for Go 1.14.

Shay NehmadShay Nehmad

Well, Go one one fourteen until 01/19.

Jonathan HallJonathan Hall

Up through 01/19. Yeah. So they they finally implemented a a, like, policy of which versions are we gonna support, and they decided to support the last four versions. So not really big news unless you're running an old version of Go and need new features from g, then you're gonna

Shay NehmadShay Nehmad

be stuck. So there is one last rewrite that I just wanna tease and we'll we'll talk about it on the next episode. Okay. The ASDF, rewrite. Oh, yeah. I'm just teasing it. We'll talk about it next week because I'm I'm very excited about that one. We mentioned a lot of stuff related like the NVM thing, which is a you you probably use SDF to run NVM and writing bash scripts using Bunster and all that, but that's for next week because we don't have time.

Jonathan HallJonathan Hall

And then related to that is the QWERTY rewrite called Dvorak. Where where is that where is that sound effect now?

Shay NehmadShay Nehmad

No. No. No. No. No. Don't do that.

Jonathan HallJonathan Hall

Sir, stay away from the vehicle, sir. Alright.

Shay NehmadShay Nehmad

That's all that's all we have for you for the live

Jonathan HallJonathan Hall

I think it's time for an ad break. And then,

Shay NehmadShay Nehmad

Let's do a quick

Jonathan HallJonathan Hall

ad break.

Shay NehmadShay Nehmad

Let's

Jonathan HallJonathan Hall

do it. Okay. I need that I need that media back again. Where is it?

Shay NehmadShay Nehmad

So I'll just do Welcome to our ad break. How smooth was that, guys? I feel like if since this is a live episode, I should I should be more like, you're listening to COPO geo radio on all your five gigahertz or 2.4 hertz, Wi Fi connections. Traffic looking good today on Docker Hub. Not too many crashes on Docker Hub. If you're pulling, keep pulling. But let's do our actual ad break.

Jonathan HallJonathan Hall

Okay.

Shay NehmadShay Nehmad

Thanks a lot a lot a million to our supporters on Patreon, who, by the way, dictated the date of this show. That's the only poll, they had open. But, yeah, we have a lot of people in our audience. 40 people. Jamie, Sagar, David, Jose, another David, Dave Cheney.

Oh, Dave Cheney. Nice. Mhmm. Kemai Akuyun, Arav Duda, Stephen Clark, Martin Ruby, Gil Ada, who was actually on the show, Paul Boteau, Code Stank, great name, Michael Haggerty, Thomas Gooder, Ragnarok, Vulcan Ruhl, Simon Law. By the way, if any of you are here,

Jonathan HallJonathan Hall

feel free to write and chat because your support is what makes the show tick.

Shay NehmadShay Nehmad

Rob Printless, Charlie TC, Adelina Simeon, who was on the show, and

Jonathan HallJonathan Hall

you should

Shay NehmadShay Nehmad

buy her books. Thomas Gall, Lutz Hannuken, s j k s k s k k s k s. I assume that's not their real name, but if that's the case,

Jonathan HallJonathan Hall

Carlsen We still love you. You've heard this.

Shay NehmadShay Nehmad

Bruno, Wilken Rivera. Yeah. Kristen von Kietzel, Jamie Tenna, friend of the show, who was on the show and is actually on the chat right now. Thanks, Jamie. Joost Helberg, Mateusz Kvalka, Andy Williams, friend of the show, stepped in for me a few times.

The mind behind fine, Mihai, Mihai Tudor, Hey Mihai, Robert Burke, Jens Hillingsil. I don't know how to pronounce these, Nordic letters. I'm sorry. Lucian Kaffee, Podolinski Ljolent, Frederick Everpill, who's actually here on the, chat right now. I see people, like, saying here here

Jonathan HallJonathan Hall

on the chat.

Shay NehmadShay Nehmad

Will Roden and Josh Bleaker Snyder, end of the show. Oh. Thanks a lot to all these beautiful people. We never did the full run through. Right? No.

Jonathan HallJonathan Hall

Yeah. And and and thanks for, reading those names so I didn't have to because, I'm terrible at his pronunciation too.

Shay NehmadShay Nehmad

Jens is not happy with my pronunciation. I'm sorry. This show has ran for a hundred episodes. Yeah. We started it two years ago just based on Jonathan sending some, like, phishing messages in a Slack we were both in over two years ago at this point.

Jonathan HallJonathan Hall

Yeah. A little more. Because because we haven't done every single week.

Shay NehmadShay Nehmad

Yeah. We've done almost every single week. I think we missed, like

Jonathan HallJonathan Hall

We took a break off each summer, I think.

Shay NehmadShay Nehmad

Yeah. So went through some, like, and and we kept doing it even through, through some hard, limitations, like when I was away for three months draft or you moved countries to The States and we had to change the recording time. Yeah. But I don't know about you. This is very, very fun.

Jonathan HallJonathan Hall

I agree. Yeah. Good to

Shay NehmadShay Nehmad

And one of the reasons it's fun is because I get to learn a lot about Go from you, which is nice.

Jonathan HallJonathan Hall

And I learn from you too. We learn from each other.

Shay NehmadShay Nehmad

Yeah. You mostly get to teach me. Let's be honest here. Right?

Jonathan HallJonathan Hall

Oh, I mean, you've taught me quite a bit about especially the security related stuff. There's a lot of thing insights there that you have that I I don't know about.

Shay NehmadShay Nehmad

And imagine that's the things I can tell you about. But one of the main reasons that it's fun other than the fact that I'm learning is the support of our Patreons and our listeners. If you want to join this beautiful community, you can reach us at cupago.dev, that is cupago.dev, where you can find links to all of our stuff. Our Gopher Slack channel, which is where most of the, like, community chat is going, where we, for example, gave the links to this live episode and ran some polls and people post some cool stuff. It's Kebab Case, cup - 0 dash go.

You can email us if you're not into Slack or any of our social media links. We totally get that. I'm trying to cut down on social media a lot. Just email us at [email protected]. That is [email protected]. A little bit inside baseball, it's actually only Jonathan reading these emails. So if you wanna shit talk me, that's a really good address to do so. Oh, yeah. If you wanna be like, we you have to replace that.

Jonathan HallJonathan Hall

And and you only see the ones I share with you. So.

Shay NehmadShay Nehmad

Yeah. For sure. You have a full editorial control on that. If you want to support the show, like the beautiful patrons we mentioned before, you can do that. You can also buy some swag. You can the people on the live stream can see my beautiful Capa Go hoodie and our nice Capa Go, mugs. Although, non canonically, I think we're both drinking tea right now. Right?

Jonathan HallJonathan Hall

Yeah. We are.

Shay NehmadShay Nehmad

Yeah. Yeah. But just to be fair, it's, like, 9PM here, and I wanna sleep at 10:00.

Jonathan HallJonathan Hall

It's two almost 2PM here. So, yeah, it's not coffee time anymore.

Shay NehmadShay Nehmad

If you, don't want to buy swag or support the show financially, that's totally okay. A great way to support the show is to leave a review on Spotify, YouTube, Apple Podcasts, or just wherever you listen to your podcast, well, to this podcast and share the show with a friend, a colleague, a a co student, just wherever you meet other gophers. Maybe if you're planning to go to gopher, GopherCon, soon, just share the show and spread the word. I think we would have made it to, like, 20 episodes if nobody joined and nobody listened. Oh, yeah.

But since so many people joined and listened, recently, we passed a hundred thousand downloads and, you know, so many subscribers, people talking to us, a hundred episodes, lots of milestones. It's a lot because other people are listening and we're, like, getting this positive feedback for from the community.

Jonathan HallJonathan Hall

Did I miss anything on the on the ad break checklist? I don't think so. I think

Shay NehmadShay Nehmad

I think we've

Jonathan HallJonathan Hall

We're good. Done enough ad break. I think we should move on to the release party.

Shay NehmadShay Nehmad

Let's, do that.

Jonathan HallJonathan Hall

I like that little organ, like, Bob Dylan esque organ in the in the beginning there.

Shay NehmadShay Nehmad

It's, Contax Carby a, 200 for all my other midi heads out there. Native Instruments. I Jens sipping in Negroni from my cup of cocoa. Love it. Love it. I guess we should add a, PEGI rating for the cups. We we need

Jonathan HallJonathan Hall

shot glasses in our swag store too, I think.

Shay NehmadShay Nehmad

I don't know if I

Jonathan HallJonathan Hall

It could be espresso shot glasses or or the other kind. Either one either one would be a a a a improvement.

Shay NehmadShay Nehmad

Yeah. Espresso wing. Actually, a good idea, Jens. Maybe I'll maybe I'll put that into stock. Let's get to the release party. Yesterday, February 12, the Go team has officially released, Go version one dot 24 dot zero. Jonathan, walk us through the, like, top items. Why do I even care other than the fact that if I'm using one twenty two, I have to upgrade because it's end of life?

Jonathan HallJonathan Hall

So that's a good question. Because I think the things I care about are, most in this release are some of the least important things for most people. The the thing I'm most excited about actually that I'm gonna be using the soonest is the new context in the testing package.

Shay NehmadShay Nehmad

Yes. Sync test. You've wanted to talk about that on the show forever.

Jonathan HallJonathan Hall

Not even that. The t dot context method that returns a context, it's canceled when the when the test ends.

Shay NehmadShay Nehmad

Oh, yeah. Yeah. Yeah.

Jonathan HallJonathan Hall

Yeah. Because that's gonna clean up a whole bunch of context to to dos in my tests. So it's a really minor minor thing that doesn't matter, really, but it's gonna be one of the first things I use. The other one is the s log discard handler.

Shay NehmadShay Nehmad

So discarding logs, allows you to just create a silent logger. Right? Yes. Why would you need a silent logger that does nothing?

Jonathan HallJonathan Hall

You could always already create one, but it was more verbose and less efficient. Not that that matters a lot in tests, but it's usually for tests. You have a you have a an object that takes a logger because during normal operation, it creates logs. But in tests, you don't want the log output or you don't wanna capture it somewhere, so you can just discard it. So it's it's intended primarily for for testing purposes.

Shay NehmadShay Nehmad

Now here's, a question for you. Should you test logging? Because I assume if you use the discard handler, you can't test it.

Jonathan HallJonathan Hall

You should test logging, but not in all of your tests.

Shay NehmadShay Nehmad

No. I I'm not saying test the logger. Like, should you test that the expected log output is being written?

Jonathan HallJonathan Hall

Yes. But not in all of your tests.

Shay NehmadShay Nehmad

In which ones? Just the, like, super important logs to care about

Jonathan HallJonathan Hall

or something? I will generally write one test for each behavior that I want to test. So when I so I'll write one test to test that under these circumstances, the correct log output occurs. And I'll write another, test to test that under these circumstances, the correct error value is returned, etcetera, etcetera. So I

like like let's say I'm testing a function that takes a log or that uses a log. I'll probably write one single test or maybe if there's if there's different types of logs depending on how it's used, I'll create one test for each type of log. But most of my tests won't test the logger because that's kind of incidental to to what I'm testing in in my other tests.

Shay NehmadShay Nehmad

So when you use the discard logger, the the log itself happens is just directed to slash dev slash null.

Jonathan HallJonathan Hall

Right? Basically. Yeah.

Shay NehmadShay Nehmad

So if you do some inline computation when you run the log thing, it it will happen. That's the thing I'm worried about because

Jonathan HallJonathan Hall

It depends on how people do like,

Shay NehmadShay Nehmad

log, you know, server dot init and then the response, they just log it. And then if you have a thing that out, like, optimizes logs out of the code, the code breaks. You know what I mean?

Jonathan HallJonathan Hall

Mhmm. Mhmm.

Shay NehmadShay Nehmad

So

Jonathan HallJonathan Hall

it depends on how your logs are done. So there there are some capabilities in the s log package that you can detect whether or not this log level is enabled or whatever. So the the discard handler basically says all levels are disabled. So if you're using that capability to probe the logger, then that code will not will not execute.

Shay NehmadShay Nehmad

Oh, so, yeah, that that makes sense. But, generally, this is more like syntactic sugar because you could already do that. Yeah. I, by the way, disagree with you. Like, I never, test logs. I think logs have to be incidental. They're not behavior. Every program you have, I should be able to take all the log prints out, and it should behave the same. So The logs are to SDD error, and the output is to SDD out. You know what I mean?

Jonathan HallJonathan Hall

So counterargument, delete all your logs. I use them. Then they have behavior that that matters, and then they

Shay NehmadShay Nehmad

should be tested. We can this won't hold up in court. Very, very cool.

Jonathan HallJonathan Hall

The consumer of your logs is very different than the consumer of your application, and and that's why the testing is done differently. But, you know, if you as the the administrator of the application need to read those logs, then you wanna make sure those logs are working correctly.

Shay NehmadShay Nehmad

So if the my view on it is usually logs are for me personally as a person who's developing the software. But if I'm shipping something, let's say, overseas, you know, to like a a blocked network, let's say you have to do FedRAMP and you're not allowed to look at the logs and only other people are allowed to look at the logs, only in these, like, very strange circumstances where I'm writing software and the logs are being written but I'm not allowed or I can't read them but someone else has to and has to understand maybe then I'll consider testing it but definitely not for every function.

Jonathan HallJonathan Hall

Oh, I don't I don't do it for every function for sure.

Shay NehmadShay Nehmad

Anyway, the, omit the, like, discard logs thing is I've I've implemented this literally in every project I've worked on. Right? You start a test, then you have, like, a flag for the test of, like, wait, I'm trying to debug, but I don't like, I can't be, arced to open the actual debugger. So just print some logs and I'll add some, like, one, two, three, four, and I'll discover which line has the problem. But usually, you don't want logs in your test because you want the test output to be very clean.

Go test already is pretty good with that because if I think, like, it doesn't print output if your test don't fail. But if you have a different server running somewhere and your tests are like integration tests, having a discard handler is very very useful. Also maybe in very security related context where like okay in this environment I don't want to log anything like ever I don't want people to know what the program is doing. This part of the show is an like an interview with the people on the in chat and they are saying some things.

Jonathan HallJonathan Hall

Yes. Jamie We should talk about those.

Shay NehmadShay Nehmad

Is saying that logs are operational data. I don't know if that's, argument for me or for you. I'll take that one for me because the rest agree with you. So I want to have, like, at least one point. You wanna read some of the

Jonathan HallJonathan Hall

I agree with that too. They are operational data, but operations are important to the program. I mean, I I think going on to what Dwayne Dwayne says next, you know, if you get a bug where something isn't getting logged, it should be. Don't you wanna test for that, to make sure you don't regress. And I think that, yes, it's operational data. So the considerations are different, but they're still important considerations that deserve to be tested for the matter.

Shay NehmadShay Nehmad

That's fair. That's fair. What Frederic says is is very close to what I did, which is testing the logs for sensitive information and, like, very specific expected keys. So you don't test every log or every whatever, you take the entire log output, then you feed it. I used to feed it to Microsoft Presidio and just look for any sensitive information at all, like secrets, keys, data, personal data, things like that because all the companies I've worked at have been cyber companies that deal with very sensitive data.

So you don't want to accidentally when you read that data log it somewhere and then your promise to the customer, hey, I don't, store your data persistently. I do all the processing in memory. Right? You you in reality, you break that promise because you log it and then your logs are shipped to, like, somewhere that's very persistent. You store them for, like, I don't know, twelve months on CoreLogix or your Splunk server or whatever.

Good comments from the, peanut gallery. Thank you, people. Anyway, my, feature to pick out is concurrent, map. So the implementation of sync map has changed to a better one. If you're into comp sci and you I don't know, you're grinding lead code right now, It's a concurrent hash tree, so you should go read the code because someone's gonna ask you to write it on a whiteboard soon.

But it's a better performance especially for map modifications for disjoint, key sets. It's not gonna contend. So if you have like five threads updating your map at the same time, they're not gonna lock on one another because the maps are laid out in a way that makes sense that allows like different threads, the different goroutines, sorry, to talk to different parts of the map at the same time, which sounds now obvious. But clearly, it has a lot of edge cases, very difficult to implement. Unlike the t dot context one, which I think is one of the simplest pull requests you could read on this, on this release.

This one is like super benchmark y, algorithm y. I have to admit I don't fully understand the code and if someone asked me to implement it right now I won't wouldn't be able to. I really like the fact that it, doesn't perform better on every benchmark. So it's not strictly better.

Jonathan HallJonathan Hall

Right? Right. Right.

Shay NehmadShay Nehmad

So so I love that. I love the fact that it's not strictly better.

Jonathan HallJonathan Hall

There's a trade off. Oh, no.

Shay NehmadShay Nehmad

Yeah. There is a trade off, but nearly, nearly, nearly on every single benchmark, it's better. You could go read the specific benchmarks, but honestly, I think it'll be good, just choosing the right one choosing the default one. And you can by the way, you can disable the new implementation. Like, if you actually have the need for the old implementation, you can disable it by disabling the, like, go experiment flag, which I really liked as a as a feature for a release.

Jonathan HallJonathan Hall

And that closely relates to the other, the the general performance improvements. The the blog post here says that, in general, CPU overhead has been reduced by two to 3% across many benchmarks, and this is a big part of it. Can you That's cool.

Shay NehmadShay Nehmad

Show me another language that gets upgraded for you, and you just get, like, very reliably on every single release between single to to to double digit performance improvements just by upgrading the toolchain and doing nothing else. We had, profile guided optimization, right, that improved everything. Then we had including compile times. I think two releases ago, we also had a really big performance improvement on, I don't remember what exactly, but but, I I remember it was there. This release is the maps.

You just upgrade and you get better software, which is so rare. Usually, most software upgrade gets worse. I love that for us. Alright. What's your next one?

Jonathan HallJonathan Hall

Well, I wanna hear from the audience what their favorite features are. So while while I'm talking here, drop in the comp in the chat what your favorite features are, and we'll we'll pick some of those to talk about too. So the I think one that needs to be mentioned is the new gold tool command. That's one that I was initially very excited about because it's such a pain in the butt the way it works right now, where you, you know, to to to lay out the problem for anybody who's not familiar. If you have a a Go tool that you use, let's say, to generate some code, like, maybe, SQL c or something like that.

Or o,

Shay NehmadShay Nehmad

o API Cogen. Just throwing it out there. No no relation or no money being handed to me under the table by the chat members right now.

Jonathan HallJonathan Hall

But anything like that, that you use, typically in a go generate, it's it's a hassle. It's a hassle. It's a dependency, but it's not a compile dependency. Right? It's a it's not part of the compiled output.

So the, you want to tag a version. So you're always sure that everybody on your team is using the same version locally and CI and bring builds. So you have to create this typically the typical solution is to create a file that isn't actually compiled into your code somewhere. So you create like a tools directory with the tools that go in it and you put the dependency there. That way, go dot mod picks it up and and, and everything, but it's not compiled in anywhere.

But there's nothing in go dot mod that says this dependency is a tool rather than something else. The go, tool command is supposed to solve that. Now side note, I just saw I'm not familiar with this interface, but I just saw a little pop up from Jamie trying to call in to talk about Go tool, and it went away before I had a chance to accept. If you wanna try that again, Jamie, we'll give it a shot and see if we can have you on here to talk about that because you wrote a great blog post about this topic. So I'd love to have you on.

Let's try this. I don't know how this works. Nice. Oh, hi, Jamie.

Shay NehmadShay Nehmad

Hey, Jamie. I'm listening.

Jamie Tanna

Yeah. Like, as you mentioned, I was also very excited. I'm like, my blog post was very excited about it. I am still a bit disappointed. It's not quite, as nice to work with. In particular, I get it. But the reason you have to do Go tool and then the module path to actually invoke a tool means that you can't just say, like, go to all Lint. It's go to github.com/ blah blah blah blah blah blah /command/ blah blah blah. And it's, yeah, not quite as handy as it could have been, originally.

Shay NehmadShay Nehmad

Yep. I think the the Go team is very like, the Go project is very much crawl, walk, run. Right? You already have, like, final thing in mind, but there are a hundred thousand people you will well, maybe 10,000 people who will use this feature in the next six months. And then for 01/25, we could, like, introduce all these improvements based on the survey feedback, etcetera.

This is a very UX kind of thing. It's not like the maps where straight performance improvements, blah blah blah. Like, it's no question. Like, maybe other people have great justification for using Go tool, GitHub.com, blah blah blah blah blah. Right? But I thought you you just run Go tool and then your tool like Stringer or going like, is that not the case?

Jamie Tanna

So you have to use the full module input path, which yeah. And so that's the thing. Like, yes, in the future, maybe they will add aliases and that will drastically reduce that. And then that little bit of, awkward developer experience will go away. But at least right now, it's not. So yeah.

Jonathan HallJonathan Hall

I I feel like it's a step in the right direction, but it's a really awkward step. And and I haven't yet decided if I'm gonna use it or not. I probably will, but kind of reluctantly.

Shay NehmadShay Nehmad

I think a really good reason to use it that Frederick well, I think. I saw a comment, from Frederick right now on the chat that a really good reason to use it is because it's gonna be in the, Go mod file. Dependabot could be, like or any other supply chain security stuff could they don't they don't wouldn't have to parse, like, go build tags for things, which I think no vendor offers today. I would be very surprised if, like, Snyk or any of the companies I've worked at, like, security companies, parse build the tags in source code to find tools that you rely on. That's gonna be pretty difficult because you don't have the full module path there.

There, you just have, like, whatever local path it is for whatever company you're working on. Right? But now Dependabot or or Sneak or Orca, ShiftLeft, or any of these, offerings could just read the line and say, hey, this is deprecated. This has been discovered as a supply chain attack. Remember last week with BoltDBGo? Like, if you use this as a tool and not a, compile that dependency, now they could see it.

Jamie Tanna

And so kind of, in fact, like, wearing a renovate t shirt, not necessarily for this. But I was, working with the RenovAte maintainers to look at what it would mean to add support to Go tool to RenovAte. And due to the implementation of it, and the fact that it is just in your Go mod. But there is a new tool directive, which subtly changes things. So, like when you are going to update that dependency, so yeah.

Say for instance, you've got OAPI Code Jam as one of your dependencies. Not at all sponsored, but happy to hire you. So that will come in as an indirect dependency in your go. Mod. And then there will be a tool directive, which also has a dependency on that module.

So by default, lots of tools don't update indirect dependencies by default. So they need to know that, okay, there is a tool directive for this thing. So now go and find any modules that have that as a prefix, and then try and update those.

Shay NehmadShay Nehmad

So so it's not it it it sounds like it's a lot more built in than trying to parse build tags and just basically guesstimating what tool you're trying to install. Right?

Jamie Tanna

But I think, so previously, if you followed the tools. Go pattern, you basically don't get any benefits with this. It's kind of effectively what happens. However, if, yes, you were, doing, like, in your makefile, go install or, like, curl to bash to install things like Golang CI Lint, you could get support through things like Renovate, and you could have other tools that would manage things. But no, it wouldn't detect it directly from, like, a tools.go.

It would still try and find the things in the codon mod.

Shay NehmadShay Nehmad

Cool. Cool. Cool. So some improvement yet, but it's a first, stepping stone, I guess. While we have, Jamie on the phone, what do you think about Amidzero? I just saw you posted a blog post about that as well. Yeah. Although, I don't know how impressive it is to find a blog post of you about something because we're, like, celebrating our hundredth episode. You're, like, at a 10 1,001 blog posts at this point. Like, what haven't you blogged about?

Jamie Tanna

Well, and, someone rightfully so took the Mac out of me for posting another very excited post about 01/24. And, I think I've kind of found that posting something like this is a great way of getting it upvoted in loads of places because everyone's like, Ah, yeah, this sounds really good. But yeah, zero is something I am very much looking forward to because, there are cases where you have structs with JSON, where you want to have an optional field. But depending on what that type actually is, the best way of doing that with the existing, and the empty would be to add a pointer to that thing. But that's a little bit painful to them work with, especially if you've got nested things.

So one of the options that is now available is use them at zero, then the zero value of that type can get ignored. So

Shay NehmadShay Nehmad

So it's not just the zero value. It's also if you're if you have a custom struct and you have a is zero method, it will omit that based on that as well, which I can very easily see how it gets abused to, get, security, information out of, like, mark it as is zero if it has a key in it so it doesn't get logged and things like that.

Jonathan HallJonathan Hall

Oh, yeah. It's interesting.

Shay NehmadShay Nehmad

But the this is a really cool improvement. The best way to understand it if, Jamie's very clear explanation wasn't clear is, again, I'm referring you to Anton's live release notes. So he has the these, like, clickable release notes. You could just go click run. You run the first example and it prints, name Alice, birth date zero zero zero one dash zero one dash zero one, t zero zero, column zero zero, column zero zero zed.

And you're like, oh, no. That's not what I meant. That's Jesus's birthday. Like, that's not the date I meant. And then you run the second example, which is go on '24, and it just prints the name. You're like, oh, nice. And it doesn't involve any pointers or any nonsense, like that.

Jamie Tanna

I will say there is a drawback of this that, someone nicely actually replied to me on Reddit about, which is, you need to be careful when your zero value actually has value. So for instance, like age may not necessarily be something if age is zero, you don't really care too much. But there probably will be some fields that you actually have to be careful that

Shay NehmadShay Nehmad

Wait. What do you mean age zero makes a lot of sense? If you if see if it's in years, the first twelve months. Right?

Jamie Tanna

Yeah. It's the sort of thing that there may be some fields that you have to be careful about. And be like, oh, no. Actually, I maybe shouldn't use the zero value because that is a valid thing that we need to represent.

Shay NehmadShay Nehmad

Interesting. Cool. I love how you had to, not omit the someone replied nicely on Reddit because that's not the usual case. If you omitted it, it's omit zero. We assume someone is being an asshole on Reddit.

Jonathan HallJonathan Hall

I just discovered I can show comments on screen. Oh.

Shay NehmadShay Nehmad

Oh, cool. Cool. Cool. Sweet. Sweet. Thanks, Jamie.

Jonathan HallJonathan Hall

Thanks for calling in.

Shay NehmadShay Nehmad

Yeah. If you figure out how to do that as right on Slack or somewhere, like, where people can do that. I don't think we have a lot of show left. I have, like, fifteen minutes. And we If somebody else wants to call in

Jonathan HallJonathan Hall

and talk about their favorite feature, we'd love to.

Shay NehmadShay Nehmad

You you have, like, a few minutes. One other feature, which is totally, syntactic trigger

Jonathan HallJonathan Hall

that

Shay NehmadShay Nehmad

I really, really liked, random text. You need to get some random text.

Jonathan HallJonathan Hall

I'm gonna use that one pretty quickly too.

Shay NehmadShay Nehmad

Yeah. And and you always have to wait, what about the seed? Oh, I can't use rand. I should use crypto and then it's a whole pain. No. You type rand dot text and you get a cryptograph of kitty random seed with a base 32 alphabet, which contains at least a 28 bits of randomness, which is enough to prevent brute force today. Super it it it's just the most practical Go boring feature that I could imagine. Right? But, you know, trying

Jonathan HallJonathan Hall

to get random text without that is is an embarrassingly annoying pain in my opinion. It's several steps, and you have to look them up every time. It's not obvious because partly because the crypto rand API is just so bare. So I I really I really appreciate this.

Shay NehmadShay Nehmad

Yes. And on that note, there's a lot of new crypto stuff, which we won't go into in this party because the people who already care about it, they already celebrated. Right? Mhmm. We did have the Phipps episode, so we would refer

Jonathan HallJonathan Hall

you to listen to our

Shay NehmadShay Nehmad

inter our our whole FIPS episode, federal information security.

Jonathan HallJonathan Hall

Frogs in pirate suits, wasn't

Shay NehmadShay Nehmad

it? Yeah. Something like that. It was something federal. So the US government, like, tries to do post quantum crypto.

So things you encrypt right now, even if quantum computing does end up working well enough, the quantum computers won't be able to decrypt it, which is very relevant for, like, your, health records right now. Right? They'll you don't want someone to be able to decrypt them in twenty years' time, so you should build it safe for the future. So there are two, there's a lot of new crypto things. There's the new SHA hash function, there's HMAC based extract and expand key derivation functions and other things.

These are just pretty complicated topics to go over quickly. Yeah. I think if if you're really into encryption and this is relevant for your work, then you should definitely read it. If you're just trying to convince someone, like your boss or whatever, that Go is is a good pick because it's secure, you can just say, hey, the new release has FIPS flag and you can just turn on then flag and boom, you get the certification, which if you've ever worked in a company that tries to sell to federal government, you know it's a huge deal. Huge, huge, huge deal.

Any last, part of the release you wanna celebrate?

Jonathan HallJonathan Hall

Well, I I wanna pull out a comment here from Frederick. Let me see if I can show it. Oh, sorry.

Shay NehmadShay Nehmad

Go ahead.

Jonathan HallJonathan Hall

It's another tool related one. Go test now has a dash JSON flag, which will output JSON formatted test information. So not intended for humans necessarily to parse, but to integrate with tools like Neovim or or other editors or CI pipelines and stuff like that. So your, test output can be more machine parsable. That's pretty cool.

And they've been adding features like this to other, Go tool, subcommands over the last few releases, I think. I think it's a good a good trend towards making our our tooling more integratable.

Shay NehmadShay Nehmad

It also prevents you from having to write the output of the test to some horrible format like JUnit XMLs just because that's a standard. Right? Yeah. Yeah. I could really imagine in my last role, we implemented a flaky test service that, like, took the output of tests and tried to run them all kind of different ways and with different parameters and then see which ones fail and why and try to detect and things like that.

I imagine this JSON output would have made our lives a whole lot easier messing around with like really bad formats like JUnit and things like that. But anything you you allow machines to do, they'll they'll like start doing. Right? That's pretty good. If you want details on this JSON format because it's not just for tests, it's for go install and go build as well, you can just do go help build JSON.

So I have to admit, like, typing in my terminal go space help space something is something I've never done. Have you done that before to look for documentation? The the Go blog is just good enough. So let's wrap up. The Go one twenty four introduced a lot of new features and I'm, for one, very excited to see what people are gonna build with it.

We haven't mentioned weak pointers and finalizers and directory scope file system access. There's, like, a really, really, big amount of features in this release, which are also very diverse. I'm really happy for the faster maps, which is very important and developer experience.

Jonathan HallJonathan Hall

A clarification from from Frederick, something that that I missed. The JSON output itself has already been there. They've added new information to that output is the is the new change to one twenty four. So this goes to show that I don't output JSON from my, Go commands right off. So I didn't even know it was already there.

Shay NehmadShay Nehmad

So yeah. The the the build failures one we talked about it on the show, by the way. You should go listen to that.

Jonathan HallJonathan Hall

You know, I've we talk about so many things on the show, and some of them are are accepted proposals. Some are upcoming, maybe accept, some are declined. I honestly forget which features exist now now and which ones might exist and which ones will never exist. And I've actually found myself trying to use features in my coding that that have not yet been approved or or approved that aren't implemented yet. Maybe this show makes me worse at Coding Go. I'm not sure.

Shay NehmadShay Nehmad

I would be surprised. So a lot of, new features. I think all in all a great release. I don't know how you compare this one to, like, previous years.

Jonathan HallJonathan Hall

I I don't feel like this is like a an Earth shattering release. Like, there there have been some that introduced really, big changes. This doesn't feel like one of those. I mean, certainly nothing compared to the addition of generics, but, it's a solid release. You know, there's, there's several things that I I am I'm looking forward to.

Shay NehmadShay Nehmad

It's not divisive, I think. Everybody loves this release because it just improves performance and adds some features, some of which are kind of, young yet, like tool dependencies. Some of them are just very useful, like, all the all the things we discussed. And, yeah, I think that wraps it up for the show. Jonathan, anything else to add? Nothing.

Jonathan HallJonathan Hall

I think it's a good show. Thanks, everybody, for listening for the last two years. I know not everybody's listening that long, but, hopefully, we'll see you here again in in two more years for episode 200. We'll we'll see.

Shay NehmadShay Nehmad

Well, if we're doing dailies, it should be, like, just a few months.

Jonathan HallJonathan Hall

Yeah. Right. Well, maybe we'll

Shay NehmadShay Nehmad

discuss that offline. Right? Or not. Thanks a lot, everyone. Nice celebration. Program exited. Goodbye. Program exited. Goodbye.

Transcript source: Provided by creator in RSS feed: download file
For the best experience, listen in Metacast app for iOS or Android
Open in Metacast