All Episodes

July 12, 2025 β€’ 35 mins
Mark as Played
Transcript

Episode Transcript

Available transcripts are automatically generated. Complete accuracy is not guaranteed.
Speaker 1 (00:00):
This show is supported by you, our listener.

(00:01):
Stick around to live for thenews to hear more about that.
This is Cup A Go for July 11 or12/2025. Keep up to date with
your

Speaker 2 (00:19):
flat circle.

Speaker 1 (00:43):
This is Cup of Go for 07/12/2025. Keep up to date with
the important happenings in theGo community in about fifteen
minutes per week. I'm JonathanHall.

Speaker 2 (00:51):
And I'm gonna make you an offer you can't refuse on
the show Cup of Go.

Speaker 1 (00:56):
What did you do with my cohost?

Speaker 2 (00:57):
You went sleeping together with all the YAML
proposals. Don't worry about it.So anyway, this week, I wanna
tell you about the linter.You're killing me, Ma. You're
killing me with all the linter.
We've decided that my mobsterimpression is better than
Jonathan's.

Speaker 1 (01:16):
Yeah. Is not same words.

Speaker 2 (01:19):
In two weeks, he'll do the show as a as a mobster,
we'll see how it goes. We'llsee. Doing, Jonathan?

Speaker 1 (01:25):
I am alright. Getting ready to go on vacation.

Speaker 2 (01:28):
We have a lot of, topics to cover. We sure do.
Again, our back news backlog isbecoming longer than our news
this week column, which isalways a bad sign.

Speaker 1 (01:39):
It it feels like the Go team is back in proposal zone
and kicking out new interestingproposals, so we have things to
talk about in that regard. Wehave new releases to talk about.

Speaker 2 (01:49):
Yeah. We have some conferences to mention, but
let's start with the newsecurity release. So there's one
point twenty four point five andone point twenty three point
eleven, like a minor pointrelease, which is fixing
unexpected command execution inuntrusted, like repos. So some

(02:11):
usage of the Go tool chain maycause, you know, unexpected
commands. Like, it's justbecause how Go tries to figure
out which version control systemis being used.
So you embed the buildinformation. So if you're using,
Mercurial or Git, you know, likeif you have multiple

(02:32):
configurations, it might lead tounexpected behaviors and even
unexpected commands. It's apretty cool, like, little
vulnerability. It's just thatour last show was super focused
on vulnerabilities. So I'll justsay you should probably upgrade.

Speaker 1 (02:49):
But to be clear, if I understand this, this really is
very niche. Like, it onlyhappens if you have, say, a Git
repository with a .hg directoryor a Mercurial repository with a
.git directory or something likethat, right?

Speaker 2 (03:03):
Yes. But I think it's the sort of thing that people
could very easily try tointroduce into an open source
library that people clone andyou wouldn't notice. I think
that's the vector

Speaker 1 (03:15):
people Certainly, are it could happen if you've
migrated from one VCS to anotherand forgot to clean up the old
metadata or something like that.Yeah. Yeah. So it's a niche
case. It shouldn't affect mostpeople.
But like like you said, somebodycould intentionally try to
introduce one of thesedirectories. So, yeah, upgrade.

Speaker 2 (03:32):
I just wanna shout out Ryutak, the 21 year old
security researcher with thebeautiful pink, like, you know,
rainbow colored pastel site andthe cute emoji, you know, with a
ton of, hits on HackerOne and ablog and whatever, like the most
hardcore, you know, securityresearch together with the most

(03:55):
like anime, Kawaii, the sort ofsite that's literally written in
Comic Sans or something. I lovethat. I love the security
community sometimes. So anyway,now the tool chain will not do
that anymore. So it's an easyupgrade.
It doesn't it literally will notimpact your program. So it's a
no brainer to upgrade this timebecause it has zero risk for,

(04:17):
you know, changing, like, howyour program behaves or anything
because it's actually in thetool chain, not the program. So
go upgrade.

Speaker 1 (04:23):
And related to that, 1.25 RC two has been released
with the same security fix, andI don't see it mentioned that
any other changes have been madesince RC one, likely have been a
few others. So if you're testingthe latest one twenty five RC,
just update the version two, RCtwo, and start running your CI
pipelines on that one.

Speaker 2 (04:44):
RC two is normally the last one or is there like,
are we expecting more?

Speaker 1 (04:48):
I don't know if we could say should say we're
expecting more, but I think thewhole idea of an RC is that they
expect that to be the last oneor at least potentially could be
the last one if they don't findany issues. So, yeah, within
about two or three weeks, we'llknow because the final version
or whatever it is, whichever theRC is at that moment will be
tagged as the final one andreleased. It has been a while

