1
00:00:00,001 --> 00:00:03,040
So I think we can start with lots of news this week.

2
00:00:03,040 --> 00:00:05,800
It's been a few weeks since our last episode.

3
00:00:05,800 --> 00:00:08,540
We had to postpone last week,

4
00:00:08,540 --> 00:00:10,460
which has given us a little bit of a chance

5
00:00:10,460 --> 00:00:14,080
to get a little bit more queued up news,

6
00:00:14,080 --> 00:00:16,880
but we have several things to talk about this week.

7
00:00:16,880 --> 00:00:18,280
- Yeah, indeed we have.

8
00:00:18,280 --> 00:00:21,720
Actually last week, I had just finished participating

9
00:00:21,720 --> 00:00:25,840
in the Server-Side SWIFT meetup, the third one,

10
00:00:25,840 --> 00:00:27,800
organized by the SSWG,

11
00:00:27,800 --> 00:00:30,400
which is the SWIFT on Server Working Group.

12
00:00:30,400 --> 00:00:34,300
There's just so much SWIFT and server in those names.

13
00:00:34,300 --> 00:00:37,940
And I think this is of general interest.

14
00:00:37,940 --> 00:00:41,440
I mean, it's a Server-Side SWIFT meetup and working group,

15
00:00:41,440 --> 00:00:43,880
but the topics were actually

16
00:00:43,880 --> 00:00:46,820
not all that Server-Side specific, I'd say.

17
00:00:46,820 --> 00:00:51,960
So there was a great talk by Jutta Seito

18
00:00:51,960 --> 00:00:53,760
about SWIFT WASM.

19
00:00:53,760 --> 00:00:57,680
And there's a package also that I can mention

20
00:00:57,680 --> 00:00:59,880
while we're at it, WASM Kit.

21
00:00:59,880 --> 00:01:02,120
It's not a single thing.

22
00:01:02,120 --> 00:01:04,700
So there are a number of things

23
00:01:04,700 --> 00:01:09,480
that are sort of in the category of WASM.

24
00:01:09,480 --> 00:01:14,400
And WASM, what does WASM actually stand for?

25
00:01:14,400 --> 00:01:15,520
I keep forgetting.

26
00:01:15,520 --> 00:01:16,800
It's Web--

27
00:01:16,800 --> 00:01:18,480
- WebAssembly, I think, yeah.

28
00:01:18,480 --> 00:01:20,040
- WebAssembly, exactly.

29
00:01:20,040 --> 00:01:21,760
So effectively it's sort of,

30
00:01:21,760 --> 00:01:24,720
I think, and Jutta had a really great way of phrasing

31
00:01:24,720 --> 00:01:28,600
what, why WASM is such a big deal.

32
00:01:28,600 --> 00:01:33,600
Think about what JSON has done for data exchange.

33
00:01:33,600 --> 00:01:36,240
Like really, you mentioned JSON

34
00:01:36,240 --> 00:01:37,960
and you want to receive JSON.

35
00:01:37,960 --> 00:01:39,680
Everyone knows what you're talking about.

36
00:01:39,680 --> 00:01:42,560
And it's just about what fields do you want?

37
00:01:42,560 --> 00:01:45,560
But all the exchange format is really, really clear.

38
00:01:45,560 --> 00:01:47,420
It's sort of become the de facto standard

39
00:01:47,420 --> 00:01:49,240
for data exchange.

40
00:01:49,240 --> 00:01:54,240
And WASM could be that for executable, for logic.

41
00:01:54,760 --> 00:01:58,680
Because it's essentially something that can be produced

42
00:01:58,680 --> 00:02:01,520
by various different languages, Swift being one of them.

43
00:02:01,520 --> 00:02:06,120
So, you know, Rust, I don't know, I guess Python,

44
00:02:06,120 --> 00:02:07,960
you know, all manner of JavaScript,

45
00:02:07,960 --> 00:02:10,240
all manner of languages can produce WASM

46
00:02:10,240 --> 00:02:11,840
as an executable format,

47
00:02:11,840 --> 00:02:15,000
which can then run on many different,

48
00:02:15,000 --> 00:02:16,160
in many different places.

49
00:02:16,160 --> 00:02:19,840
Like the browser, they are just runners.

50
00:02:19,840 --> 00:02:24,060
Like there's a thing that's actually written

51
00:02:24,060 --> 00:02:27,200
in Swift that can execute WASM.

52
00:02:27,200 --> 00:02:30,320
So it's a proper exe exchange format,

53
00:02:30,320 --> 00:02:31,820
executable exchange format.

54
00:02:31,820 --> 00:02:34,640
And it could be sort of the lingua franca

55
00:02:34,640 --> 00:02:37,400
for exchanging logic.

56
00:02:37,400 --> 00:02:40,080
You know, think plugins, you know,

57
00:02:40,080 --> 00:02:43,120
what if you wanted to have plugins that are shippable?

58
00:02:43,120 --> 00:02:44,960
That could be WASM.

59
00:02:44,960 --> 00:02:46,160
There's a really great-

60
00:02:46,160 --> 00:02:47,720
- I think that's-

61
00:02:47,720 --> 00:02:48,560
- Yeah, go on.

62
00:02:48,560 --> 00:02:52,200
- I think that's a really nice way to think about it,

63
00:02:52,200 --> 00:02:55,920
actually, because I'm much more excited.

64
00:02:55,920 --> 00:02:57,740
So I actually, I attended the meeting

65
00:02:57,740 --> 00:03:01,320
and watched this talk on WASM.

66
00:03:01,320 --> 00:03:04,540
And I actually, I asked the question halfway through,

67
00:03:04,540 --> 00:03:07,140
which was, you know, how does it interact

68
00:03:07,140 --> 00:03:09,260
with the browser APIs?

69
00:03:09,260 --> 00:03:13,100
And I'm, and it does interact with those browser APIs,

70
00:03:13,100 --> 00:03:15,980
but I'm much more excited about WASM

71
00:03:15,980 --> 00:03:19,580
as a non-browser technology.

72
00:03:19,580 --> 00:03:22,620
So I don't think I'm going to be rushing

73
00:03:22,620 --> 00:03:25,900
to interact with the DOM

74
00:03:25,900 --> 00:03:27,460
when we're doing the bits of JavaScript

75
00:03:27,460 --> 00:03:29,940
that we need to do on the Swift package index in WASM,

76
00:03:29,940 --> 00:03:33,140
because I don't really see any advantage to that.

77
00:03:33,140 --> 00:03:36,420
In fact, all you get is a slightly degraded experience

78
00:03:36,420 --> 00:03:39,100
because those browser APIs, they work,

79
00:03:39,100 --> 00:03:42,980
but they're, you, it's not,

80
00:03:42,980 --> 00:03:45,980
it's not how they were intended to be interacted with.

81
00:03:45,980 --> 00:03:48,680
But for other bits of code

82
00:03:48,680 --> 00:03:52,260
where you might have to either re-implement something

83
00:03:52,260 --> 00:03:54,660
that you had in your server-side code or something like that.

84
00:03:54,660 --> 00:03:57,620
And as you say, as maybe like an interchange format

85
00:03:57,620 --> 00:04:02,540
for code, I think it's a much more exciting technology

86
00:04:02,540 --> 00:04:04,100
in those cases.

87
00:04:04,100 --> 00:04:04,940
- Yeah, exactly.

88
00:04:04,940 --> 00:04:06,220
I mean, think of all the places

89
00:04:06,220 --> 00:04:09,520
where you have executable code

90
00:04:09,520 --> 00:04:12,380
that should run cross-platform, for instance.

91
00:04:12,380 --> 00:04:15,020
And like one example that's been brought up

92
00:04:15,020 --> 00:04:19,160
that has actually been pitched is macros.

93
00:04:19,160 --> 00:04:24,160
So right now you have to include Swift syntax, right?

94
00:04:24,160 --> 00:04:30,040
When you have macros and you want to generate the source code

95
00:04:30,040 --> 00:04:31,920
and you have to build all of Swift syntax,

96
00:04:31,920 --> 00:04:34,080
and that's a huge strain on the build system,

97
00:04:34,080 --> 00:04:37,180
on your builds in particular, if they release builds.

98
00:04:37,180 --> 00:04:41,560
WASM could be the exchange format,

99
00:04:41,560 --> 00:04:44,920
such that you don't have to ship Swift syntax

100
00:04:44,920 --> 00:04:47,280
in source, but you could ship it as,

101
00:04:47,280 --> 00:04:49,640
my understanding is at least that it would be shipped

102
00:04:49,640 --> 00:04:52,840
as a WASM build that then gets run.

103
00:04:52,840 --> 00:04:54,720
So you skip the build step of it.

104
00:04:54,720 --> 00:04:58,400
You automatically have a cross-platform plugin

105
00:04:58,400 --> 00:05:03,120
and you don't need to ship like five different slices of,

106
00:05:03,120 --> 00:05:06,120
you know, how would you even do that with Linux?

107
00:05:06,120 --> 00:05:09,160
You know, you can ship a binary that runs

108
00:05:09,160 --> 00:05:12,340
on macros, Intel and ARM, you know,

109
00:05:12,340 --> 00:05:14,980
by having a binary that has the two aspects of it,

