text
stringlengths
0
1.82k
\[20:06\] As long as your program is single-threaded, once you try to use multiple goroutines to do that, I'm less confident it would work out of the box.
**Erik St. Martin:** Yeah, this would be multiple threads with different priority, because you basically have some threads going out to fetch new segments of video and audio, and then you kind of have your real-time thread responsible for keeping your timeline and multiplexing the package together and dropping them, an...
I might have to whip up a silly example of something like that to see whether I could get it to work and whether it falls flat. Before it wasn't even a consideration because of the garbage collection time, but now it's nice to see that we're kind of in a point where that's not the most complex part of it. It's really t...
**Keith Randall:** Right. Yeah, goroutines don't exist as objects to the users, so you can't set priorities and things like that on goroutines. That's sort of a deliberate design decision, that they're anonymous, so you can't do things like wait for goroutines to die and things like that.
**Erik St. Martin:** Right.
**Keith Randall:** It makes the runtime all that simpler, but it makes things like real-time a bit more difficult.
**Erik St. Martin:** But in those use cases, I'll take it. You can use Go for almost anything, except for a couple of these odd use cases that not many people have to worry about.
**Keith Randall:** Yeah, exactly.
**Erik St. Martin:** Alright, so we're gonna take a quick sponsor break, and then we will jump back on with Keith.
**Break:** \[21:47\]
**Erik St. Martin:** Alright, we are back. Carlisia, I know you had some questions for Keith.
**Carlisia Thompson:** Yeah, I was curious to know if you do any side projects when you're not working on compilers, or if you do a different sort of compiler work when you're not at work?
**Keith Randall:** Like when I'm home, hacking by myself?
**Carlisia Thompson:** Yeah.
**Keith Randall:** Yeah, I sort of hack on random stuff. I wrote a pretty good integer factorization library, which you can grab on my GitHub account. It can factor 50-digit integers. I'm a math geek and a performance geek, so I like to sort of hack on stuff like that.
**Carlisia Thompson:** Very cool. I'm gonna check that out.
**Bill Kennedy:** Are there are other languages that you work in, other than C -- like, have you looked at Rust at all? What do you think about their philosophies around integrity and around the runtime there?
**Keith Randall:** Yeah, I like the idea of Rust, that you keep track of exactly what pointers mean and what they're allowed to do and when they disappear, and things like that. I'm not a big fan of the fact that there's eight different kinds of pointers, or whatever the number is nowadays. Because that adds a lot of c...
I haven't actually written anything in Rust, so take my comments with a grain of salt. Maybe it's easier than I think it is. But I like the fact that in Go everything's naturally -- you're used to it coming from C or from Java, or whatever... There's no fancy new semantics to learn.
**Bill Kennedy:** \[24:05\] One of the questions that seems to come up more and more - and I think it's because I'm seeing more programmers that are coming from functional programming languages, is they get afraid about pointers and they start asking me, "What is the advantage of having the pointers over not having to ...
**Keith Randall:** It's fundamentally a question of efficiency, and to the extent that a compiler can realize that you're doing something functional and can pass pointers around under the hood, so you don't have to do big copies - that's great. The SSA thing would totally be impossible to write in a functional language...
So I agree that the semantics of a functional language are much easier to understand, and make for a nicer programming language. In languages that scale, it's hard to make functional programs efficient in all cases, whereas given a pointer, it's much easier to sort of design your thing to make whatever algorithm you're...
**Bill Kennedy:** That's cool. I'm also curious if you played with Delve at all, and what kind of support are you seeing maybe in the future to help the development of that tool?
**Keith Randall:** Yeah, I love Delve. We are in contact with Derek all the time... We're making this change to the compiler that's gonna change the layout of registers or layout of memory locations - does Delve still work if we do this? So we had a good contact with him, and I love Delve. I use it not all that much wh...
**Erik St. Martin:** That's awesome, so you actually collaborate and reach out proactively and let him know that there's going to be these potentially breaking changes to kind of give him the headstart?
**Keith Randall:** Yeah, exactly.
**Erik St. Martin:** That's great.
**Keith Randall:** Go had a very bad story for debuggers for a long time, and it was slowly bumping up our list of "This is something we have to tackle, this is something we have to tackle", and then Derek tackled it for us, it was great.
**Erik St. Martin:** One of those, "See a need, fill a need."
**Keith Randall:** Exactly.
**Erik St. Martin:** I was actually really surprised when it came out. To your point, I kind of thought that that was ways down the road as far as the Go team, that there was still a lot of work to be done on the language and the compilers themselves, and I recognize that there needed to be a debugger, it just wasn't t...
**Keith Randall:** Yeah, exactly. It was pretty sweet.
**Erik St. Martin:** Yeah. So speaking of cool projects, do you guys wanna get into interesting projects and news, and we'll just kind of talk about stuff that's going on right now?
**Carlisia Thompson:** Yeah, let's do that.
**Keith Randall:** Okay.
**Erik St. Martin:** So the biggest of which is Go 1.8 beta, which was recently released, and for anybody who hasn't tested their code against it, they should, because it drops in February, if I recall...?
**Keith Randall:** Yeah, February 1st, or January 31st, something like that.
**Erik St. Martin:** And Brad Fitzpatrick gave everybody a warning that he's got time to fix bugs now, but later not so much. So file the bug reports now. Is there anything you're particularly excited about in this release?
**Keith Randall:** The big thing is the SSA stuff, for all the other architectures besides x86. That's sort of been my focus. What else is cool in this release...? It's a good question.
**Erik St. Martin:** I know everybody was raving about the 10 to 100 microsecond GC pauses...
**Keith Randall:** Right.
**Erik St. Martin:** \[28:01\] I think it was guaranteed to be under a hundred microseconds, but they were seeing ten-ish most of the time, if I recall what that was.
**Keith Randall:** Yeah, the pauses we got rid of... There's a bunch of stuff that you have to do when you stop the world. When you do a GC, you stop the world, you sort of set some bits, then you have to do some stuff and then you have to start the world up again. And the stuff you need to do, we've been shrinking and...
**Erik St. Martin:** And then I know this release also saw some improvements with the overhead and calling out to Cgo.
**Keith Randall:** Right.
**Erik St. Martin:** I don't remember what they were... I wanna say it was like cut in half, or something like that; a big concern for people using cgo was the expense of calling out to C, so most of the time the code got written in C, and then there were these logical breakpoints where flow of execution kind of got ha...
**Keith Randall:** Right, and a lot of people we'll serve are stuck with legacy stuff in C, and you've gotta use it... Yeah, so I think the big improvements were in defer. We've put some defer records on the stack instead of allocating them from the heap, and that sort of helps a lot when you have to do -- you basicall...
**Erik St. Martin:** Speaking of which, defer itself was improved. Was that kind of where this was gained? The overhead was kind of saved there because it leverages defer and then defer itself had performance improvements?
**Keith Randall:** Yeah. That was the main reason behind the optimizations to defer, it was for the C path.
**Erik St. Martin:** We actually have a listener in the GoTime FM channel, Chris Heinz, who's asking a question for you. He's asking what the status of inlining \[unintelligible 00:30:11.05\] functions is, because currently you can only inline functions if all the functions they call can also be inlined.