(05:10):
since we've talked aboutconferences. I just hopped over
to the Go Wiki somebody'supdated a bunch of conferences
there. So we're gonna talk aboutthe the next upcoming one, South
Africa, GopherCon South Africa.
This is the first GopherConSouth Africa. It is also online.
So even if you're not physicallyin South Africa, you can still
attend virtually August. Got alist of speakers up on the

(05:33):
website, including Dave Cheneyand Alex Rios and a number of
others. Great gophers gonna beteaching us all about Go.
So check out GopherCon SouthAfrica, August. And on the next
episode, we'll talk about someother upcoming conferences
further in the future.

Speaker 2 (05:48):
And if you have like more conferences or meetups
you're setting up, let us knowon the channel. We've actually
had an interesting discussionabout how people come, like
learn about the show and how dothey get to us because we don't
like do advertising or anythinglike that. Right, Jonathan? And
one of the people on the channelwas like, oh, I heard about it
in some conference. So it's justfair for us to, like, if you're

(06:10):
arranging your first meetup orin your local whatever
community, just let us know andwe'll try to push it.

Speaker 1 (06:20):
Yeah, absolutely.

Speaker 2 (06:22):
And I think we I think we do have, you know,
that's a whole differentdiscussion, probably enough for
for the show, but it wasinteresting to learn how people,
like, funnel into our showbecause I'm still amazed we have
so many, like, subscribers andpeople that actually listen to
this.

Speaker 1 (06:35):
We're up to five eighty on the channel now, it's
pretty amazing.

Speaker 2 (06:38):
Goddamn. One thing that happened yesterday, I was
working with one of the parentsfrom my kid's kindergarten.
She's like a brand marketingperson and she's Chinese and
she's like working withadvertising marketing in China.
So I checked our analytics and Ithink like it's unrepresentative

(06:58):
how few listeners we have inChina versus how many people
there are in China. I think weshould have more Chinese
listeners.
So maybe we'll just like utilizeher to

Speaker 1 (07:09):
get more people in China.

Speaker 2 (07:12):
All that is a long winded way to say we're gonna do
a whole conference roundup likein two weeks. So if you have a
conference you want us tomention, just let us know
because we're mostly relying onsocial media channels and the
GoWiki to find these. But thatusually misses like the smaller
ones, the local ones, which areusually the best honestly.

Speaker 1 (07:31):
Yep. Cool.

Speaker 2 (07:32):
There's one blog post that I'm afraid of talking
about. Uh-oh. Well, let's justpreface it by saying I'm pretty
dumb. Is that a fair estimation?

Speaker 1 (07:42):
Don't think you're dumb.

Speaker 2 (07:44):
Well, I'm not smart enough to be working on code
that requires genericinterfaces, but that's what this
blog post is about and it's verySo we're gonna mention it.
Honestly, I think, know, kiddingaside, there are some people who
who and I have had that happento me in my career, that you get
into some point where you writelike a really generic or or

(08:05):
really core piece offunctionality or like a library
or a template that's like superrelevant to a ton of people. You
know what I mean? Where you'rebuilding like the first template
or the cornerstone of like a bigsystem. You know what I'm
talking about?
That feeling? But that's notmost of my day to day. Like most
of my day to day is not veryabstract. It's very concrete.

(08:25):
Like I wanna do a businessthing.
I wanna connect this API to thisthing and run it through that,
transformations veryspecifically without anything
very generic. And most of the,like, abstract, the generic
stuff is handled by librariesfor me, which is why I had a
hard time understanding what theGeneric Interfaces blog post was
all about. Because honestly, Ibarely even use generics in Go.

(08:48):
So, like, you can do more thingswith it. And I'm like, really?
Cool. But I read it and I thinkit's interesting. And, you know,
even if you don't even if you'relike me and Jonathan, you said
you're like this as well, right?Most of the code you write ends
up just being concrete?

Speaker 1 (09:06):
Mostly. Yeah.

Speaker 2 (09:07):
So you're not, like, grabbing, generics on a daily
basis or even a weekly basis?

Speaker 1 (09:13):
Use generics sparingly, you know, usually for
little utility functions, thekind of things that would that
might exist in the slicespackage or the maps package, but
just don't for various reasons,legitimate or otherwise. You
know, I want to convert, a sliceof ints to or a slice of this to
a slice of that or somethinglike that. You know, I have a
lot of little utility functionsthat use generics. I try to

