text
stringlengths
0
2.35k
[1010.16 --> 1010.84] All right.
[1011.32 --> 1011.72] Okay.
[1011.88 --> 1014.78] Daniel, your turn to pick one from the list.
[1014.96 --> 1016.92] What else is cool coming in Go 118?
[1017.26 --> 1021.82] By the way, do you say 118, 1 dot, 1 eight, 1 point 18?
[1022.40 --> 1023.28] How do you say it?
[1023.64 --> 1026.38] Now you're making me doubt myself about how I pronounce these things.
[1026.72 --> 1026.98] Yeah.
[1027.18 --> 1028.08] You just have to forget.
[1028.28 --> 1030.06] Just clear your mind and then just say it.
[1030.32 --> 1030.94] See what happens.
[1031.24 --> 1031.60] 118.
[1031.98 --> 1033.06] Yeah, I say 118.
[1033.42 --> 1033.68] Yeah.
[1033.84 --> 1034.10] Okay.
[1034.40 --> 1034.88] That's good.
[1035.04 --> 1036.34] It is kind of 118, isn't it?
[1036.38 --> 1038.88] It's not, because it's not a decimal number, is it?
[1039.30 --> 1039.78] It's Semver.
[1040.04 --> 1041.88] So that second number is 18.
[1041.96 --> 1042.58] I think we're right.
[1042.84 --> 1046.78] So does that mean that when we reach 120, we can go back to 1.2?
[1047.14 --> 1048.90] I think for just that release.
[1049.34 --> 1050.32] No, you can't, can you?
[1050.42 --> 1051.28] No, because that's what I mean.
[1051.28 --> 1051.94] It's not decibel.
[1052.46 --> 1052.90] That's it.
[1053.00 --> 1053.14] Yeah.
[1053.88 --> 1054.92] Yeah, we've got that in the end.
[1054.92 --> 1059.50] So another feature, I mean, it's maybe a bit cheeky that I bring this up because I worked on this,
[1059.50 --> 1064.30] but GoFump without a space now formats files in parallel.
[1064.88 --> 1068.46] So up until now, you have, well, you have two tools, which is also confusing.
[1068.64 --> 1072.80] You have GoFump without a space, and then you have Go space Fump.
[1073.06 --> 1073.34] Yeah.
[1073.38 --> 1078.18] It's ironic that the GoFump tool, it can be called in different ways just by changing the formatting.
[1079.78 --> 1080.30] Yeah.
[1080.94 --> 1081.70] Oh God.
[1082.04 --> 1086.36] The difference between the two tools, and I think it also confuses a bunch of users,
[1086.36 --> 1091.42] is that without a space, it takes files and directories, but it doesn't know what packages
[1091.42 --> 1091.72] are.
[1092.12 --> 1095.58] And with a space, it takes a package pattern.
[1095.72 --> 1097.80] So you can give it dot slash dot dot dot, for example.
[1098.44 --> 1103.80] And the one that works on packages has always been relatively well parallelized, because what
[1103.80 --> 1108.30] it does is, I believe it formats each package in parallel or something like that.
[1108.42 --> 1111.88] But the one that takes directories and files, it would just do one at a time.
[1111.88 --> 1118.48] And now we've essentially removed the parallelism from the one with the space, and just made
[1118.48 --> 1122.92] both tools use the same kind of parallelism, which is GoFump without a space.
[1123.20 --> 1126.24] When you give it a bunch of files to format, it's just going to figure out how to format
[1126.24 --> 1127.20] them as fast as possible.
[1127.92 --> 1128.40] So that's cool.
[1128.52 --> 1132.88] Does GoFump work only within the context of a file at a time then?
[1133.10 --> 1136.76] Like, it doesn't need to know anything else about types and things, does it?
[1136.76 --> 1138.84] Because it's just doing kind of formatting tasks.
[1139.14 --> 1139.68] Yeah, that's correct.
[1139.68 --> 1141.92] So it makes sense, you just do all that at the same time.
[1142.16 --> 1147.66] Yeah, even though there's a few tricky bits about that, because initially my naive implementation
[1147.66 --> 1152.60] was just format each file as a separate GoRoutine as they come in.
[1153.16 --> 1154.90] But some files are really, really tiny.
[1155.28 --> 1159.74] I think like a doc.go file that only has like 10 lines with like a package documentation
[1159.74 --> 1160.60] or something like that.
[1161.00 --> 1166.10] And spawning a new GoRoutine, synchronizing with the parent, maybe allocating the new parser,
[1166.10 --> 1167.64] the new printer, and stuff like that.
[1167.64 --> 1172.52] It actually consumes quite a lot more CPU just because of the overhead of all those tiny
[1172.52 --> 1172.90] files.
[1173.60 --> 1178.28] So we ended up with something that's kind of like chunking groups of files in groups of
[1178.28 --> 1182.78] similar sizes so that they're big enough that actually doing that as parallel units,
[1182.94 --> 1183.50] it's fast.
[1183.82 --> 1184.94] Oh, that's really cool.
[1185.06 --> 1185.78] That's a surprise.
[1185.88 --> 1188.10] I would not have expected it to be doing that.
[1188.28 --> 1191.80] But that's nice to know that that's measured and done properly.
[1191.80 --> 1191.88] Okay.
[1192.76 --> 1193.56] That's very cool.
[1193.66 --> 1194.66] Have you used this then?
[1194.82 --> 1197.86] Have you really noticed this in practice?
[1198.34 --> 1199.10] The speed importance?
[1199.34 --> 1201.08] I think it depends on what people do.
[1201.40 --> 1205.68] I think many people use the tool that works on packages, and then they just format their
[1205.68 --> 1206.04] packages.
[1206.20 --> 1208.94] But I like using the one with directories.
[1208.94 --> 1214.06] So I go to the root of my repository, and I just tell it, format everything, including
[1214.06 --> 1215.44] test files, including everything.
[1216.16 --> 1218.14] And because I did that, it was really slow before.
[1218.46 --> 1222.14] So now, depending on your machine, it's usually about three to four times as fast.
[1222.40 --> 1228.12] So for me, for example, formatting a large repo might go from like five seconds to two
[1228.12 --> 1229.24] seconds, which is nice.
[1230.10 --> 1232.08] Matt Lube, do you format your code?
[1232.60 --> 1232.90] Yes.
[1233.04 --> 1235.26] I mean, we all format our code.
[1235.66 --> 1236.44] It's not a trick question.
[1236.44 --> 1238.68] No, is there anyone who doesn't format their code?
[1239.00 --> 1241.14] Because I want to hear about it.
[1241.22 --> 1242.74] It's like a problem we need to solve.
[1243.02 --> 1243.34] Oh, yeah.
[1243.40 --> 1244.00] No, I don't.
[1244.06 --> 1245.10] I don't think so.
[1245.16 --> 1247.08] Because you only have to do it a few times.
[1247.08 --> 1251.74] And then when pull requests, although they improved it in GitHub, where whitespace was
[1251.74 --> 1252.70] understood better.
[1253.02 --> 1257.30] But it certainly used to be that what you'd get just pull requests that every line has