1
00:00:00,000 --> 00:00:04,640
Did you notice that we had a noticeable drop in traffic yesterday?

2
00:00:04,640 --> 00:00:07,680
I didn't because I was out of the office yesterday.

3
00:00:07,680 --> 00:00:11,920
Oh, that's probably why I dropped it. It was just that one unique missing.

4
00:00:11,920 --> 00:00:15,960
Well, I did have to stop my script that just constantly hits our site.

5
00:00:15,960 --> 00:00:24,300
Oh, right. Actually, that reminds me of a nice other episode. I was working on a project once,

6
00:00:24,520 --> 00:00:30,040
and this was sort of an agency sort of setup. And we were working on an app and starting to

7
00:00:30,040 --> 00:00:35,140
launch it, and they sent around an email, people in the office, please make sure that you disable

8
00:00:35,140 --> 00:00:41,720
tracking so your traffic isn't part of the traffic that we record, the uniques and stuff.

9
00:00:41,720 --> 00:00:46,660
And I thought, folks, if you need to filter out the 15 people you have in the office,

10
00:00:46,660 --> 00:00:48,820
then your traffic is not worth tracking.

11
00:00:48,820 --> 00:00:54,460
Yes.

12
00:00:54,460 --> 00:00:59,200
Well, no, I didn't. So the short answer to your question is no, I didn't notice that we got a dip in traffic.

13
00:00:59,200 --> 00:01:02,380
Can you imagine why that is, that we had a drop yesterday?

14
00:01:02,380 --> 00:01:12,720
It wasn't the bank holiday. It was a very belated April Fool's trip. I don't know.

15
00:01:12,720 --> 00:01:18,320
I'm pretty sure it was the eclipse because it's the US traffic that dropped off significantly.

16
00:01:18,320 --> 00:01:20,460
Oh, everyone was outside.

17
00:01:20,460 --> 00:01:22,760
Yeah, they were all sun gazing.

18
00:01:22,760 --> 00:01:32,080
Right. Yeah. And because we could only, there was only a few places here that could just see the

19
00:01:32,080 --> 00:01:32,800
tail end of it, right?

20
00:01:32,800 --> 00:01:37,500
Oh, right. Or did it hit the UK? Because it certainly didn't hit mainland Europe.

21
00:01:37,500 --> 00:01:44,940
I think it just, it hit the top corner of Scotland. And then I think in the band where I was,

22
00:01:44,940 --> 00:01:49,280
it was supposedly visible for about 30 seconds or something like that.

23
00:01:49,280 --> 00:01:52,080
But yes, that makes sense.

24
00:01:52,080 --> 00:01:55,280
And how much of a percentage drop was it?

25
00:01:55,280 --> 00:01:59,760
I did. Well, you see the bump notice, it's noticeable. I think in the US traffic,

26
00:01:59,760 --> 00:02:05,160
it might have been, don't quote me, maybe even 50%. I mean, it looked like a weekend effectively.

27
00:02:05,160 --> 00:02:12,300
And that's a weekend is typically 50% down. And that double check, like India had a higher day

28
00:02:12,300 --> 00:02:19,180
than normal on Monday yesterday. So it was clearly, and India is the second highest source of traffic,

29
00:02:19,180 --> 00:02:19,740
interestingly.

30
00:02:19,740 --> 00:02:22,060
Just, just,

31
00:02:22,220 --> 00:02:23,440
Just barely behind the US.

32
00:02:23,440 --> 00:02:29,260
Well, so luckily, it doesn't happen again for how, it's like another 30 years or something.

33
00:02:29,260 --> 00:02:39,560
I, well, I mean, I think there's, there's certainly other ones happening. I just don't know where. I think Australia is next at some point.

34
00:02:39,560 --> 00:02:47,620
They're quite, quite frequent. You should ask ChatGPT and it'll give you a confident answer.

35
00:02:47,620 --> 00:02:50,680
At least it'll be confident.

36
00:02:50,680 --> 00:02:52,820
Well, okay.

37
00:02:52,820 --> 00:02:55,340
Well, I'm glad it's recovered today, at least.

38
00:02:55,340 --> 00:03:01,800
We also have some follow-up from our previous recording.

39
00:03:01,800 --> 00:03:11,380
And this is from Mr. Anonymous, a person who's been really frequent in their follow-up.

40
00:03:11,380 --> 00:03:12,480
And I really enjoy that.

41
00:03:12,480 --> 00:03:18,220
I really love getting the follow-up so that we can at least in hindsight make sure that

42
00:03:18,220 --> 00:03:23,380
what we talk about is more correct than the first time around.

43
00:03:23,380 --> 00:03:26,420
So anonymous, in fact, that I don't even know who it is.

44
00:03:26,420 --> 00:03:36,320
And last time we talked about this project, this package to measure the code size in packages.

45
00:03:36,320 --> 00:03:44,040
And the idea was to get a feel for how much your app or library will grow if you use a

46
00:03:44,040 --> 00:03:47,720
certain package in your app or library.

47
00:03:47,840 --> 00:03:54,800
And we were discussing, you know, could this be an opt-in mechanism and so on.

48
00:03:54,800 --> 00:04:02,340
And this anonymous person said, actually, that won't make a lot of sense because Swift

49
00:04:02,340 --> 00:04:04,820
packages are statically linked and dead code stripped.

50
00:04:04,820 --> 00:04:09,600
So you effectively only pay for what you use pretty much.

51
00:04:09,600 --> 00:04:09,960
Right.

52
00:04:09,960 --> 00:04:12,380
If everything works as planned.

53
00:04:12,380 --> 00:04:15,500
And I think there's some changes, still ongoing changes.

54
00:04:15,500 --> 00:04:17,280
So this isn't quite perfect yet.

55
00:04:17,460 --> 00:04:19,800
But it certainly has been improving.

56
00:04:19,800 --> 00:04:22,760
And this will certainly also continue to improve.

57
00:04:22,760 --> 00:04:23,840
So it'll always be.

58
00:04:23,840 --> 00:04:28,620
If we were to do this kind of thing, I think what we'd be measuring is effectively only