(09:36):
limit my generics in most othercases.

Speaker 2 (09:39):
It's funny that you say you should you're trying to
limit your generics becauseactually, this is what this blog
post is all about. Yeah. Becausebecause an interface in Go is a
type, it can have typeparameters. Meaning, you can
have an interface, that isgeneric. Right?
So you could say type and theexample I've managed to come up
with that is concrete enoughlike a tree because whatever. I

(10:04):
I will never implement a tree,right? So what's the point? You
want to define an interface andyou want it to have a function
that returns a thing, and thatthing could be of like any type,
right? So you define yourinterface, and then the
interesting part is that you canuse, that interface in another

(10:24):
interface, pass the generic intoit.

Speaker 1 (10:27):
Yo, dog, I heard you like interfaces, so I gave you
generic interfaces, so could useinterfaces in your interfaces.

Speaker 2 (10:31):
Yeah, I lost you. I lost you. So here's an example.
Let's say I'm implementing abackend, right?

Speaker 1 (10:37):
I'm implementing a backend.

Speaker 2 (10:39):
Like a normal CRUD repo pattern. Yeah. I want to
define a repository, right? ButI'm like, all of my things, you
know, like my user and my postand my product and my order,
they're all just CRUD. I cancreate, get, delete them.
So I don't need, like, the youknow what I mean? I don't need
to implement the repositoryinterface differently for user

(11:01):
and post and product and order.Right? I could just define it as
a generic interface that getsany. But that's not a 100%
correct because I do have someconstraints on it.
Like the ID needs to be anidentifiable and it needs to
implement get ID, and it needsto be comparable, right, because
I'm I'm getting it, etcetera,etcetera. So what you could do
is you can define an interfacecalled identifiable, which

(11:24):
returns an ID. And then defineanother interface called
repository, which has an ID thatis comparable, which is a thing
you can say about the typeinterface, about a generic type
in Go. You could say, okay, thisis not just any type, this type
has to be comparable. So youconstrain it, and then you say,
oh, and the item is anidentifiable item that gets the

(11:50):
ID.
So you have a generic interfacethat is self referential. The
use of it is basically you getcompile time safety. Like if
your type doesn't implement getID, it fails during build and
zero boilerplate. Like thehandler, you'll implement it
once and then reuse it. And alsothere's no overhead of like
interface boxing, like overheadwith function pointers.

(12:13):
And, you know, I think somepeople would say this is like
very readable. To me, it screamsthe C plus plus templating, oh
my God, I can't read this, I'mafraid, I don't understand. But
honestly, after looking at it atit like two or three times, it
does make a lot of sense. Andagain, it gives you the compile

(12:34):
time safety, so that's great.I'll jump to the end of the blog
post because there's a few morefeatures here to look at and how
to implement it and what do youdo if you don't constrain it and
point to receivers, blah, blah,Like, if you want to express
constraints on receivers selfreferentially, can use generic
interfaces, but the blog postends with, do not overengineer

(12:55):
things.
A less flexible, but simpler andmore readable solution may
ultimately be the wiser choice.And like, oh my God, that is so
right. Like, would much ratherjust implement the CRUD three
times or like 16 times than haveto deal with this generic stuff.
Unless it's a hard requirement,like, because you're

(13:18):
implementing a library, right,and you literally don't know
what will go on, I don't like, Iwouldn't use it. I I can't see
myself reaching for it unlessabsolutely required functionally
just because it's so hard toread.
I don't know if I'm like, I'm inthe minority here. Like, would
you reach for generics if itreduces three concrete
implementations into onehandler?

Speaker 1 (13:38):
I might. It depends on how complicated that is.

Speaker 2 (13:42):
Depends on your mood?

Speaker 1 (13:44):
Perhaps. Mostly depends, I think, on, yeah, on
on the trade offs. I mean, threeis kind of borderline. If it was
12, very likely I would switch.Yeah.
The blog

Speaker 2 (13:55):
post has, many more details, and it's really well
written and has code examplesand everything. So if you're
interested, I suggest you goread it and don't just trust my
understanding of it. Blog postby Axel Wagner. So thanks a lot,
Axel. And you said that the Goteam is back in proposal land.

Speaker 1 (14:11):
Yes. They have come up with a bunch of new proposals
and two in particular I wannatalk about. Let's save those
until after a short break. As Isaid at the top of the show, the
show is supported by you, ourlistener. Thank you to all of
our Patreons who contributefinancially to supporting the

(14:33):
show.
Your contribution helps pay forhosting and mostly for editing
of the show. We do have aprofessional editor who does a
great job of making us sound alot smarter than we really are.

