The State of Go
CC Attribution 2.0 Belgium:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Campoy, Francesc
Go 1.12 is planned to be released in February 2019 and this talk covers what's coming up with it. We'll talk about Go Modules, the proposals for Go 2, and all of the new things you might have missed. This has been a staple talk of the Go devroom, opening the stage every year, and has always been a successful one.
 Okay, welcome everyone. This is Lother. Hi. Welcome to the Go Dev Room for the 2019. Bigger than ever. So congratulations, you made it. Yes. Yes. So we're going to start with the talk that we start every year, which is the state of Go that covers everything that has happened since the previous FOSDEM. So if you want to follow the slides, they're already online. They're in a bid-lit SOG, state of Go, FOSDEM 19. So you can go there and follow along if you want to. I'm going to give you two seconds to take a picture. And done. So that didn't work, but those are supposed to be my name and her name. Let's fix that real time. So fixed. So yeah. So I am Francesca Amboi, VP of product at Sourced. And then my second speaker lost her voice. So please stand up, say hi. Yeah, Margie could not make it, but big shout out to her because most of those lights are made by her. No, the Wi-Fi. No. Okay. Okay, cool. Continue. So we're going to be talking about everything that happened since last time I gave this talk, which means Go 111 and Go 112. Go 111 was released in August 24th, 2018. And Go 112 was released in sometime soon. And every single time I give this talk is always sometime soon. But a release candidate is already out. This time not even a release candidate is out. Only beta. Beta 2 was released in January 10th. And you can check it out. Which means that if you run some of the code on the playground will not work. Because the playground is still running Go 111. So just so you take that into account. So the agenda is going to be, as always, we're going to be talking about the changes to the language, the standard library, the tooling, and finally the community. Also a big shout out to all of the drawer, like all the artists that made the go first. All of their names will be at the end. And this died too. Cool. Did my laptop die? Yeah. Okay. Cool. Oh, my God. Okay. So changes to the language. What has changed in the language since 20, since Go 1.10? Nothing. And yeah. So that is a feature of Go. We do not break things unless we really have to. We do not things unless we really have to. So that's why this really good talk by Brad's Fitzpatrick called Go is approaching asymptotically boring. That's the goal. So what are the changes we have? Standard library. In the standard library we have two breaking changes. So those are the important ones that might break your code. The first one is the fact that when you're passing a typed interface to an implicit skipper in the HTML template package, instead of getting an escaped version of Neil, you will get nothing. What does this mean? In code. So if you pass a pointer to an integer to a template, before it was printing that escaped version of Neil, which is like, we know you're inside of HTML. We don't want to have an HTML tag. So that's why it escaped. Now it will not print anything, except that in all of my tests, it's still printed. So yeah. So I asked Brad Fitzpatrick and he said he doesn't know. So yeah. So the other breaking change which actually broke things, it's buffio. In buffio, now when you call unread rune or unread byte after doing peak, it will fail. So this means that in this code, for instance, we're reading from a buffer, from a buffered reader, buffio the new reader, and we're doing peak of one that will get the first character of the thing, but it will actually not read it for real. It will just look at what it's next. If you do unread after that, previously, it would just work. And the problem with that is that in some weird random cases, that would fail. Now we will always fail. So you will see things like invalid use of unread byte of unread rune more often. So if you see that error, take into account that that's why. Your code was already wrong. Now it's wronger. So other interesting changes, all the things that have changed to the Sunday library that might be interesting to you. You can now assign variables in templates. This is new. Previously, you only could declare variables but not change their values. Now you can do that too. So in this example, this v equals change, that's something that was not a thing before. So if you want to do it, if you find that useful, you can use it. I find it quite useful for debugging templates. You can have something at the beginning that says if debug, change these variables to something else. So it's pretty useful. Other than that, I don't think it changes much. It's still something that I would rather personally avoid. Something else. Replace all. Replace all is a new function in two packages, bytes and strings. And basically it's the same thing as replace with a minus one at the end. But that replace with a minus one to say replace all of them was confusing to beginners. So it has been changed to be more obvious. Replace all replaces all of the things. Replace minus one is kind of weird if you think about it. Also, if you print maps, they will be sorted. So what does this mean? No, don't be so happy. So it is not as cool as it sounds. So this means that previously, if you wanted to print a map sorted in order, you had to do this. You had to get all of the, so you get the map. You iterate over all of the keys. You put them in a slice. You sort the slice. You iterate over the slice and you get the keys. The values are attached to the keys from the map. Now, this is complicated. But now you can just print the map and it will just work. But this is only for printing. If you iterate over a map, the order is still random. So do not try getting things in order because that's not go. And that's actually good if you know why Java hashing functions are a good way to start reading about the hell that you can get in there. So go doesn't have that. So that's why that will always be random. But now you can print them easier. Why did we do this? Because of tests. So now when you print two maps, you can actually compare whether they look exactly the same or not. That's the only reason. We also get TLS 1.3 support in the sound library. Except that not by default. So if you want to use TLS 1.3, you actually need to, on the config, you need to change max version to that value. TLS version, TLS 3. 1.3, sorry. Also, zero RTT is not supported. Quick question. How many of you know TLS 1.3 as a thing? Okay. Not many of you. How many of you know what zero RTT is? Okay. Everybody that knows 1.3 knows 0 RTT. We do not support 0 RTT yet. But also the whole point is that this is TLS before. And you can see that the green stuff here, you have client hello that sends server hello. And then it sends back a certificate. And then we verify that their certificate is correct. And then we send another thing saying, hey, these are the cipher suites that I support. And then the server says, okay, let's use this one. Now in TLS 1.3, so yeah, those are the two things that we're doing. In 1.3, what we do is we send hello, these are the cipher suites that I support. And the answer will be great. Let's use this one. This is my certificate. And then we verify. So we basically removing one, one, one, return. So eventually we'll be able to cache that information. And that will be the zero RTT. So we'll be able to connect directly without having to have any handshake just start sending the information, which something that's not supported yet. Also the point is that there's only secure cipher suites. But that's what people said about 1.2. So eventually we'll have things that are not secure. Okay. So what else? Reverse proxies. And I know there's a talk later about how to write a reverse proxy in 25 minutes. This about how to write a reverse proxy in one slide. So this actually works. And the new thing is actually not the fact that reverse proxy is so easy to do. But rather the new thing is the fact that now it also supports WebSockets. So if you have WebSockets in that website in there, my IP.minja, which is something that March created, you can just use WebSockets directly there. Nothing needs to change. It's really nice. Tooling. So what change in tooling? Bunch of things. First thing, go run of a package now works. This is cool because this means that you can actually run that line to someone that doesn't know anything about Go, but they have Go installed, obviously, and it will just work. It will download all the code, find that there's a package in there that is a binary, find the main.go and run it. This also works for directories. So go run dot works. This is cool. Previously, you had to do go run star and hope for the best that you were not putting random stuff in there. So this is actually a pretty good improvement. It's pretty simple, but if you've ever dealt with like go run main.go, oh, this function is not defined because it was on the second file, you don't need to do that anymore. Go run dot will do it. Also debugger, go run functions. So, oh, this goes too fast. So basically, when you're printing that IP, previously, you got all of that random stuff. Now you can actually call the string method. And when you call the string method, instead, you will get that value there, which is what the string method returns. So this is pretty useful. It is pretty limited. There's many things that you cannot do inside of that function. And it only works on Linux. Except that that screenshot is from my Mac. So it also works on Mac, but probably not as well. So you can try it. And also, yeah, there's a bunch of different constraints. You cannot stop. You cannot create new variables. You cannot stop all the other routines. This is actually something that was before the same way. And also you cannot just stop anywhere and run a function. You need to stop it with a breakpoint into a safe point. You cannot just stop and run something. It will not work. Go doc. So how many of you know the difference between go doc and go doc? Cool. Three people. So yes. So go doc and go doc. We're basically the same thing. Now there are actually separate things. Go. So go doc is the one that you should be using. Go doc is an HTTP server for go doc. With a space in between. It is hard to pronounce. But basically the cool thing about this is that now you can do go doc dash HTTP equals whatever into the documentation as it would look like once you have it on GitHub and you access it through go doc.org. And for everything else you do go doc. Also dash all on go doc will make it feature complete with go doc. So everything that you had before will work there. Just read it. It's hard to say go doc and go doc and make it sound different. Something cool though. And I don't know if you can read this very well. But in go doc which is the binary that's an HTTP server you will be able now to see in what version something was added to the standard library which is pretty cool. So here you can say client trace was added in 1.7. And then that field in that struct was added in go 1.11. And if I see these my first reaction is like wait that breaks backwards compatibility. Well I tweeted about this and Brad Fitzpatrick referred me very nicely to the specs telling me that for the additional features in later releases it may be necessary to add fields to export a struct in the API. So these actually compatible with the backwards compatibility of go which means that when you're declaring things you should always use the field name in the struct. Otherwise you could break with newer versions. So that's why you should be doing that. Because otherwise if you just pass all of the values of client trace and then you get to go on 111 your code will break because there's a new one. Go that is deprecated. So go to that that not exist anymore. Go that is the thing you should be using. How many of you have ever used go to that. Okay so stop doing that. It is not it is exactly same as go that go to that was there for all reasons. And you will get also a new mistake. That code is correct. But if you remove that 42 in there previously it would not complain because actually it's not able to figure out that those parameters are passed to the print F. Now it will actually detect and it will say that wrapper format percent S which argument one but call has zero arguments if you are missing that 42. So a little bit more little bit smarter error detection in GoVet. Which is always good. Then with 10 minutes we're going to be talking about modules WebAssembly and some more stuff. So modules modules are great. Why do I think they're great because they remove the need for a goal path. That is I think great thing. Why are they also good because they allow you to do modules. For me the secondary thing. It's something that allows you to have third party dependencies manage similarly to go depth is not that different to be honest but it's just a little bit different. It's actually integrating to the go tooling. So if you want to know more about that shameless plug I'm Monday. I have a channel on YouTube just for funk and there's two episodes that cover this exactly. They cover the intro to go modules and then so as a user and then another video if you're a maintainer of the packaging you want to start using modules and how to migrate to V2 V3 etc. So those are probably the places you're going to see in total it's over one hour of video so I don't have time to do that today. Runtime trace. So if you've ever used the go runtime tracer which is super useful you may have seen that it generates events for every single thing that happens. If you declare a new if you start a new go routine or if you block in a channel or if the garbage collector starts or whatever happens all of those things are locked. Now you can lock more stuff. You can log your own things. So that's pretty useful if you want to manage your own code and understand what's going on with things that may be like an event that is not something runtime but rather something that you personally care about but not in general. If you want to know more actually found a very good blog post so it's bit.ly slash go UD trace for user defined traces and it's probably a good place to check it out if you've ever used tracing. If you've never used it it's not that important but it can be useful for people that are doing things like open sensors at scale. Here you can do it at less scale just one binary and get the same idea. And then changes in the runtime. I wanted to give a shout out to Miguel for this drawing because that toaster just kills me. So in performance changes in performance not much. Everything is a little bit faster but there's not actually any performance any benchmark out or anything that is official. So I actually found something in in one of the actually forgot what package this was. Yeah no I forgot with this one of the big libraries that uses go. I forgot which one it was sorry. But basically from one that 11 beta to everything was a little bit faster and go one that 12 everything is supposed to be a little bit faster but unfortunately there's no official benchmark so try it on. Also if you've seen this talk before I used to have these screenshots of the same guy over and over my grading he changed companies so he cannot do that anymore so it's sad. Then new ports so there's a bunch of different things go under 11 will only works on open BSD 6.2 or later open BSD 6.4 only works on go other 11 and later go on the 13 on Mac OS will require 10.11 or later which means that go one that 12 didn't break anything but go on the 13 will. So if you're not if you're doing things on Mac for one dollar 11 for 10.10 or before for Mac you will be impacted go on the 12 the last release is the last release supported on free BSD 10.x and runtime arm 64 is now faster. Windows arm supports Raspberry Pi 3 and risk V which or risk 5 which personally I didn't know what it was but March it was very very excited about having this and apparently there's a death room above this so I should learn what it is and going to hurt our reserved values. What does that mean nothing it means that maybe there's some work that's going to be started but has not been started yet so it's maybe in the future. There's one more port that is super exciting which is WebAssembly so you can compile go to WebAssembly and this is something that works since go 11 and it is awesome because it allows you to run go on the browser like you could do before with go for JS but personally I think that this is easier to use I know how to use this go for JS I gave it a try or two it was actually kind of hard to get started once you know how to use it is actually very nice but this is easier to use because it's actually a port so what you need to do is say the go OS or goos is JS for JavaScript and the go architecture or goarch is wasm which is the shortnet version of WebAssembly and it will work. I actually have a super mini demo of this so we have ooh that's small that is too big. Okay so we have that code and I can do make run. This will compile a couple things and start my server and then I can go back here. This is going to be mind blowing you've been warned okay so if now I go to this that was printed from go. Thank you. So if you want to do more complicated things like interacting with the DOM there's actually a new package under syscall slash JS which is experimental and I have not tried it so give it a try if you want to but it might change in the future is not tied to the backwards completely of 1.x yet and personally I think that this will be great to be able to run go on the browser but called from JavaScript I think that probably the best way to interact with the DOM is still JavaScript but that way you can integrate with go much easier. And now let's see if the Wi-Fi works cool. So community. They're all cheating because they all have the same cards but whatever. So five years ago how many of you were here five years ago? Okay I was here too not many of us you might remember that was this picture makes that room look bigger than what it was this is actually a very tiny room there was no stage so that was pretty good it was a good start. Last year you might remember this oh it's not going to have the audio wait a second sorry. Yes. So that was last year everybody complaining about the fact that the room was too small and this was this morning. It's coming. Yeah. So thank you for them for a bigger room very happy with this. All the things that have changed women so women who go keeps growing they have six more chapters than in 2018 so they have now 30 chapters and they're in many many places but still if you want to create more chapters do that we need them we need more chapters and also if you're interested in starting one there's two people in here that might help you so please there you go they're part of like they're like the managers of women who go like they're really important people so talk to them. Go meet us in the world they're all around the world also you might see that some of them are not clustered I want to go to those those are the cool ones but they're everywhere around the world I didn't count how many you had but basically everywhere and then go conferences so we have go Devrom 2019 hi then dot goes going to be happening soon and we have the organizer right there we have got them go that is happening in New York City April 12 and I will be there my talk was accepted go for gone Singapore I will not be there because it's very far go for gone Europe is going to be intended if it's a little bit nicer than Brussels in February so it's it's a good move I think go come in Canada and go for a condenium San Diego and go for scones and Diego I will not be speaking but I will be there for sure is going to be super cool how many of you are going to go for constant Diego okay no many people which makes sense carry with you up so again the slides are here you can check them out I'm going to give you two more seconds to take a picture just in case and what else do we have today we have many talks so this was the first one the next one we're going to have is I'm going to say Serge Zidezep but I'm not sure how to pronounce it perfect close enough and then we're going to have a bunch of different talks many many many many talks so stay around if you want to attend because getting back into the room is going to be hard and also we have go lining talks at the end so if you want to register for those lining talks the link is bw slash go light 2019 which is also in next to the not creepy golfer and we will have the deadline is at 6 at 4 p.m. so make sure you use and your your ideas before that you have only five minutes per talk those five minutes will actually be four minutes and 30 seconds after which I will keep you out so just you've been warned that's it thank you very much.
 Okay, welcome everyone. This is Lother. Hi. Welcome to the Go Dev Room for the 2019.  Bigger than ever. So congratulations, you made it. Yes. Yes. So we're going to start  with the talk that we start every year, which is the state of Go that covers everything  that has happened since the previous FOSDEM. So if you want to follow the slides, they're  already online. They're in a bid-lit SOG, state of Go, FOSDEM 19. So you can go there  and follow along if you want to. I'm going to give you two seconds to take a picture.  And done. So that didn't work, but those are supposed to be my name and her name. Let's  fix that real time. So fixed. So yeah. So I am Francesca Amboi, VP of product at Sourced.  And then my second speaker lost her voice. So please stand up, say hi. Yeah, Margie could  not make it, but big shout out to her because most of those lights are made by her. No,  the Wi-Fi. No. Okay. Okay, cool. Continue. So we're going to be talking about everything  that happened since last time I gave this talk, which means Go 111 and Go 112. Go 111  was released in August 24th, 2018. And Go 112 was released in sometime soon. And every  single time I give this talk is always sometime soon. But a release candidate is already out.  This time not even a release candidate is out. Only beta. Beta 2 was released in January  10th. And you can check it out. Which means that if you run some of the code on the playground  will not work. Because the playground is still running Go 111. So just so you take that into  account. So the agenda is going to be, as always, we're going to be talking about the  changes to the language, the standard library, the tooling, and finally the community. Also  a big shout out to all of the drawer, like all the artists that made the go first. All  of their names will be at the end. And this died too. Cool. Did my laptop die? Yeah. Okay.  Cool. Oh, my God. Okay. So changes to the language. What has changed in the language  since 20, since Go 1.10? Nothing. And yeah. So that is a feature of Go. We do not break  things unless we really have to. We do not things unless we really have to. So that's  why this really good talk by Brad's Fitzpatrick called Go is approaching asymptotically boring.  That's the goal. So what are the changes we have? Standard library. In the standard library  we have two breaking changes. So those are the important ones that might break your code.  The first one is the fact that when you're passing a typed interface to an implicit  skipper in the HTML template package, instead of getting an escaped version of Neil, you  will get nothing. What does this mean? In code. So if you pass a pointer to an integer  to a template, before it was printing that escaped version of Neil, which is like, we  know you're inside of HTML. We don't want to have an HTML tag. So that's why it escaped.  Now it will not print anything, except that in all of my tests, it's still printed. So  yeah. So I asked Brad Fitzpatrick and he said he doesn't know. So yeah. So the other breaking  change which actually broke things, it's buffio. In buffio, now when you call unread  rune or unread byte after doing peak, it will fail. So this means that in this code, for  instance, we're reading from a buffer, from a buffered reader, buffio the new reader,  and we're doing peak of one that will get the first character of the thing, but it will  actually not read it for real. It will just look at what it's next. If you do unread  after that, previously, it would just work. And the problem with that is that in some  weird random cases, that would fail. Now we will always fail. So you will see things like  invalid use of unread byte of unread rune more often. So if you see that error, take  into account that that's why. Your code was already wrong. Now it's wronger. So other  interesting changes, all the things that have changed to the Sunday library that might be  interesting to you. You can now assign variables in templates. This is new. Previously, you  only could declare variables but not change their values. Now you can do that too. So  in this example, this v equals change, that's something that was not a thing before. So  if you want to do it, if you find that useful, you can use it. I find it quite useful for  debugging templates. You can have something at the beginning that says if debug, change  these variables to something else. So it's pretty useful. Other than that, I don't think  it changes much. It's still something that I would rather personally avoid. Something  else. Replace all. Replace all is a new function in two packages, bytes and strings. And basically  it's the same thing as replace with a minus one at the end. But that replace with a minus  one to say replace all of them was confusing to beginners. So it has been changed to be  more obvious. Replace all replaces all of the things. Replace minus one is kind of weird  if you think about it. Also, if you print maps, they will be sorted. So what does this  mean? No, don't be so happy. So it is not as cool as it sounds. So this means that previously,  if you wanted to print a map sorted in order, you had to do this. You had to get all of  the, so you get the map. You iterate over all of the keys. You put them in a slice. You  sort the slice. You iterate over the slice and you get the keys. The values are attached  to the keys from the map. Now, this is complicated. But now you can just print the map and it  will just work. But this is only for printing. If you iterate over a map, the order is still  random. So do not try getting things in order because that's not go. And that's actually  good if you know why Java hashing functions are a good way to start reading about the  hell that you can get in there. So go doesn't have that. So that's why that will always  be random. But now you can print them easier. Why did we do this? Because of tests. So now  when you print two maps, you can actually compare whether they look exactly the same  or not. That's the only reason. We also get TLS 1.3 support in the sound library. Except  that not by default. So if you want to use TLS 1.3, you actually need to, on the config,  you need to change max version to that value. TLS version, TLS 3. 1.3, sorry. Also, zero  RTT is not supported. Quick question. How many of you know TLS 1.3 as a thing? Okay.  Not many of you. How many of you know what zero RTT is? Okay. Everybody that knows 1.3  knows 0 RTT. We do not support 0 RTT yet. But also the whole point is that this is TLS  before. And you can see that the green stuff here, you have client hello that sends server  hello. And then it sends back a certificate. And then we verify that their certificate  is correct. And then we send another thing saying, hey, these are the cipher suites that  I support. And then the server says, okay, let's use this one. Now in TLS 1.3, so yeah,  those are the two things that we're doing. In 1.3, what we do is we send hello, these  are the cipher suites that I support. And the answer will be great. Let's use this one.  This is my certificate. And then we verify. So we basically removing one, one, one, return.  So eventually we'll be able to cache that information. And that will be the zero RTT.  So we'll be able to connect directly without having to have any handshake just start sending  the information, which something that's not supported yet. Also the point is that there's  only secure cipher suites. But that's what people said about 1.2. So eventually we'll  have things that are not secure. Okay. So what else? Reverse proxies. And I know there's  a talk later about how to write a reverse proxy in 25 minutes. This about how to write  a reverse proxy in one slide. So this actually works. And the new thing is actually not the  fact that reverse proxy is so easy to do. But rather the new thing is the fact that  now it also supports WebSockets. So if you have WebSockets in that website in there,  my IP.minja, which is something that March created, you can just use WebSockets directly  there. Nothing needs to change. It's really nice. Tooling. So what change in tooling?  Bunch of things. First thing, go run of a package now works. This is cool because this  means that you can actually run that line to someone that doesn't know anything about  Go, but they have Go installed, obviously, and it will just work. It will download all  the code, find that there's a package in there that is a binary, find the main.go and run  it. This also works for directories. So go run dot works. This is cool. Previously, you  had to do go run star and hope for the best that you were not putting random stuff in  there. So this is actually a pretty good improvement. It's pretty simple, but if you've ever dealt  with like go run main.go, oh, this function is not defined because it was on the second  file, you don't need to do that anymore. Go run dot will do it. Also debugger, go run  functions. So, oh, this goes too fast. So basically, when you're printing that IP, previously,  you got all of that random stuff. Now you can actually call the string method. And when  you call the string method, instead, you will get that value there, which is what the string  method returns. So this is pretty useful. It is pretty limited. There's many things that  you cannot do inside of that function. And it only works on Linux. Except that that screenshot  is from my Mac. So it also works on Mac, but probably not as well. So you can try it. And  also, yeah, there's a bunch of different constraints. You cannot stop. You cannot create new variables.  You cannot stop all the other routines. This is actually something that was before the same  way. And also you cannot just stop anywhere and run a function. You need to stop it with  a breakpoint into a safe point. You cannot just stop and run something. It will not work.  Go doc. So how many of you know the difference between go doc and go doc? Cool. Three people.  So yes. So go doc and go doc. We're basically the same thing. Now there are actually separate  things. Go. So go doc is the one that you should be using. Go doc is an HTTP server for go doc.  With a space in between. It is hard to pronounce. But basically the cool thing about this is  that now you can do go doc dash HTTP equals whatever into the documentation as it would  look like once you have it on GitHub and you access it through go doc.org. And for everything  else you do go doc. Also dash all on go doc will make it feature complete with go doc.  So everything that you had before will work there. Just read it. It's hard to say go doc  and go doc and make it sound different. Something cool though. And I don't know if you can read  this very well. But in go doc which is the binary that's an HTTP server you will be  able now to see in what version something was added to the standard library which is  pretty cool. So here you can say client trace was added in 1.7. And then that field in that  struct was added in go 1.11. And if I see these my first reaction is like wait that  breaks backwards compatibility. Well I tweeted about this and Brad Fitzpatrick referred me  very nicely to the specs telling me that for the additional features in later releases  it may be necessary to add fields to export a struct in the API. So these actually compatible  with the backwards compatibility of go which means that when you're declaring things you  should always use the field name in the struct. Otherwise you could break with newer versions.  So that's why you should be doing that. Because otherwise if you just pass all of the values  of client trace and then you get to go on 111 your code will break because there's a new  one. Go that is deprecated. So go to that that not exist anymore. Go that is the thing you  should be using. How many of you have ever used go to that. Okay so stop doing that.  It is not it is exactly same as go that go to that was there for all reasons. And you  will get also a new mistake. That code is correct. But if you remove that 42 in there  previously it would not complain because actually it's not able to figure out that those parameters  are passed to the print F. Now it will actually detect and it will say that wrapper format  percent S which argument one but call has zero arguments if you are missing that 42.  So a little bit more little bit smarter error detection in GoVet. Which is always good. Then  with 10 minutes we're going to be talking about modules WebAssembly and some more stuff.  So modules modules are great. Why do I think they're great because they remove the need  for a goal path. That is I think great thing. Why are they also good because they allow  you to do modules. For me the secondary thing. It's something that allows you to have third  party dependencies manage similarly to go depth is not that different to be honest but  it's just a little bit different. It's actually integrating to the go tooling. So if you want  to know more about that shameless plug I'm Monday. I have a channel on YouTube just for  funk and there's two episodes that cover this exactly. They cover the intro to go modules  and then so as a user and then another video if you're a maintainer of the packaging you  want to start using modules and how to migrate to V2 V3 etc. So those are probably the places  you're going to see in total it's over one hour of video so I don't have time to do that  today. Runtime trace. So if you've ever used the go runtime tracer which is super useful  you may have seen that it generates events for every single thing that happens. If you  declare a new if you start a new go routine or if you block in a channel or if the garbage  collector starts or whatever happens all of those things are locked. Now you can lock  more stuff. You can log your own things. So that's pretty useful if you want to manage  your own code and understand what's going on with things that may be like an event that  is not something runtime but rather something that you personally care about but not in  general. If you want to know more actually found a very good blog post so it's bit.ly  slash go UD trace for user defined traces and it's probably a good place to check it  out if you've ever used tracing. If you've never used it it's not that important but  it can be useful for people that are doing things like open sensors at scale. Here you  can do it at less scale just one binary and get the same idea. And then changes in the  runtime. I wanted to give a shout out to Miguel for this drawing because that toaster just  kills me. So in performance changes in performance not much. Everything is a little bit faster  but there's not actually any performance any benchmark out or anything that is official.  So I actually found something in in one of the actually forgot what package this was.  Yeah no I forgot with this one of the big libraries that uses go. I forgot which one  it was sorry. But basically from one that 11 beta to everything was a little bit faster  and go one that 12 everything is supposed to be a little bit faster but unfortunately  there's no official benchmark so try it on. Also if you've seen this talk before I used  to have these screenshots of the same guy over and over my grading he changed companies  so he cannot do that anymore so it's sad. Then new ports so there's a bunch of different  things go under 11 will only works on open BSD 6.2 or later open BSD 6.4 only works on  go other 11 and later go on the 13 on Mac OS will require 10.11 or later which means that  go one that 12 didn't break anything but go on the 13 will. So if you're not if you're  doing things on Mac for one dollar 11 for 10.10 or before for Mac you will be impacted  go on the 12 the last release is the last release supported on free BSD 10.x and runtime  arm 64 is now faster. Windows arm supports Raspberry Pi 3 and risk V which or risk 5  which personally I didn't know what it was but March it was very very excited about having  this and apparently there's a death room above this so I should learn what it is and going  to hurt our reserved values. What does that mean nothing it means that maybe there's some  work that's going to be started but has not been started yet so it's maybe in the future.  There's one more port that is super exciting which is WebAssembly so you can compile go  to WebAssembly and this is something that works since go 11 and it is awesome because  it allows you to run go on the browser like you could do before with go for JS but personally  I think that this is easier to use I know how to use this go for JS I gave it a try  or two it was actually kind of hard to get started once you know how to use it is actually  very nice but this is easier to use because it's actually a port so what you need to do  is say the go OS or goos is JS for JavaScript and the go architecture or goarch is wasm  which is the shortnet version of WebAssembly and it will work. I actually have a super  mini demo of this so we have ooh that's small that is too big. Okay so we have that code  and I can do make run. This will compile a couple things and start my server and then  I can go back here. This is going to be mind blowing you've been warned okay so if now I  go to this that was printed from go. Thank you. So if you want to do more complicated  things like interacting with the DOM there's actually a new package under syscall slash  JS which is experimental and I have not tried it so give it a try if you want to but it  might change in the future is not tied to the backwards completely of 1.x yet and personally  I think that this will be great to be able to run go on the browser but called from  JavaScript I think that probably the best way to interact with the DOM is still JavaScript  but that way you can integrate with go much easier. And now let's see if the Wi-Fi works  cool. So community. They're all cheating because they all have the same cards but whatever.  So five years ago how many of you were here five years ago? Okay I was here too not many  of us you might remember that was this picture makes that room look bigger than what it was  this is actually a very tiny room there was no stage so that was pretty good it was a  good start. Last year you might remember this oh it's not going to have the audio wait a  second sorry. Yes. So that was last year everybody complaining about the fact that the room  was too small and this was this morning. It's coming. Yeah. So thank you for them for a  bigger room very happy with this. All the things that have changed women so women who  go keeps growing they have six more chapters than in 2018 so they have now 30 chapters  and they're in many many places but still if you want to create more chapters do that  we need them we need more chapters and also if you're interested in starting one there's  two people in here that might help you so please there you go they're part of like they're  like the managers of women who go like they're really important people so talk to them. Go  meet us in the world they're all around the world also you might see that some of them  are not clustered I want to go to those those are the cool ones but they're everywhere around  the world I didn't count how many you had but basically everywhere and then go conferences  so we have go Devrom 2019 hi then dot goes going to be happening soon and we have the  organizer right there we have got them go that is happening in New York City April 12 and  I will be there my talk was accepted go for gone Singapore I will not be there because  it's very far go for gone Europe is going to be intended if it's a little bit nicer than  Brussels in February so it's it's a good move I think go come in Canada and go for a condenium  San Diego and go for scones and Diego I will not be speaking but I will be there for sure  is going to be super cool how many of you are going to go for constant Diego okay no many  people which makes sense carry with you up so again the slides are here you can check  them out I'm going to give you two more seconds to take a picture just in case and what else  do we have today we have many talks so this was the first one the next one we're going  to have is I'm going to say Serge Zidezep but I'm not sure how to pronounce it perfect  close enough and then we're going to have a bunch of different talks many many many many  talks so stay around if you want to attend because getting back into the room is going  to be hard and also we have go lining talks at the end so if you want to register for  those lining talks the link is bw slash go light 2019 which is also in next to the not  creepy golfer and we will have the deadline is at 6 at 4 p.m. so make sure you use and  your your ideas before that you have only five minutes per talk those five minutes will actually  be four minutes and 30 seconds after which I will keep you out so just you've been warned  that's it thank you very much.