110
00:05:14,980 --> 00:05:16,640
but that wouldn't work for Linux.

111
00:05:16,640 --> 00:05:20,300
And then you'd have to bundle that up somehow.

112
00:05:20,300 --> 00:05:22,620
But with WASM, it's just one thing that gets run

113
00:05:22,620 --> 00:05:26,340
on different platforms because they know how to execute that.

114
00:05:26,340 --> 00:05:27,860
So that's quite interesting.

115
00:05:27,860 --> 00:05:31,420
Just give the, the meeting has been recorded.

116
00:05:31,420 --> 00:05:36,140
So there's a YouTube up where you can watch the presentation

117
00:05:36,140 --> 00:05:37,740
or it's really nice, really interesting.

118
00:05:37,740 --> 00:05:42,600
Opens up lots of possibilities around that topic,

119
00:05:42,600 --> 00:05:45,060
you know, executable logic exchange.

120
00:05:45,060 --> 00:05:46,200
- Sure.

121
00:05:46,200 --> 00:05:48,120
- Yeah, and there was a second interesting talk

122
00:05:48,120 --> 00:05:52,080
by Konrad Marowski of the Swift team at Apple.

123
00:05:52,080 --> 00:05:56,520
And that's also not, wasn't really server specific

124
00:05:56,520 --> 00:05:59,440
because he talked about getting ready for Swift 6.

125
00:05:59,440 --> 00:06:03,920
And that was a really interesting talk as well.

126
00:06:03,920 --> 00:06:06,520
Was, he started, I think he started off with a reminder,

127
00:06:06,520 --> 00:06:10,000
you shouldn't panic, don't panic about Swift 6.

128
00:06:10,000 --> 00:06:12,000
It might even have been his first slide,

129
00:06:12,000 --> 00:06:16,240
but he also had great tips on how to hold your towel

130
00:06:16,240 --> 00:06:17,120
when you do panic.

131
00:06:17,120 --> 00:06:20,240
And if you don't know the towel reference,

132
00:06:20,240 --> 00:06:24,100
you can do a web search, but you know,

133
00:06:24,100 --> 00:06:26,480
you might end up in places where you get warnings

134
00:06:26,480 --> 00:06:27,880
and you don't know how to deal with it.

135
00:06:27,880 --> 00:06:30,160
And Konrad had examples of those

136
00:06:30,160 --> 00:06:31,000
and how you deal with them.

137
00:06:31,000 --> 00:06:34,080
And I think that's a great talk

138
00:06:34,080 --> 00:06:37,480
to take the edge off because I think,

139
00:06:37,480 --> 00:06:39,400
and we've talked about this a number of times,

140
00:06:39,400 --> 00:06:43,800
there is a lot of concern around Swift 6

141
00:06:43,800 --> 00:06:46,680
and Konrad really addresses that

142
00:06:46,680 --> 00:06:48,840
and calms people down, I think.

143
00:06:48,840 --> 00:06:50,440
And he's done a really great job

144
00:06:50,440 --> 00:06:55,600
laying out how you should approach it.

145
00:06:55,600 --> 00:06:56,720
- That's great, yeah.

146
00:06:56,720 --> 00:07:00,400
And talking of events, Swift events,

147
00:07:00,400 --> 00:07:05,400
you are actually at an event where you will be,

148
00:07:05,400 --> 00:07:07,720
by the time this gets released, you will be at,

149
00:07:07,720 --> 00:07:10,320
you're not at, talk about a Swift event.

150
00:07:10,320 --> 00:07:11,880
(laughing)

151
00:07:11,880 --> 00:07:14,920
- Yes, I will be at the Swift on Server Conference

152
00:07:14,920 --> 00:07:16,440
in London next week.

153
00:07:16,440 --> 00:07:18,840
In fact, I'll be leaving tomorrow and this podcast,

154
00:07:18,840 --> 00:07:21,040
I'll be ahead of the podcast

155
00:07:21,040 --> 00:07:24,500
and the podcast will arrive after me there.

156
00:07:24,500 --> 00:07:27,760
Yes, I'm really looking forward to this one.

157
00:07:27,760 --> 00:07:29,860
Lots of people I've interacted with.

158
00:07:30,700 --> 00:07:32,900
Online that I've never met in person,

159
00:07:32,900 --> 00:07:37,340
so I'm excited to meet lots of folks.

160
00:07:37,340 --> 00:07:39,420
I've already got a list of names of people

161
00:07:39,420 --> 00:07:40,780
to get in touch with.

162
00:07:40,780 --> 00:07:43,100
Yeah, exciting times.

163
00:07:43,100 --> 00:07:46,540
Unfortunately, you're not one of these people on the list,

164
00:07:46,540 --> 00:07:47,980
but we'll manage here.

165
00:07:47,980 --> 00:07:49,300
- I'm afraid I'm not.

166
00:07:49,300 --> 00:07:53,460
Yeah, like I said, I've not been super well recently

167
00:07:53,460 --> 00:07:57,220
and I'm not gonna be able to be there this week,

168
00:07:57,220 --> 00:08:00,260
which is a tragedy because I was there

169
00:08:00,260 --> 00:08:02,700
the last time this conference was put on

170
00:08:02,700 --> 00:08:05,940
and it was not only a fantastic conference,

171
00:08:05,940 --> 00:08:09,580
but a great opportunity to meet a lot of people

172
00:08:09,580 --> 00:08:13,900
who I hadn't yet met in the server-side Swift community

173
00:08:13,900 --> 00:08:18,900
and it was a great event.

174
00:08:18,900 --> 00:08:20,740
Fantastic venue.

175
00:08:20,740 --> 00:08:22,660
I think it's at the same venue this year.

176
00:08:22,660 --> 00:08:25,200
It's the Science Museum in London,

177
00:08:25,200 --> 00:08:27,260
which is a fantastic venue.

178
00:08:27,260 --> 00:08:31,900
And as you say, just a really good chance

179
00:08:31,900 --> 00:08:33,460
to meet a lot of people.

180
00:08:33,460 --> 00:08:35,660
But it unfortunately does mean

181
00:08:35,660 --> 00:08:39,740
that we won't get a chance to meet up again this time.

182
00:08:39,740 --> 00:08:41,940
- Yeah, unfortunately not.

183
00:08:41,940 --> 00:08:44,620
But you mentioned, we were on a call yesterday,

184
00:08:44,620 --> 00:08:47,820
you mentioned a cardboard cutout that exists of you.

185
00:08:47,820 --> 00:08:48,860
And do you own that?

186
00:08:48,860 --> 00:08:53,020
Could you ship that so I can prop you up here in my office?

187
00:08:53,020 --> 00:08:55,060
- I don't own it.

188
00:08:55,060 --> 00:08:56,340
No, at the end of,

189
00:08:56,340 --> 00:08:59,260
so we'll pop a link in the show notes too.

190
00:08:59,260 --> 00:09:01,380
This is something that happened a few years ago

191
00:09:01,380 --> 00:09:03,180
and there's a whole story behind it,

192
00:09:03,180 --> 00:09:06,700
which is too long to go into on the podcast.

193
00:09:06,700 --> 00:09:11,700
But at WWDC and Alt Conf 2019,

194
00:09:11,700 --> 00:09:17,540
there ended up being a life-size printout of me

195
00:09:20,420 --> 00:09:25,420
that was put in the Alt Conf kind of main lobby area

196
00:09:25,420 --> 00:09:28,400
for the entire week of WWDC.

197
00:09:28,400 --> 00:09:33,220
And it was there for people to take pictures with,

198
00:09:33,220 --> 00:09:38,060
which is the strangest possible backstory to this.

199
00:09:38,060 --> 00:09:39,700
So strange, in fact,

200
00:09:39,700 --> 00:09:42,220
that I felt I had to clarify it in a blog post,

201
00:09:42,220 --> 00:09:43,040
which I did do,

202
00:09:43,040 --> 00:09:45,540
and we'll include a link in the show notes to that.

203
00:09:45,540 --> 00:09:49,220
But the main reason I wanted to clarify it

204
00:09:49,220 --> 00:09:51,260
is just to make sure that people understood

205
00:09:51,260 --> 00:09:55,740
that I didn't make a huge life-size cutout of myself

206
00:09:55,740 --> 00:09:58,700
because nobody wants to be that person.

207
00:09:58,700 --> 00:10:00,660
And that's not what happened.

208
00:10:00,660 --> 00:10:06,060
But the slightly worrying thing is I didn't make it,

209
00:10:06,060 --> 00:10:08,100
I don't own it, and I don't know where it is,

210
00:10:08,100 --> 00:10:10,980
but I'm pretty sure it still probably exists somewhere.

211
00:10:10,980 --> 00:10:13,620
- This was spawned by PicswithDave, right?

212
00:10:13,620 --> 00:10:15,460
There was this Twitter thing.

213
00:10:15,460 --> 00:10:16,780
- It was, yeah.

214
00:10:16,780 --> 00:10:17,620
- I mean, be honest,

215
00:10:17,620 --> 00:10:19,380
you just outsourced the PicswithDave

216
00:10:19,380 --> 00:10:20,860
to a cardboard cutout, right?

