Episode Transcript
Available transcripts are automatically generated. Complete accuracy is not guaranteed.
Shay Nehmad (00:00):
This show is
supported by you, our listeners,
who are joining in this episodelive. Woo hoo. Stick around till
the ad break to hear more aboutthat.
Jonathan Hall (00:21):
This is Cup of Go
for 02/13/2025. Keep up to date
with the important happenings inthe Go community in about
fifteen minutes per week. I'mSinek Mahad. And I'm Jonathan
Hall. Do you feel
Shay Nehmad (00:33):
anything, special
going on?
Jonathan Hall (00:36):
This is a unique
experience. I mean, I've done
some live streams before, butnever for a podcast.
Shay Nehmad (00:43):
It's our live
episode. One hundredth episode
celebration. If you're listeningto this offline, I well, thanks
for listening to the episodesnormally. If you join the
stream, hi, y'all. Thanks forjoining.
Jonathan Hall (00:57):
Jamie just
commented. So are you still
listening to this at, at
Shay Nehmad (01:01):
One x speed.
Actually, the non live episode,
we record the two x speed, andthen we ask Filippo to, cut the
speed down in half in theeditor. Yeah. So we have a
pretty cool show, planned fortoday. It's kind of the same and
kind of different.
So we have a bunch of new abunch of news items to, discuss.
(01:23):
Gopher Khan Israel is coming up,some proposals, some blog posts,
some new blogs on the Go devblog. 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 liveshow. And then we're gonna do
the Go one twenty four releaseparty.
They released it yesterday,which was really nice of them,
(01:43):
freeing up all the people forValentine's Day. Right?
Jonathan Hall (01:47):
That's their
that's their motive, isn't it?
That's why they won't release iton Valentine's Day. They don't
wanna ruin everybody'sValentine's by having people go
to the Go party instead of theirwith their spouse.
Shay Nehmad (01:56):
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 iscould 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
(02:17):
gonna use the interactiverelease notes by Anton.
Maybe you'd, as my reference. Sowe're gonna talk about almost
all of the features, likeeverything that's worth talking
about. And because we have ourbeautiful live stage audience
here with us, like Jens, Andy,Frederick, Giuseppe, Jamie, and
(02:37):
probably others, we, we're gonnatake questions. We're gonna take
questions from the audience. Youwe you shouldn't have discovered
that tab, man,
Jonathan Hall (02:49):
on the app. It's
gonna it's gonna ruin the entire
show from now on.
Shay Nehmad (02:53):
No. It's gonna be
fine. So without further ado,
let's get started. Right? Let'sdo it.
Cool. First up, Gofer ConIsrael.
Jonathan Hall (03:04):
Tell us all about
it and why you're not gonna be
there.
Shay Nehmad (03:06):
Yeah. So,
unfortunately, I'm not gonna
make it
Jonathan Hall (03:08):
to Gofer Con
Israel. Lucky because it's May
in Tel Aviv, and by May, I'm notgonna be in Tel Aviv,
Shay Nehmad (03:14):
because I'm moving.
But Gofer Con Israel is always a
great event. I know theorganizer personally. One of
them was here on the show, Miki,our first interviewee ever,
actually. And the team, includessome people that I've done other
conferences with in the past,like, Nachshon Samarit, who who
came to Orca to do a show, andYerben Leifenfeld, who was also
(03:36):
on the show, and like peoplethat, have organized, the
conference in the past.
So if you have enjoyed theconference in the past, you
should expect, pretty much thesame. The conference is still
looking for sponsors. So I thinkthat's the best call to action
here if you're working at a bigIsraeli company, that uses Go,
think about companies like Fflyor Getexy and all the rest,
(03:59):
CrowdStrike, etcetera, etcetera.Please consider becoming a
sponsor. You know, there's goldlevel of sponsorship, which
really really puts you front andcenter at the conference, and
it's really not that expensive.
You get an on-site booth andyour logo on the conference
website and on all the videosand you get five sponsorships,
(04:19):
you get, seven tickets, sorry,And there are five available. So
you should probably move fastbecause I find no app slider
that already got the first one.And it's great for recruiting,
branding, etcetera. Regardingthe talks themselves, I don't
know if the if, who's exactly,gonna talk yet. There there
isn't a docket yet, but usuallyit's very, very good.
It's gonna
Jonathan Hall (04:39):
be a live
conference, in
Shay Nehmad (04:40):
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 Hall (04:46):
And I'm assuming
it's gonna be a mixture of
Hebrew and English presentationsas as usual.
Shay Nehmad (04:51):
Yes. Yes. Most
years, the keynote is in
English, and the rest of thetalks is, like, depends on the
speaker and what's theirpreference.
Jonathan Hall (04:59):
Cool.
Shay Nehmad (05:00):
But most of the
talks are in Hebrew. And it's a
dual track. I I really hope theydo the same this year. All the
all the years I've been, it's adual track thing. So you have
two talks and you choose whichone to attend.
Right? Yeah.
Jonathan Hall (05:12):
Cool.
Shay Nehmad (05:13):
So you you get to,
like you're not just stuck to
whoever's talking or whateverschedule you have. If you're not
interested in one topic, you cantake the other. And they do a
really good good job of, like,separating them. You know what I
mean? So you won't have twotopics about the same subject,
like web development, on thesame time slot.
So, yeah, go for Khan Israel.It's in May. Make sure to, prep.
Jonathan Hall (05:35):
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 thatHanover did their meetup, but it
just happened yesterday. And Iheard it's not announced, like,
two days before, so so we didn'thave time to mention it on the
show. Let us know in advancenext time, and we'll mention it
on the show.
Maybe we can do a daily show.Here we go.
Shay Nehmad (05:53):
I don't know if
there's enough action going on
in Go to do a jet daily show.Yeah.
Jonathan Hall (05:57):
I don't know if I
have enough time, even if there
were.
Shay Nehmad (05:59):
Alright. Let's talk
about some proposals. Let's do
it.
Jonathan Hall (06:02):
So, attack of the
clones or something. This
proposal has been accepted, andit is the ability to clone
hashes so we can start thoseclone wars more effectively or
more efficiently or something.The basic idea, if you're if
(06:22):
you're doing a hash, say, an MP5or SHA-two 56 or something like
that, You basically feed a bunchof data to this hash function
that calculates a hash as it'sgoing 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 hashingan email for some reason. Right?
And you've hashed the email, youhave this hash, and now you have
to you wanna create twoversions, one that has your
(06:44):
signature and one that doesn'thave the signature. Prior to
this proposal, you'd have tosend all that data twice once to
get the hash with the signatureand then once again to do
without the signature. With thisnew function, you could send
this first amount of datawithout the signature and then
clone the hash and then feed itmore data to get the one of the
signatures. So if you're hashingduplicate data or partially
(07:04):
duplicate data, this will,potentially improve your
performance significantly. Thecapability, I guess, was already
there.
It just wasn't exposed throughthe public interface. So now
it's gonna be exposed so soanybody can use it.
Shay Nehmad (07:15):
In what use case do
you copy something like you've
already hashed instead of justcopying the hashed value? Like,
if you're only hashing on thefirst few bytes and then you add
some other things to the digest,you can save on some
computation. Is that the thing?
Jonathan Hall (07:30):
Yeah. I mean, I I
suppose this would happen like
you're doing any sort ofblockchain type of stuff, I I
imagine. It's not honestly, it'snot 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 whereit's useful. Cool.
Shay Nehmad (07:47):
Who submitted it?
Jonathan Hall (07:49):
Silippo del
Sorda, who we had on the show
before.
Shay Nehmad (07:51):
The usual suspect.
Jonathan Hall (07:52):
Yes. Yes.
Shay Nehmad (07:54):
Cool. So if you
use, hashes often and you're
looking for optimizationopportunities, now we can clone
hashes. And if not, you can resteasy knowing the people who
actually worry and sweat this,these details now have a
slightly better API to do so.
Jonathan Hall (08:08):
Yes.
Shay Nehmad (08:09):
Instead of us mere
mortals. Jonathan, you work on
on Gopher JS, right?
Jonathan Hall (08:15):
Yeah. I'm one of
the top engineers. To It it it
transpiles Go to JavaScript.Yeah.
Shay Nehmad (08:21):
Not to WebAssembly.
Not to WebAssembly. So the next
two items on the docket are arekinda counterproductive, for
you.
Jonathan Hall (08:29):
Well, I I can see
why you say that. But, so
actually the the original authorof Gopher. Js is the one who
added WebAssembly support to Go.So they're they're closely
related projects. You could sayGopher.
Js was the training wheels forfor adding WebAssembly to Go.
Shay Nehmad (08:43):
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, usingRust and WebAssembly, using
YARH, and it was very, very cooltechnically and very
unproductive compared to likehow fast I could whip up stuff
with like React which I knowpretty well and then I dropped
(09:04):
it and that was like four yearsago. It seems like a lot of
people have been doingWebAssembly since then for like
myriad uses, but this is thefirst like production enterprise
SaaS example that I've seen thatthat makes a lot of sense.
It's Dagger,Dagger.io. Just acomment from chat here. Why did
(09:25):
you replace Jonathan with atalking pixel bringing Jonathan
back?
Jonathan Hall (09:29):
Is is my video
frozen? It wouldn't surprise me.
Shay Nehmad (09:33):
It's not frozen.
It's just, It's just bad. It's
Prince of Persia levels ofquality. Right? You look
rotoscope and then pixels andthen later on.
It's it's actually kind of retroin a cool kind of way.
Jonathan Hall (09:47):
I'll take your
word for it.
Shay Nehmad (09:48):
Yeah.
Jonathan Hall (09:48):
So I'm I'm on a
bad network connection here. I
apologize.
Shay Nehmad (09:51):
So Dagger Dagger
replaced the React front end
with Go and WebAssembly. Now Iknow what you're thinking. Oh my
god, everybody like how do theyhave time? What's the benefit?
Whatever.
Jumping to the end, they have aparagraph in the blog post
called should you do this? Andthe answer the answer is
(10:11):
generally no, right? The answeris generally, they do not
recommend making front ends inGo. There are some serious
limitations that they had tolike deal with. Memory usage
because you have a limit of, ahard limit on web assembly
applications, two gigabyte,which I didn't I wasn't aware
of.
And what Dagger does is likedisplay large traces whatever,
(10:33):
but it's a very interesting blogpost where they sort of dive to,
what's the main reason. The mainreason for them, which I think
is very different for a lot ofother companies that have like,
you know, an admin hub or a webUI interface for the users is
that Dagger have a terminal UIas well, terminal UI offering
(10:54):
for their product. Mhmm. Theterminal UI offering is written
in Go, and the front end iswritten in in React, was written
in React. But they did exactlythe same thing.
Right? Mhmm. Also, they had,performance issues. The web UI
couldn't keep up with all thedata it had to process, which
again is kind of an edge case.Most Web pages just display some
(11:16):
text, right, a chart if they'rereally ambitious, a few images,
but they represent, like, supercomplex events and traces
that's, like, their their wholething.
It's like a pipeline that yourun, you know, with their, like,
function calls and and modulesand blah blah pipelines and it's
like pretty complicated. So thebig reason is they wanted to
(11:39):
have a single code base thatdoes all this, interface work.
They had to figure out somestuff to derisk the project.
They're going through it here inthe blog post, but the most
interesting part is thatapparently WebAssembly is slow
at parsing large amounts ofJSON. I think this is related to
what we discussed about with,like, JSON v two.
Right?
Jonathan Hall (11:59):
Yeah. Mhmm.
Shay Nehmad (12:00):
Do do you remember
a few episodes ago, you
mentioned that really large JSONobjects are slow to dango
because of, a reason?
Jonathan Hall (12:07):
What was that?
Basically yeah. Basically, the
the I don't know exactly howthis translates to to
WebAssembly, but, the standardlibrary Go or the standard
library JSON marshaler andunmarshaler essentially buffers
the entire object before it itstarts 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 Nehmad (12:28):
So for for, Dagger,
obviously, that, was a no go. So
they fixed it by instead ofusing JSON, they used the Go
binary format and usedWebSockets to pipe that thing.
And, you know, they used someReact libraries that they still
want to use, so they connectedthe NPM to their Go, which I
assume is kind of ugly, but itdid work. And, yeah, the it's
(12:53):
really they they rewrote thething in Go, which is
interesting because usuallyfront ends, you don't do Go and
in the end, they recommend notdoing 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 casewhere you could come for example
to one of your clients and say,hey, I recommend you rewrite
(13:15):
your funding in Go. I thinkthat's the correct choice.
Jonathan Hall (13:18):
It'd be very rare
circumstances. The the main
thing would be if you had Golibraries that you need to
run-in the front end. Therewasn't a reasonable alternative
in JavaScript. That would be themain thing I would think of. I
suppose, like, you mentionedsome corner cases around
performance and stuff that thatthat wouldn't jump to mind as
the solution.
Shay Nehmad (13:39):
Yeah. For sure.
They they say that if their UI
is very complex and Reactdoesn't scale well for it, then
you should do so. If you have ateam of very strong Go engineers
and that's everybody you have onyour team, which tends to happen
in like very, like, if you havea very topic centric company.
Let's say you have a very AIresearch type company, everybody
(14:02):
there is gonna know Python andjust Python.
Right? Because that's what theydid in their academic career and
that's it. So it makes sense todo the back end in in Python
even though there might betechnically, like, more standard
or better options just becausethat's who you have. So they're
saying everybody on our team isa strong Go developer, so we
decided to do it, the front endas well. And also
(14:23):
standardization.
Right? If you do the same thingexactly in your back end
language and your front endlanguage, the same display,
right, the same view, and theydid that because they had a
terminal UI. So if you're inthat circumstance, I would
actually reach out to them. Theyhave a Discord as well. So you
could probably talk to them andlike, hey, should I do this?
I think it's really cool thatthey've been able to do this
(14:44):
because it seems like Go hasmuch better support for web web
assembly than I expected. Seemslike 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, youknow, that it defeated their,
bullshit detector. It works. Soa cool blog post from, Dagger.
(15:08):
The link is in the show notes.Maybe I should put it in the
chat as well, actually,
Jonathan Hall (15:13):
think about it.
Shay Nehmad (15:14):
No. I don't want
you I don't want you all to
leave the tab, so I'm notsending it. You'll have to wait
until the episode comes out.
Jonathan Hall (15:20):
Sneaky. Just like
IKEA. Once you enter, you can't
leave.
Shay Nehmad (15:23):
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 wifeand I got married, it's in
Israel, August, very hot, andwe're, like, wearing the suit
and the dress, which is very notwhat you usually wear in Israel
because it's very hot, veryhumid. And my brother-in-law had
(15:46):
the amazing idea, do your, like,you know, pictures with with a
suit and everything in IKEA. Goto IKEA, and then you have,
like, 15 different rooms and andsettings and all the props.
And, man, that was the best ideaever. Yeah.
Jonathan Hall (16:01):
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 thesame people who designed the
Diablo levels.
Like, at any at any point you'restanding, it looks like a
legitimate room, but you walk 10feet and you're like, wait. This
doesn't make any sense. It'sjust a brawler. Alright.
Shay Nehmad (16:25):
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. Wedon't need money. Just
Jonathan Hall (16:37):
Alright. So, let
let me try the segue here. This
is the part you never hear onthe on the live show where,
like, okay, what's the seguenow?
Shay Nehmad (16:44):
I mentioned
WebAssembly and
Jonathan Hall (16:45):
Yeah. So you you
mentioned in in that article
they talked about, making callsinto some other React libraries
and stuff like that.Historically, that has been one
of the strong reasons to preferGo for JS over WebAssembly. It's
because it's much, much easierto do that with Go for JS.
Because Gopher.
Js transpiles into JavaScript,you literally are running
JavaScript. You can callJavaScript functions and vice
(17:08):
versa. So your Go code can callJavaScript functions, your
JavaScript functions can go Gocode. Well, now that's less of a
benefit for Go for JS comparedto WebAssembly, because with
1.24, they've added this new, Godirective you can add called go
colon wasm export, whicheffectively exports a Go
(17:28):
function so that otherWebAssembly code can call it.
And there's a blog post thatjust came out today, from the Go
team by Cheri Mu Mui, I'm notsure how you pronounce that
name, that that talks about it.
It's a pretty short one. So ifyou're a WebAssembly user, this
would be a quick read for you.Yeah. So that's that's nice to
have that that,
Shay Nehmad (17:47):
So if I write Go
code and I add this Go
directive, I can call it fromJavaScript? That's the
Jonathan Hall (17:53):
From WebAssembly.
Oh. Yeah. So it's not it's not
quite the same as what Go so youcan't just, like, natively call
you can't your your rack appcan't natively call Go
functions. I think you canaccomplish that as you mentioned
in your article.
But it takes it. It's it's a lotmore cumbersome than that. It's
not as direct. But from another,if you have some WebAssembly
(18:15):
that say written in Rust, itcould now call Go.
Shay Nehmad (18:17):
And I assume again,
the people this benefits, like
the developers that care aboutthis kind of stuff, either work
on, like, super high performancefront end applications or work
on, like, very, small no. Like,if you work on small
architectures, do you use theWebAssembly as well, or do you
compile to like, very smalldevices, I mean. Oh, some some
(18:40):
will. Yeah. I guess, like, ifyou're working on Raspberry Pis
or or things like that.
Although you I think you cancompile Go natively on Raspberry
Pis.
Jonathan Hall (18:49):
True. Yeah. You
can. I'm I'm
Shay Nehmad (18:51):
just wondering,
like, I really wanna meet the
people who care about thisstuff, that don't develop things
for web applications. Maybe theyhave just a a tiny widget in a
in a normal web app orsomething.
Jonathan Hall (19:02):
I know that
companies like Fastly are using
WebAssembly sort of on, like, onthe edge, if you will, you know,
that to to easily and quicklyship router programs or I don't
know exactly what they're doing,but, you know, to to or for CDN
delivery, stuff like that. Soyou know, in situations like
that, maybe you want tointegrate, you know, something
some components are written in xy z language and other
(19:24):
components in a b c language,and this sort of makes that
integration easier.
Shay Nehmad (19:28):
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'rehappy with it. Not sponsored.
Right?
But if Fastly use, like,WebAssembly and Go
Jonathan Hall (19:46):
to do that, I'm
happy because I'm
Shay Nehmad (19:47):
a happy Giphy user.
It's like my second most used
feature in Slack.
Jonathan Hall (19:51):
I imagine a huge
number of websites you use are
are using Fastly.
Shay Nehmad (19:56):
Yeah. It's sort of
this weird layer of
infrastructure of the Internetthat we are just so used to.
Everything is on CDN, andeverything is fast, and
everything is we're just used toit even though it's in reality,
it's an amazing engineeringeffort. Right? So this blog post
is an official blog post on theGo dev blog.
Right?
Jonathan Hall (20:14):
Yes. It is.
Shay Nehmad (20:15):
I really like the
the Go blog as a source of,
like, okay. This is what theyactually care about. They don't
post post that often, which Ithink is a good thing. They
could talk about, like, everylittle thing. Cool.
One last blog post I wanted totalk about before the break, is
very near and dear to my heartright now because I'm working a
lot on SQL code right now. I'mimplementing a lot of back end,
(20:37):
you know, views and whatever atwork. That's sort of been like
my last week. Then I saw thisblog post called SQL nulls are
weird. Actually, sidebar, how doyou say it?
Do you say SQL now that I thinkabout it. Right?
Jonathan Hall (20:50):
I usually say
SQL.
Shay Nehmad (20:51):
Okay. So you are
weird as well. It's SQL. So this
blog post is not about Go, and Iwanna 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 becausethe person who wrote it,
Raymond, works on, like, two Goprojects, a company called
(21:16):
Convoy IO, just like a webhookthing, webhook gateway, and
another project called LightQueue, which is a test queue
over SQLite in Go. Okay.
Jonathan Hall (21:27):
Yeah.
Shay Nehmad (21:27):
So you can create,
like, a queue over your SQLite,
server, which I imagine is verylightweight 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 thingyet. But this blog post goes
into the fact that nulls aredistinct values in SQL. Did you
(21:50):
know that?
Jonathan Hall (21:51):
Yeah. I mean How?
Null equals tried
it.
Shay Nehmad (21:55):
One equals one is
true. One equals zero is false.
And null equals null is null.
Jonathan Hall (22:01):
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 thatway.
Shay Nehmad (22:09):
Yes. But the thing
is, if you insert two, like,
unique rows, but you put null inone of the values, it will let
you do that.
Jonathan Hall (22:18):
Right. Right.
Shay Nehmad (22:20):
I was, like, blown
away. It it was very puzzling to
me and actually was relevant atwork at the moment. So whenever
I have a blog that's as relevantas this one and, you know, it
popped up on Hacker News andwhatever, It's a it's a good
blog post if you work in,databases right now like me, and
then you remember that you haveto add these, like, partial
(22:41):
indexes to deal with it or agenerated column or something
like that. Like, something thatis not nullable in reality. You
basically add wherever you wouldput null, you put, like,
something that looks like not areal value.
Jonathan Hall (22:57):
Right. Right.
Shay Nehmad (22:58):
Case in point,
today I ordered an appointment
for, like, to get my passportrenewed for the flight. And then
it had, like, add it to your,calendar. And then I clicked on
it, and then it said meeting forobject object.
Jonathan Hall (23:14):
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 Nehmad (23:32):
Really? Is
Jonathan Hall (23:33):
this happening
right now? It's happening right
now. So, I I do wanna mentionsome things pulled out, or
mentioned here in commentsbecause, 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 Joshads, but all nands are.
Shay Nehmad (23:59):
The I'll I'll just
say all NANs all NANs are empty
in their own way. But everyevery initiated value
initialized value is different.Right? You have to leave the
media tab.
Jonathan Hall (24:16):
Yeah. I'm just
not making jokes. It's your
fault, not mine. Okay.
Shay Nehmad (24:21):
We're gonna take a
short break. This is was the
first part of the show. This wasnews. We're gonna do a short ad
break, and then we're gonna do areal, like, two minute break,
and then we're gonna do the Goone twenty four release party.
Alrighty.
But before all that, obviously,we have a lightning round for
you.
Jonathan Hall (24:38):
Oh, yeah.
Shay Nehmad (24:38):
With lots of stuff
to
Jonathan Hall (24:40):
talk about
because we're gonna empty out
the backlog. Let me bring thatmedia tab back.
Shay Nehmad (24:49):
Lightning round.
Jonathan Hall (24:53):
That's a long,
setup. Yeah.
Shay Nehmad (24:56):
It has a lot of
echo. Yeah. So you have the
first item here, and I'm excitedbecause I'm seeing, like, one of
my favorite URLs,steamcommunity.com. Are we doing
Factorio lighting round again?
Jonathan Hall (25:09):
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 freezewhen they are launched via the
Steam client. So something Idon't know what it is exactly,
but something about the Goruntime doesn't play well with
with Steam. Steam is doing someinteresting weird stuff, I'm
(25:30):
assuming, because, like, whywouldn't it? It's Steam.
Shay Nehmad (25:36):
If Gabe and say
says it should Gabe and
Jonathan Hall (25:38):
The issue is long
and full of stack traces and
process lists and all sorts ofweird archaic stuff, you know,
the sort of stuff that, yoursignificant other says, do you
understand that when they see iton the screen and you pretend
that you do? That's that's thisissue. Anyway, I I thought it
was kind of interesting to tosee this come up, on Steam. Now
(25:59):
I don't know that this meansthat games are written in Go
that are produced on or that aredistributed with Steam, although
it might mean that. But I thinkthe particular case, it's just a
little utility program that ispart of a much larger game.
So I don't think that the gameitself is written in Go. But if
it is, it probably doesn't work.
Cool. Cool. Yeah.
Lighting round.
(26:21):
Here we go.
Shay Nehmad (26:22):
My lighting round
well, my first item for the
lighting round is anotherrewrite in Go. I brought a
company called Dagger that wrotetheir front end in Go. Now I'm
bringing a company calledLovable, which by the way, if
you haven't heard about them, Ihaven't used them yet. But I
think they beat Wiz for thefastest to, 100,000,000, ARR.
(26:45):
Don't quote me on that because Imight have seen a different
company, but they're they'redefinitely exploding, like a lot
of people use them.
It's AI agents, like, just writeyour app and it builds you it
for you, like, automaticallykind of thing, which I don't
super love, but apparently it'sgood enough.
Jonathan Hall (27:02):
Mhmm.
Shay Nehmad (27:03):
They rewrote their
entire Python backend into Go.
42,000 lines of code. And theygo
Jonathan Hall (27:12):
through the one
thousand in Python or in Go?
Shay Nehmad (27:15):
In Python. And I'm
Jonathan Hall (27:16):
curious how many
that translates to in Go if it's
more or less.
Shay Nehmad (27:19):
I assume it's more.
Jonathan Hall (27:20):
I assume it's
more verbose.
Shay Nehmad (27:22):
So they it's very
simple, the blog post. They just
say why we shifted to Go, theirback end is highly concurrent
and parallel. That's like theirworkload. And they built their
own dependency injectionframework because apparently
they didn't like anything theyfound in Go maybe or they didn't
know it, but, like, it helpedthem structure their code, which
I assume makes sense if they usethe DI framework in Python. It's
(27:45):
makes it a lot easier to keepthe same structure.
Although, I never had to use adependency injection framework
in Go, and I've built prettycomplex applications. I don't
know if you have.
Jonathan Hall (27:54):
No. I've I've
I've actually wondered why a
dependency injection frameworkis even useful. Like, I've I've
I've yet to to imagine ascenario where that's that's
beneficial. But, people seem tothink it is because they use
them.
Shay Nehmad (28:09):
I I think for them,
it makes sense because they have
a lot of, like, things poppingup and out of the server, very
dynamically because the agent isdoing a lot of things, so it's
very non deterministic, the theback end. But it's just an
assumption. I don't actuallyknow anybody yet, lovable. The I
think the main number here isthat deployments got lowered
(28:30):
from fifteen minutes just tothree. All request times are
faster, 12% on average.
And most importantly, and ifthere are any, chief financial
officers listening or someonewho's on cloud cost, they
reduced their server instancesfrom 200 to just 10 Wow. Which
is pretty amazing.
Jonathan Hall (28:50):
Yeah. That's
pretty cool.
Shay Nehmad (28:52):
And they say that
they're, like, practically,
their engineers spend less timeon performance bottlenecks than
just working on stuff, likefeatures. So for now, at least,
it seems like that rewrite wastotally worth it. Cool.
Jonathan Hall (29:04):
Speaking of
rewrites, I wanna talk about
something that isn't isn't arewrite, but it helps you
rewrite. You ever, write bashscripts and then it's annoying
to deploy them because it's it'sjust annoying? Yes. Or they're
slow?
Shay Nehmad (29:16):
Yes. Yes. A
thousand times, yes.
Jonathan Hall (29:19):
Enter Bunster.
Bunster will transpile your
shell scripts into Go so thatyou can compile them into a
single executable binary.
Shay Nehmad (29:27):
Oh, really?
Jonathan Hall (29:29):
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'sunder active development. And I
think that's kinda cool.
Cool. Cool. Cool.
Shay Nehmad (29:41):
Before we move into
the last, item on the lightning
round, I wanna pull some, thingsfrom comments here. First of
all, Andy and Andy, I don't knowif it's the same Andy. Thank you
for putting the lightning iconfor for the lightning round.
Andy says well, I don't knowwhich one. I have Go oh, I know
which one.
Alright. Define Andy, AndyWilliams, says he has a Go apps
(30:04):
on his Steam Deck, and it worksgreat. So Steam Deck is their,
like, hand to hand, console.
Jonathan Hall (30:10):
Oh, yeah.
Shay Nehmad (30:10):
I did the mistake.
Well, if Nintendo wants to
sponsor this, episode,Konnichiwa, Arigato. Thank you.
But as long as they're not, Ibought my wife, the Switch,
which is a great console andit's a lot of fun. But then they
announced the Steam Deck, like,a week after I bought it.
And I was like,
Jonathan Hall (30:30):
surely there's a
refund, period. You could've you
could've taken it back.
Shay Nehmad (30:34):
Yeah. But she likes
the switch, and also I bought
some games. So but it's a goodactually, 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 theflight. Right?
Jonathan Hall (30:47):
So we we have we
we settled the question who Andy
is. Andy tells us that Andy isAndy is me. So so we've got that
settled. It's they're likenulls.
Shay Nehmad (30:57):
They're they're all
the Andys are unique.
Jonathan Hall (30:59):
They're all
unique, and they're all the same
at the same time.
Shay Nehmad (31:02):
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'tknow if this is just a
signposting for the questionmark proposal.
Jonathan Hall (31:17):
I don't know.
I've I've been doing some
JavaScript lately, and if I tryto do JavaScript the way I do
Go, you know, that is checkevery function call for errors,
it's, like, 10 times bigger thanGo because you have all these
try catches all over thefreaking place. It's a Yeah.
Yeah.
Shay Nehmad (31:31):
It's not a lot of
fun. And talking about, working
in JavaScript, I've been doingback end Go. I've been doing
back end JavaScript, TypeScript.That's what I'm doing, at work
right now. And I stumbled uponthis project.
It's actually trending onGitHub. There's a project called
NVM Windows. This is a live inground, so I'm gonna keep it for
(31:52):
ten seconds. Jonathan, do youknow what NVM is?
Jonathan Hall (31:56):
Let's see. We're
on different versions of, like,
Node or or something, doesn't
Shay Nehmad (32:00):
it? Yes. It's Node
version one.
Jonathan Hall (32:01):
Yeah. Okay.
Shay Nehmad (32:02):
If you have, like,
two project let's say your front
end is Node 20, but your backend is already upgraded to Node
22, you have to change your allyour shims. Right? Same as
Python virtual ends. So you canuse pyenv to manage your Python
versions or or, UV if youalready upgraded. So same for,
node.
It's standard for me, it'sstandard procedure for every
(32:22):
node project I work on. I putthe nvmrc file there and then
I'm not worried about theversion. However, apparently for
Windows users, which we know onthis show we have, like on the
Go community we have quite alot, they don't have nvm that
works. NVM is not for Windows.So there's a project called NVM
for Windows, who was trendingthis week.
(32:43):
There's a new release that cameout, 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 thedrive other than c. Do you
remember, like, work dealingwith all that stuff, all that
nonsense in when the driveletters and COM objects?
Jonathan Hall (33:02):
Those weird
backslashes.
Shay Nehmad (33:04):
Anyway, so there's
a project called, NVM for
Windows. If you use NVM in yourown Windows, go check it out.
The people who are working on itare working on a full time,
like, company, environmentmanager kind of thing. They even
have a LinkedIn. So if that thisis a real problem for you, you
know, consider talking to them.
It's author software on,Twitter, which I found very
(33:28):
interesting that it's such areal problem to manage node
versions that you need a wholecompany. But, yeah, it's kind of
a pain in the behind. And yourlast item
Jonathan Hall (33:38):
is So that's just
a yeah. Chi. Everybody remembers
Chi. Right? Some of you mightstill be using it.
Chi was my go to HTTP routeruntil six months ago when six
months ago, 01/2023 was releasedwith the new improved serve mux
in the standard library. So I'veactually migrated two or three
(33:59):
projects for clients off of Chisince 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 Nehmad (34:10):
Well, Go one one
fourteen until 01/19.
Jonathan Hall (34:12):
Up through 01/19.
Yeah. So they they finally
implemented a a, like, policy ofwhich versions are we gonna
support, and they decided tosupport the last four versions.
So not really big news unlessyou're running an old version of
Go and need new features from g,then you're gonna
Shay Nehmad (34:28):
be stuck. So there
is one last rewrite that I just
wanna tease and we'll we'll talkabout it on the next episode.
Okay. The ASDF, rewrite. Oh,yeah.
I'm just teasing it. We'll talkabout 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 bashscripts using Bunster and all
(34:51):
that, but that's for next weekbecause we don't have time.
Jonathan Hall (34:53):
And then related
to that is the QWERTY rewrite
called Dvorak. Where where isthat where is that sound effect
now?
Shay Nehmad (35:01):
No. No. No. No. No.
Don't do that.
Jonathan Hall (35:06):
Sir, stay away
from the vehicle,
sir. Alright.
Shay Nehmad (35:11):
That's all that's
all we have for you for the live
Jonathan Hall (35:13):
I think it's time
for an ad break.
And then,
Shay Nehmad (35:15):
Let's do a quick
Jonathan Hall (35:16):
ad break.
Shay Nehmad (35:17):
Let's
Jonathan Hall (35:17):
do it. Okay. I
need that I need that media back
again. Where is it?
Shay Nehmad (35:20):
So I'll just do
Welcome to our ad break. How
smooth was that, guys? I feellike if since this is a live
episode, I should I should bemore like, you're listening to
COPO geo radio on all your fivegigahertz or 2.4 hertz, Wi Fi
(35:46):
connections. Traffic lookinggood 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 Hall (35:56):
Okay.
Shay Nehmad (35:56):
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 hadopen. But, yeah, we have a lot
of people in our audience. 40people. Jamie, Sagar, David,
Jose, another David, DaveCheney.
(36:18):
Oh, Dave Cheney. Nice. Mhmm.Kemai Akuyun, Arav Duda, Stephen
Clark, Martin Ruby, Gil Ada, whowas actually on the show, Paul
Boteau, Code Stank, great name,Michael Haggerty, Thomas Gooder,
Ragnarok, Vulcan Ruhl, SimonLaw. By the way, if any of you
(36:39):
are here,
Jonathan Hall (36:40):
feel free to
write and chat because your
support is what makes the showtick.
Shay Nehmad (36:45):
Rob Printless,
Charlie TC, Adelina Simeon, who
was on the show, and
Jonathan Hall (36:49):
you should
Shay Nehmad (36:49):
buy her books.
Thomas Gall, Lutz Hannuken, s j
k s k s k k s k s. I assumethat's not their real name, but
if that's the case,
Jonathan Hall (37:02):
Carlsen We still
love you. You've heard this.
Shay Nehmad (37:04):
Bruno, Wilken
Rivera. Yeah. Kristen von
Kietzel, Jamie Tenna, friend ofthe show, who was on the show
and is actually on the chatright now. Thanks, Jamie. Joost
Helberg, Mateusz Kvalka, AndyWilliams, friend of the show,
stepped in for me a few times.
The mind behind fine, Mihai,Mihai Tudor, Hey Mihai, Robert
(37:26):
Burke, Jens Hillingsil. I don'tknow 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 Hall (37:42):
on the chat.
Shay Nehmad (37:43):
Will Roden and Josh
Bleaker Snyder, end of the show.
Oh. Thanks a lot to all thesebeautiful people. We never did
the full run through. Right?
No.
Jonathan Hall (37:58):
Yeah. And and and
thanks for, reading those names
so I didn't have to because, I'mterrible at his pronunciation
too.
Shay Nehmad (38:04):
Jens is not happy
with my pronunciation. I'm
sorry. This show has ran for ahundred episodes. Yeah. We
started it two years ago justbased on Jonathan sending some,
like, phishing messages in aSlack we were both in over two
years ago at this point.
Jonathan Hall (38:24):
Yeah. A little
more. Because because we haven't
done every single week.
Shay Nehmad (38:27):
Yeah. We've done
almost every single week. I
think we missed, like
Jonathan Hall (38:31):
We took a break
off each summer, I think.
Shay Nehmad (38:33):
Yeah. So went
through some, like, and and we
kept doing it even through,through some hard, limitations,
like when I was away for threemonths draft or you moved
countries to The States and wehad to change the recording
time. Yeah. But I don't knowabout you. This is very, very
(38:54):
fun.
Jonathan Hall (38:54):
I agree.
Yeah. Good to
Shay Nehmad (38:56):
And one of the
reasons it's fun is because I
get to learn a lot about Go fromyou, which is nice.
Jonathan Hall (39:00):
And I learn from
you too. We learn from each
other.
Shay Nehmad (39:03):
Yeah. You mostly
get to teach me. Let's be honest
here. Right?
Jonathan Hall (39:05):
Oh, I mean,
you've taught me quite a bit
about especially the securityrelated stuff. There's a lot of
thing insights there that youhave that I I don't know about.
Shay Nehmad (39:11):
And imagine that's
the things I can tell you about.
But one of the main reasons thatit's fun other than the fact
that I'm learning is the supportof our Patreons and our
listeners. If you want to jointhis beautiful community, you
can reach us at cupago.dev, thatis cupago.dev, where you can
find links to all of our stuff.Our Gopher Slack channel, which
(39:33):
is where most of the, like,community chat is going, where
we, for example, gave the linksto this live episode and ran
some polls and people post somecool stuff. It's Kebab Case, cup
- 0 dash go.
You can email us if you're notinto Slack or any of our social
media links. We totally getthat. I'm trying to cut down on
(39:53):
social media a lot. Just emailus at news@cupago.dev. That is
news@cupago.dev.
A little bit inside baseball,it's actually only Jonathan
reading these emails. So if youwanna 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 Hall (40:10):
And and you only
see the ones I share with you.
So.
Shay Nehmad (40:13):
Yeah. For sure. You
have a full editorial control on
that. If you want to support theshow, like the beautiful patrons
we mentioned before, you can dothat. You can also buy some
swag.
You can the people on the livestream can see my beautiful Capa
Go hoodie and our nice Capa Go,mugs. Although, non canonically,
I think we're both drinking tearight now. Right?
Jonathan Hall (40:35):
Yeah. We are.
Shay Nehmad (40:35):
Yeah. Yeah. But
just to be fair, it's, like, 9PM
here, and I wanna sleep at10:00.
Jonathan Hall (40:41):
It's two almost
2PM here. So, yeah, it's not
coffee time anymore.
Shay Nehmad (40:44):
If you, don't want
to buy swag or support the show
financially, that's totallyokay. A great way to support the
show is to leave a review onSpotify, YouTube, Apple
Podcasts, or just wherever youlisten to your podcast, well, to
this podcast and share the showwith a friend, a colleague, a a
co student, just wherever youmeet other gophers. Maybe if
you're planning to go to gopher,GopherCon, soon, just share the
(41:08):
show and spread the word. Ithink we would have made it to,
like, 20 episodes if nobodyjoined and nobody listened. Oh,
yeah.
But since so many people joinedand listened, recently, we
passed a hundred thousanddownloads and, you know, so many
subscribers, people talking tous, a hundred episodes, lots of
milestones. It's a lot becauseother people are listening and
(41:31):
we're, like, getting thispositive feedback for from the
community.
Jonathan Hall (41:35):
Did I miss
anything on the on the ad break
checklist? I don't think so. Ithink
Shay Nehmad (41:39):
I think we've
Jonathan Hall (41:40):
We're good. Done
enough ad break. I think we
should move on to the releaseparty.
Shay Nehmad (41:44):
Let's, do that.
Jonathan Hall (41:56):
I like that
little organ, like, Bob Dylan
esque organ in the in thebeginning there.
Shay Nehmad (42:01):
It's, Contax Carby
a, 200 for all my other midi
heads out there. NativeInstruments. I Jens sipping in
Negroni from my cup of cocoa.Love it. Love it.
I guess we should add a, PEGIrating for the cups. We we need
Jonathan Hall (42:18):
shot glasses in
our swag store too, I think.
Shay Nehmad (42:21):
I don't know if I
Jonathan Hall (42:21):
It could be
espresso shot glasses or or the
other kind. Either one eitherone would be a a a a
improvement.
Shay Nehmad (42:27):
Yeah. Espresso
wing. Actually, a good idea,
Jens. Maybe I'll maybe I'll putthat into stock. Let's get to
the release party.
Yesterday, February 12, the Goteam has officially released, Go
version one dot 24 dot zero.Jonathan, walk us through the,
(42:47):
like, top items. Why do I evencare other than the fact that if
I'm using one twenty two, I haveto upgrade because it's end of
life?
Jonathan Hall (42:56):
So that's a good
question. Because I think the
things I care about are, most inthis release are some of the
least important things for mostpeople. The the thing I'm most
excited about actually that I'mgonna be using the soonest is
the new context in the testingpackage.
Shay Nehmad (43:13):
Yes. Sync test.
You've wanted to talk about that
on the show forever.
Jonathan Hall (43:16):
Not even that.
The t dot context method that
returns a context, it's canceledwhen the when the test ends.
Shay Nehmad (43:22):
Oh, yeah. Yeah.
Yeah.
Jonathan Hall (43:23):
Yeah. Because
that's gonna clean up
a whole bunch of
context to to dos in my tests.
So it's a really minor minorthing that doesn't matter,
really, but it's gonna be one ofthe first things I use. The
other one is the s log discardhandler.
Shay Nehmad (43:38):
So discarding logs,
allows you to just create a
silent logger. Right? Yes. Whywould you need a silent logger
that does nothing?
Jonathan Hall (43:49):
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 fortests. You have a you have a an
object that takes a loggerbecause during normal operation,
it creates logs. But in tests,you don't want the log output or
you don't wanna capture itsomewhere, so you can just
discard it. So it's it'sintended primarily for for
testing purposes.
Shay Nehmad (44:09):
Now here's, a
question for you. Should you
test logging? Because I assumeif you use the discard handler,
you can't test it.
Jonathan Hall (44:17):
You should test
logging, but not in all of your
tests.
Shay Nehmad (44:21):
No. I I'm not
saying test the logger. Like,
should you test that theexpected log output is being
written?
Jonathan Hall (44:27):
Yes. But not in
all of your tests.
Shay Nehmad (44:29):
In which ones? Just
the, like, super important logs
to care about
Jonathan Hall (44:33):
or something? I
will generally write one test
for each behavior that I want totest. So when I so I'll write
one test to test that underthese circumstances, the correct
log output occurs. And I'llwrite another, test to test that
under these circumstances, thecorrect error value is returned,
etcetera, etcetera. So
I
like like let's
say I'm testing a function that
(44:55):
takes a log or that uses a log.I'll probably write one single
test or maybe if there's ifthere's different types of logs
depending on how it's used, I'llcreate one test for each type of
log. But most of my tests won'ttest the logger because that's
kind of incidental to to whatI'm testing in in my other
tests.
Shay Nehmad (45:11):
So when you use the
discard logger, the the log
itself happens is just directedto slash dev slash null.
Jonathan Hall (45:21):
Right? Basically.
Yeah.
Shay Nehmad (45:22):
So if you do some
inline computation when you run
the log thing, it it willhappen. That's the thing I'm
worried about because
Jonathan Hall (45:30):
It depends on how
people do like,
Shay Nehmad (45:32):
log, you know,
server dot init and then the
response, they just log it. Andthen if you have a thing that
out, like, optimizes logs out ofthe code, the code breaks. You
know what I mean?
Jonathan Hall (45:43):
Mhmm. Mhmm.
Shay Nehmad (45:45):
So
Jonathan Hall (45:45):
it depends on how
your logs are done. So there
there are some capabilities inthe s log package that you can
detect whether or not this loglevel is enabled or whatever. So
the the discard handlerbasically says all levels are
disabled. So if you're usingthat capability to probe the
logger, then that code will notwill not execute.
Shay Nehmad (46:04):
Oh, so, yeah, that
that makes sense. But,
generally, this is more likesyntactic 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 beincidental. They're not
behavior. Every program youhave, I should be able to take
all the log prints out, and itshould behave the same. So The
(46:26):
logs are to SDD error, and theoutput is to SDD out. You know
what I mean?
Jonathan Hall (46:30):
So
counterargument, delete all your
logs. I use them. Then they havebehavior that that matters, and
then they
Shay Nehmad (46:36):
should be tested.
We can this won't hold up in
court. Very, very cool.
Jonathan Hall (46:43):
The consumer of
your logs is very different than
the consumer of yourapplication, and and that's why
the testing is done differently.But, you know, if you as the the
administrator of the applicationneed to read those logs, then
you wanna make sure those logsare working correctly.
Shay Nehmad (46:55):
So if the my view
on it is usually logs are for me
personally as a person who'sdeveloping the software. But if
I'm shipping something, let'ssay, overseas, you know, to like
a a blocked network, let's sayyou have to do FedRAMP and
you're not allowed to look atthe logs and only other people
are allowed to look at the logs,only in these, like, very
(47:15):
strange circumstances where I'mwriting software and the logs
are being written but I'm notallowed or I can't read them but
someone else has to and has tounderstand maybe then I'll
consider testing it butdefinitely not for every
function.
Jonathan Hall (47:27):
Oh, I don't I
don't do it for every function
for sure.
Shay Nehmad (47:29):
Anyway, the, omit
the, like, discard logs thing is
I've I've implemented thisliterally in every project I've
worked on. Right? You start atest, 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 toopen the actual debugger. So
just print some logs and I'lladd some, like, one, two, three,
(47:49):
four, and I'll discover whichline has the problem. But
usually, you don't want logs inyour test because you want the
test output to be very clean.
Go test already is pretty goodwith that because if I think,
like, it doesn't print output ifyour test don't fail. But if you
have a different server runningsomewhere and your tests are
like integration tests, having adiscard handler is very very
useful. Also maybe in verysecurity related context where
(48:12):
like okay in this environment Idon't want to log anything like
ever I don't want people to knowwhat the program is doing. This
part of the show is an like aninterview with the people on the
in chat and they are saying somethings.
Jonathan Hall (48:24):
Yes. Jamie We
should talk about those.
Shay Nehmad (48:26):
Is saying that logs
are operational data. I don't
know if that's, argument for meor for you. I'll take that one
for me because the rest agreewith you. So I want to have,
like, at least one point. Youwanna read some of the
Jonathan Hall (48:37):
I agree with that
too. They are operational data,
but operations are important tothe program. I mean, I I think
going on to what Dwayne Dwaynesays next, you know, if you get
a bug where something isn'tgetting logged, it should be.
Don't you wanna test for that,to make sure you don't regress.
And I think that, yes, it'soperational data.
So the considerations aredifferent, but they're still
important considerations thatdeserve to be tested for the
(48:58):
matter.
Shay Nehmad (48:59):
That's fair. That's
fair. What Frederic says is is
very close to what I did, whichis testing the logs for
sensitive information and, like,very specific expected keys. So
you don't test every log orevery whatever, you take the
entire log output, then you feedit. I used to feed it to
Microsoft Presidio and just lookfor any sensitive information at
(49:21):
all, like secrets, keys, data,personal data, things like that
because all the companies I'veworked at have been cyber
companies that deal with verysensitive data.
So you don't want toaccidentally when you read that
data log it somewhere and thenyour promise to the customer,
hey, I don't, store your datapersistently. I do all the
processing in memory. Right? Youyou in reality, you break that
(49:44):
promise because you log it andthen your logs are shipped to,
like, somewhere that's verypersistent. You store them for,
like, I don't know, twelvemonths on CoreLogix or your
Splunk server or whatever.
Good comments from the, peanutgallery. Thank you, people.
Anyway, my, feature to pick outis concurrent, map. So the
(50:05):
implementation of sync map haschanged to a better one. If
you're into comp sci and you Idon't know, you're grinding lead
code right now, It's aconcurrent hash tree, so you
should go read the code becausesomeone's gonna ask you to write
it on a whiteboard soon.
But it's a better performanceespecially for map modifications
for disjoint, key sets. It's notgonna contend. So if you have
(50:29):
like five threads updating yourmap at the same time, they're
not gonna lock on one anotherbecause the maps are laid out in
a way that makes sense thatallows like different threads,
the different goroutines, sorry,to talk to different parts of
the map at the same time, whichsounds now obvious. But clearly,
it has a lot of edge cases, verydifficult to implement. Unlike
(50:50):
the t dot context one, which Ithink is one of the simplest
pull requests you could read onthis, on this release.
This one is like super benchmarky, algorithm y. I have to admit
I don't fully understand thecode and if someone asked me to
implement it right now I won'twouldn't be able to. I really
like the fact that it, doesn'tperform better on every
(51:12):
benchmark. So it's not strictlybetter.
Jonathan Hall (51:16):
Right? Right.
Right.
Shay Nehmad (51:17):
So so I love that.
I love the fact that it's not
strictly better.
Jonathan Hall (51:21):
There's a trade
off. Oh, no.
Shay Nehmad (51:23):
Yeah. There is a
trade off, but nearly, nearly,
nearly on every singlebenchmark, it's better. You
could go read the specificbenchmarks, but honestly, I
think it'll be good, justchoosing the right one choosing
the default one. And you can bythe way, you can disable the new
implementation. Like, if youactually have the need for the
old implementation, you candisable it by disabling the,
(51:44):
like, go experiment flag, whichI really liked as a as a feature
for a release.
Jonathan Hall (51:50):
And that closely
relates to the other, the the
general performanceimprovements. The the blog post
here says that, in general, CPUoverhead has been reduced by two
to 3% across many benchmarks,and this is a big part of it.
Can you That's cool.
Shay Nehmad (52:06):
Show me another
language that gets upgraded for
you, and you just get, like,very reliably on every single
release between single to to todouble digit performance
improvements just by upgradingthe toolchain and doing nothing
else. We had, profile guidedoptimization, right, that
improved everything. Then we hadincluding compile times. I think
(52:29):
two releases ago, we also had areally big performance
improvement on, I don't rememberwhat exactly, but but, I I
remember it was there. Thisrelease is the maps.
You just upgrade and you getbetter software, which is so
rare. Usually, most softwareupgrade gets worse. I love that
for us. Alright. What's yournext one?
Jonathan Hall (52:50):
Well, I wanna
hear from the audience what
their favorite features are. Sowhile while I'm talking here,
drop in the comp in the chatwhat your favorite features are,
and we'll we'll pick some ofthose to talk about too. So the
I think one that needs to bementioned is the new gold tool
command. That's one that I wasinitially very excited about
because it's such a pain in thebutt the way it works right now,
(53:13):
where you, you know, to to tolay out the problem for anybody
who's not familiar. If you havea a Go tool that you use, let's
say, to generate some code,like, maybe, SQL c or something
like that.
Or o,
Shay Nehmad (53:25):
o API Cogen. Just
throwing it out there. No no
relation or no money beinghanded to me under the table by
the chat members right now.
Jonathan Hall (53:33):
But anything like
that, that you use, typically in
a go generate, it's it's ahassle. It's a hassle. It's a
dependency, but it's not acompile dependency. Right? It's
a it's not part of the compiledoutput.
So the, you want to tag aversion. So you're always sure
that everybody on your team isusing the same version locally
and CI and bring builds. So youhave to create this typically
(53:53):
the typical solution is tocreate a file that isn't
actually compiled into your codesomewhere. So you create like a
tools directory with the toolsthat go in it and you put the
dependency there. That way, godot mod picks it up and and, and
everything, but it's notcompiled in anywhere.
But there's nothing in go dotmod that says this dependency is
a tool rather than somethingelse. The go, tool command is
(54:15):
supposed to solve that. Now sidenote, I just saw I'm not
familiar with this interface,but I just saw a little pop up
from Jamie trying to call in totalk about Go tool, and it went
away before I had a chance toaccept. If you wanna try that
again, Jamie, we'll give it ashot and see if we can have you
on here to talk about thatbecause you wrote a great blog
post about this topic. So I'dlove to have you on.
Let's try this. I don't know howthis works.
(54:37):
Nice.
Oh, hi, Jamie.
Shay Nehmad (54:39):
Hey, Jamie. I'm
listening.
Jamie Tanna (54:43):
Yeah. Like, as you
mentioned, I was also very
excited. I'm like, my blog postwas very excited about it. I am
still a bit disappointed. It'snot quite, as nice to work with.
In particular, I get it. But thereason you have to do Go tool
(55:03):
and then the module path toactually invoke a tool means
that you can't just say, like,go to all Lint. It's go to
github.com/ blah blah blah blahblah blah /command/ blah blah
blah. And it's, yeah, not quiteas handy as it could have been,
originally.
Shay Nehmad (55:21):
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, maybe10,000 people who will use this
feature in the next six months.And then for 01/25, we could,
(55:42):
like, introduce all theseimprovements based on the survey
feedback, etcetera.
This is a very UX kind of thing.It's not like the maps where
straight performanceimprovements, 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 runGo tool and then your tool like
(56:03):
Stringer or going like, is thatnot the case?
Jamie Tanna (56:06):
So you have to use
the full module input path,
which yeah. And so that's thething. Like, yes, in the future,
maybe they will add aliases andthat will drastically reduce
that. And then that little bitof, awkward developer experience
will go away. But at least rightnow, it's not.
(56:27):
So yeah.
Jonathan Hall (56:29):
I I feel like
it's a step in the right
direction, but it's a reallyawkward step. And and I haven't
yet decided if I'm gonna use itor not. I probably will, but
kind of reluctantly.
Shay Nehmad (56:39):
I think a really
good reason to use it that
Frederick well, I think. I saw acomment, from Frederick right
now on the chat that a reallygood reason to use it is because
it's gonna be in the, Go modfile. Dependabot could be, like
or any other supply chainsecurity stuff could they don't
(56:59):
they don't wouldn't have toparse, like, go build tags for
things, which I think no vendoroffers today. I would be very
surprised if, like, Snyk or anyof the companies I've worked at,
like, security companies, parsebuild the tags in source code to
find tools that you rely on.That's gonna be pretty difficult
because you don't have the fullmodule path there.
(57:20):
There, you just have, like,whatever local path it is for
whatever company you're workingon. Right? But now Dependabot or
or Sneak or Orca, ShiftLeft, orany of these, offerings could
just read the line and say, hey,this is deprecated. This has
been discovered as a supplychain attack. Remember last week
with BoltDBGo?
Like, if you use this as a tooland not a, compile that
(57:41):
dependency, now they could seeit.
Jamie Tanna (57:43):
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 atwhat it would mean to add
support to Go tool to RenovAte.And due to the implementation of
it, and the fact that it is justin your Go mod. But there is a
(58:08):
new tool directive, which subtlychanges things. So, like when
you are going to update thatdependency, so yeah.
Say for instance, you've gotOAPI Code Jam as one of your
dependencies. Not at allsponsored, but happy to hire
you. So that will come in as anindirect dependency in your go.
(58:31):
Mod. And then there will be atool directive, which also has a
dependency on that module.
So by default, lots of toolsdon't update indirect
dependencies by default. So theyneed to know that, okay, there
is a tool directive for thisthing. So now go and find any
modules that have that as aprefix, and then try and update
(58:53):
those.
Shay Nehmad (58:54):
So so it's not it
it it sounds like it's a lot
more built in than trying toparse build tags and just
basically guesstimating whattool you're trying to install.
Right?
Jamie Tanna (59:04):
But I think, so
previously, if you followed the
tools. Go pattern, you basicallydon't get any benefits with
this. It's kind of effectivelywhat happens. However, if, yes,
you were, doing, like, in yourmakefile, go install or, like,
curl to bash to install thingslike Golang CI Lint, you could
get support through things likeRenovate, and you could have
(59:26):
other tools that would managethings. But no, it wouldn't
detect it directly from, like, atools.go.
It would still try and find thethings in the codon mod.
Shay Nehmad (59:36):
Cool. Cool. Cool.
So some improvement yet, but
it's a first, stepping stone, Iguess. While we have, Jamie on
the phone, what do you thinkabout Amidzero?
I just saw you posted a blogpost about that as well. Yeah.
Although, I don't know howimpressive it is to find a blog
post of you about somethingbecause we're, like, celebrating
our hundredth episode. You're,like, at a 10 1,001 blog posts
(01:00:00):
at this point. Like, whathaven't you blogged about?
Jamie Tanna (01:00:04):
Well, and, someone
rightfully so took the Mac out
of me for posting another veryexcited post about 01/24. And, I
think I've kind of found thatposting something like this is a
great way of getting it upvotedin loads of places because
everyone's like, Ah, yeah, thissounds really good. But yeah,
zero is something I am very muchlooking forward to because,
(01:00:30):
there are cases where you havestructs with JSON, where you
want to have an optional field.But depending on what that type
actually is, the best way ofdoing that with the existing,
and the empty would be to add apointer to that thing. But
that's a little bit painful tothem work with, especially if
(01:00:51):
you've got nested things.
So one of the options that isnow available is use them at
zero, then the zero value ofthat type can get ignored. So
Shay Nehmad (01:01:03):
So it's not just
the zero value. It's also if
you're if you have a customstruct and you have a is zero
method, it will omit that basedon that as well, which I can
very easily see how it getsabused to, get, security,
information out of, like, markit as is zero if it has a key in
(01:01:25):
it so it doesn't get logged andthings like that.
Jonathan Hall (01:01:27):
Oh, yeah. It's
interesting.
Shay Nehmad (01:01:29):
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'mreferring you to Anton's live
release notes. So he has thethese, like, clickable release
notes. You could just go clickrun. You run the first example
and it prints, name Alice, birthdate zero zero zero one dash
(01:01:52):
zero one dash zero one, t zerozero, column zero zero, column
zero zero zed.
And you're like, oh, no. That'snot what I meant. That's Jesus's
birthday. Like, that's not thedate I meant. And then you run
the second example, which is goon '24, and it just prints the
name.
You're like, oh, nice. And itdoesn't involve any pointers or
any nonsense, like that.
Jamie Tanna (01:02:13):
I will say there is
a drawback of this that, someone
nicely actually replied to me onReddit about, which is, you need
to be careful when your zerovalue actually has value. So for
instance, like age may notnecessarily be something if age
(01:02:34):
is zero, you don't really caretoo much. But there probably
will be some fields that youactually have to be careful that
Shay Nehmad (01:02:41):
Wait. What do you
mean age zero makes a lot of
sense? If you if see if it's inyears, the first twelve months.
Right?
Jamie Tanna (01:02:48):
Yeah. It's the sort
of thing that there may be some
fields that you have to becareful about. And be like, oh,
no. Actually, I maybe shouldn'tuse the zero value because that
is a valid thing that we need torepresent.
Shay Nehmad (01:02:59):
Interesting. Cool.
I love how you had to, not omit
the someone replied nicely onReddit because that's not the
usual case. If you omitted it,it's omit zero. We assume
someone is being an asshole onReddit.
Jonathan Hall (01:03:11):
I just discovered
I can show comments on screen.
Oh.
Shay Nehmad (01:03:14):
Oh, cool. Cool.
Cool. Sweet. Sweet.
Thanks, Jamie.
Jonathan Hall (01:03:20):
Thanks for
calling in.
Shay Nehmad (01:03:21):
Yeah. If you figure
out how to do that as right on
Slack or somewhere, like, wherepeople can do that. I don't
think we have a lot of showleft. I have, like, fifteen
minutes. And we If somebody elsewants to call in
Jonathan Hall (01:03:31):
and talk about
their favorite feature, we'd
love to.
Shay Nehmad (01:03:34):
You you have, like,
a few minutes. One other
feature, which is totally,syntactic trigger
Jonathan Hall (01:03:41):
that
Shay Nehmad (01:03:41):
I really, really
liked, random text. You need to
get some random text.
Jonathan Hall (01:03:44):
I'm gonna use
that one pretty quickly too.
Shay Nehmad (01:03:45):
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 youget a cryptograph of kitty
random seed with a base 32alphabet, which contains at
least a 28 bits of randomness,which is enough to prevent brute
force today. Super it it it'sjust the most practical Go
(01:04:10):
boring feature that I couldimagine. Right? But, you know,
trying
Jonathan Hall (01:04:15):
to get random
text without that is is an
embarrassingly annoying pain inmy opinion. It's several steps,
and you have to look them upevery time. It's not obvious
because partly because thecrypto rand API is just so bare.
So I I really I reallyappreciate this.
Shay Nehmad (01:04:34):
Yes. And on that
note, there's a lot of new
crypto stuff, which we won't gointo in this party because the
people who already care aboutit, they already celebrated.
Right? Mhmm. We did have thePhipps episode, so we would
refer
Jonathan Hall (01:04:49):
you to listen to
our
Shay Nehmad (01:04:50):
inter our our whole
FIPS episode, federal
information security.
Jonathan Hall (01:04:54):
Frogs in pirate
suits, wasn't
Shay Nehmad (01:04:56):
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, thequantum computers won't be able
to decrypt it, which is veryrelevant for, like, your, health
(01:05:16):
records right now. Right?They'll you don't want someone
to be able to decrypt them intwenty years' time, so you
should build it safe for thefuture. So there are two,
there's a lot of new cryptothings. There's the new SHA hash
function, there's HMAC basedextract and expand key
derivation functions and otherthings.
(01:05:39):
These are just prettycomplicated topics to go over
quickly. Yeah. I think if ifyou're really into encryption
and this is relevant for yourwork, then you should definitely
read it. If you're just tryingto convince someone, like your
boss or whatever, that Go is isa good pick because it's secure,
you can just say, hey, the newrelease has FIPS flag and you
(01:06:01):
can just turn on then flag andboom, you get the certification,
which if you've ever worked in acompany that tries to sell to
federal government, you knowit's a huge deal. Huge, huge,
huge deal.
Any last, part of the releaseyou wanna celebrate?
Jonathan Hall (01:06:14):
Well, I I wanna
pull out a comment here from
Frederick. Let me see if I canshow it. Oh, sorry.
Shay Nehmad (01:06:18):
Go ahead.
Jonathan Hall (01:06:20):
It's another tool
related one. Go test now has a
dash JSON flag, which willoutput JSON formatted test
information. So not intended forhumans necessarily to parse, but
to integrate with tools likeNeovim or or other editors or CI
pipelines and stuff like that.So your, test output can be more
(01:06:42):
machine parsable. That's prettycool.
And they've been adding featureslike this to other, Go tool,
subcommands over the last fewreleases, I think. I think it's
a good a good trend towardsmaking our our tooling more
integratable.
Shay Nehmad (01:06:57):
It also prevents
you from having to write the
output of the test to somehorrible 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 theoutput of tests and tried to run
them all kind of different waysand with different parameters
(01:07:19):
and then see which ones fail andwhy and try to detect and things
like that.
I imagine this JSON output wouldhave made our lives a whole lot
easier messing around with likereally bad formats like JUnit
and things like that. Butanything you you allow machines
to do, they'll they'll likestart doing. Right? That's
pretty good. If you want detailson this JSON format because it's
not just for tests, it's for goinstall and go build as well,
(01:07:42):
you can just do go help buildJSON.
So I have to admit, like, typingin my terminal go space help
space something is somethingI've never done. Have you done
that before to look fordocumentation? The the Go blog
is just good enough. So let'swrap up. The Go one twenty four
introduced a lot of new featuresand I'm, for one, very excited
to see what people are gonnabuild with it.
(01:08:03):
We haven't mentioned weakpointers and finalizers and
directory scope file systemaccess. There's, like, a really,
really, big amount of featuresin this release, which are also
very diverse. I'm really happyfor the faster maps, which is
very important and developerexperience.
Jonathan Hall (01:08:19):
A clarification
from from Frederick, something
that that I missed. The JSONoutput itself has already been
there. They've added newinformation to that output is
the is the new change to onetwenty four. So this goes to
show that I don't output JSONfrom my, Go commands right off.
So I didn't even know it wasalready there.
Shay Nehmad (01:08:35):
So yeah. The the
the build failures one we talked
about it on the show, by theway. You should go listen to
that.
Jonathan Hall (01:08:43):
You know, I've we
talk about so many things on the
show, and some of them are areaccepted proposals. Some are
upcoming, maybe accept, some aredeclined. I honestly forget
which features exist now now andwhich ones might exist and which
ones will never exist. And I'veactually found myself trying to
use features in my coding thatthat have not yet been approved
or or approved that aren'timplemented yet. Maybe this show
(01:09:06):
makes me worse at Coding Go.
I'm not sure.
Shay Nehmad (01:09:08):
I would be
surprised. So a lot of, new
features. I think all in all agreat release. I don't know how
you compare this one to, like,previous years.
Jonathan Hall (01:09:16):
I I don't feel
like this is like a an Earth
shattering release. Like, therethere have been some that
introduced really, big changes.This doesn't feel like one of
those. I mean, certainly nothingcompared to the addition of
generics, but, it's a solidrelease. You know, there's,
there's several things that I Iam I'm looking forward to.
Shay Nehmad (01:09:33):
It's not divisive,
I think. Everybody loves this
release because it just improvesperformance and adds some
features, some of which are kindof, young yet, like tool
dependencies. Some of them arejust 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 Hall (01:09:53):
I think it's a
good show. Thanks, everybody,
for listening for the last twoyears. I know not everybody's
listening that long, but,hopefully, we'll see you here
again in in two more years forepisode 200. We'll we'll see.
Shay Nehmad (01:10:05):
Well, if we're
doing dailies, it should be,
like, just a few months.
Jonathan Hall (01:10:08):
Yeah. Right.
Well, maybe we'll
Shay Nehmad (01:10:10):
discuss that
offline. Right? Or not. Thanks a
lot, everyone. Nice celebration.
Program exited. Goodbye. Programexited. Goodbye.