Speaker 2 (14:43):
As you heard at the top of the show, he is very
required.

Speaker 1 (14:48):
But you can also support the show just by sharing
it with friends, withcolleagues, with worker
coworkers and co students. AsShai mentioned earlier in the
show, we just had a thread thislast week about how people found
the show at conferences and abunch of people are joining the
channel. I think we had three orfour joined just recently. So
yeah, if you're new to the show,share share it with a friend. If

(15:08):
you're if you've been a longtime listener, share it with a
new friend.
We love the word-of-mouthbecause we don't pay to
advertise.

Speaker 2 (15:13):
We love the word-of-mouth because, it's
great and not because it's free.Just like to to clarify that
last sentence.

Speaker 1 (15:21):
I mean, we would pay you for word-of-mouth if we
could do it without biasing yourword-of-mouth and and if we had
money.

Speaker 2 (15:26):
You know what? Honestly, if someone shits on
the show, I still prefer I stillprefer it to to them not not
telling anything. Like, thesetwo bozos, they're talking about
generic interfaces and theydon't know anything about it at
all.

Speaker 1 (15:39):
Somebody's probably saying that under their breath.
I hope they tell us.

Speaker 2 (15:43):
You know what? It's probably the same, like, 3%
that, use Go and respond to theGo survey and they're like, I'm
unhappy with Go. It's the samelike devout listeners of the
show that think we're bozos.

Speaker 1 (15:54):
I don't know. Honestly, I don't think I would
listen to the show. I think Iwould think our chatter is
silly, but I don't listen tosame sorts of podcasts I
participate in. So I know I'mprobably a weird person like
that.

Speaker 2 (16:05):
What do you mean it's a silly? No, I'm just kidding.
So, yeah, support us on Patreon.That's the most direct way to
support the show. And if youwant to spread the word, then
word-of-mouth is the best way,but also leaving a review on
Spotify, Apple Podcasts, or justwherever you listen to your
podcasts might help somealgorithms and AI, whatever,

(16:27):
pick us up and get to peoplelike that way through their
feeds and not necessarily fromone another.

Speaker 1 (16:33):
The other way to spread the word is to go buy a
bunch of our swag. So you'recarrying a gopher, a brewster or
a cup of coffee mug aroundeverywhere at work or wearing
the t shirt or the hoodie. Everytime you go out, the people are
gonna be asking you, who's thatcute gopher on your shirt? And
you can tell them all about thepodcast.

Speaker 2 (16:50):
Yes. And you can find the store at cupago.dev. It's
actually store.cupago.dev, but,like, whatever. All the links
are in cupago.dev, includinglinks to our Slack channel we've
mentioned, hashtag cupago in thegopher, Slack, the gopher
workspace. And finally, you canemail us at news@cupago.dev.
That is news@cupago.dev.

Speaker 1 (17:10):
Send me email, please. I'm tired of all the
spam I get about, oh my gosh,you only have a 115 episodes? Or
you only have three listeners onYouTube or whatever stupid spam
crap I get. I want some realemail from at the mail address,
so please

Speaker 2 (17:23):
The email spam is certainly kicking up lately.
Definitely. I keep gettingthese, like, AI generated emails
like, oh, you're hiring for yourcompany. Do you need help
recruiting? Blah blah blah blahblah.
I'm so excited by your missionof yeah. Yeah. Whatever. Quick
programming note, next week,it's summer, summer vibes, baby.
Next week, both of us aretraveling and we decided not to

(17:47):
try to shove an episode into asuper busy week schedule.
So we're taking a week off.

Speaker 1 (17:53):
Yes. A week off. I'll be busy fishing in Branson. If
you happen to be in Branson andwanna hit me up for a a pint or
a coffee, let me know. Butotherwise, I'm planning just to
be sitting on the docks fishingand swimming and whatever else
in Bransonville.

Speaker 2 (18:06):
I'll be camping in Lassen Volcanic National Park. I
got my America The BeautifulNational Park pass, and I'm
itching to use it.

Speaker 1 (18:13):
Awesome.

Speaker 2 (18:14):
So no episode next week. Just take a week off. Go
team. Just, like, go work onRust or something. Like, give us
a week to catch

Speaker 1 (18:21):
up. To hold you over until then, we do have a little
bit more news for you, so let'sget to it.

Speaker 2 (18:27):
Yeah. But if you if you really need your fix, just,
pause the episode now and startit again next week.

