text stringlengths 0 1.49k |
|---|
Also, it helps when you're collaborating. When someone new comes to the project and they're working on your code, they don't have to even think about closing that connection, because you've already deferred it. So I'm a big advocate for using defer because of the readability benefits you get. I think it's worth any per... |
**Erik St. Martin:** Yeah, if you've got defer in a function that's called repeatedly in a tight loop, in something that needs super low latency, I can see how you could advocate not using defer in those particular hot spots. In those cases, benchmarks tell all, right? Like you said, assume defer is the best thing to d... |
Other than that, I think the only thing that I don't like about defer is that people won't necessarily understand it sometimes, and you'll see it used inside of a loop. It's a common mistake I used to catch in people's code (new to Go) - they'd have like a for loop that calls a function inside of it, and they'd use def... |
**Kelsey Hightower:** I wanna know what others like about Go 1.8, but my two favorite things so far - and I actually have been using them a little bit early in some of my projects, forcing people to build my stuff with the beta of Go - is clean shutdown, or HTTP kind of being a built-in thing now... I don't have to go ... |
We had that in 1.7, but now we have that on the client side in 1.8, where you can now actually kind of articulate, "Hey, these are the five certificates that I need", and be able to swap out which one you serve based on what you're calling. |
**Erik St. Martin:** Oh, that's interesting... I didn't even catch that one. But yeah, I'd agree with the graceful shutdown, because we almost always have to write that ourselves for a well-behaved HTTP server. So having that in there is great. |
**Carlisia Thompson:** Is there any link that we can give to people so they can read and understand how that works now? |
**Kelsey Hightower:** Yeah, so Brad's comment in one of the issues - I think we should definitely give out the link... He gave -- it was actually from his code and his words... It was a pretty small change to do in terms of the work that has been done up to this point to make it happen. The issue has a great comment on... |
**Erik St. Martin:** \[36:19\] One of my other favorite features if you are like a benchmarking and profiling nut is the mutex contention profiling. That's something that a lot of people who do benchmarks and profiling on their Go apps have been interested in a long time. We can look at basically memory usage, we can l... |
I know GC latency improved too, for 1.8. I think it was under a hundred microseconds. I'm vaguely remembering, I need to pull up the release notes. But those were things that I think looked interesting. Anybody else see anything that they liked? |
**Kelsey Hightower:** Well, I think the work around packaging is pretty interesting. I saw recently that they released kind of an implementation of all the feedback and ideas around package management from Go. I think that's kind of big, because in the Go community there's this long stance that "We don't wanna be too o... |
That's pretty interesting how that's coming to give and shape up. I wonder what the community feedback will be once it's actually put to use. |
**Erik St. Martin:** Yeah, and we actually have Sam Boyer who's been a big, huge part of that effort. He will be on the show later this month and we'll be talking to him about that. That will be interesting, because you're right, for the longest time that was kind of a community issue, "Let the community sort that out"... |
**Kelsey Hightower:** I see Mat here has another one of his GitHub repositories called 'drop - dependency-less dependencies for Go'... That's a lot there. What's going on there, Mat, and also, what are your thoughts on where we are with the packaging efforts? |
**Mat Ryer:** I would often write little articles and build little packages, like -- there's a tri-package... Essentially, it's a nice pattern that's encoded as a package, and I'm a big believer in not building in dependencies to your projects if you can help it, and drop was something that I used... You can use it lik... |
I think dependency management and things like that - this is something that we still talk about a lot in Go, because at develop time it's still an issue, you still do have to solve for having those dependencies. But as you said earlier, the fact that all this stuff builds down into one static binary means at least at r... |
**Erik St. Martin:** \[40:08\] There's actually been some cool projects also that I think many of us have come across this week. Do you guys wanna take a couple minutes to talk about those? |
**Carlisia Thompson:** Yeah. |
**Erik St. Martin:** So actually now's probably a good time for a sponsored break, and then we'll jump into those. I've got a really cool one that I wanna talk about, too. Our second sponsor for today is Ardan Labs, with their Ultimate Go Series. |
**Break:** \[40:31\] |
**Erik St. Martin:** And we are back. We're talking with Mat Ryer and we've been talking about Go 1.8 and some of the interesting things coming up, and other projects and dependency management... |
So let's talk about some interesting projects and other news that we've come across. One I particularly am excited about - have you guys seen The App Project? I know I'm gonna slaughter the name, it's github.com/murlokswarm/app. It's basically like Electron, but written in Go. You can build a GUI-based application in G... |
**Kelsey Hightower:** I don't know, Erik... That doesn't really sound like fun to me. \[laughter\] I'm joking. |
**Carlisia Thompson:** It's pretty cool. |
**Erik St. Martin:** Who wants to write GUI apps? \[laughs\] |
**Carlisia Thompson:** Hey, we need GUI apps. |
**Erik St. Martin:** It's really cool, a couple years ago I wanted to build some GUI applications and I was having a hard time -- there was Electron, and I was trying to use the Chrome embedded framework, some Go bindings and stuff like that... That was gonna be more work to get a quick win than I was willing to accept... |
**Kelsey Hightower:** Is that a thing right now in the Go community? I'm kind of torn between those - I'd see people that would love to do every single programming task in Go, whether it's a mobile app for iOS or Android, building a desktop application... And in some ways I'm wondering if we're walking around with this... |
**Erik St. Martin:** I think that's something that I struggle with back and forth. I think that there's a lot of reasons to have native apps, and I love native apps on mobile, and things like that, but I guess for some of the use cases, when you think about the web world... We're all used to building applications for t... |
**Kelsey Hightower:** \[43:56\] Yeah, because if you're looking at Mat's project here, Bitbar... To me, this is the perfect example of a bridge technology. You do the heavy-lifting in Objective-C, using all the nice things that the platform gives to you, but then you kind of make it Go-friendly, right? The Go way is li... |
**Mat Ryer:** Honestly, if I could, I would have written Bitbar in Go, but I do know what you mean, and I kind of agree. I think if you love doing something, if you love a language and you love coding in a certain language, then it's not just that it's what you know and therefore you can be more productive... The fact ... |
Swift is almost like the opposite of Go. Go has this obsession with minimalism and keeping things simple, and Swift seems to be -- some of it is history; it needed to have all the same features the Objective-C had, because that's what it was replacing, but it does seem to be quite a greedy language. Any idea anyone has... |
I started to learn Swift because I wanted to build something in iOS, and I unfortunately gave up, because it just took me too long to learn it. So yeah, I look forward to when we can use Go in more places, but I do get the argument certainly, as far as pragmatism goes, to use the language that's best for the problem, a... |
**Erik St. Martin:** I tried with Objective-C, I really did. \[laughs\] I tried the same thing, I tried to build an iPhone app... And I could, but I never felt like it clicked, like I really got the language. I didn't spend a lot of time in it, but you said the enjoyment of working in a language... If you wanna get a p... |
I think it's like Rails. I loved Rails, because it was like if I had a cool idea for a little app, I could throw it together in a weekend because of how proficient I could be in it. It didn't even have to come down to how much I loved Ruby or Rails itself, it was just "I wanna see this idea come to fruition, and with R... |
Maybe that's the motivation for the desktop app, that I know if I wanna throw together something for my Mac, it would take me forever trying to get Objective-C down enough to do what I need it to. |
**Kelsey Hightower:** Yeah, I think that makes perfect sense when you talk to it that way. I think it's less "I think my language is the best language and the only language", it's more about -- and I think Carlisia brought this up earlier... Syntax isn't the goal. Putting words inside of a file and compiling it is not ... |
**Carlisia Thompson:** \[47:55\] Yeah, absolutely. I'm very involved with Go, as everybody can tell, and some people ask me "Why do you like Go so much? What's the big deal?" Go has pros and cons, and it's a matter of personal preference. I was ready to move to something new, and I chose Go, and that was it. I loved th... |
**Erik St. Martin:** I want it when I'm exploring, but not when I'm trying to get stuff done. |
**Kelsey Hightower:** It's funny... My wife, she studied Spanish in college, so she went to Guadalajara to study, and I noticed that some of her friends that primarily speak Spanish as their primary language and English as their language - they also have this fatigue of context-switching when they're talking to certain... |
I've seen that in kids, too. They'll just use whatever language that they use primarily - maybe at school they only speak in English, so when they come home, they may not wanna context-switch, so they continue to speak in English. I think a lot of people have that, regardless of programming language or anything else in... |
**Carlisia Thompson:** And obviously, English is not my first language, and I wonder if I'm even more sensitive to context-switching with programming languages, because I also have the context-switching with the national language. Portuguese is my native language, I speak some Spanish (I studied), but I don't have a lo... |
**Kelsey Hightower:** Carlisia, do you think you do that? Do you catch yourself preferring one language over the other maybe because it's easier to express your ideas in one language or the other? |
**Carlisia Thompson:** Yeah, absolutely. English for me is a life-saver. It's so much easier for me to express myself in English, even though it's not my native language. If I get mad, it's English. \[laughter\] |
**Kelsey Hightower:** Oh, wow! |
**Carlisia Thompson:** Yeah... It's English, for sure. I don't even care if you don't understand it. \[laughs\] |
**Erik St. Martin:** See, I think at a point if you get mad and you curse in a language, that's your native language, probably; that's the language you go to. \[laughter\] |
**Mat Ryer:** It's weird, because when I get mad, I speak Portuguese, but I can't speak Portuguese. \[laughter\] It just sounds like it. Carlisia, thank you for speaking in English though, because otherwise I'd struggle, for sure. Actually, I noticed this in the Go community... I did a conference in Berlin and there'd ... |
I wish our language education was better in the U.K., because we really have no imperative to learn other languages, and that's a shame, because I feel like we miss out because of that. So I appreciate anytime anyone switches to English for us. |
**Erik St. Martin:** \[51:53\] I wish I knew more languages, so that I could participate in conversations and not force everybody to speak English. I feel like that's something I probably wanna work on over the next couple years, too... At least be able to hold basic conversations with other languages that are becoming... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.