217
00:10:20,860 --> 00:10:23,420
(laughing)

218
00:10:23,420 --> 00:10:24,780
- Exactly, yes.

219
00:10:24,780 --> 00:10:26,260
Yeah, it's all Kevin Hocter's fault.

220
00:10:26,260 --> 00:10:27,740
That's all everyone needs to know.

221
00:10:27,740 --> 00:10:28,580
- Right, right.

222
00:10:28,580 --> 00:10:32,860
- We also have a bit of contribution news

223
00:10:32,860 --> 00:10:34,540
to talk about this week.

224
00:10:34,540 --> 00:10:37,940
We have a couple of things I'd like to mention.

225
00:10:37,940 --> 00:10:42,020
First is a contribution which is kind of in progress

226
00:10:42,020 --> 00:10:42,860
at the moment.

227
00:10:42,860 --> 00:10:46,820
So we've had a discussion around an enhancement

228
00:10:46,820 --> 00:10:51,140
with Daniel Lyons, who came to the discussions board

229
00:10:51,140 --> 00:10:55,580
on our GitHub project and suggested that we add

230
00:10:55,580 --> 00:11:00,580
a new type of filter to the search options.

231
00:11:00,580 --> 00:11:03,780
So we already have filters for things like

232
00:11:03,780 --> 00:11:07,180
license and platform.

233
00:11:07,180 --> 00:11:09,420
So you can say, show me all packages

234
00:11:09,420 --> 00:11:11,060
that match this search string,

235
00:11:11,060 --> 00:11:14,220
but also are compatible with iOS

236
00:11:14,220 --> 00:11:19,020
or have a specific license or something like that.

237
00:11:19,020 --> 00:11:22,260
And one of the filters that you can add there

238
00:11:22,260 --> 00:11:24,620
is a filter on last activity.

239
00:11:24,620 --> 00:11:28,380
So when was the last commit or pull request closed

240
00:11:28,380 --> 00:11:30,380
or issue opened or something like that.

241
00:11:30,380 --> 00:11:34,020
So how active is the project?

242
00:11:34,020 --> 00:11:38,740
And Daniel suggested that we had a first activity filter

243
00:11:38,740 --> 00:11:42,180
as well, so that you can start to filter packages

244
00:11:42,180 --> 00:11:45,620
by effectively how old they are.

245
00:11:45,620 --> 00:11:50,460
So you can filter to only packages that have been created

246
00:11:50,460 --> 00:11:52,180
within the last year, for example.

247
00:11:52,180 --> 00:11:57,780
Or you can say packages that are at least six months old

248
00:11:57,780 --> 00:11:58,620
or something like that,

249
00:11:58,620 --> 00:12:01,460
which is maybe a more realistic way to use it.

250
00:12:01,460 --> 00:12:07,980
And so we had a little discussion on the discussion board

251
00:12:07,980 --> 00:12:10,460
and that got transitioned into an issue.

252
00:12:10,460 --> 00:12:15,460
And Daniel is on his way to producing that

253
00:12:15,460 --> 00:12:19,340
as a pull request, which will get into the system

254
00:12:19,340 --> 00:12:23,420
and add that functionality into the software,

255
00:12:23,420 --> 00:12:24,940
which is great.

256
00:12:24,940 --> 00:12:27,420
And then another contribution,

257
00:12:27,420 --> 00:12:28,580
which is a little bit further along.

258
00:12:28,580 --> 00:12:30,460
In fact, I think the final part of it

259
00:12:30,460 --> 00:12:31,860
is going to be merged today,

260
00:12:31,860 --> 00:12:34,060
which means it will be live on the site

261
00:12:34,060 --> 00:12:38,540
by the time you hear this.

262
00:12:38,540 --> 00:12:41,700
It's from Mirza Ucchanbalik.

263
00:12:41,700 --> 00:12:46,700
And that is a feature that we had in our heads

264
00:12:46,700 --> 00:12:51,900
since almost the very beginning of this project.

265
00:12:51,900 --> 00:12:56,540
It's a three digit issue number,

266
00:12:56,540 --> 00:12:58,300
which is pretty rare these days,

267
00:12:58,300 --> 00:13:01,780
that this was originally there.

268
00:13:01,780 --> 00:13:06,180
And it's to add some information on package pages

269
00:13:06,180 --> 00:13:08,980
for packages that have been forked from

270
00:13:08,980 --> 00:13:10,660
another Git repository.

271
00:13:10,660 --> 00:13:14,140
And so what's going to happen is,

272
00:13:14,140 --> 00:13:16,380
as of by the time you hear this,

273
00:13:16,380 --> 00:13:20,540
you'll be able to, if a package is a fork of another package,

274
00:13:20,540 --> 00:13:22,260
you'll be able to see that right at the top

275
00:13:22,260 --> 00:13:26,220
of the metadata description on the package page.

276
00:13:26,220 --> 00:13:29,380
And it will say this package is forked from

277
00:13:29,380 --> 00:13:32,260
and then give you a link to the previous package.

278
00:13:32,260 --> 00:13:34,700
And this is one of those features

279
00:13:34,700 --> 00:13:39,700
that is really interesting because it sounds

280
00:13:39,700 --> 00:13:43,340
much more simple than it is.

281
00:13:43,340 --> 00:13:46,060
And it's one of those that has a couple of little edge cases

282
00:13:46,060 --> 00:13:49,620
and it's been kind of interesting going through with Mirza

283
00:13:49,620 --> 00:13:54,100
to find those and then decide what to do with them

284
00:13:54,100 --> 00:13:54,940
and cope with them.

285
00:13:54,940 --> 00:13:58,300
So the idea is a couple of these are like, for example,

286
00:13:58,300 --> 00:14:02,900
the idea is that we could provide a link

287
00:14:02,900 --> 00:14:05,620
to the parent package, of course,

288
00:14:05,620 --> 00:14:07,420
that seems an obvious thing to do.

289
00:14:07,420 --> 00:14:09,980
But then we have the choice of, well, what do we do?

290
00:14:09,980 --> 00:14:12,220
Do we link to the GitHub repository?

291
00:14:12,220 --> 00:14:14,660
Do we link to the Swift package index page?

292
00:14:14,660 --> 00:14:16,780
In that case, what happens if the package

293
00:14:16,780 --> 00:14:18,700
isn't in the index?

294
00:14:18,700 --> 00:14:20,940
I think most of them are,

295
00:14:20,940 --> 00:14:23,580
but we have to cope with those edge cases

296
00:14:23,580 --> 00:14:26,300
where it might not be, or for some reason,

297
00:14:26,300 --> 00:14:27,820
the original package author of the fork

298
00:14:27,820 --> 00:14:29,580
wants their package removed.

299
00:14:29,580 --> 00:14:33,380
And that the fork is now the definitive package

300
00:14:33,380 --> 00:14:34,420
or something like that.

301
00:14:34,420 --> 00:14:37,140
So you have this condition of, well,

302
00:14:37,140 --> 00:14:40,380
what happens depending on where that repository currently,

303
00:14:40,380 --> 00:14:42,580
where that parent repository currently is.

304
00:14:42,580 --> 00:14:44,780
So that was kind of interesting.

305
00:14:44,780 --> 00:14:47,540
And then you've got things like, well, what happens

306
00:14:47,540 --> 00:14:51,740
if the parent repository is renamed

307
00:14:51,740 --> 00:14:54,020
or the child repository is renamed?

308
00:14:54,020 --> 00:14:56,340
And you've got all these kind of little edge cases

309
00:14:56,340 --> 00:14:57,580
around a feature like this.

310
00:14:57,580 --> 00:15:00,940
That something quite simple initially

311
00:15:00,940 --> 00:15:03,100
can turn into a much bigger feature

312
00:15:03,100 --> 00:15:04,940
than you might've thought it was.

313
00:15:04,940 --> 00:15:08,340
But it's been great to work with Mirza on this.

314
00:15:08,340 --> 00:15:13,340
And I think it's turned into a really great little feature.

315
00:15:13,340 --> 00:15:15,940
And I'm really happy to see it ship finally,

316
00:15:15,940 --> 00:15:17,460
because this is something that's,

317
00:15:17,460 --> 00:15:22,460
well, this is something that tripped me up recently

318
00:15:22,460 --> 00:15:26,580
that I thought I was talking about a package

319
00:15:26,580 --> 00:15:30,060
and actually I was talking about a fork of a package.

320
00:15:30,060 --> 00:15:34,820
And it is really useful.

321
00:15:34,820 --> 00:15:37,260
There's nothing wrong.

322
00:15:37,260 --> 00:15:38,860
I'm happy that we have forks in,

323
00:15:38,860 --> 00:15:40,700
and I'm happy to have as many forks

324
00:15:40,700 --> 00:15:43,380
in the package repository as can exist.

325
00:15:43,380 --> 00:15:44,940
That's not the problem at all.

326
00:15:44,940 --> 00:15:48,740
But the knowledge that you are looking at a fork

327
00:15:48,740 --> 00:15:50,940
is really quite important.

328
00:15:50,940 --> 00:15:51,780
- Yeah, exactly.

329
00:15:51,980 --> 00:15:56,980
I'm really glad we're getting to this finally, so to speak.