59
00:04:28,620 --> 00:04:29,660
the worst case scenario.

60
00:04:29,660 --> 00:04:33,600
And that's a very misleading figure then, you know, because if you used everything

61
00:04:33,600 --> 00:04:36,960
a package had to offer, that's what you then would pull in.

62
00:04:36,960 --> 00:04:38,680
But, you know, no one ever does that.

63
00:04:38,680 --> 00:04:42,000
So publishing that metric would be pretty useless.

64
00:04:42,000 --> 00:04:42,920
Yeah.

65
00:04:42,920 --> 00:04:44,320
I hadn't thought about that.

66
00:04:44,320 --> 00:04:45,960
But it's obviously in hindsight.

67
00:04:45,960 --> 00:04:47,280
I think in the JavaScript.

68
00:04:47,280 --> 00:04:49,880
I quite like the name of it in the JavaScript world.

69
00:04:49,880 --> 00:04:50,860
They call it tree shaking.

70
00:04:50,860 --> 00:04:54,120
Anything that's not attached to a branch falls out.

71
00:04:54,120 --> 00:04:55,380
Yeah.

72
00:04:55,380 --> 00:05:03,420
Oh, I should also mention it's a bit murkier than that because if you're using inlinable

73
00:05:03,420 --> 00:05:08,500
and you have lots of generic functions, it can actually grow because for each inlinable

74
00:05:08,500 --> 00:05:13,140
use of a generic function, you will generate more code on your end.

75
00:05:13,140 --> 00:05:14,800
So it's give and take.

76
00:05:14,800 --> 00:05:16,540
It's a really difficult thing.

77
00:05:17,100 --> 00:05:20,900
And it's very specific to your use case.

78
00:05:20,900 --> 00:05:25,280
So I think, you know, the message effectively is it's going to be.

79
00:05:25,280 --> 00:05:26,380
We shouldn't do it.

80
00:05:27,480 --> 00:05:27,660
No.

81
00:05:27,660 --> 00:05:36,380
And I think the main thing there is that if you give a piece of information on a package

82
00:05:36,380 --> 00:05:41,720
page like that, if it's a glanceable bit of information, it has to be fairly robust.

83
00:05:41,720 --> 00:05:42,780
Yeah.

84
00:05:42,780 --> 00:05:45,780
And anything that we could put there that might be misleading is.

85
00:05:46,920 --> 00:05:50,560
Is something we should try very hard not to do.

86
00:05:50,560 --> 00:05:50,720
Yeah.

87
00:05:50,720 --> 00:05:51,700
Yeah.

88
00:05:51,700 --> 00:05:52,400
I mean, exactly.

89
00:05:52,400 --> 00:06:01,400
If it's so specific, I mean, there's really no real value because even if you were to

90
00:06:01,400 --> 00:06:05,240
use it in different projects of use, you'd get different results.

91
00:06:05,240 --> 00:06:06,160
It's not even.

92
00:06:06,160 --> 00:06:07,260
Yeah.

93
00:06:07,260 --> 00:06:12,800
I just don't see a way how we could possibly derive anything useful out of this.

94
00:06:12,800 --> 00:06:13,340
Yeah.

95
00:06:13,340 --> 00:06:14,860
It's the end of the feature, unfortunately.

96
00:06:14,860 --> 00:06:16,740
But that's okay.

97
00:06:16,740 --> 00:06:20,240
Because these things that you think about a feature.

98
00:06:20,240 --> 00:06:21,300
Yeah, exactly.

99
00:06:21,300 --> 00:06:21,800
That's how.

100
00:06:21,800 --> 00:06:22,680
Yeah, that's how it works.

101
00:06:22,680 --> 00:06:22,900
Yeah.

102
00:06:22,900 --> 00:06:23,320
Exactly.

103
00:06:23,320 --> 00:06:29,800
So one thing I wanted to briefly talk about is the issue that popped up.

104
00:06:29,800 --> 00:06:34,060
I think it was last week or the week before, certainly after we last recorded, which was

105
00:06:34,060 --> 00:06:34,820
two weeks ago.

106
00:06:34,820 --> 00:06:39,720
And that was yet another supply chain ecosystem thing.

107
00:06:39,720 --> 00:06:44,440
And that's the XC package backdoor that happened.

108
00:06:44,440 --> 00:06:45,160
And the.

109
00:06:45,160 --> 00:06:46,480
Well,

110
00:06:46,560 --> 00:06:47,060
the.

111
00:06:47,060 --> 00:06:51,420
Everyone has probably seen this, but just to summarize very briefly.

112
00:06:51,420 --> 00:07:01,660
So there was a widely used package XC that's around compression and it's used in lots of other packages amongst them SSH and the Linux kernel.

113
00:07:01,660 --> 00:07:07,300
And someone managed to sneak in code that can be used as a backdoor into this package.

114
00:07:07,300 --> 00:07:14,620
And it was caught just before it was being widely rolled out into all sorts of packages and Linux distribution.

115
00:07:14,620 --> 00:07:15,660
So that was a really.

116
00:07:15,660 --> 00:07:22,980
Really critical thing that happened and was caught at the last minute by chance effectively.

117
00:07:22,980 --> 00:07:27,540
I mean, it's kind of crazy that this didn't turn into an actual backdoor.

118
00:07:27,540 --> 00:07:32,380
There's a couple of really good write ups of this that we'll put in the show notes.

119
00:07:32,380 --> 00:07:33,320
Yeah, exactly.

120
00:07:33,320 --> 00:07:34,420
And I think interestingly.

121
00:07:34,420 --> 00:07:36,980
If you haven't kept up with it.

122
00:07:36,980 --> 00:07:37,480
Yeah.

123
00:07:37,480 --> 00:07:38,400
Yeah, exactly.

124
00:07:38,400 --> 00:07:40,620
And I think it's interesting in two aspects.

125
00:07:40,620 --> 00:07:42,180
Well, maybe at least two.

126
00:07:42,180 --> 00:07:43,220
So one is technical.