Speaker 1 (18:32):
So the first proposal I want to talk about is a
proposal for the LogSlogpackage, which we all know and
love. This is to add multiplehandler support for the logger.
So if you've used this package,you probably know that you get
to pass in a single loggerlogger handler that is. And if

(18:56):
you want to do more than one,you have to use a third party
package. There are one or twopopular ones out there.
The one I usually use is fromSamber, github.com/samber
samber/slog-multi. The big openquestion on the proposal is why
not just use the third partypackage? Why does should this be
part of the standard library?There's

Speaker 2 (19:16):
Why a X list and STD Lib is a thing that the Go team
loves to reference when peoplesuggest stuff. I remember it
from when they burned my YAMLproposal, which is like, you
need a good reason to put stuffin the standard library because
it basically means that the Goteam will have to maintain that
piece of code forever. So it's alegitimate question. Why

Speaker 1 (19:34):
do we

Speaker 2 (19:35):
need this if there is a third party library?

Speaker 1 (19:37):
And there are some back and forth here. Most of the
emoji voting seems to be infavor of adding it to the
standard library. Not thatthat's gonna sway the team. My
personal opinion, and I may addthis as a comment on here, my
personal opinion is I think thisshould be part of the center
library because I want rocksolid code I can trust doing
this for me. And I have writtenenough handlers, like three or

(20:00):
four.
I know it's a real pain in therear end to get it right. And I
don't even know if I got itright. I don't know if this
third party got it right becausethere's, like, memory
utilization concerns. There'syou know, you wanna make sure
things are called in the rightorder. Writing a handler for
SLOG is not an easy task to ifyou wanna make sure that it's

(20:20):
memory efficient, and so on.
So I would love for this to bepart of the standard library
just so that I don't have toworry about whether or not this
third party I chose is solidcode or has security
vulnerabilities. And I certainlydon't want to write it myself
for every application because Ineed this in virtually every
application I use.

Speaker 2 (20:40):
Wait. Those are my have multi handler in every
project you why are you writingto the console and to a file or
something?

Speaker 1 (20:46):
I almost always log to my regular log, and then I
almost always log to Sentry IOalso for errors.

Speaker 2 (20:52):
Sentry is good.

Speaker 1 (20:53):
Sometimes to third or fourth party logs, sometimes to
the console and to, you know, athird party logging application
or something. And further onthat topic, Sentry just released
a couple weeks ago a new versionof their Go SDK that includes a
logger handler in it. So there'seven less I I I'd written my own
Sentry log handler before. Iintend to retire that now and

(21:14):
use theirs. But, yeah, I usethis in virtually every
application I use.
I I use the very package hementions, but it makes me
nervous every time I do itbecause I have, you know, I have
less trust for some random thirdparty library than I do the
standard library.

Speaker 2 (21:28):
And here's a question. If you have a multi
logger, is it happening, like,one at a time?

Speaker 1 (21:38):
That's a good question. And that's one of the
questions I don't know about Orthe one

Speaker 2 (21:41):
of them fails, like Yeah. When you have one handler,
you don't have to worry aboutall this stuff, but I would
like, if you it's very unclearhow it would happen. I mean, I
guess I guess the best solutionis for the normal,
implementation to be thesimplest. And then if you do
want it to be concurrent, youyou use a a third party library.

(22:04):
Right?
Or something like that.

Speaker 1 (22:05):
I think I would probably handle them by default.
I would handle them in parallel,probably.

Speaker 2 (22:09):
In parallel by default?

Speaker 1 (22:11):
No, no, no, no. In series? In would

Speaker 2 (22:14):
be One in at a

Speaker 1 (22:15):
time. Yeah. Because I would already expect my logger
to be as lightweight aspossible. And if it's going to
be blocking, I would expect itto do that in the background
already. If it's going to takeit five hundred milliseconds to
send something over the networkor something, I don't want it
blocking my application to dothat if possible.
I'd hope it would have a bufferin place and, you know, build up
a buffer and flush it every nowand then, which most loggers do
anyway, the fancy ones.

Speaker 2 (22:37):
That's super interesting. I also use a multi
logger, mostly for development,actually. Like in production, I
have Sentry instrumentinstrument my thing normally,
but in production, I have superverbose logs written to my
console while I'm working,right? Because that's the entire
point of debug logs, like whenI'm running But I'll also
writing the real logs, like infolevel and up to a file in JSON

(23:00):
format. I make sure like all mylogging is actually correct.
So I have a JSON file, like arotating five megabyte file
locally to make sure that theoutput is as I would expect to
see it, like in whatever isconsuming my logs.
Unfortunately, it's a bad, like,cloud log service right now. I
will not name them. It's supershitty.