330
00:15:56,980 --> 00:16:00,460
And I actually was thinking about that as well.

331
00:16:00,460 --> 00:16:02,740
I mean, I think that prompted it effectively, right?

332
00:16:02,740 --> 00:16:05,540
Us revisiting that issue was the fact

333
00:16:05,540 --> 00:16:07,460
that we ourselves were tripped up,

334
00:16:07,460 --> 00:16:13,180
not realizing that the package is actually a fork.

335
00:16:13,180 --> 00:16:14,580
- Yeah.

336
00:16:14,580 --> 00:16:16,260
- Right, in other news,

337
00:16:16,260 --> 00:16:19,940
there are a couple of important packages

338
00:16:19,940 --> 00:16:22,660
we wanted to mention that have seen recent updates.

339
00:16:22,660 --> 00:16:24,220
This is also server-side Swift.

340
00:16:24,220 --> 00:16:29,220
So Hummingbird 2 has come out.

341
00:16:29,220 --> 00:16:31,260
So the second version of Hummingbird.

342
00:16:31,260 --> 00:16:33,900
I believe you also linked to this

343
00:16:33,900 --> 00:16:36,780
in iOS Dev Weekly, didn't you, Dave?

344
00:16:36,780 --> 00:16:38,340
- Both of them, yeah.

345
00:16:38,340 --> 00:16:39,540
- Yeah, both of them, exactly.

346
00:16:39,540 --> 00:16:42,060
Yeah, and Hummingbird 2 is out.

347
00:16:42,060 --> 00:16:43,180
Beautiful webpage.

348
00:16:43,180 --> 00:16:45,140
I want to give out a shout out to the webpage.

349
00:16:45,140 --> 00:16:46,300
Looks fantastic.

350
00:16:47,260 --> 00:16:50,860
Really, really nice to navigate.

351
00:16:50,860 --> 00:16:53,460
Briefly, what's new in version two,

352
00:16:53,460 --> 00:16:54,980
it's fully async/await.

353
00:16:54,980 --> 00:16:58,420
So written with async/await in mind from the start,

354
00:16:58,420 --> 00:17:00,060
and it is Swift 6 ready.

355
00:17:00,060 --> 00:17:02,020
Give it a go.

356
00:17:02,020 --> 00:17:05,900
I always, when I talk about Hummingbird and Vapor,

357
00:17:05,900 --> 00:17:08,300
the other package that I'll mention in a minute,

358
00:17:08,300 --> 00:17:11,500
to compare them, and this,

359
00:17:11,500 --> 00:17:13,380
apologies if you don't know Python,

360
00:17:13,380 --> 00:17:14,420
but in the Python world,

361
00:17:14,420 --> 00:17:17,820
there's two packages that are Flask and Django.

362
00:17:17,820 --> 00:17:21,220
And Django is the one where everything comes,

363
00:17:21,220 --> 00:17:23,580
you pull in Django, you have everything,

364
00:17:23,580 --> 00:17:25,980
and Flask is the one where you pull in a core package

365
00:17:25,980 --> 00:17:28,860
and then you add things as you need them.

366
00:17:28,860 --> 00:17:31,620
And that's how I think about when I compare

367
00:17:31,620 --> 00:17:33,500
Hummingbird and Vapor.

368
00:17:33,500 --> 00:17:36,340
Vapor's the one where you get everything off the bat,

369
00:17:36,340 --> 00:17:37,700
and Hummingbird is where the one

370
00:17:37,700 --> 00:17:40,300
where you're more focused and more diligent

371
00:17:40,300 --> 00:17:43,620
about where you start and what you then pull in,

372
00:17:43,620 --> 00:17:44,460
in addition.

373
00:17:44,460 --> 00:17:49,380
- It's a really common pattern in the Ruby world.

374
00:17:49,380 --> 00:17:51,340
There's Rails, which is the whole everything,

375
00:17:51,340 --> 00:17:52,420
and then there's Sinatra,

376
00:17:52,420 --> 00:17:54,580
which is the one where you start with the minimal

377
00:17:54,580 --> 00:17:56,340
and then bring other modules in as you need.

378
00:17:56,340 --> 00:17:57,260
- Right, yeah.

379
00:17:57,260 --> 00:17:58,740
Yeah, and it makes perfect sense, right?

380
00:17:58,740 --> 00:18:00,780
Sometimes, especially early on, maybe,

381
00:18:00,780 --> 00:18:04,780
when you're learning a framework or a language,

382
00:18:04,780 --> 00:18:06,620
it's nice to have something

383
00:18:06,620 --> 00:18:08,180
where you don't need to worry about

384
00:18:08,180 --> 00:18:11,220
finding the best thing to do, X.

385
00:18:11,220 --> 00:18:12,620
You know, how do I do database?

386
00:18:12,620 --> 00:18:14,140
And then you have to go hunting,

387
00:18:14,140 --> 00:18:16,140
well, what's the package?

388
00:18:16,140 --> 00:18:18,740
It's really great on those occasions

389
00:18:18,740 --> 00:18:21,500
to have everything at the ready.

390
00:18:21,500 --> 00:18:22,980
If you know your way around,

391
00:18:22,980 --> 00:18:25,220
it's also nice to start small, right,

392
00:18:25,220 --> 00:18:27,500
and not incur the build costs and all that,

393
00:18:27,500 --> 00:18:29,420
and stuff that might be confusing

394
00:18:29,420 --> 00:18:32,660
or might be in the way when you actually know already,

395
00:18:32,660 --> 00:18:33,820
well, I'm not going to need that.

396
00:18:33,820 --> 00:18:36,260
So it's really great to have the choice.

397
00:18:36,260 --> 00:18:41,260
And as I mentioned, Vapor also hasn't had the release,

398
00:18:41,260 --> 00:18:43,100
the next release, which is version five,

399
00:18:43,100 --> 00:18:47,820
but they've put up a post about the future of Vapor,

400
00:18:47,820 --> 00:18:54,100
and it's laying out the plans for version five of Vapor,

401
00:18:54,100 --> 00:18:55,500
which is, it's very similar

402
00:18:55,500 --> 00:18:57,140
to what Hummingbird 2 is really.

403
00:18:57,140 --> 00:18:59,180
It's fully async/await,

404
00:18:59,180 --> 00:19:01,740
using structured concurrency throughout,

405
00:19:01,740 --> 00:19:05,340
and it's Swift 6 ready,

406
00:19:05,340 --> 00:19:09,580
which isn't to say that neither of those

407
00:19:09,580 --> 00:19:10,980
is the case for Vapor 6.

408
00:19:10,980 --> 00:19:14,980
It's just that in Vapor 6, it is async/await ready,

409
00:19:14,980 --> 00:19:18,900
so you can use it, and it's fully Swift 6 ready as well,

410
00:19:18,900 --> 00:19:22,660
but the async/awaitness has been sort of retrofitted,

411
00:19:22,660 --> 00:19:24,260
and in lots of places,

412
00:19:24,260 --> 00:19:27,860
stuff has been made sendable via locks.

413
00:19:27,860 --> 00:19:31,700
So as a user, as an API user, you wouldn't notice it,

414
00:19:31,700 --> 00:19:34,460
but under the hood, I think you're going to,

415
00:19:34,460 --> 00:19:38,700
if you're very performance sensitive, perhaps,

416
00:19:38,700 --> 00:19:42,340
you would probably see that there's locking going on

417
00:19:42,340 --> 00:19:43,180
under the hood,

418
00:19:43,180 --> 00:19:48,180
but I think, and we've been using Vapor for years now,

419
00:19:48,180 --> 00:19:50,660
and we've transitioned to async/await fully.

420
00:19:50,660 --> 00:19:55,380
We don't notice any downsides of this right now,

421
00:19:55,380 --> 00:19:57,780
but it's still nice to have the plan laid out,

422
00:19:57,780 --> 00:20:00,940
and there's also a couple other things,

423
00:20:00,940 --> 00:20:05,940
like moving to use a few more upstream packages,

424
00:20:06,300 --> 00:20:11,300
like for instance, the HTTP types from the Swiftlang,

425
00:20:11,300 --> 00:20:13,460
Swift HTTP types repository,

426
00:20:13,460 --> 00:20:16,100
so there's, and that's going to make it easier

427
00:20:16,100 --> 00:20:20,340
once you use these types as currency types to exchange.

428
00:20:20,340 --> 00:20:23,180
If you have different packages that all use these types,

429
00:20:23,180 --> 00:20:25,140
it becomes easier to exchange those types

430
00:20:25,140 --> 00:20:27,860
because they then live in an upstream library,

431
00:20:27,860 --> 00:20:31,020
so imagine you have a router that returns

432
00:20:31,020 --> 00:20:32,620
some common HTTP type.

433
00:20:32,620 --> 00:20:35,100
You can easily plug it into another component

434
00:20:35,100 --> 00:20:37,540
that uses that same type without having to write

435
00:20:37,540 --> 00:20:40,580
a little converter for that,

436
00:20:40,580 --> 00:20:42,020
so that's really nice to see.

437
00:20:42,020 --> 00:20:46,020
The first alpha should be released really soon.

438
00:20:46,020 --> 00:20:49,180
In fact, it might be released already.