127
00:07:43,220 --> 00:07:45,300
So I think technically it's interesting how that was.

128
00:07:45,300 --> 00:07:45,640
Actually.

129
00:07:45,640 --> 00:07:51,760
Done because even even when you knew it was happening, it was really hard to detect.

130
00:07:51,760 --> 00:07:59,620
I actually looked at one of the pull requests where where the disabling of the of one of the detecting mechanisms was was snuck in.

131
00:07:59,620 --> 00:08:03,140
And I, I knew sort of what to look for.

132
00:08:03,140 --> 00:08:03,940
I didn't see it.

133
00:08:03,940 --> 00:08:15,620
I mean, also, I'm I didn't really understand all of the details of it, but there was a extra dot put into pull request, which is like impossible to see unless you.

134
00:08:15,620 --> 00:08:17,000
really look at it.

135
00:08:17,000 --> 00:08:17,420
Sure.

136
00:08:17,420 --> 00:08:22,240
I guess it really depends a lot on how you look at pull requests and divs.

137
00:08:22,240 --> 00:08:28,040
And if you were to use the normal GitHub mechanism to do that, you probably wouldn't see that extra dot.

138
00:08:28,040 --> 00:08:29,940
So that I found that interesting.

139
00:08:29,940 --> 00:08:37,900
The other interesting bit was that it really abused the weak spot in how open source software is being maintained.

140
00:08:37,900 --> 00:08:45,600
And by that I mean that it's often sole maintainers that are working on things themselves.

141
00:08:45,600 --> 00:08:49,780
And are sort of left to deal with everything themselves.

142
00:08:49,780 --> 00:09:00,480
And it's quite easy to sort of gain trust, become part of the team and then inject code that way because it's that's the mechanism, right?

143
00:09:00,480 --> 00:09:01,380
That was used here.

144
00:09:01,380 --> 00:09:08,600
It wasn't someone sneaking a code review past someone or just solely that it was also someone being part of the team.

145
00:09:08,600 --> 00:09:12,600
And that made it a lot easier to get that past watchful eyes.

146
00:09:12,600 --> 00:09:13,100
Yeah.

147
00:09:13,100 --> 00:09:15,580
And that's tricky.

148
00:09:15,580 --> 00:09:34,400
The other really big one that's worth mentioning there is that a lot of solo maintained open source projects have this other problem, which is that the person who had the original problem and develop some code to fix their original problem, they might not have that problem anymore.

149
00:09:34,400 --> 00:09:43,020
And so they gradually kind of drift away from wanting to maintain it at all because it's not actually a project that they use in their current role.

150
00:09:43,020 --> 00:09:45,560
And so this is a real problem as well.

151
00:09:45,560 --> 00:09:49,400
And so when somebody steps up to say, oh, I'll help.

152
00:09:49,400 --> 00:09:50,680
Yeah, you're happy, right?

153
00:09:50,680 --> 00:09:51,180
Yeah.

154
00:09:51,180 --> 00:09:53,180
That can, you're very happy.

155
00:09:53,180 --> 00:09:59,060
And that can be like, oh, thank everything that somebody is interested enough to help with this.

156
00:09:59,060 --> 00:10:02,240
And it can be very tempting just to let it go too easily.

157
00:10:02,240 --> 00:10:02,740
Yeah.

158
00:10:02,740 --> 00:10:11,120
And it's sort of for everyone using that package, it changes under the hood, the trust that they initially had when they picked it as a dependency.

159
00:10:11,120 --> 00:10:12,860
You sort of change it under them.

160
00:10:12,860 --> 00:10:15,540
You know, it's like as if there's a popular website that gets.

161
00:10:15,540 --> 00:10:21,860
Sold and then, you know, someone else is sort of maintaining it and you suddenly, you know, it's a different mechanism.

162
00:10:21,860 --> 00:10:29,720
It's a very different, you don't have the same sort of buy in to your initial dependency pick that you made.

163
00:10:29,720 --> 00:10:33,980
So, and I wonder how you could even protect against that.

164
00:10:33,980 --> 00:10:37,040
I think that's a really difficult thing to deal with.

165
00:10:37,040 --> 00:10:40,520
And money is really only part of it.

166
00:10:40,520 --> 00:10:45,520
I'm not even sure if that maintainer was better paid, that would have changed anything of the outcome, right?

167
00:10:45,520 --> 00:10:48,140
And that's the typical thing that pops up.

168
00:10:48,140 --> 00:10:52,020
I quipped, I guess I wrote on Macedon, silly idea.

169
00:10:52,020 --> 00:10:59,820
How about maintainers were paid a dollar per star per month from a fund that big tech companies pay into.

170
00:10:59,820 --> 00:11:01,020
Right.

171
00:11:01,020 --> 00:11:03,320
And of course that's silly, right?

172
00:11:03,320 --> 00:11:06,340
Because money isn't the only problem as we've just discussed.

173
00:11:06,340 --> 00:11:14,800
And it's obviously also very easy to game that sort of thing, you know, just have go around accounts starring the thing.

174
00:11:14,800 --> 00:11:15,500
But, you know, I thought.

175
00:11:15,500 --> 00:11:29,120
It was interesting to look at that as well, because in some cases I think it might help if people were able to make it their job to maintain open source, which in many cases it can't be right.

176
00:11:29,120 --> 00:11:31,000
It's an evening thing.

177
00:11:31,000 --> 00:11:32,200
It's a weekend thing.

178
00:11:32,200 --> 00:11:34,260
It's a side thing.

179
00:11:34,260 --> 00:11:43,680
And that makes it harder for people to actually stay vigilant and stay in quotes on the job, which isn't actually their job.

180
00:11:43,680 --> 00:11:45,480
I think.

181
00:11:45,480 --> 00:11:53,480
And it's something, it's a metric we use in the package index scoring calculation.

182
00:11:53,480 --> 00:11:59,520
And the metric we have is how many contributors does a package have?

183
00:11:59,520 --> 00:12:09,980
And we give a number of points on various thresholds of kind of one, or I think there's one for two and then more than five and then more than 10 or something like that.