The_State_of_Go_What_s_new_since_Go_1_10_mVAh5NSPlnE_0_431.png The_State_of_Go_What_s_new_since_Go_1_10_mVAh5NSPlnE_432_815.png The_State_of_Go_What_s_new_since_Go_1_10_mVAh5NSPlnE_816_1175.png The_State_of_Go_What_s_new_since_Go_1_10_mVAh5NSPlnE_1176_1403.png The_State_of_Go_What_s_new_since_Go_1_10_mVAh5NSPlnE_1404_1943.png The_State_of_Go_What_s_new_since_Go_1_10_mVAh5NSPlnE_1944_2123.png The_State_of_Go_What_s_new_since_Go_1_10_mVAh5NSPlnE_2124_4007.png The_State_of_Go_What_s_new_since_Go_1_10_mVAh5NSPlnE_4008_4283.png The_State_of_Go_What_s_new_since_Go_1_10_mVAh5NSPlnE_4284_4367.png The_State_of_Go_What_s_new_since_Go_1_10_mVAh5NSPlnE_4368_4787.png The_State_of_Go_What_s_new_since_Go_1_10_mVAh5NSPlnE_4788_5435.png The_State_of_Go_What_s_new_since_Go_1_10_mVAh5NSPlnE_5436_6431.png The_State_of_Go_What_s_new_since_Go_1_10_mVAh5NSPlnE_6432_7367.png The_State_of_Go_What_s_new_since_Go_1_10_mVAh5NSPlnE_7368_7439.png The_State_of_Go_What_s_new_since_Go_1_10_mVAh5NSPlnE_7440_15947.png The_State_of_Go_What_s_new_since_Go_1_10_mVAh5NSPlnE_15948_22823.png The_State_of_Go_What_s_new_since_Go_1_10_mVAh5NSPlnE_22824_28391.png The_State_of_Go_What_s_new_since_Go_1_10_mVAh5NSPlnE_28392_29459.png The_State_of_Go_What_s_new_since_Go_1_10_mVAh5NSPlnE_29460_29627.png The_State_of_Go_What_s_new_since_Go_1_10_mVAh5NSPlnE_29628_30011.png The_State_of_Go_What_s_new_since_Go_1_10_mVAh5NSPlnE_30012_31439.png The_State_of_Go_What_s_new_since_Go_1_10_mVAh5NSPlnE_31440_32603.png The_State_of_Go_What_s_new_since_Go_1_10_mVAh5NSPlnE_32604_32819.png The_State_of_Go_What_s_new_since_Go_1_10_mVAh5NSPlnE_32820_32879.png The_State_of_Go_What_s_new_since_Go_1_10_mVAh5NSPlnE_32880_35711.png The_State_of_Go_What_s_new_since_Go_1_10_mVAh5NSPlnE_35712_35795.png The_State_of_Go_What_s_new_since_Go_1_10_mVAh5NSPlnE_35796_36503.png The_State_of_Go_What_s_new_since_Go_1_10_mVAh5NSPlnE_36504_37151.png The_State_of_Go_What_s_new_since_Go_1_10_mVAh5NSPlnE_37152_37589.png