439
00:20:49,180 --> 00:20:51,020
I haven't seen it, but I might have missed it.

440
00:20:51,020 --> 00:20:53,420
I didn't go actively looking.

441
00:20:53,420 --> 00:20:55,300
It certainly should be imminent,

442
00:20:55,300 --> 00:20:59,700
perhaps around the conference end of this week,

443
00:20:59,700 --> 00:21:01,900
or maybe shortly after.

444
00:21:01,900 --> 00:21:05,420
You should see the first beta of Vapor V.

445
00:21:05,420 --> 00:21:06,620
- The only other thing I'd add there

446
00:21:06,620 --> 00:21:08,420
is I think I should add some clarification

447
00:21:08,420 --> 00:21:11,940
on version numbers because there were a lot of Swift 6

448
00:21:11,940 --> 00:21:16,100
and Vapor Vs and Homebird 2s and Vapor 4s in there,

449
00:21:16,100 --> 00:21:18,060
and I think you may have got the numbers mixed up

450
00:21:18,060 --> 00:21:19,500
a little bit, a couple of points.

451
00:21:19,500 --> 00:21:20,340
- Oh, did I?

452
00:21:20,340 --> 00:21:23,860
- Yeah, so you were talking about Vapor 6,

453
00:21:23,860 --> 00:21:24,820
which is not a thing.

454
00:21:24,820 --> 00:21:26,300
That's Vapor V.

455
00:21:26,300 --> 00:21:27,140
- It will be, though.

456
00:21:27,140 --> 00:21:28,220
It will be, I'm sure.

457
00:21:28,220 --> 00:21:30,460
(laughing)

458
00:21:31,660 --> 00:21:34,100
- Yeah, so that's Vapor V with Swift 6 support,

459
00:21:34,100 --> 00:21:38,620
and Hummingbird 2 also with Swift 6 support.

460
00:21:38,620 --> 00:21:39,460
- It's, you know.

461
00:21:39,460 --> 00:21:40,500
- Just to clarify that.

462
00:21:40,500 --> 00:21:43,060
- I was 18 on the iPhone 17, right,

463
00:21:43,060 --> 00:21:46,660
and running on MacOS, oh God, it's all so terrible.

464
00:21:46,660 --> 00:21:49,220
- Exactly, yeah.

465
00:21:49,220 --> 00:21:51,620
And the Swift package index is still on version 2

466
00:21:51,620 --> 00:21:53,100
and has been for the last three and a half years.

467
00:21:53,100 --> 00:21:55,580
- Yeah, but for a minor version 101.

468
00:21:55,580 --> 00:21:57,820
(laughing)

469
00:21:59,900 --> 00:22:02,380
So yes, lots of version numbers.

470
00:22:02,380 --> 00:22:06,300
We shall, as an industry, we shall one day solve

471
00:22:06,300 --> 00:22:08,740
the mystery of how to do version numbers.

472
00:22:08,740 --> 00:22:09,580
- Oh dear.

473
00:22:09,580 --> 00:22:12,980
- So should we do some package recommendations?

474
00:22:12,980 --> 00:22:14,620
- Let's do some packages.

475
00:22:14,620 --> 00:22:15,980
Do you wanna kick us off?

476
00:22:15,980 --> 00:22:17,380
- Sure thing.

477
00:22:17,380 --> 00:22:22,380
I'm gonna talk first about a package called Swift Snowflake

478
00:22:22,380 --> 00:22:26,740
by Jaehong Kang, and this is,

479
00:22:26,740 --> 00:22:29,460
so I hadn't actually come across the idea

480
00:22:29,460 --> 00:22:31,460
of this Snowflake ID.

481
00:22:31,460 --> 00:22:32,300
Had you?

482
00:22:32,300 --> 00:22:33,420
Do you know about a Snowflake ID?

483
00:22:33,420 --> 00:22:35,420
- No, it sort of rings a bell.

484
00:22:35,420 --> 00:22:39,580
I might've read about it, but I can't recall any details.

485
00:22:39,580 --> 00:22:41,300
- Right, okay, yes, it might, yeah.

486
00:22:41,300 --> 00:22:43,540
You probably will have heard something about it,

487
00:22:43,540 --> 00:22:45,340
or at least there are lots of technologies

488
00:22:45,340 --> 00:22:46,380
which I'm sure you do know.

489
00:22:46,380 --> 00:22:49,460
Like for example, UDIDs are a similar,

490
00:22:49,460 --> 00:22:51,180
solving a similar problem to this.

491
00:22:51,180 --> 00:22:57,260
A Snowflake ID in best Wikipedia terminology

492
00:22:57,260 --> 00:22:59,620
is a form of unique identifier

493
00:22:59,620 --> 00:23:01,540
used in distributed computing.

494
00:23:01,540 --> 00:23:05,340
It was initially created in the early days of Twitter

495
00:23:05,340 --> 00:23:08,420
and used for the IDs of tweets,

496
00:23:08,420 --> 00:23:11,220
but now it's used by Masterdard, it's used by Instagram,

497
00:23:11,220 --> 00:23:12,100
it's used by Discord,

498
00:23:12,100 --> 00:23:15,420
it's used by a whole load of other products.

499
00:23:15,420 --> 00:23:20,420
And it is a kind of guaranteed unique number

500
00:23:20,420 --> 00:23:25,300
that an individual machine can generate

501
00:23:25,300 --> 00:23:27,940
without needing to know what the previous number was.

502
00:23:27,940 --> 00:23:33,980
So 64 bytes binary, it starts with a timestamp,

503
00:23:33,980 --> 00:23:35,540
it then has a machine ID,

504
00:23:35,540 --> 00:23:40,420
and then has a sequence number for that machine after that.

505
00:23:40,420 --> 00:23:45,140
And a little bit like UUID or UD-

506
00:23:45,140 --> 00:23:45,980
- UUID?

507
00:23:45,980 --> 00:23:48,860
- No, UDID is unique device, isn't it?

508
00:23:48,860 --> 00:23:51,740
And UUID is universally unique.

509
00:23:53,980 --> 00:23:57,420
Yes, you can then generate these numbers

510
00:23:57,420 --> 00:24:01,420
which are good for, maybe you can use them as database ID,

511
00:24:01,420 --> 00:24:04,380
but you can certainly use them for public identifiers

512
00:24:04,380 --> 00:24:07,820
for unique resources inside your application.

513
00:24:07,820 --> 00:24:12,700
And Swift Snowflake is a implementation

514
00:24:12,700 --> 00:24:16,180
of Snowflake IDs for Swift.

515
00:24:16,180 --> 00:24:18,660
So it's very, very simple to use.

516
00:24:18,660 --> 00:24:23,340
You can either represent a specific Snowflake ID

517
00:24:23,340 --> 00:24:26,340
if you would like to represent one that you already have,

518
00:24:26,340 --> 00:24:30,780
or you can ask it to generate one.

519
00:24:30,780 --> 00:24:33,300
And there are various different strategies

520
00:24:33,300 --> 00:24:38,940
for encoding that if you want to put it into JSON.

521
00:24:38,940 --> 00:24:43,180
And yeah, it's a very, very simple package to use,

522
00:24:43,180 --> 00:24:47,820
but I hadn't come across the Snowflake IDs before,

523
00:24:47,820 --> 00:24:49,460
and I thought they were kind of interesting.

524
00:24:49,460 --> 00:24:50,420
- Interesting.

525
00:24:50,420 --> 00:24:54,220
Just to clarify, you said 64 bytes.

526
00:24:54,220 --> 00:24:55,940
Did you mean bytes or bits?

527
00:24:55,940 --> 00:24:57,620
- Bits, I meant bits.

528
00:24:57,620 --> 00:25:01,100
Like it's like Vapor 6 and 64 bytes.

529
00:25:01,100 --> 00:25:01,940
Yeah.

530
00:25:01,940 --> 00:25:04,220
(laughs)

531
00:25:04,220 --> 00:25:07,740
Yeah, a 64 byte identifier would be amazing.

532
00:25:07,740 --> 00:25:11,300
That would be more identifiers

533
00:25:11,300 --> 00:25:14,460
than there are grains of sand in the world, I'm sure.

534
00:25:14,460 --> 00:25:15,300
- Yeah, that's for sure.

535
00:25:15,300 --> 00:25:18,020
But also, I mean, UUID is 128,

536
00:25:18,020 --> 00:25:21,540
and that is, that bears, I mean, it's a small risk,

537
00:25:21,540 --> 00:25:22,740
but there's a risk of collision.

538
00:25:22,740 --> 00:25:24,860
You said guaranteed unique.

539
00:25:24,860 --> 00:25:28,260
I mean, and that's half the size, I guess, that-

540
00:25:28,260 --> 00:25:29,100
- Probably.

541
00:25:29,100 --> 00:25:32,980
There is no mention of the word guaranteed unique

542
00:25:32,980 --> 00:25:34,660
on the Wikipedia page.

543
00:25:34,660 --> 00:25:35,500
- Oh, okay.

544
00:25:35,500 --> 00:25:37,580
(laughs)

545
00:25:37,580 --> 00:25:43,980
- That is me projecting my wishes onto this forum.

546
00:25:43,980 --> 00:25:46,180
- Okay, that's a wishful thinking addition.