Speaker 1 (23:20):
So it's not Spark, Spark Logs?

Speaker 2 (23:23):
No. It's not. It's not Spark Logs.

Speaker 1 (23:25):
That would solve all your problems, of course.

Speaker 2 (23:28):
No. No. It's a big one. And, yeah, like, having
that multi logger in thestandard library would would
make that again, like like a lotof things, it would make it
easier, but if they were toreject it, I would be like, Ah,
you know how it is, go team,they wanna keep the
implementation stable. I wouldaccept it either way.
But scrolling through theproposal here, it seems like

(23:48):
it's, like, active, it seemslike it's going, you know, seems
like it's going, trendingtowards positive. Yeah. If you
have a specific use case, prettysmart to jump on the thread here
and and put it in. Right? Andfinally, like, Filippo Valsorta,
which we hosted on the show.

(24:10):
Right?

Speaker 1 (24:10):
Yeah. Been a little while, but, yeah, thanks for
coming on, Filippo.

Speaker 3 (24:14):
So I'm Filippo Valsorta. I've been maintaining
the Go Cryptography StandardLibrary since 02/2018. I've done
that first at Google as the leadof the Go security team, and
these days, I'm doing it as aindependent open source
maintainer.

Speaker 2 (24:29):
So, anyway, he commented here with, like, his
multi handler implementationthat he wrote. And he says like,
I copied this to do threedifferent projects, which are
all the projects that haveadopted S Log, so please give me
this in the standard library.

Speaker 1 (24:45):
Yeah. And I think that's a great example. Like,
it's not a lot of code. It'swhat, two dozen lines maybe,
maybe three dozen at most. Soit's not like we're asking the
standard library or the Go teamto take on a huge burden, but I
would just rest easier knowingthat this has been handled in
the best way.

Speaker 2 (25:01):
Honestly, standard library contributions have a
Goldilocks problem, where ifit's too small, if it's like a
three three lines of code,they'll be like, just copy it,
right? It's better thandependencies. And if it's too
big of a change, like IntroduceYama, they're like, it shouldn't
be in the standard library. Soit's a Goldilocks problem where
it has to be a feature that'slike, you know, just right.

(25:24):
Anyway, that's a cool proposal.
I I like it. Interesting.

Speaker 1 (25:28):
Next up, here's a proposal from an obscure gopher
named Rob Piquet. Oh, no. Pike.Rob Pike. I actually

Speaker 2 (25:36):
Like the blanket type. You know that blanket that
has squares on it, Pike blanket?Then you go to sleep on it and
you wake up. You, like, fallasleep on the couch. You wake
up.
Your whole face looks like awaffle.

Speaker 1 (25:49):
Wow. Yeah. So I love this proposal. I hope it makes
it in. This proposal wasproposed in 2021.
It's been sitting around awhile, but it just moved into
the active column for themeetings notes. So that means
the Go team is actually lookingat it to decide if they want to
implement it. What's theproposal? Add an expression to
create pointers to simple types.Here's the pre this is the the

(26:11):
whole proposal is worth reading.
It's it's fairly long anddetailed. He actually he's
actually proposing two specificthings. He's proposing we do
both of them. Let me read thepreamble though. As you probably
know, it's easy to create apointer to a struct.
You do ampersand, struct name,and then your little curly
braces or whatever the contentsof the struct is, right? And the

(26:33):
result is a pointer to thestruct. It's interestingly and
perhaps ironically verydifficult to get a pointer to a
simple type like an integer. Youcan't do ampersand three or
ampersand int paren three atall. Now ampersand three is
problematic because we don'tknow the type, but even if you
put the int in there, it's stillnot possible to do that.
So he's proposing it would makethat possible. And he gives two

(26:55):
different ways that would bothkind of independently solve the
same problem, but you could alsosort of and he's proposing we do
both with the with the withunderstanding that maybe during
discussion we decide that one orone of them is better than the
other and we should only do oneor not the other or whatever.
However, all of that said, myfavorite comment in the whole
proposal is part of thetemplate. The template asks this

(27:16):
question, would you consideryourself a novice, intermediate,
or experienced Go programmer?And Mr.
Rob Pike replies, I have someexperience. I've heard of it.
For those of you listening whodon't know who Rob Pike is, he
is one of the co creators of Go.So yes, he does have some
experience. There's literallyonly one or two other people on
the planet who could possiblyhave more experience than him or