184
00:12:09,980 --> 00:12:15,460
And there's diminishing returns, but having that indicator of there is more than five.

185
00:12:15,460 --> 00:12:16,460
And I think that's a really important thing.

186
00:14:39,460 --> 00:14:48,260
How many stars across all of our packages do we have in the package index?

187
00:14:48,260 --> 00:14:50,220
And I'll accept answers to the nearest 10.

188
00:14:50,220 --> 00:14:51,220
Okay.

189
00:14:51,220 --> 00:14:52,220
Nearest 10?

190
00:14:52,220 --> 00:14:54,220
I thought you were going to say nearest thousand.

191
00:14:54,220 --> 00:14:55,220
Well, yeah.

192
00:14:55,220 --> 00:14:56,220
Well, let's say 20.

193
00:14:56,220 --> 00:14:57,220
Okay.

194
00:14:57,220 --> 00:15:07,500
So approximately just under 7,000 packages, probably an average of 10 stars.

195
00:15:07,500 --> 00:15:08,500
So let's say 70,000.

196
00:15:08,500 --> 00:15:09,420
Let's say 65,000.

197
00:15:09,420 --> 00:15:13,380
Oh, you're miles off.

198
00:15:13,380 --> 00:15:16,380
I'll come in again.

199
00:15:16,380 --> 00:15:20,720
You're miles off.

200
00:15:20,720 --> 00:15:23,920
You're two and a half orders of magnitude, I think.

201
00:15:23,920 --> 00:15:24,920
Oh, dear.

202
00:15:24,920 --> 00:15:25,920
Okay.

203
00:15:25,920 --> 00:15:26,920
What was your figure?

204
00:15:26,920 --> 00:15:27,920
65.

205
00:15:27,920 --> 00:15:30,920
No, it's, yeah, it's one and a half.

206
00:15:30,920 --> 00:15:32,180
It's one and a half what?

207
00:15:32,180 --> 00:15:34,180
Now it's become a math question.

208
00:15:34,180 --> 00:15:38,380
Oh, one and a half orders of magnitude.

209
00:15:38,380 --> 00:15:39,380
Yes.

210
00:15:39,380 --> 00:15:40,380
What's the number?

211
00:15:41,380 --> 00:15:46,380
The number is 2,274,276 stars across.

212
00:15:46,380 --> 00:15:49,340
Oh, I got that very, very wrong.

213
00:15:49,340 --> 00:15:52,340
So the average must be much higher.

214
00:15:52,340 --> 00:15:53,340
Yeah.

215
00:15:53,340 --> 00:15:58,240
So I know there are a couple of packages with a lot of stars, which I suppose I should

216
00:15:58,240 --> 00:16:01,340
have thought about those because I think some of them have like 30,000 stars.

217
00:16:01,340 --> 00:16:02,340
Yes.

218
00:16:02,340 --> 00:16:03,340
Yeah.

219
00:16:03,340 --> 00:16:04,340
I think our highest has 25,000 or so.

220
00:16:04,340 --> 00:16:05,340
Yeah.

221
00:16:05,340 --> 00:16:07,340
And I think there are quite a number of those.

222
00:16:07,340 --> 00:16:08,340
Yeah.

223
00:16:08,340 --> 00:16:09,340
Okay.

224
00:16:09,340 --> 00:16:12,300
So I think you would already get your 65,000 that you have there.

225
00:16:12,300 --> 00:16:13,300
Right.

226
00:16:13,300 --> 00:16:14,300
Okay.

227
00:16:14,300 --> 00:16:15,300
I think there's also a long tail of-

228
00:16:15,300 --> 00:16:16,300
Well, good job, everyone, for clicking on the stars.

229
00:16:16,300 --> 00:16:17,300
Yeah.

230
00:16:17,300 --> 00:16:18,300
I think there's a long tail of just stars on repositories in general.

231
00:16:18,300 --> 00:16:19,300
I think it's quite easy to get a few hundred just because they never go down, right?

232
00:16:19,300 --> 00:16:20,300
No one unstars repositories.

233
00:16:20,300 --> 00:16:21,300
So it's really a continuously growing number on a repository.

234
00:16:21,300 --> 00:16:22,300
That's true.

235
00:16:23,300 --> 00:16:24,300
Yeah.

236
00:16:24,300 --> 00:16:25,300
So I think there's a long tail of just stars on repositories in general.

237
00:16:25,300 --> 00:16:26,300
I think it's quite easy to get a few hundred just because they never go down, right?

238
00:16:26,300 --> 00:16:27,300
No one unstars repositories.

239
00:16:27,300 --> 00:16:28,300
So it's really a continuously growing number on a repository.

240
00:16:28,300 --> 00:16:29,300
That's true.

241
00:16:29,300 --> 00:16:30,300
Yeah.

242
00:16:31,300 --> 00:16:32,300
So yeah, there you go.

243
00:16:32,300 --> 00:16:33,300
That's the quiz question.

244
00:16:33,300 --> 00:16:34,300
Well, there we go.

245
00:16:34,300 --> 00:16:35,300
I shall find an appropriate chiming sound.

246
00:16:35,300 --> 00:16:36,300
Excellent.

247
00:16:36,300 --> 00:16:37,300
Right.

248
00:16:37,300 --> 00:16:38,300
Another thing we could briefly talk about is an interesting post I saw on the Swift

249
00:16:38,300 --> 00:16:54,920
forums in the last week or two, and that's a post calling for the

250
00:16:54,920 --> 00:17:01,260
Swift community to be able to use the Swift community to do a lot of work.

251
00:17:01,260 --> 00:17:04,220
It's called Calling Haskell from Swift.

252
00:17:04,220 --> 00:17:06,220
I saw this.

253
00:17:06,220 --> 00:17:07,220
Yeah.

254
00:17:07,220 --> 00:17:14,260
And this is a post by Rodrigo Mesquita, and it's a post about calling Haskell

255
00:17:14,260 --> 00:17:17,300
from Swift, as the title says.

256
00:17:17,300 --> 00:17:19,440
Another example of Swift in unusual places.