547
00:25:47,220 --> 00:25:48,700
It does say,

548
00:25:48,700 --> 00:25:52,780
it does say, I mean,

549
00:25:52,780 --> 00:25:54,100
per machine secrets number two,

550
00:25:54,100 --> 00:25:56,020
allow creation of multiple snowflakes

551
00:25:56,020 --> 00:26:01,020
in the same millisecond, which is quite reasonable.

552
00:26:01,020 --> 00:26:03,180
- Yeah, yeah, I mean, even with,

553
00:26:03,180 --> 00:26:07,740
especially with UUID, the chances are really, really slim.

554
00:26:07,740 --> 00:26:10,620
I mean, if you think your problem is a UUID collision,

555
00:26:10,620 --> 00:26:14,340
then in all likelihood, you need to think again,

556
00:26:14,340 --> 00:26:15,820
if that was really what's happening.

557
00:26:15,820 --> 00:26:17,100
- Right, yeah, exactly.

558
00:26:17,100 --> 00:26:18,940
Yeah, yeah.

559
00:26:18,940 --> 00:26:23,460
And I think maybe that's the place to think about this

560
00:26:23,460 --> 00:26:25,340
rather than maybe a UUID,

561
00:26:25,340 --> 00:26:30,020
which is if it tends to be used for

562
00:26:30,020 --> 00:26:35,100
identifiers that might end up in like a URL.

563
00:26:35,100 --> 00:26:40,100
So where a UUID might be a little bit long for a URL,

564
00:26:40,100 --> 00:26:41,620
this is a little shorter

565
00:26:41,620 --> 00:26:46,620
and might fit into a URL more conveniently

566
00:26:46,780 --> 00:26:49,740
than some of the longer identifiers.

567
00:26:49,740 --> 00:26:51,460
- Yeah, yeah.

568
00:26:51,460 --> 00:26:53,500
Plus also not always,

569
00:26:53,500 --> 00:26:56,020
there are scenarios where you can think

570
00:26:56,020 --> 00:26:57,180
you might need an ID.

571
00:26:57,180 --> 00:27:00,260
And if, I mean, even in the remote chance

572
00:27:00,260 --> 00:27:02,300
that there is a collision, it might not be fatal, right?

573
00:27:02,300 --> 00:27:05,580
You might be able to detect and just regenerate.

574
00:27:05,580 --> 00:27:09,140
You know, that's also sometimes an option.

575
00:27:09,140 --> 00:27:10,540
- Right.

576
00:27:10,540 --> 00:27:11,980
- Uh-huh, interesting.

577
00:27:11,980 --> 00:27:12,820
Nice.

578
00:27:14,060 --> 00:27:19,060
Right, my first pick is called Versionator by Sam Dean.

579
00:27:19,060 --> 00:27:22,140
And that's a nice little package.

580
00:27:22,140 --> 00:27:25,820
It's a build plugin that generates a source file

581
00:27:25,820 --> 00:27:27,260
with version control info.

582
00:27:27,260 --> 00:27:29,940
So I think that's quite a common scenario.

583
00:27:29,940 --> 00:27:32,900
And I even thought we talked about a package

584
00:27:32,900 --> 00:27:33,740
like this before,

585
00:27:33,740 --> 00:27:35,460
but I didn't find anything in the show notes.

586
00:27:35,460 --> 00:27:40,460
So if this is a repeat mention of a,

587
00:27:40,460 --> 00:27:42,580
not this package in all likelihood,

588
00:27:42,580 --> 00:27:44,660
but a similar package, apologies.

589
00:27:44,660 --> 00:27:49,500
But this covers the scenario where you have an app

590
00:27:49,500 --> 00:27:51,980
and you want to expose version information

591
00:27:51,980 --> 00:27:54,980
that is, you know, like what git hash

592
00:27:54,980 --> 00:27:59,660
did generate this build, that sort of thing.

593
00:27:59,660 --> 00:28:00,940
And you don't want to automatically,

594
00:28:00,940 --> 00:28:05,260
you know, don't want to manually track that version number.

595
00:28:05,260 --> 00:28:06,980
This plugin will generate a source file

596
00:28:06,980 --> 00:28:09,980
that you can use and reference in your application

597
00:28:09,980 --> 00:28:12,580
and then, you know, display it and whatnot.

598
00:28:12,580 --> 00:28:15,820
It has a number of different things in the struct

599
00:28:15,820 --> 00:28:18,100
that it generates, like for instance, the build count.

600
00:28:18,100 --> 00:28:19,740
And this is using git under the hood

601
00:28:19,740 --> 00:28:21,580
to determine these values.

602
00:28:21,580 --> 00:28:25,260
So it counts the number of commits since the start.

603
00:28:25,260 --> 00:28:28,300
So that's a good thing to use for build count.

604
00:28:28,300 --> 00:28:31,420
The git commit, as I mentioned, the hash, the shah.

605
00:28:31,420 --> 00:28:34,980
And it can generate a git describe string.

606
00:28:34,980 --> 00:28:36,900
So that's typically the tag,

607
00:28:36,900 --> 00:28:39,340
but it can also include additional information

608
00:28:39,340 --> 00:28:42,980
if you're not exactly on a tag, it'll add some extra info.

609
00:28:42,980 --> 00:28:45,820
It's really nice, you just stick that in there

610
00:28:45,820 --> 00:28:48,740
and you get this source file that you can then use.

611
00:28:48,740 --> 00:28:50,140
It's a bit like in the old days,

612
00:28:50,140 --> 00:28:51,660
which doesn't work with git anymore,

613
00:28:51,660 --> 00:28:53,860
but in older version control systems,

614
00:28:53,860 --> 00:28:56,740
you could place special tags in your source code

615
00:28:56,740 --> 00:28:59,540
that would be replaced by the version control system

616
00:28:59,540 --> 00:29:01,500
whenever you made a commit.

617
00:29:01,500 --> 00:29:05,940
CVS, if people old enough to know CVS

618
00:29:05,940 --> 00:29:08,740
will know the little dollar.

619
00:29:08,740 --> 00:29:12,380
I think it was $CVS$ that you put in your source code

620
00:29:12,380 --> 00:29:14,180
and it replaced that under the hood.

621
00:29:14,180 --> 00:29:18,340
So yeah, that's Versionator by Sam Dean.

622
00:29:18,340 --> 00:29:19,300
- Fantastic.

623
00:29:19,300 --> 00:29:26,220
My next package is Game Controller Kit by Wesley de Groot.

624
00:29:26,220 --> 00:29:31,780
And this is predictably a package

625
00:29:31,780 --> 00:29:35,180
that allows you to easily interface with game controllers

626
00:29:35,180 --> 00:29:40,180
on lots of platforms,

627
00:29:40,180 --> 00:29:43,060
iOS, macOS, VisionOS, tvOS.

628
00:29:43,060 --> 00:29:44,980
No support yet for watchOS,

629
00:29:44,980 --> 00:29:46,420
which I'm terribly disappointed about

630
00:29:46,420 --> 00:29:48,460
because I desperately want to.

631
00:29:48,460 --> 00:29:52,580
Actually, how would you hold the controller

632
00:29:52,580 --> 00:29:53,980
and look at your watch?

633
00:29:53,980 --> 00:29:56,180
Maybe that's why it doesn't support watchOS.

634
00:29:56,180 --> 00:29:58,260
(laughs)

635
00:29:58,260 --> 00:29:59,780
- You got there eventually.

636
00:29:59,780 --> 00:30:00,620
- But...

637
00:30:00,620 --> 00:30:03,100
(laughs)

638
00:30:03,100 --> 00:30:05,300
It was only as I actually looked at my watch

639
00:30:05,300 --> 00:30:10,300
and realized the difficulty that would cause.

640
00:30:10,300 --> 00:30:14,220
So we'll forgive the lack of support for watchOS.

641
00:30:14,220 --> 00:30:18,380
But yes, what it is, is it's a package

642
00:30:18,380 --> 00:30:22,860
that really gives a nice, convenient programming interface

643
00:30:22,860 --> 00:30:24,460
to a game controller.

644
00:30:24,460 --> 00:30:29,460
Both the detection of button events and joystick events,

645
00:30:29,460 --> 00:30:32,940
but also control of the haptics.

646
00:30:32,940 --> 00:30:35,620
So most, if not all game controllers

647
00:30:35,620 --> 00:30:39,860
have pretty sophisticated haptics these days

648
00:30:39,860 --> 00:30:42,860
and you get control of...

649
00:30:42,860 --> 00:30:44,580
I actually can't see at what level

650
00:30:44,580 --> 00:30:46,500
you get control of the haptics,

651
00:30:46,500 --> 00:30:48,460
but it does say that you get control of the haptics.

652
00:30:48,460 --> 00:30:51,460
So that may just be as simple as, you know,

653
00:30:51,460 --> 00:30:52,700
give it a vibrate,

654
00:30:52,700 --> 00:30:55,580
or it may be something a little more subtle

655
00:30:55,580 --> 00:30:57,460
like we have on the iPhone.

656
00:30:57,460 --> 00:31:01,820
But yeah, I thought this was just a very,

657
00:31:01,820 --> 00:31:06,580
really super simple way to get access