(27:37):
more likely tied for the amountof experience that he has.
So anyway, I would love thisproposal to be accepted in
either form or both forms. I'mnot going to go to the details
of those because it's fairlydetailed, but just read the
proposal. The TLDR, it would bepossible to do ampersand int
curly brace three close curlybrace and get a direct pointer
to an integer or a string or aboolean or any other basic type.

(28:00):
If either of these co proposalsare accepted, I really hope that
makes it into Go 1.26. Thatwould make that my favorite Go
version for a while.

Speaker 2 (28:09):
Actually filling the template here is like, yeah, the
question about experience ispretty funny, but I just read
through the entire, his likeanswers of the template and it
definitely feels like, you know,you remember that scene in
Hitchhiker's Galaxy where heneeds to fill out the form? He's
in the Vogon's ship and he needsto fill out the form. And

(28:32):
there's like this lady at thecount the alien lady at the
counter is like, oh, you have toget the blue for have a vague,
like, they're standing in linelike, oh, I'm an Englishman,
that was made for queuing. Likethis very cynical it's like,
what other languages do you haveexperience with? And it's like
Fortran, C, Fourth, Basic, C, Cplus plus Java, Python, and

(28:52):
probably more, just notJavaScript.
Is this change backwardcompatible? Yes, don't worry.
That's like a good Yeah. Wow.Good good answers.
How would the language specchange? Answer it above. Why is
this question here twice? Howwould we measure it? Eyeballing.

(29:13):
It's just like the dead ban,responses are pretty great.

Speaker 1 (29:16):
I don't know, that makes me feel a little bit
better about when I fill out oneof these forms and I feel like
the questions are kind ofridiculous or don't apply.
Apparently, I'm not the only oneand I didn't even create the
language.

Speaker 2 (29:28):
Yeah. Yeah. I mean, I just had to fill out all the
visa forms just a few months agoand that was the craziest form
I've ever had to fill. You likehave to fill out countries. My
wife is from Ukraine and theywon't accept like Ukraine.
You have to fill out, okay, shewas part of the Soviet Union
from this year to this year andthen the Soviet Union crashed,
so she changed. Like, do youhave any documents like to prove

(29:51):
that that happened? Like toprove that the Soviet Union like
crashed? I gotta have thepapers. Back to the content of
the proposals though, not justthe forum.
Although Rob, it's pretty funny.Good work. Why would I need the
pointer to a const, like simpletype?

Speaker 1 (30:07):
Don't you ever need that? I need it all the freaking
time.

Speaker 2 (30:10):
Just to, like, pass the number three into a function
and things like that?

Speaker 1 (30:14):
Oh, or a pointer to three or a pointer to

Speaker 2 (30:17):
the Yeah. Mean, to pass a pointer to the number
three to a function.

Speaker 1 (30:20):
Yeah. I mean yeah.

Speaker 2 (30:23):
No. But I mean, like, you can you can do it. Right?
You put it in a variable andthen you

Speaker 1 (30:27):
put a reference to variable. It's two steps. Yeah.

Speaker 2 (30:30):
I mean, yeah. It's two steps, but it's not like you
have the variable and then youhave the pointer. It's not like
two steps to get one thing. Youknow what I mean?

Speaker 1 (30:39):
What? Yeah. It's two steps to get one thing.

Speaker 2 (30:42):
I mean, you use the pointer, but you create a value
and then you

Speaker 1 (30:45):
And then you point

Speaker 2 (30:46):
to point to the value. I mean, it's

Speaker 1 (30:47):
you okay. Don't have to do that for composite types
like like structs.

Speaker 2 (30:51):
Yes. That's true. But I just don't feel like I'm I'm
not saying this is a badproposal. I just feel like this
is such a non problem in thesense that, yeah, it's like an
it's a small thing that's notthe most elegant.

Speaker 1 (31:04):
Don't know.

Speaker 2 (31:04):
It's like friend of a friend. Like, I I feel like,
okay, if we're looking at uglythings in the language that
people try to use and arecomplicated, why not fix like
the time format or the thingsthat people actually complain
about?

Speaker 1 (31:16):
People complain about this all the time, man. I
complain about all the time. I II have

Speaker 2 (31:21):
about Go every week for a few for, like, two and a
half years, and I've never heardyou mention it.

Speaker 1 (31:26):
But Go

Speaker 2 (31:26):
listen to the entire archive right now.

Speaker 1 (31:28):
I have I'm sure I've mentioned it before. I've
mentioned it in my 10 things Ihate about Go video. I know
that.