257
00:17:19,440 --> 00:17:26,700
So last time, I think it was last time we talked about calling Swift from C#.

258
00:17:26,700 --> 00:17:28,180
This time it's Haskell.

259
00:17:28,180 --> 00:17:30,220
It's really interesting to see these pop up.

260
00:17:30,220 --> 00:17:31,220
Yeah.

261
00:17:31,220 --> 00:17:33,420
And it's using C interop in this case.

262
00:17:33,420 --> 00:17:36,840
I think in the C# case, it was C++ interop.

263
00:17:36,840 --> 00:17:41,220
This time it's C. And codable is used for argument sending.

264
00:17:41,220 --> 00:17:42,220
Really interesting.

265
00:17:42,220 --> 00:17:48,800
I think Swift is quite interesting and perhaps unique in that it has this strong C interop

266
00:17:48,800 --> 00:17:56,880
and effectively allows all of these language integrations to be quite feasible.

267
00:17:56,880 --> 00:18:01,180
Post is a very interesting read, if only to see how...

268
00:18:01,180 --> 00:18:05,220
Haskell actually looks like, because it's quite a different beast.

269
00:18:05,220 --> 00:18:06,560
I've never used Haskell.

270
00:18:06,560 --> 00:18:11,720
I'm sort of aware of it, a functional language.

271
00:18:11,720 --> 00:18:13,500
And it's quite alien to read.

272
00:18:13,500 --> 00:18:19,940
You look at a couple of constructs that are quite difficult to decipher.

273
00:18:19,940 --> 00:18:23,180
Without comments and annotation, you probably wouldn't know what's going on.

274
00:18:23,180 --> 00:18:31,140
I took a quick look at Haskell many years ago, and it passed me by.

275
00:18:31,140 --> 00:18:32,140
That language.

276
00:18:32,140 --> 00:18:33,140
Yeah.

277
00:18:33,140 --> 00:18:37,740
I did see a peek and a poke there in the example, which was really nice.

278
00:18:37,740 --> 00:18:45,940
Threw me back to the C64 days where these were things it would do.

279
00:18:45,940 --> 00:18:51,140
The other thing I found interesting, it's using macros on both the Swift and the Haskell

280
00:18:51,140 --> 00:18:57,720
side, Haskell's equivalent of macros, to deal with the bureaucracy of this interop.

281
00:18:57,720 --> 00:19:01,100
Because again, here also, there's a bit of setup that has to be done.

282
00:19:01,100 --> 00:19:07,180
To marshal and unmarshal the arguments that are being passed through, and getting all

283
00:19:07,180 --> 00:19:16,280
the calling set up, which is using C and unsafe buffers and all that stuff.

284
00:19:16,280 --> 00:19:21,440
So there's a bit of bureaucracy that needs to happen to get this going, and macros can

285
00:19:21,440 --> 00:19:23,200
deal with this, which is really nice.

286
00:19:23,200 --> 00:19:31,060
And I think that's also something that wouldn't have been possible that easily in an actual

287
00:19:31,060 --> 00:19:32,060
environment.

288
00:19:32,060 --> 00:19:35,460
So this comes with a library that makes it then easier to do this interop.

289
00:19:35,460 --> 00:19:40,660
So that's quite nice, and I wanted to give this a shout out.

290
00:19:40,660 --> 00:19:46,800
I think just worth mentioning that I think the goal pretty much to use this is to use

291
00:19:46,800 --> 00:19:52,720
SwiftUI, the UI layer in Swift, and then call out to a Haskell library.

292
00:19:52,720 --> 00:20:01,020
I think that's, again, as in the C# case, the interest is to use the rich UI libraries

293
00:20:01,020 --> 00:20:05,060
in the Apple platforms and use the backend in other languages.

294
00:20:05,060 --> 00:20:07,060
So quite nice.

295
00:20:07,060 --> 00:20:08,560
Absolutely.

296
00:20:08,560 --> 00:20:13,860
And in not cross language, but cross platform news, I noticed something in the...

297
00:20:13,860 --> 00:20:19,900
So we have this nightly job that looks at every package in the index and the dependencies

298
00:20:19,900 --> 00:20:24,840
that that package has, and it uses those dependencies to discover packages that we have yet to add

299
00:20:24,840 --> 00:20:25,840
to the index.

300
00:20:25,840 --> 00:20:30,980
And I noticed, I think on last night's nightly job, that there was a lot of stuff that was

301
00:20:30,980 --> 00:20:31,980
in the index.

302
00:20:31,980 --> 00:20:34,980
And I noticed that there was a big expansion of packages from the browser company, who

303
00:20:34,980 --> 00:20:41,600
are the people who have been doing a lot of work on Swift on Windows for their Arc browser

304
00:20:41,600 --> 00:20:45,100
that's now in beta on Windows.

305
00:20:45,100 --> 00:20:53,060
And I think before there was only one package that interfaced with the Windows runtime.

306
00:20:53,060 --> 00:20:57,220
And there's not enough information in the readme files for me to be confident about

307
00:20:57,220 --> 00:21:00,940
this, but my guess is that this is a splitting of responsibilities.

308
00:21:00,940 --> 00:21:07,480
Because there are now packages for Swift UWP, which is...

309
00:21:07,480 --> 00:21:14,580
UWP is Universal Windows Programming, maybe?

310
00:21:14,580 --> 00:21:15,580
Universal Windows Platform.

311
00:21:16,580 --> 00:21:17,580
There we go.

312
00:21:17,580 --> 00:21:18,580
Nice.

313
00:21:18,580 --> 00:21:24,580
And there's one for the C Windows runtime, and there's one for the web driver,

314
00:21:24,580 --> 00:21:30,900
which is for doing Appium and Win app driver endpoints.

315
00:21:30,900 --> 00:21:33,940
And there's the Windows SDK, which I think was the old WinRT one.

316
00:21:33,940 --> 00:21:41,660
And so I have a feeling there's just a separation rather than anything kind of momentous happening

317
00:21:41,660 --> 00:21:42,660
here.

318
00:21:42,660 --> 00:21:47,020
But if that's not the case, then please fill us in because we'd love to talk about it if