658
00:31:06,580 --> 00:31:09,860
to an input device that you may not be thinking about

659
00:31:09,860 --> 00:31:10,780
at the moment.

660
00:31:10,780 --> 00:31:15,780
Comes with a demo app that for the iPhone or for the Mac,

661
00:31:15,780 --> 00:31:18,340
or there's also a tvOS screenshot here,

662
00:31:18,340 --> 00:31:20,940
which I guess is a great platform for game controllers

663
00:31:20,940 --> 00:31:25,700
where it has every input and button mapped out

664
00:31:25,700 --> 00:31:28,020
onto the screen, including things like the touchpad.

665
00:31:28,020 --> 00:31:31,500
So I think it's the PlayStation controller has a touchpad.

666
00:31:32,500 --> 00:31:36,100
All the trigger buttons, all the left, right, up, downs,

667
00:31:36,100 --> 00:31:37,540
the X, Y, A, Bs,

668
00:31:37,540 --> 00:31:41,060
and of course the two joysticks as well.

669
00:31:41,060 --> 00:31:46,020
So it seems like a great and comprehensive library

670
00:31:46,020 --> 00:31:48,620
to get access to that.

671
00:31:48,620 --> 00:31:51,980
Should we add game controller support to SwiftPackage Index?

672
00:31:51,980 --> 00:31:54,540
Is that something that people are crying out for?

673
00:31:54,540 --> 00:31:56,420
- That's a tough sell, but who knows?

674
00:31:56,420 --> 00:31:58,100
Maybe open a discussion first.

675
00:31:59,940 --> 00:32:02,060
- That's a very polite way of saying no.

676
00:32:02,060 --> 00:32:04,940
- That's a standard way of dealing with feature requests.

677
00:32:04,940 --> 00:32:08,300
- Yes, please put it in a discussion.

678
00:32:08,300 --> 00:32:13,940
So yes, that's a game controller kit by Wesley de Groot.

679
00:32:13,940 --> 00:32:14,780
- Nice.

680
00:32:14,780 --> 00:32:18,460
Right, my second pick,

681
00:32:18,460 --> 00:32:21,620
I was going to snipe you in iOS Dev Weekly,

682
00:32:21,620 --> 00:32:23,500
but then because we pushed it back by a week,

683
00:32:23,500 --> 00:32:24,820
you actually sniped me.

684
00:32:26,020 --> 00:32:30,180
And the package is called Swift Export by Frank Lefebvre.

685
00:32:30,180 --> 00:32:34,860
And it's a package, it's a command line tool

686
00:32:34,860 --> 00:32:37,700
to make it easier to sign and authorize executables

687
00:32:37,700 --> 00:32:38,540
on macOS.

688
00:32:38,540 --> 00:32:42,860
And that sounds like a great tool to help with this.

689
00:32:42,860 --> 00:32:44,700
So it's been a while that I actually

690
00:32:44,700 --> 00:32:51,140
redeployed my app or our SPI app.

691
00:32:53,180 --> 00:32:56,060
And what I normally do, I've sort of written down the steps

692
00:32:56,060 --> 00:32:57,420
that I go through in Xcode,

693
00:32:57,420 --> 00:33:00,260
you know, like clicking through dialogues.

694
00:33:00,260 --> 00:33:04,220
But I always love having something that I can make file

695
00:33:04,220 --> 00:33:07,020
or a script that I can run that sort of encodes the steps

696
00:33:07,020 --> 00:33:09,380
in like actual code that I can check in

697
00:33:09,380 --> 00:33:12,340
because I can never, like a few months later,

698
00:33:12,340 --> 00:33:14,620
I don't remember how to release things.

699
00:33:14,620 --> 00:33:19,620
And I would absolutely use this and change this

700
00:33:19,620 --> 00:33:21,700
and use this to notarize an executable

701
00:33:21,700 --> 00:33:23,900
because I could then put it in a script.

702
00:33:23,900 --> 00:33:28,620
So this is really nice way of automating that

703
00:33:28,620 --> 00:33:32,020
and dealing with this sort of, yeah,

704
00:33:32,020 --> 00:33:35,820
taking out the dialogue based distribution.

705
00:33:35,820 --> 00:33:42,020
Yeah, so that's Swift Export by Frank Lefebvre.

706
00:33:42,020 --> 00:33:45,020
- I believe, so I did link to that in our Dev Weekly.

707
00:33:45,020 --> 00:33:47,540
And I believe it also has some extra features

708
00:33:47,540 --> 00:33:49,460
like it can automate the generation

709
00:33:49,460 --> 00:33:51,180
of a package-based installer.

710
00:33:51,180 --> 00:33:55,340
So a .pkg file, which if you, yeah,

711
00:33:55,340 --> 00:33:59,820
if you need to do additional things like, you know,

712
00:33:59,820 --> 00:34:01,780
move files into places that are not just

713
00:34:01,780 --> 00:34:04,540
in the applications directory, for example,

714
00:34:04,540 --> 00:34:09,500
you can again automate and create a configuration file

715
00:34:09,500 --> 00:34:12,980
to perform those steps as part of the installer.

716
00:34:12,980 --> 00:34:15,260
And it will then generate that package installer as well.

717
00:34:15,260 --> 00:34:17,580
I think as long as I didn't get it mixed up,

718
00:34:17,580 --> 00:34:20,060
but I believe that's the case.

719
00:34:20,060 --> 00:34:22,300
- That's great, I didn't even notice that.

720
00:34:22,300 --> 00:34:24,020
That's fantastic.

721
00:34:24,020 --> 00:34:26,900
- Well, I think probably because we're not going to need that

722
00:34:26,900 --> 00:34:31,900
with the SPI app, because that is just a pure, simple copy

723
00:34:31,900 --> 00:34:35,420
into the applications directory and you're done.

724
00:34:35,420 --> 00:34:40,420
But yeah, it reminds me of the old,

725
00:34:40,420 --> 00:34:42,940
and this is going back a long time now,

726
00:34:42,940 --> 00:34:45,540
the old install shield.

727
00:34:45,540 --> 00:34:48,060
Did you ever have to use install shield on Windows?

728
00:34:48,060 --> 00:34:48,980
- Oh God, yeah, yeah.

729
00:34:48,980 --> 00:34:52,100
I mean, it's still, they still run installers, right?

730
00:34:52,100 --> 00:34:53,420
- It is, yeah, yeah.

731
00:34:53,420 --> 00:34:55,300
It does still exist.

732
00:34:55,300 --> 00:34:59,820
And I believe it still makes package,

733
00:34:59,820 --> 00:35:02,780
installer packages for Mac OS, I believe.

734
00:35:02,780 --> 00:35:04,900
But it's certainly, it's a bit of a,

735
00:35:04,900 --> 00:35:08,100
I think it's a bit of an old technology now of that whole,

736
00:35:08,100 --> 00:35:09,900
well, let's build our installer.

737
00:35:09,900 --> 00:35:14,900
But certainly this would be a simpler way of doing that

738
00:35:14,900 --> 00:35:18,420
than some software like that, I'm sure.

739
00:35:18,420 --> 00:35:21,980
Maybe I'm being terribly unfair to install shield,

740
00:35:21,980 --> 00:35:24,020
but I somehow doubt it.

741
00:35:24,020 --> 00:35:24,860
- Nice.

742
00:35:24,860 --> 00:35:30,100
- My final package this week is a little bit of a fun one.

743
00:35:30,100 --> 00:35:33,140
I like to occasionally include a fun package

744
00:35:33,140 --> 00:35:35,380
in the recommendations here,

745
00:35:35,380 --> 00:35:40,380
and it's called Chip8i Emulation Core by Danijel Stracenski.

746
00:35:40,380 --> 00:35:46,540
And I also hadn't heard of the Chip8 system,

747
00:35:46,540 --> 00:35:51,220
which is, again, an old,

748
00:35:51,220 --> 00:35:57,180
it's an old microprocessor originally used

749
00:35:57,180 --> 00:36:00,380
on the Cosmac VIP and Telmac 1800

750
00:36:00,380 --> 00:36:03,700
that were 18, eight-bit microcomputers in the,

751
00:36:03,700 --> 00:36:04,700
from the '70s.

752
00:36:04,700 --> 00:36:10,500
And what it is, is it's a swift emulation

753
00:36:10,500 --> 00:36:15,460
of the, that whole processor.

754
00:36:15,460 --> 00:36:18,860
So what you get as an API from Swift

755
00:36:18,860 --> 00:36:22,220
is a way to load ROM files in.

756
00:36:22,220 --> 00:36:27,220
So you don't get to code in the basic

757
00:36:27,220 --> 00:36:29,660
or whatever the language of the thing had.

758
00:36:29,660 --> 00:36:33,540
It just enables you to load the ROM files in.

759
00:36:33,540 --> 00:36:36,820
And then you get to call this emulation function,

760
00:36:36,820 --> 00:36:40,580
and it has 16 input keys, which, again,

761
00:36:40,580 --> 00:36:42,020
so it didn't even have a full keyboard.

762
00:36:42,020 --> 00:36:46,140
It had one, zero to nine numbers,

763
00:36:46,140 --> 00:36:49,460
and A to F, so it could input hex, I guess,