Speaker 2 (31:34):
Oh, maybe you leave all that energy to the to the
the the, like, videos andLinkedIn comments, and then I
only get the positive, Jonathan.Maybe so. Cool. Cool. Cool.
So is this, like, happening? Isthis, like what what's the
state?

Speaker 1 (31:48):
It's it's the status is added to minutes. So that
means it's recently come totheir to the top of their stack
of of things to consider. Iimagine over the next few weeks,
we'll start to see more commentsabout this, hopefully from our
listeners who either agree withme or agree with you that it's
either really important thing toadd or it's not important at

(32:08):
all. But, yeah, go leave acomment on the proposal. And
then, yeah, I don't know.
Within a few weeks, we mightstart to see whether it's likely
accept or likely decline.

Speaker 2 (32:19):
Yeah. I'm not I'm not against it. I was just saying
it's not hugely important.

Speaker 1 (32:24):
I think that's it for the news. I have one lightning
round item, so let's play thatmusic.

Speaker 2 (32:32):
Lightning round.

Speaker 1 (32:33):
Alright. On the lightning round, I think it was
two episodes ago when Jeremy washere. He mentioned Fang from
Charmbracelet, the new tool tomake COBRA applications more
colorful and exciting andeverything. And I mentioned in
the commentary of that episodethat I think it's cool, but I
wish it would work for other CLIlibraries as well because I feel
like COBRA is kind of nonidiomatic in some ways. Without

(32:55):
trying to disparage the author,he just wrote this long before
Go's idioms had beenestablished.
A simple example would becontext handling. COBRA existed
before the context package did,so obviously it didn't support
context handling. And that'sbeen sort of bolted on, but in a
slightly awkward way forbackward compatibility reasons.
So the question came up in ourSlack channel, if I don't like

(33:15):
Cobra, what do I like instead?And so I want to call out the
library urfavecli, U R F A V E.
It's on GitHub, of course.Github.com/irfave/cli. They have
a version three, which came outa few months ago, I think, and
has is an improvement over the vtwo API. I haven't used this

(33:37):
enough to say positively that Ithink it's better in all ways
than than Cobra, but it is moremodern. So that's one to check
out.
If you're also a little bitfrustrated with how Cobra works,
maybe you'll check out Perfazeslash CLI.

Speaker 2 (33:51):
Is that the sort of thing where you're still, let's
use a library for it and notjust a standard lib if you need
to implement the CLI?

Speaker 1 (33:59):
Yeah. So maybe it's worth talking a little bit about
what these libraries do. Theybecause I feel like there was
some confusion about that on thechannel as well. They they kind
of it's kind of like a webframework for CLIs. So it it
ties in flag manipulation,reading configuration variables
from a file, and then executingcommands and subcommands.

(34:20):
And so, like, if you have acommand, I don't know, like,
Kubernetes or something and youtype kubectl space and then, I
don't know, apply or whatever

Speaker 2 (34:30):
you huddle? Yeah. Stop. It's cube cube c t l.

Speaker 1 (34:34):
Yeah. It's cube cuddle.

Speaker 2 (34:35):
Oh my god. I'm learning a lot about you this
episode, John.

Speaker 1 (34:44):
So anyway, the point is, like, each subcommand can
have its own help section andall that stuff, right, to
arbitrary levels and then andthey could each subcommand can
have its own flags. So it ithelps to orchestrate all this
stuff together. So it's morethan simply just parsing
mainline arguments in yourpreferred way or whatever, which
some of the discussion on thechannel was about. It certainly

(35:05):
relates to that, but it's much,much more than that as well. So
if you're looking for a fullfledged CLI library, this is one
to consider.
If you just want a really simpleCLI with flags, just use your
own flags and you don't need alibrary for this. I think that
wraps it up.

Speaker 2 (35:20):
That's a show.

Speaker 1 (35:21):
I'm going fishing.

Speaker 2 (35:22):
We're going fishing or we're going camping. So no
show next week. Enjoy your breakfrom us, and program exited.

Speaker 1 (35:36):
Program exited. Goodbye.
Advertise With Us

Popular Podcasts

Stuff You Should Know
The Joe Rogan Experience

The Joe Rogan Experience

The official podcast of comedian Joe Rogan.

Dateline NBC

Dateline NBC

Current and classic episodes, featuring compelling true-crime mysteries, powerful documentaries and in-depth investigations. Special Summer Offer: Exclusively on Apple Podcasts, try our Dateline Premium subscription completely free for one month! With Dateline Premium, you get every episode ad-free plus exclusive bonus content.

Music, radio and podcasts, all free. Listen online or download the iHeart App.

Connect

Β© 2025 iHeartMedia, Inc.