319
00:21:47,020 --> 00:21:48,660
there's more work going on there.

320
00:21:48,660 --> 00:21:51,140
Yeah, that's interesting.

321
00:21:51,140 --> 00:21:52,140
Right.

322
00:21:52,140 --> 00:21:54,360
I've got one more.

323
00:21:54,360 --> 00:22:00,860
And that is an app called Proposal Monitor, and that's by Victor Martins.

324
00:22:00,860 --> 00:22:04,180
Also via the Swift forums, it was announced there.

325
00:22:04,180 --> 00:22:10,100
And it's a nice little app too that runs on the iPad, the iPhone, where you can follow

326
00:22:10,100 --> 00:22:11,980
Swift evolution proposals.

327
00:22:11,980 --> 00:22:17,420
It's a bit of a sort of like a Kanban board where you can see what's in review, what's

328
00:22:17,420 --> 00:22:20,100
been accepted, what's been implemented, and so on.

329
00:22:20,100 --> 00:22:24,980
It has different columns and you can click through and see the proposals.

330
00:22:24,980 --> 00:22:26,720
And that's quite nice.

331
00:22:26,720 --> 00:22:30,820
I know there's something on swift.org, but I suspect I might use this.

332
00:22:30,820 --> 00:22:38,480
I was just about to say there is a page on swift.org which also tracks this and has kind

333
00:22:38,480 --> 00:22:43,680
of filters and various things that you can search the list and things like that.

334
00:22:43,680 --> 00:22:46,280
And it is dynamically updated from the website.

335
00:22:46,280 --> 00:22:49,620
So it is always the proposals website.

336
00:22:49,620 --> 00:22:52,320
So it's always up to date on swift.org.

337
00:22:52,320 --> 00:22:58,580
But of course what that doesn't do is it doesn't give you notifications or anything like that,

338
00:22:58,580 --> 00:22:59,940
or arrange them in a Kanban board.

339
00:22:59,940 --> 00:23:00,780
Right.

340
00:23:00,780 --> 00:23:01,780
Yeah.

341
00:23:01,780 --> 00:23:07,300
Is that data available in an API or in a JSON feed or something?

342
00:23:07,300 --> 00:23:09,020
Is that where Victor is getting this?

343
00:23:09,020 --> 00:23:13,940
Yes, there is a JSON file that it works off.

344
00:23:13,940 --> 00:23:14,940
Yes.

345
00:23:14,940 --> 00:23:16,900
I should know where that JSON file is.

346
00:23:16,900 --> 00:23:17,900
It's in one of the repositories.

347
00:23:17,900 --> 00:23:19,900
It's in a repository somewhere.

348
00:23:19,900 --> 00:23:20,900
Right.

349
00:23:20,900 --> 00:23:21,900
Excellent.

350
00:23:21,900 --> 00:23:22,900
Well, that solves it then.

351
00:23:22,900 --> 00:23:27,740
Start at the beginning of GitHub and I'm sure you'll find it eventually.

352
00:23:27,740 --> 00:23:28,740
It's somewhere.

353
00:23:28,740 --> 00:23:30,740
It currently doesn't have a macro.

354
00:23:30,740 --> 00:23:36,320
It's a macOS app, but apparently that's soon to follow as Victor has announced in the thread.

355
00:23:36,320 --> 00:23:37,320
And there you go.

356
00:23:37,320 --> 00:23:38,320
Proposal monitor.

357
00:23:38,320 --> 00:23:39,320
Give it a look.

358
00:23:39,320 --> 00:23:42,820
I wonder if this app is using that JSON file because it's not hidden.

359
00:23:42,820 --> 00:23:45,020
It is an open JSON file.

360
00:23:45,020 --> 00:23:46,020
So it could be.

361
00:23:46,020 --> 00:23:47,020
I would imagine so.

362
00:23:47,020 --> 00:23:50,760
That's why I was asking because I don't, I mean, I wouldn't imagine he's scraping the

363
00:23:50,760 --> 00:23:52,460
website or anything.

364
00:23:52,460 --> 00:23:59,560
I mean, nothing wrong if he did it, but I think it's going to be much easier to ingest

365
00:23:59,560 --> 00:24:00,560
a JSON file.

366
00:24:00,560 --> 00:24:01,560
So, yeah, I think it's going to be a good idea.

367
00:24:01,560 --> 00:24:02,560
I think it's going to be a good idea.

368
00:27:44,560 --> 00:27:47,940
I can kick us off this week.

369
00:27:47,940 --> 00:27:52,880
My first package is called Whisper Kit.

370
00:27:52,880 --> 00:27:58,060
The company, I think it's made by a company, Argmax, but the primary contributor is Zach

371
00:27:58,060 --> 00:28:02,060
Nagengast.

372
00:28:02,060 --> 00:28:09,660
Whisper Kit is a package that will take the OpenAI Whisper speech recognition model, which

373
00:28:09,660 --> 00:28:11,880
is freely available.

374
00:28:11,880 --> 00:28:14,500
Even the models, not only the...

375
00:28:14,500 --> 00:28:19,720
The code, but the model as well is freely available.

376
00:28:19,720 --> 00:28:27,640
And give it to you as a package that you can use to interpret speech or to do speech to

377
00:28:27,640 --> 00:28:28,640
text.

378
00:28:28,640 --> 00:28:32,120
And there's a couple of reasons to mention this.

379
00:28:32,120 --> 00:28:35,100
First of all, this process is incredible.

380
00:28:35,100 --> 00:28:41,840
We've actually been using Whisper for probably about a year now to create transcripts of

381
00:28:41,840 --> 00:28:42,840
this podcast.

382
00:28:42,840 --> 00:28:44,440
So, if you...

383
00:28:44,440 --> 00:28:49,820
If you enjoy the transcripts or if you were not aware of the transcripts, they are...

384
00:28:49,820 --> 00:28:57,340
Every episode has been transcribed by Whisper and the accuracy is remarkable, really.

385
00:28:57,340 --> 00:28:59,580
It's incredibly high quality.