764
00:36:49,460 --> 00:36:51,420
is effectively what it could do.

765
00:36:51,420 --> 00:36:55,700
And then you get to hook into various key presses.

766
00:36:55,700 --> 00:36:59,500
So you can say on key down or on key up on any of the keys.

767
00:36:59,500 --> 00:37:01,420
You can observe the output.

768
00:37:01,420 --> 00:37:06,420
You also get a 64 by 32 grid of Boolean values,

769
00:37:06,420 --> 00:37:11,820
which represent the pixel states on the screen.

770
00:37:11,820 --> 00:37:14,700
So it was a very high resolution display,

771
00:37:14,700 --> 00:37:19,900
which you could then represent in SwiftUI

772
00:37:19,900 --> 00:37:22,660
or whatever technology you would like

773
00:37:22,660 --> 00:37:26,900
to represent those pixels as.

774
00:37:26,900 --> 00:37:30,260
In fact, there is an example in the readme file,

775
00:37:30,260 --> 00:37:35,260
which is a Mac OS SwiftUI app that generates CG images

776
00:37:37,740 --> 00:37:42,260
and lays them out on a SwiftUI display

777
00:37:42,260 --> 00:37:47,260
based on this 64 by 32 bit grid of Booleans.

778
00:37:47,260 --> 00:37:52,420
So it's kind of interesting that something like this

779
00:37:52,420 --> 00:37:55,820
would end up emulated in Swift,

780
00:37:55,820 --> 00:37:58,500
but I thought it was an interesting thing

781
00:37:58,500 --> 00:38:00,180
to have a quick look at.

782
00:38:00,180 --> 00:38:01,020
- That's amazing.

783
00:38:01,020 --> 00:38:02,540
Actually, if you think about it, as you were talking,

784
00:38:02,540 --> 00:38:04,780
I was looking at my watch and I thought,

785
00:38:04,780 --> 00:38:09,780
well, this is a tiny piece of a complication on my watch.

786
00:38:09,780 --> 00:38:12,060
(laughs)

787
00:38:12,060 --> 00:38:12,900
- Exactly.

788
00:38:12,900 --> 00:38:17,900
Yeah, I mean, 64 by 32 is really low resolution.

789
00:38:17,900 --> 00:38:20,100
It's like super low resolution.

790
00:38:20,100 --> 00:38:23,140
- Yeah, but it's not that far off where we started.

791
00:38:23,140 --> 00:38:25,980
But my first computer was the Commodore 64,

792
00:38:25,980 --> 00:38:30,780
and I think that was 320 by something or 480 by 320,

793
00:38:30,780 --> 00:38:31,620
something like that.

794
00:38:31,620 --> 00:38:32,860
It wasn't that much more.

795
00:38:32,860 --> 00:38:33,700
I mean, a little bit more, but-

796
00:38:33,700 --> 00:38:35,900
- No, not that much more, yeah.

797
00:38:35,900 --> 00:38:37,580
- Not way more.

798
00:38:37,580 --> 00:38:40,140
So yeah, really fun.

799
00:38:40,140 --> 00:38:42,220
- So you could take a little trip down.

800
00:38:42,220 --> 00:38:44,740
It's probably not exactly a trip down memory lane

801
00:38:44,740 --> 00:38:47,660
because I'm not confident that many people

802
00:38:47,660 --> 00:38:50,500
will have used this system listening to this podcast,

803
00:38:50,500 --> 00:38:52,620
but it's always fun to look at

804
00:38:52,620 --> 00:38:54,380
a bit of the history of computing.

805
00:38:54,380 --> 00:38:55,380
- Yeah, absolutely.

806
00:38:55,380 --> 00:39:01,380
Right, my third and final pick is called Spectricate

807
00:39:01,380 --> 00:39:03,300
by Patrik Svensson.

808
00:39:03,300 --> 00:39:05,860
And can I just say, great last name, Patrick.

809
00:39:05,860 --> 00:39:07,940
(laughs)

810
00:39:07,940 --> 00:39:12,060
The package is a library to help you

811
00:39:12,060 --> 00:39:14,140
create beautiful terminal applications.

812
00:39:14,140 --> 00:39:17,860
I think that's a quote I lifted from the package.

813
00:39:17,860 --> 00:39:20,100
And just look at it.

814
00:39:20,100 --> 00:39:23,580
If you open that up and look at the screenshot

815
00:39:23,580 --> 00:39:26,820
that Patrick has placed there of a table,

816
00:39:26,820 --> 00:39:29,860
a panel and a table created with it, it's just fantastic.

817
00:39:29,860 --> 00:39:32,100
We had a couple of packages

818
00:39:32,100 --> 00:39:35,260
to create terminal applications in the past, I believe.

819
00:39:35,260 --> 00:39:36,780
And I always pick them.

820
00:39:36,780 --> 00:39:39,460
So if you want to get mentioned,

821
00:39:39,460 --> 00:39:42,660
I think that's a package you sort of need to create.

822
00:39:42,660 --> 00:39:45,300
But it's just beautiful.

823
00:39:45,300 --> 00:39:51,180
I think the UI is Swift UI like,

824
00:39:51,180 --> 00:39:54,780
but even if it isn't, just look at the result.

825
00:39:54,780 --> 00:39:59,780
You'll implement this with any API,

826
00:39:59,780 --> 00:40:01,980
I think, to get results like this.

827
00:40:01,980 --> 00:40:05,620
I recall having written a little tool

828
00:40:05,620 --> 00:40:09,620
that deals with our ProSquare database in the past.

829
00:40:09,620 --> 00:40:12,140
And I was looking around for packages

830
00:40:12,140 --> 00:40:17,140
that output nice table views, like tables in the terminal.

831
00:40:17,140 --> 00:40:21,020
And I'm very sure that that hadn't existed at the time

832
00:40:21,020 --> 00:40:23,420
because I would have certainly picked it.

833
00:40:23,420 --> 00:40:24,860
But it kind of makes me want to go back

834
00:40:24,860 --> 00:40:27,420
and substitute that one in now.

835
00:40:27,420 --> 00:40:30,540
- Yeah, I just had a look at it and it looks great.

836
00:40:30,540 --> 00:40:35,540
It's really, I quite like the kind of curved edge boxes

837
00:40:35,540 --> 00:40:40,020
as well as the straight edge boxes.

838
00:40:40,020 --> 00:40:45,020
Is that using, they're not characters.

839
00:40:45,020 --> 00:40:48,060
Are they being drawn or are they characters?

840
00:40:48,060 --> 00:40:53,060
- Yeah, those are, so all these use Unicode glyphs

841
00:40:53,060 --> 00:40:54,420
to generate the tables.

842
00:40:54,420 --> 00:40:57,140
So this would be fully selectable and pasteable.

843
00:40:57,140 --> 00:40:58,300
I mean, obviously you'd have,

844
00:40:58,300 --> 00:40:59,940
you wouldn't get just the text,

845
00:40:59,940 --> 00:41:04,780
you'd get the text and the Unicode stuff.

846
00:41:04,780 --> 00:41:07,500
So it'll, formatting might change if you have a non,

847
00:41:07,500 --> 00:41:11,380
you know, a font that doesn't support all the glyphs

848
00:41:11,380 --> 00:41:14,580
or if you paste this into a proportional font thing,

849
00:41:14,580 --> 00:41:16,100
then it would be messed up.

850
00:41:16,100 --> 00:41:18,860
But no, it is proper text.

851
00:41:18,860 --> 00:41:22,140
- I'm very familiar with the single and the double boxes

852
00:41:22,140 --> 00:41:24,820
from back in the old DOS days.

853
00:41:24,820 --> 00:41:28,980
But I haven't yet seen the boxes with curved corners before.

854
00:41:28,980 --> 00:41:30,820
So that's news to me.

855
00:41:30,820 --> 00:41:33,540
There are still characters in the Unicode character set

856
00:41:33,540 --> 00:41:34,940
that I'm unfamiliar with.

857
00:41:34,940 --> 00:41:37,580
- Yeah, it's beautiful, isn't it?

858
00:41:37,580 --> 00:41:40,620
- That's, it is, yeah, it's great.

859
00:41:40,620 --> 00:41:44,940
It takes me back to the days of Ball and IDEs

860
00:41:44,940 --> 00:41:49,100
where they used the double box characters to great effect

861
00:41:49,100 --> 00:41:52,180
to create all their windows and UIs.

862
00:41:52,180 --> 00:41:55,420
Very fond memories of that.

863
00:41:55,420 --> 00:41:57,940
There we go.

864
00:41:57,940 --> 00:42:01,700
So that brings us to the end of another episode.

865
00:42:01,700 --> 00:42:05,820
And if you are at the Server-Side Swift conference,

866
00:42:05,820 --> 00:42:09,780
please do try and find Sven and say hello.

867
00:42:09,780 --> 00:42:13,420
And if not, then we'll see you back here

868
00:42:13,420 --> 00:42:14,740
in a few weeks time.

869
00:42:14,740 --> 00:42:16,460
- Yep, see you in a few weeks.

870
00:42:16,460 --> 00:42:17,580
Bye-bye.

871
00:42:17,580 --> 00:42:18,620
- All right, bye-bye.