386
00:28:59,580 --> 00:29:00,580
It doesn't...

387
00:29:00,580 --> 00:29:03,880
It's not perfect, but it's not far off.

388
00:29:03,880 --> 00:29:11,000
Especially if you download the large model, which is one of the models that they make

389
00:29:11,000 --> 00:29:12,280
available.

390
00:29:12,280 --> 00:29:14,380
The accuracy is really very, very good.

391
00:29:14,380 --> 00:29:19,320
We use an application called Whisper.

392
00:29:19,320 --> 00:29:21,560
Is it called Whisper or is it called MacWhisper?

393
00:29:21,560 --> 00:29:22,560
That's right.

394
00:29:22,560 --> 00:29:23,560
MacWhisper.

395
00:29:23,560 --> 00:29:24,560
Yeah.

396
00:29:24,560 --> 00:29:25,560
Yep.

397
00:29:25,560 --> 00:29:27,740
And that's by Jordi Bruin.

398
00:29:27,740 --> 00:29:35,140
And MacWhisper is a Mac app that also uses the same model and the same code to do this,

399
00:29:35,140 --> 00:29:36,600
but it's in the form of a Mac app.

400
00:29:36,600 --> 00:29:42,340
And this package by Zach is in the form of a Swift package.

401
00:29:42,340 --> 00:29:43,340
And...

402
00:29:43,340 --> 00:29:44,340
Yeah.

403
00:29:44,340 --> 00:29:52,840
It's worth checking out if you have any kind of speech to text requirement, I would thoroughly

404
00:29:52,840 --> 00:29:55,060
recommend that you check out Whisper.

405
00:29:55,060 --> 00:30:01,440
And this package might be a good way to interact with it.

406
00:30:01,440 --> 00:30:04,580
I think there is also a command line tool for it.

407
00:30:04,580 --> 00:30:10,080
So you could use it both as an SDK, but you can also use it as a command line tool if

408
00:30:10,080 --> 00:30:12,520
you don't have MacWhisper or something like that.

409
00:30:12,520 --> 00:30:13,520
There are several tools.

410
00:30:13,520 --> 00:30:19,640
There are several tools that use this that are out there.

411
00:30:19,640 --> 00:30:25,900
The other thing just to mention here is that all of the processing for the Whisper OpenAI

412
00:30:25,900 --> 00:30:27,760
model happens on device.

413
00:30:27,760 --> 00:30:32,100
So you're not having to upload your audio into the cloud and wait for a network connection

414
00:30:32,100 --> 00:30:33,860
to bring you back the text.

415
00:30:33,860 --> 00:30:38,420
This is all happening once you've got the model downloaded.

416
00:30:38,420 --> 00:30:40,120
And the model is, I think, quite big.

417
00:30:40,120 --> 00:30:41,520
I think it's a couple of gigabytes.

418
00:30:41,520 --> 00:30:42,520
Yeah.

419
00:30:42,520 --> 00:30:44,400
Maybe even a little bit more than that.

420
00:30:44,400 --> 00:30:51,520
But once you have that model inside your app, you can transcribe as much audio as you'd

421
00:30:51,520 --> 00:30:52,520
like to.

422
00:30:52,520 --> 00:30:53,520
Right.

423
00:30:53,520 --> 00:30:57,140
And I'm not sure if you know, but I guess, like, how would the package deal with the

424
00:30:57,140 --> 00:30:58,140
model?

425
00:30:58,140 --> 00:31:00,420
Is that something you need to invoke and download separately?

426
00:31:00,420 --> 00:31:04,280
I mean, it's presumably not shipped with a package, right?

427
00:31:04,280 --> 00:31:06,760
It's not shipped with a package, no.

428
00:31:06,760 --> 00:31:08,520
No, it's not shipped with the package.

429
00:31:08,520 --> 00:31:09,520
It's actually...

430
00:31:09,520 --> 00:31:10,520
I did read about this in the readme file.

431
00:31:10,520 --> 00:31:11,520
I think it's a little bit more complicated.

432
00:31:11,520 --> 00:31:12,520
Yeah.

433
00:31:12,520 --> 00:31:20,980
But if you call WhisperKit and give it some text to transcribe and give it a model that

434
00:31:20,980 --> 00:31:24,520
it doesn't have, that call to transcribe will download the model.

435
00:31:24,520 --> 00:31:25,520
Now, I think...

436
00:31:25,520 --> 00:31:26,520
Oh, okay.

437
00:31:26,520 --> 00:31:27,520
Probably.

438
00:31:27,520 --> 00:31:29,880
That's probably not quite the right approach to it.

439
00:31:29,880 --> 00:31:33,600
But certainly, there are methods in there to download the model so that you can make

440
00:31:33,600 --> 00:31:37,520
sure you're ready before actually starting the transcription process.

441
00:31:37,520 --> 00:31:38,520
Nice.

442
00:31:39,520 --> 00:31:40,520
Yeah.

443
00:31:40,520 --> 00:31:41,520
WhisperKit.

444
00:31:41,520 --> 00:31:42,520
WhisperKit is great.

445
00:31:42,520 --> 00:31:43,520
Yeah.

446
00:31:43,520 --> 00:31:44,520
I've seen the results.

447
00:31:44,520 --> 00:31:47,520
It's quite amazing, quite remarkable how well that works.

448
00:31:47,520 --> 00:31:54,520
So yeah, it's the real world face of AI, this package.

449
00:31:54,520 --> 00:31:56,040
Right.

450
00:31:56,040 --> 00:32:01,580
My first pick is called Async Channels by Brian Floersch.

451
00:32:01,580 --> 00:32:06,660
And this is an interesting package that's bringing the equivalent of Go's channels to

452
00:32:06,660 --> 00:32:10,520
Swift, as the name sort of applies.

453
00:32:10,520 --> 00:32:16,560
And as you can imagine, that sort of spawned a discussion about performance in a thread

454
00:32:16,560 --> 00:32:18,440
on the Swift forums.

455
00:32:18,440 --> 00:32:20,520
And that was also interesting.

456
00:32:20,520 --> 00:32:26,520
Don't tell me you found a half second delay and realised that there's been a...

457
00:32:26,520 --> 00:32:30,520
No, not that kind of a half second.

458
00:32:30,520 --> 00:32:35,120
No, but if there's a different language, different implementation, sort of the first thing people

459
00:32:35,120 --> 00:32:37,520
do is check out how does it hold up.

460
00:32:37,520 --> 00:32:38,520
Yeah.

461
00:32:39,520 --> 00:32:45,020
It's a nice collaborative effort there to see, compare the results and make improvements

462
00:32:45,020 --> 00:32:47,100
because they are needed.

463
00:32:47,100 --> 00:32:53,160
It's quite a bit slower than the Go original.

464
00:32:53,160 --> 00:33:00,700
I'm not sure how much that is due to Go channels just being very well tailored to how Go's

465
00:33:00,700 --> 00:33:04,520
Async model works and that might be part of it.

466
00:33:04,520 --> 00:33:06,560
What's also...

467
00:33:06,560 --> 00:33:07,560
So I should mention that.

468
00:33:07,560 --> 00:33:08,560
Yeah.

469
00:33:08,560 --> 00:33:12,880
I think the benchmarks are up to 10X in Async channel versus Go's channel.

470
00:33:12,880 --> 00:33:13,880
So it's quite significant.

471
00:33:13,880 --> 00:33:14,880
Quite significant.

472
00:33:14,880 --> 00:33:15,880
Yeah.

473
00:33:16,880 --> 00:33:23,180
I am not 100% sure how reliable the benchmarks themselves are.

474
00:33:23,180 --> 00:33:31,580
I think they cover a few things, but I got the sense that there might be more work needed

475
00:33:31,580 --> 00:33:33,440
on how to run the benchmarks.

476
00:33:33,440 --> 00:33:38,340
And I think they're currently taking, looking at averages, which is... we've discussed this

477
00:33:38,340 --> 00:33:45,880
in the past, isn't necessarily the best way or isn't great in finding actual real-time

478
00:33:45,880 --> 00:33:46,880
performance.

479
00:33:46,880 --> 00:33:52,500
I'll dig up the past discussion we had and this came up when we looked at the package

480
00:33:52,500 --> 00:33:54,320
benchmark.

481
00:33:54,320 --> 00:33:56,460
Right.

482
00:33:56,460 --> 00:34:02,100
But what's also interesting, there is another implementation of this concept and

483
00:34:02,100 --> 00:34:05,940
that's in the Swift Async algorithms package by Apple itself.

484
00:34:05,940 --> 00:34:07,180
So this is there.

485
00:34:07,180 --> 00:34:08,120
There's a title.

486
00:34:08,120 --> 00:34:12,940
There's a type called Async channel, which does effectively the same thing pretty much

487
00:34:12,940 --> 00:34:16,020
with a different API.

488
00:34:16,020 --> 00:34:20,360
But this has also been benchmarked and that's slower than this Swift package.

489
00:34:20,360 --> 00:34:27,440
So there is certainly room for improvement in that package, in Apple's package.

490
00:34:27,440 --> 00:34:31,600
But I guess also in this new implementation, it's quite interesting.

491
00:34:31,600 --> 00:34:33,000
And I tried this out a bit.

492
00:34:33,000 --> 00:34:34,540
I think the API is quite nice.

493
00:34:34,540 --> 00:34:37,660
So if Async streams are...

494
00:34:37,660 --> 00:34:42,980
a bit nebulous to you, which they can be.

495
00:34:42,980 --> 00:34:44,980
I think this API is interesting.

496
00:34:44,980 --> 00:34:49,260
It's a bit clearer what you're sending and how...

497
00:34:49,260 --> 00:34:54,760
It's using operators, so it has a couple of tricky bits around that.

498
00:34:54,760 --> 00:34:58,720
But if you're sort of new to the concept and want to understand how that works, it's quite

499
00:34:58,720 --> 00:35:02,740
interesting to set this up in a playground and play around with it a bit.

500
00:35:02,740 --> 00:35:06,660
So that's the package called Async channels by Brian Floersch.

501
00:35:06,660 --> 00:35:07,200
Bye.

502
00:35:07,200 --> 00:35:08,580
There we go.

503
00:35:08,580 --> 00:35:13,320
And next week we'll be talking about how we can integrate Go code with Swift so that

504
00:35:13,320 --> 00:35:14,320
we...

505
00:35:14,320 --> 00:35:15,840
I'm sure that exists.

506
00:35:15,840 --> 00:35:16,840
We'll dig that up.

507
00:35:16,840 --> 00:35:18,540
I'm sure it does.

508
00:35:18,540 --> 00:35:26,380
It'll be, again, be the C API, I would imagine, that will lead to that.

509
00:35:26,380 --> 00:35:32,860
So my next package for today is, well, it's one of those packages, you're going to laugh

510
00:35:32,860 --> 00:35:36,740
at me here, that there are some packages that...

511
00:35:36,740 --> 00:35:41,140
Like, for example, the one you just talked about and Wispakit and things like that, that

512
00:35:41,140 --> 00:35:46,780
are big problems that solve fundamental issues that you might have in your application or

513
00:35:46,780 --> 00:35:52,340
that allow you to do things that you would not otherwise be able to do in your application.

514
00:35:52,340 --> 00:35:56,480
And some packages solve a very small and very targeted problem.

515
00:35:56,480 --> 00:35:59,460
And my next package is one of those.

516
00:35:59,460 --> 00:36:04,700
But then I love them just as much because that problem is just something that you're

517
00:36:04,700 --> 00:36:06,280
going to have to solve over and over again.

518
00:36:06,280 --> 00:36:07,280
And I'm going to talk about that in a bit.

519
00:36:07,280 --> 00:36:08,280
But I'm going to talk about the other one.

520
00:36:08,280 --> 00:36:09,280
And I'm going to talk about the other one.

521
00:49:26,280 --> 00:49:28,040
we will see you in a few weeks

522
00:49:28,040 --> 00:49:29,360
see you then bye bye