1
00:00:01,080 --> 00:00:02,960
Speaker 1: How'd you like to listen to dot net rocks with

2
00:00:03,080 --> 00:00:07,879
no ads? Easy? Become a patron for just five dollars

3
00:00:07,919 --> 00:00:10,800
a month. You get access to a private RSS feed

4
00:00:10,839 --> 00:00:14,279
where all the shows have no ads. Twenty dollars a month,

5
00:00:14,279 --> 00:00:16,879
we'll get you that and a special dot net Rocks

6
00:00:16,960 --> 00:00:21,000
patron mug. Sign up now at patreon dot dot NetRocks

7
00:00:21,120 --> 00:00:36,240
dot com. Hey, and welcome back to dot net rocks.

8
00:00:36,399 --> 00:00:39,320
I'm Carl Franklin, I'm Richard Campbell, and Jason Bacha is

9
00:00:39,359 --> 00:00:41,240
here with us. We're gonna be talking to him in

10
00:00:41,240 --> 00:00:43,240
a minute. And of course, Jason, while we're doing the intro.

11
00:00:43,359 --> 00:00:45,640
You can feel free to jump in at any time.

12
00:00:47,000 --> 00:00:49,640
But we got a few things to do first. Should

13
00:00:49,679 --> 00:00:52,119
we talk about nineteen eighty eight and what happened?

14
00:00:52,200 --> 00:00:53,840
Speaker 2: Do the history thing? Huh?

15
00:00:54,000 --> 00:00:54,759
Speaker 1: The history thing?

16
00:00:54,880 --> 00:00:56,479
Speaker 2: Okay, we'll try and keep it brief. But what do

17
00:00:56,520 --> 00:00:56,759
you got?

18
00:00:57,200 --> 00:01:01,000
Speaker 1: Soviet Union began significant economic restructre churing you might have

19
00:01:01,119 --> 00:01:07,879
remembered Peristroika Peristroika and started to break apart and allowed

20
00:01:07,879 --> 00:01:08,840
some free travel.

21
00:01:08,920 --> 00:01:10,799
Speaker 2: This is the beginning of the end, beginning of the end.

22
00:01:10,920 --> 00:01:14,920
Speaker 1: YEP. George H. W. Bush was elected President of the

23
00:01:15,000 --> 00:01:18,640
United States defeating Michael Ducacas. I ran air flight six

24
00:01:18,760 --> 00:01:25,640
fifty five the USS Vincennes Vincennis mistakenly shot down. I

25
00:01:25,719 --> 00:01:29,040
ran air flight sixty five, six fifty five, killing all

26
00:01:29,040 --> 00:01:31,519
two hundred ninety people on board. At least that's what

27
00:01:31,560 --> 00:01:34,400
my report says. Did they determine that it was an accident?

28
00:01:34,480 --> 00:01:37,959
Speaker 2: Yep, yeah, okay, it was yeah, you know operator air Ultimately,

29
00:01:39,640 --> 00:01:40,079
let's see.

30
00:01:40,079 --> 00:01:43,120
Speaker 1: The lockerby bombing, of course, was a kind of historic

31
00:01:43,239 --> 00:01:46,719
thing that happened a lot of flight stuff. Here a

32
00:01:46,760 --> 00:01:50,640
hailstorm in Nepal at a soccer match and Katmandu caused

33
00:01:50,640 --> 00:01:53,920
a stampede, killing at least seventy people.

34
00:01:54,040 --> 00:01:54,280
Speaker 2: Wow.

35
00:01:54,719 --> 00:01:57,760
Speaker 1: We had the nineteen eighty eight Winter Olympics in Calgary, Canada.

36
00:01:57,879 --> 00:01:59,000
Speaker 2: Yeah, interested the right of me.

37
00:01:59,239 --> 00:02:02,439
Speaker 1: And this Olympics in Seoul, South Korea.

38
00:02:02,519 --> 00:02:05,319
Speaker 3: That's back when they still had them in four year intervals.

39
00:02:05,400 --> 00:02:08,280
Speaker 2: Yeah, all the same years. Yeah, I mean, then we

40
00:02:08,280 --> 00:02:10,319
figured out to offset them because you make more revenue

41
00:02:10,319 --> 00:02:10,680
that way.

42
00:02:11,159 --> 00:02:16,719
Speaker 1: Andy Gibb died that year. And let's talk about some movies, right.

43
00:02:16,840 --> 00:02:19,680
Speaker 2: M hm, So you like your movie collection in the eighties.

44
00:02:19,840 --> 00:02:21,639
This just shows our bias, I think.

45
00:02:21,639 --> 00:02:24,599
Speaker 1: Yeah, die Hard you know, yeah, die Hard is on

46
00:02:24,639 --> 00:02:25,159
that list.

47
00:02:25,520 --> 00:02:27,039
Speaker 2: Yeah. Best Christmas movie ever?

48
00:02:27,319 --> 00:02:34,360
Speaker 1: Yes, kaym who framed Roger Rabbit was the number one

49
00:02:34,400 --> 00:02:38,439
grossing movie of nineteen eighty eight. Rain Man Coming to America.

50
00:02:38,759 --> 00:02:41,800
Speaker 2: Oh man, I saw Eddie. I can't even tell you

51
00:02:41,840 --> 00:02:43,039
how many times I've seen that movie.

52
00:02:43,280 --> 00:02:49,719
Speaker 1: Yeah, Yeah, Rambo, three big, three men in a baby beetlejuice, cocktail,

53
00:02:49,879 --> 00:02:56,759
and my favorite, a fish called Wanda. The car, sing

54
00:02:56,800 --> 00:02:58,439
It Sing It the Car.

55
00:02:58,879 --> 00:03:01,280
Speaker 3: The best scene in that movie he was when he

56
00:03:01,439 --> 00:03:04,680
was going to get run over by a steamroller or whatever.

57
00:03:04,719 --> 00:03:08,439
Speaker 2: That was right. Yeah, the whole trying to get the

58
00:03:08,479 --> 00:03:10,520
old lady and keep hitting the dogs. Like, there's so

59
00:03:10,599 --> 00:03:14,199
many funny bits in that movie. That's hilarious. And do

60
00:03:14,240 --> 00:03:16,080
you remember when they did the press tour and they

61
00:03:16,159 --> 00:03:18,560
all agreed, all of the big you know, Kleine and

62
00:03:18,719 --> 00:03:20,599
Clease and all these folks all agreed to say the

63
00:03:20,599 --> 00:03:22,599
same thing, which was, I carried this movie. The others

64
00:03:22,639 --> 00:03:26,080
are worthless, right, And so like every single interview, each

65
00:03:26,120 --> 00:03:28,000
one of them said exactly. They they just sort of

66
00:03:28,120 --> 00:03:28,680
blew up.

67
00:03:29,240 --> 00:03:30,599
Speaker 3: I had no idea about that.

68
00:03:30,599 --> 00:03:32,759
Speaker 2: That's great, It's just hysterical.

69
00:03:32,960 --> 00:03:35,479
Speaker 1: So one of the iconic scenes in that movie is

70
00:03:35,520 --> 00:03:39,919
where Kevin Kleine is holding John Cleese by his legs,

71
00:03:40,000 --> 00:03:41,840
dangling him outside of a window to get him to

72
00:03:41,919 --> 00:03:43,599
apologize for calling him stupid.

73
00:03:43,639 --> 00:03:44,360
Speaker 2: Apologize.

74
00:03:45,240 --> 00:03:48,479
Speaker 1: And when Cleese was on the tour promoting movie, he

75
00:03:48,520 --> 00:03:51,879
was on Letterman and he said, he said, well, the

76
00:03:51,919 --> 00:03:56,080
whole apology thing is Britain's just, you know, they apologize

77
00:03:56,120 --> 00:03:58,759
for everything. You know, you're in America and you're at

78
00:03:58,759 --> 00:04:03,000
the dinner table. It's like a saw in Britain's are like,

79
00:04:03,240 --> 00:04:10,759
I'm sorry. So he was poking fun at BRIT's in

80
00:04:10,800 --> 00:04:12,400
their apologety ways.

81
00:04:13,159 --> 00:04:15,120
Speaker 2: That's so funny. All right, what do you got, Richard?

82
00:04:15,599 --> 00:04:20,240
We'll start space. Of course, the return of the Shuttle

83
00:04:20,360 --> 00:04:23,439
after the Challenger disaster in January of eighty six ers

84
00:04:23,439 --> 00:04:25,600
now in nineteen eighty eight, so it's September twenty ninth.

85
00:04:26,360 --> 00:04:29,519
Discovery is return to flight, deploying the third of the

86
00:04:29,560 --> 00:04:32,560
TDR satellites. Use the satellites to allow the Shuttle be

87
00:04:32,600 --> 00:04:34,879
to continue his communication and that was the third and

88
00:04:34,959 --> 00:04:37,279
last needed now though the member replacements in there. And

89
00:04:37,279 --> 00:04:40,199
then later that later Atlantis will fly one of the

90
00:04:40,240 --> 00:04:42,519
last military payloads to Shuttle. Well or Fly, which is

91
00:04:42,519 --> 00:04:45,439
one of the Lacross satellites, which should be its own show.

92
00:04:45,560 --> 00:04:47,480
So we're not gonna talk about that, okay.

93
00:04:47,160 --> 00:04:48,920
Speaker 3: Because they had to take a two year break in

94
00:04:49,000 --> 00:04:49,920
between Challenger.

95
00:04:50,040 --> 00:04:50,279
Speaker 1: Yeah.

96
00:04:50,319 --> 00:04:55,480
Speaker 2: From Challengers Yeah and last show in eighty seven, I

97
00:04:55,480 --> 00:04:58,319
talked about the Rogers Commission and just the complete failure

98
00:04:58,360 --> 00:05:00,800
of NASA to be able to change their culture. They

99
00:05:00,839 --> 00:05:03,360
just fixed the tech stuff, but also just committed to

100
00:05:03,360 --> 00:05:05,439
the reality that they would never fly that many shuttles,

101
00:05:05,439 --> 00:05:08,199
and they never would again. Yeah, the shuttle was supposed

102
00:05:08,199 --> 00:05:11,399
to be an airliner. It simply wasn't, which that argument

103
00:05:11,519 --> 00:05:13,519
is the reason we even have the geek outs. Carls,

104
00:05:13,800 --> 00:05:16,240
you told me we should record that, and I said

105
00:05:16,279 --> 00:05:19,319
that was stupid, and you said, but I was wrong,

106
00:05:19,519 --> 00:05:20,399
Clearly I was wrong.

107
00:05:20,600 --> 00:05:22,399
Speaker 1: Well, I don't remember where we were, but we were

108
00:05:22,399 --> 00:05:24,519
having scotch after a conference somewhere.

109
00:05:24,600 --> 00:05:26,360
Speaker 2: It was when Atlantis landed for the last time at

110
00:05:26,360 --> 00:05:28,160
twenty eleven. That's why I was raging.

111
00:05:28,240 --> 00:05:31,160
Speaker 1: You were brain dropping. I mean, it was just like NonStop,

112
00:05:31,199 --> 00:05:33,240
and I'm like, you know, this would just be a

113
00:05:33,279 --> 00:05:33,879
great show.

114
00:05:34,399 --> 00:05:34,759
Speaker 2: Yeah.

115
00:05:35,079 --> 00:05:39,240
Speaker 3: The whole history behind the Space Shuttle program is just fascinating.

116
00:05:39,600 --> 00:05:43,680
Speaker 2: Yeah, but also terrible. Yes, it cost a lot of

117
00:05:43,680 --> 00:05:48,120
lives and money. And I remember who was it, Dan,

118
00:05:48,920 --> 00:05:51,680
the old NASA administrator, saying, if we had not done shuttles,

119
00:05:51,680 --> 00:05:55,639
we'd stuck with Saturn. We would have done six missions

120
00:05:55,680 --> 00:05:57,879
a year, including two to the Moon every year the

121
00:05:58,079 --> 00:06:01,199
entire time, for the same amount of money. Yeah, presumably

122
00:06:01,199 --> 00:06:03,759
it would have improved things, but you know they always

123
00:06:03,879 --> 00:06:06,000
argument is it didn't spend enough on shuttle to make

124
00:06:06,040 --> 00:06:07,839
it as good as it needed to be. They just

125
00:06:08,120 --> 00:06:11,000
limped it over the line and it limped the whole time.

126
00:06:11,639 --> 00:06:15,240
Speaking of shuttles, in nineteen eighty eight, we have the

127
00:06:15,279 --> 00:06:17,920
second flight of the Energy A booster by the Soviet Union,

128
00:06:18,040 --> 00:06:24,160
the only flight of the Burran the Russian shuttle the

129
00:06:24,879 --> 00:06:28,680
Soviet Union trying to keep up with the Americans, arguably

130
00:06:28,759 --> 00:06:33,000
a superior shuttle. It was flown unmanned. All of the

131
00:06:33,040 --> 00:06:35,279
engines were actually on the Energy A boosters, so it

132
00:06:35,319 --> 00:06:37,839
didn't have to carry that weight into space, did need

133
00:06:37,879 --> 00:06:40,279
the external tank. I didn't do any of those things,

134
00:06:40,279 --> 00:06:42,199
but it was it was a very capable machine. It's

135
00:06:42,279 --> 00:06:45,000
terrible that they built three of them, flew one of them,

136
00:06:45,040 --> 00:06:47,720
and then they sat in hangars until those hangars clopped

137
00:06:47,720 --> 00:06:50,639
around them. So that's the end of that. And Energy

138
00:06:50,639 --> 00:06:52,480
it would never fly again. An Energy actually had a

139
00:06:52,519 --> 00:06:56,319
design again, this could be a whole show to have

140
00:06:56,480 --> 00:07:00,480
recoverable flyback boosters and things like. They really did pursue

141
00:07:00,519 --> 00:07:02,839
all the things that Shuttle could have had that never

142
00:07:03,000 --> 00:07:06,160
actually happened. Other than that, you know, nineteen eighty is

143
00:07:06,160 --> 00:07:08,120
a quiet year for space. The Soviet Union's running out

144
00:07:08,120 --> 00:07:09,519
of money, so they don't fly. A whole bunch of

145
00:07:09,519 --> 00:07:11,399
the Americans are just getting back on their feet again.

146
00:07:11,480 --> 00:07:13,839
So that's all I got to say about that. But

147
00:07:14,040 --> 00:07:17,519
on the computing side, let's go.

148
00:07:17,519 --> 00:07:21,040
Speaker 1: For a ride. Come some good stuff, some good.

149
00:07:20,879 --> 00:07:23,759
Speaker 2: Stuff, right, I got to lead off with the next.

150
00:07:24,399 --> 00:07:26,800
So Steve Jobs, who've been forced out of Apple in

151
00:07:26,879 --> 00:07:29,920
nineteen eighty five, has now founded a company called Next.

152
00:07:30,480 --> 00:07:33,720
He builds the most outrageous computer ever, the Next Cube,

153
00:07:33,720 --> 00:07:37,279
which actually has three Motorola processes and an eight megs

154
00:07:37,279 --> 00:07:42,120
a RAM in nineteen eighty eight, eard of yeah, sixty

155
00:07:42,199 --> 00:07:45,040
five hundred dollars US in nine.

156
00:07:46,120 --> 00:07:47,920
Speaker 1: I can't remember where I saw it, but I saw

157
00:07:47,920 --> 00:07:49,199
it and I used it, and I.

158
00:07:49,160 --> 00:07:51,319
Speaker 2: Was well blown away. To be clear, this is the

159
00:07:51,360 --> 00:07:54,079
machine that Tim berners Lee will invent the World Wide

160
00:07:54,079 --> 00:07:59,000
Web with. Right, His next cube is insern behind glass

161
00:07:59,040 --> 00:08:00,480
and it's still got the sticker on it says do

162
00:08:00,519 --> 00:08:04,680
not turn off server. For the first web server and

163
00:08:04,720 --> 00:08:09,319
web browser were on that machine. It's great. Also, that's

164
00:08:09,360 --> 00:08:13,279
when Next licenses objective C. That will come back to

165
00:08:13,360 --> 00:08:15,639
haunt us all for a couple of decades.

166
00:08:16,000 --> 00:08:18,120
Speaker 3: Thank you for expressing it that way.

167
00:08:18,079 --> 00:08:21,639
Speaker 1: That haunt is right. What was a Rory Bleise's comment

168
00:08:21,680 --> 00:08:24,480
about objective C programm Stockholm syndrome?

169
00:08:27,639 --> 00:08:29,600
Speaker 2: And of course we don't know it in nineteen eighty eight,

170
00:08:29,720 --> 00:08:32,120
but eight years later in ninety six, Apple will acquire

171
00:08:32,200 --> 00:08:36,080
Next and get Jobs back and so forth. Also related

172
00:08:36,120 --> 00:08:36,879
to Apple.

173
00:08:36,639 --> 00:08:40,639
Speaker 3: There's one project that I did real quick on objective

174
00:08:40,679 --> 00:08:42,000
C and that was enough.

175
00:08:42,720 --> 00:08:47,320
Speaker 2: Yeah, I oh man, terrible. Well, you know then it

176
00:08:47,360 --> 00:08:50,039
was always supposed to be a internal language, right, Jobs

177
00:08:50,039 --> 00:08:52,919
had never intended us to write directly to the iPhone

178
00:08:52,919 --> 00:08:55,759
at all. Those are all internal tools. But when we

179
00:08:55,879 --> 00:08:58,240
jail broke the phone, he had to do something, and

180
00:08:58,240 --> 00:09:00,480
that's when he came up with a store and released

181
00:09:00,480 --> 00:09:02,960
all those internal tools. Is why they were so terrible,

182
00:09:03,480 --> 00:09:06,360
you know, and admittedly like I'm not a big Swift fan,

183
00:09:06,840 --> 00:09:10,879
but objectively, no pun intended, Swift is a pretty damn

184
00:09:10,879 --> 00:09:14,919
good language. That's what it should have been. Yeah. Apple,

185
00:09:15,720 --> 00:09:19,720
same year nineteen eighty eight files the copyright infringement lawsuit

186
00:09:19,759 --> 00:09:23,080
against Microsoft for the look and feel of Windows two

187
00:09:23,559 --> 00:09:26,840
against the Mac os. This is the beginning of that,

188
00:09:28,080 --> 00:09:30,159
and it won't be settled till the nineteen eighty five.

189
00:09:30,240 --> 00:09:33,120
The only thing that will take longer is Apple acquiring next,

190
00:09:33,159 --> 00:09:33,879
but not by much.

191
00:09:33,919 --> 00:09:40,000
Speaker 1: I wrote a program that if Windows equals Mac call FTC.

192
00:09:41,679 --> 00:09:46,080
Speaker 2: Ninety eight, the first release of Microsoft Office, the bundling

193
00:09:46,279 --> 00:09:51,240
of Word and Excel and PowerPoint and eventually Access and others.

194
00:09:51,320 --> 00:09:53,279
Speaker 3: That was the first year nineteen eighty eight.

195
00:09:53,399 --> 00:09:55,639
Speaker 2: Wow, first year was nineteen eighty eight, and it came

196
00:09:55,679 --> 00:09:58,799
on three and a half inch fluppies, how many and

197
00:09:59,000 --> 00:10:03,200
lots of of them? Yeah, twenty eight was always bad.

198
00:10:03,480 --> 00:10:05,559
Oh then you'd only find that out the hard way.

199
00:10:05,679 --> 00:10:08,200
Ask you you know that happened to me too.

200
00:10:08,480 --> 00:10:09,919
Speaker 1: I don't know if it was twenty eight, but it

201
00:10:09,960 --> 00:10:11,720
was one of the one of the ones at the end.

202
00:10:11,879 --> 00:10:16,480
Speaker 2: Yeah. Uh, sound Blaster Creative Labs, Yes, eleven Voice FM synthesizer,

203
00:10:16,600 --> 00:10:20,519
Texas Speech MIDI and a joystick port dun dun dum.

204
00:10:22,600 --> 00:10:25,399
Speaker 3: I got a sound blaster card in college and that

205
00:10:25,559 --> 00:10:27,200
was Oh, that was so much fun.

206
00:10:27,759 --> 00:10:28,759
Speaker 2: So it was such a big deal.

207
00:10:28,840 --> 00:10:30,960
Speaker 1: Yeah, did you play any of the sample MIDI files?

208
00:10:31,200 --> 00:10:33,200
Speaker 3: I think I did. I think it also had if

209
00:10:33,240 --> 00:10:35,000
I remember right, it had some kind of like a

210
00:10:36,200 --> 00:10:39,960
voice pitch, yeah, the parrot. But yeah, so you could

211
00:10:40,000 --> 00:10:42,120
you could change your voice. And of course in college

212
00:10:42,159 --> 00:10:43,399
that was so much fun.

213
00:10:43,440 --> 00:10:45,000
Speaker 2: It's all you would do, doing well if you ran

214
00:10:45,039 --> 00:10:47,159
the MIDI files. I wrote those, Oh you did. I

215
00:10:47,200 --> 00:10:49,000
did well.

216
00:10:49,080 --> 00:10:51,759
Speaker 1: Once the MIDI pack came out from Voyetra, which was

217
00:10:51,799 --> 00:10:54,759
in the nineties, and we'll get there. Yeah. Yeah, I

218
00:10:55,159 --> 00:10:57,000
did the MIDI files that came with that, but they

219
00:10:57,000 --> 00:10:58,399
would just work for hire, you know.

220
00:10:58,559 --> 00:11:01,639
Speaker 2: That was my job, the musician with the text chops,

221
00:11:01,720 --> 00:11:03,840
so you make it work any got Yeah, MIDI was

222
00:11:03,960 --> 00:11:06,960
part of that. A couple other hardware pieces, the IBM

223
00:11:07,000 --> 00:11:10,399
AS four hundred sucked up a few years of my life.

224
00:11:11,840 --> 00:11:18,000
The Helid Packard desk jet printer, the first commercial inkjet printer. Wow,

225
00:11:18,200 --> 00:11:23,559
that's beginning the true demise of printing worldwide. Right, These days.

226
00:11:23,559 --> 00:11:26,840
They are essentially disposable. Right, it's cheap printed by Ink

227
00:11:26,919 --> 00:11:27,080
for it.

228
00:11:27,159 --> 00:11:29,320
Speaker 1: Yeah, I was gonna say. And the onset of the

229
00:11:29,559 --> 00:11:31,639
Ink Subscription.

230
00:11:31,200 --> 00:11:37,080
Speaker 2: Revolution Intel three eighty six s X released that year

231
00:11:37,120 --> 00:11:41,480
by Intel. Okay, let's talk Internet stuff. This is the

232
00:11:41,519 --> 00:11:46,080
release of the specifications for S and MP NTP right

233
00:11:46,200 --> 00:11:50,919
in the network Protocol and IRC Internet Relay Chat. I'll

234
00:11:50,960 --> 00:11:52,159
begin in nineteen eighty eight.

235
00:11:52,320 --> 00:11:56,159
Speaker 1: Oh did you say NTP or n NTP NTP. Okay,

236
00:11:56,240 --> 00:11:56,799
that's different.

237
00:11:56,840 --> 00:12:00,879
Speaker 2: And NTK comes a little later. Yeah, And finally the

238
00:12:00,960 --> 00:12:05,080
Morris Worm. So Robert Morris, twenty three year old father

239
00:12:05,159 --> 00:12:08,240
works for the NSA, gets access to the Internet, writes

240
00:12:08,279 --> 00:12:11,960
a non destructive propagating worm that is eventually found on

241
00:12:12,320 --> 00:12:15,960
six thousand of the sixty thousand hosts currently connected to

242
00:12:15,960 --> 00:12:19,960
the Internet nineteen eighty nikes ten percent of the Internet,

243
00:12:21,440 --> 00:12:23,240
and he was the first person ever committed under the

244
00:12:23,240 --> 00:12:25,919
Computer Fraud and Abuse sack. Wow, we're writing a propagator.

245
00:12:26,360 --> 00:12:28,080
There you go, There you go. That's my story. I

246
00:12:28,080 --> 00:12:31,000
could mention Sega Genesis, but eh, you know video. Yeah,

247
00:12:31,080 --> 00:12:32,240
she's oh in the McChicken.

248
00:12:32,320 --> 00:12:35,080
Speaker 1: Don't forget the McChicken, No kidding, I think that was

249
00:12:35,120 --> 00:12:37,799
the Larry Bird commercial, right, yeah, oh.

250
00:12:37,679 --> 00:12:39,320
Speaker 2: In lunchables plunchables do.

251
00:12:39,559 --> 00:12:42,960
Speaker 1: Oh wow, Well, the McChicken Larry Bird commercials are funny

252
00:12:42,960 --> 00:12:46,080
because he kind of looks like a chicken and his

253
00:12:46,240 --> 00:12:49,399
last name is bird Bird. Yeah, he was the perfect

254
00:12:49,440 --> 00:12:53,279
guy to advertise the McChicken sandwich. All right, let's roll

255
00:12:53,320 --> 00:12:55,000
the music for better note of framework.

256
00:12:55,080 --> 00:13:03,799
Speaker 2: Awesome. All right, man, what do you got?

257
00:13:03,840 --> 00:13:06,279
Speaker 1: Here's a trending repoll on GitHub. This is from Microsoft

258
00:13:07,000 --> 00:13:08,440
Data Science for beginners.

259
00:13:08,559 --> 00:13:09,000
Speaker 2: We love it.

260
00:13:09,080 --> 00:13:13,279
Speaker 1: A curriculum Azure Cloud advocates at Microsoft are pleased to

261
00:13:13,279 --> 00:13:16,759
offer a ten week twenty lesson curriculum all about data science.

262
00:13:17,240 --> 00:13:21,039
Each lesson includes pre lesson in post lesson, quizzes, written

263
00:13:21,080 --> 00:13:25,080
instructions to complete the lesson, a solution, and an assignment.

264
00:13:25,240 --> 00:13:25,519
Speaker 2: Wow.

265
00:13:25,720 --> 00:13:29,159
Speaker 1: Our project based pedagogy allows you to learn while building

266
00:13:29,159 --> 00:13:33,000
a proven way for new skills to stick some good

267
00:13:33,080 --> 00:13:33,960
names behind it too.

268
00:13:34,039 --> 00:13:37,480
Speaker 2: It's good stuff, nice well, and you know, speaks to

269
00:13:37,519 --> 00:13:40,120
the fact that there's just so much training available out

270
00:13:40,159 --> 00:13:42,600
there if you want to learn, take the time. And

271
00:13:43,399 --> 00:13:46,159
the fact is that Microsoft knows that there are less

272
00:13:46,200 --> 00:13:49,559
and less people interested in programming and data science at

273
00:13:49,639 --> 00:13:52,399
least at youngins and so this is a good way

274
00:13:52,440 --> 00:13:55,440
to you know, to invest in the future. Well then

275
00:13:55,480 --> 00:13:57,360
demand you know, I'm going into high schools a few

276
00:13:57,399 --> 00:13:59,440
times a year, and I keep pointing at like, this

277
00:13:59,480 --> 00:14:02,279
is an area that as interesting as you if you're

278
00:14:02,320 --> 00:14:05,519
into figuring stuff out and finding prout, you know, digging

279
00:14:05,519 --> 00:14:07,879
through data, like, you'll find interesting things that can be

280
00:14:08,000 --> 00:14:10,600
really valuable to companies. You can make a company a

281
00:14:10,639 --> 00:14:12,279
lot of money and make yourself a lot of money

282
00:14:12,320 --> 00:14:14,919
in the process. So, yes, still a fine area to follow.

283
00:14:15,039 --> 00:14:21,200
And it's it's the non insane part of machine learning too, right, Yeah, cool.

284
00:14:20,919 --> 00:14:23,240
Speaker 1: So that's what I got. I was talking to us today,

285
00:14:23,360 --> 00:14:24,080
Richard Campbell.

286
00:14:24,200 --> 00:14:26,080
Speaker 2: I went to the way back machine. My friend will

287
00:14:26,120 --> 00:14:28,039
not literally, I just went out. You know, I don't

288
00:14:28,039 --> 00:14:29,399
even know this. We have quite a few episodes of

289
00:14:29,440 --> 00:14:31,039
dot net Rocks, but I know we were talking. We're

290
00:14:31,039 --> 00:14:32,519
going to talk about a little about so our generation.

291
00:14:32,639 --> 00:14:35,240
It made me think of Kathleen Dollar, who we need

292
00:14:35,279 --> 00:14:36,919
to get back. I haven't talked to her in ages too.

293
00:14:37,240 --> 00:14:39,679
And Kathleen did a show with us back in twenty fourteen.

294
00:14:39,879 --> 00:14:42,639
This is episode nine thirty eight. It's only a thousand

295
00:14:42,759 --> 00:14:47,039
shows so called co generation and Rosalind because that's the

296
00:14:47,120 --> 00:14:50,480
year that Roslyn comes out. Yeah, and got a ton

297
00:14:50,519 --> 00:14:52,639
of comments. I mean this was actually one of the

298
00:14:52,720 --> 00:14:56,399
tour shows. We had Kathleen fly in to Saint Louis,

299
00:14:56,600 --> 00:14:59,440
right and we did we did it in person in

300
00:14:59,440 --> 00:15:01,759
front of hers, so we had a big audience, you know,

301
00:15:01,919 --> 00:15:04,879
lots of fun with that. And get this, this is

302
00:15:04,879 --> 00:15:07,600
a comment from twelve years ago. This is Stephen Morowski,

303
00:15:07,840 --> 00:15:10,519
another past guest on the show and somebody who's frequented

304
00:15:10,600 --> 00:15:12,799
running as it was a big DevOps believer, So you'll

305
00:15:12,840 --> 00:15:16,840
love this. Comedy goes ah around the thirty seven minute

306
00:15:16,879 --> 00:15:20,639
mark when the conversation detoured from PowerShell to script cs.

307
00:15:20,759 --> 00:15:24,799
Your script cs. Oh yeah, yeah, I've used it to DevOps.

308
00:15:24,879 --> 00:15:28,000
My it was great stuff at the time. Was that

309
00:15:28,120 --> 00:15:28,879
was that? Nikhel?

310
00:15:29,360 --> 00:15:30,879
Speaker 1: I think that rings a bell?

311
00:15:31,000 --> 00:15:37,080
Speaker 2: Nick Heil, Yeah, Karthur Parthy, something like that. From PowerShell

312
00:15:37,159 --> 00:15:40,279
to script CS to DevOps my hope sword. I love

313
00:15:40,320 --> 00:15:42,879
that you talked about building a PowerShell API and possibly

314
00:15:42,919 --> 00:15:46,360
co generating some of the plumbing. Then Kathleen implied the

315
00:15:46,399 --> 00:15:49,440
DevOps is a job which is a person with a

316
00:15:49,559 --> 00:15:52,279
split skill sheet and you didn't correct her Richard, Yeah,

317
00:15:52,360 --> 00:15:54,799
I would have. I should have, because DevOps is not

318
00:15:54,879 --> 00:15:58,399
a job. Meanwhile, one of the true intents of DevOps

319
00:15:58,480 --> 00:16:01,240
was never really talked about or identified, talking between the

320
00:16:01,279 --> 00:16:05,480
teams and sharing ideas and concepts, yes, developers and operators

321
00:16:05,519 --> 00:16:09,720
and stakeholders, and keeping everybody communication together. That being said,

322
00:16:09,720 --> 00:16:11,080
the rest of the show is pretty awesome, so I'll

323
00:16:11,120 --> 00:16:14,759
let that mischaracteris position of DevOps slide this time. Thanks

324
00:16:14,799 --> 00:16:17,080
Steven twelve years.

325
00:16:16,759 --> 00:16:18,320
Speaker 1: Ago keeping us honest.

326
00:16:18,679 --> 00:16:21,159
Speaker 2: I enjoyed the conversation around languages used by devs and

327
00:16:21,159 --> 00:16:23,399
ops coming together, but Kathleen hit on a key point.

328
00:16:23,519 --> 00:16:26,320
PowerShell is a shell first and foremost it could be

329
00:16:26,399 --> 00:16:28,240
used for programming, but it is a shell and offers

330
00:16:28,240 --> 00:16:30,759
shell semantics. Sea sharp is a programming language and script

331
00:16:30,840 --> 00:16:34,120
cs offers the ability to write scripts in it. But

332
00:16:34,159 --> 00:16:36,720
it's still not Oh and I cannot wait to see

333
00:16:36,720 --> 00:16:40,600
what Kathleen kicks out around ETW. That's event tracing for Windows.

334
00:16:40,639 --> 00:16:43,759
This is all about the telemetry back twelve years ago.

335
00:16:44,399 --> 00:16:47,039
That might fill a huge gap in operations ability to

336
00:16:47,120 --> 00:16:50,000
tap into the ETW stream in a more straightforward manner.

337
00:16:50,120 --> 00:16:52,559
And I don't know that it ever became anything. Of course,

338
00:16:52,600 --> 00:16:54,519
these days that's not even how you think about. It's

339
00:16:54,519 --> 00:16:59,440
all open telemetry, right, you've changed the whole standard for that. Hey, Steven,

340
00:17:00,080 --> 00:17:02,440
nice flash from the past, man, Thanks so much for that.

341
00:17:02,519 --> 00:17:04,319
And a coffee of music Koba is on its way

342
00:17:04,319 --> 00:17:05,680
to you. And if you'd like a copy of music,

343
00:17:05,720 --> 00:17:07,319
go buy. I read a comment on the website at

344
00:17:07,319 --> 00:17:09,519
donat Rocks dot com or on the facebooks. We publish

345
00:17:09,519 --> 00:17:10,880
every show there and if you comment there and I

346
00:17:10,960 --> 00:17:12,680
read on the show, we'll send you a copy of

347
00:17:12,720 --> 00:17:13,240
music Goba.

348
00:17:13,680 --> 00:17:16,079
Speaker 1: You know, we did an episode with Glenn Block on

349
00:17:16,240 --> 00:17:20,079
script CS March tenth, twenty fifteen.

350
00:17:20,440 --> 00:17:22,640
Speaker 2: Yeah, and you know what this one? That was the

351
00:17:22,720 --> 00:17:27,759
period where the roslins Sharp run time didn't have a

352
00:17:27,799 --> 00:17:30,720
license for you to use it freely, so you had

353
00:17:30,759 --> 00:17:34,160
to force anybody using it to download it themselves. Yeah,

354
00:17:34,319 --> 00:17:36,359
I could had all this weirdness around it because this

355
00:17:36,400 --> 00:17:39,200
is before open source and before that whole mindset. Although

356
00:17:39,200 --> 00:17:41,640
it's imminent, right this is January of twenty fourteen. We

357
00:17:41,720 --> 00:17:45,759
published this, like in April they will release rosalin As

358
00:17:46,079 --> 00:17:48,480
on GitHub as cross platform open So it.

359
00:17:48,440 --> 00:17:52,200
Speaker 1: Was Glenn Block that started was CS so March twelve,

360
00:17:52,279 --> 00:17:54,799
twenty thirteen, we did episode eight fifty three with him

361
00:17:55,119 --> 00:17:58,200
and it's called Glenn Block goes open source with script cs.

362
00:17:58,519 --> 00:18:01,440
Speaker 2: Right, so there you go. Sort of we're still battling

363
00:18:01,440 --> 00:18:04,720
with what that would even mean, but right, it's funny

364
00:18:04,720 --> 00:18:06,240
in the context you just bring it up because this

365
00:18:06,279 --> 00:18:09,799
is from January twenty fourteen. Four months later at the

366
00:18:09,799 --> 00:18:12,079
Bills conference, they'll announced it.

367
00:18:12,160 --> 00:18:15,759
Speaker 1: Yeah, so there you go. And Richard mentioned music to

368
00:18:15,799 --> 00:18:20,000
code Buy still going strong and have downloads every day,

369
00:18:20,640 --> 00:18:24,480
twenty two tracks currently. You can get him in wave,

370
00:18:25,519 --> 00:18:30,279
flak or MP three format. All right, Jason, it's your turn.

371
00:18:30,400 --> 00:18:33,960
Jason Bock is a staff software engineer at Rocket Mortgage

372
00:18:34,000 --> 00:18:37,279
and a Microsoft MVP for c Sharp. You can find

373
00:18:37,440 --> 00:18:41,720
out more about him at jasonbok dot net. Welcome Jason,

374
00:18:41,799 --> 00:18:42,559
thanks for having me.

375
00:18:42,599 --> 00:18:44,559
Speaker 3: I appreciate being here, looking forward to it.

376
00:18:44,720 --> 00:18:48,759
Speaker 1: Yeah, so we're talking about source generation or source generators

377
00:18:49,200 --> 00:18:51,599
and kind of an open topic. So let's just start

378
00:18:51,640 --> 00:18:53,640
with the elevator pitch. What is a source generator and

379
00:18:53,640 --> 00:18:54,200
how does it work?

380
00:18:54,279 --> 00:18:58,240
Speaker 3: So a source generator is a feature in the compiler.

381
00:18:58,480 --> 00:19:02,359
You know, Richard, you already mentioned Roz and that's the

382
00:19:02,400 --> 00:19:05,720
compiler underneath the scenes for c sharp and bend that

383
00:19:05,759 --> 00:19:11,119
way since twenty fifteen. And initially there were extension points

384
00:19:11,160 --> 00:19:14,240
in the compiler where you could write analyzers, code fixes,

385
00:19:14,319 --> 00:19:17,960
and refactorings, which is cool. That has a lot of

386
00:19:18,000 --> 00:19:20,680
interesting stuff and it plus the Holy API was there.

387
00:19:20,839 --> 00:19:22,960
You could build whatever tools you wanted on top of

388
00:19:23,000 --> 00:19:26,759
that to do code analysis. So it really a lot

389
00:19:26,759 --> 00:19:30,720
of developer to do all sorts of wild interesting things

390
00:19:30,799 --> 00:19:34,640
and also beneficial for other developers. At some point they

391
00:19:34,680 --> 00:19:37,160
added in another extension point. I believe this was for

392
00:19:37,240 --> 00:19:41,400
c sharp nine, and it's called source generators. So effectively

393
00:19:41,480 --> 00:19:47,000
it allows you during the compilation process to look at

394
00:19:47,039 --> 00:19:51,039
code that currently exists in that compilation and say, hey,

395
00:19:51,079 --> 00:19:53,839
I want to generate some code, and there's a couple

396
00:19:53,880 --> 00:19:56,640
of reasons why you want to do that. But you

397
00:19:56,720 --> 00:19:59,839
participate when you write, When you author a source generator,

398
00:20:00,279 --> 00:20:04,400
you participate in that compilation pipeline. And so you can

399
00:20:04,440 --> 00:20:08,079
see literally, like in an idea, as somebody's changing code,

400
00:20:08,200 --> 00:20:11,039
you can react to that and potentially change what you

401
00:20:11,160 --> 00:20:15,200
generated if the use case that you're trying to hit

402
00:20:15,440 --> 00:20:18,920
needs to do something like that. So it's native to

403
00:20:18,960 --> 00:20:23,079
the compiler, it's not like a tool that you do

404
00:20:24,240 --> 00:20:27,480
cogeneration as a separate step. Though there's nothing wrong with that,

405
00:20:27,880 --> 00:20:30,720
but you don't have to have that separate tool. Do

406
00:20:30,839 --> 00:20:35,279
all that you were talking beforehand about tool or pre

407
00:20:35,319 --> 00:20:38,279
existing tools like T four T four templates is something

408
00:20:38,279 --> 00:20:40,359
that I think if you've been in dotnet for a while,

409
00:20:40,400 --> 00:20:44,079
you probably have heard of again, a nice fine tool,

410
00:20:44,160 --> 00:20:47,359
except that's something you have to manually run. So source

411
00:20:47,400 --> 00:20:52,160
generators are part and parcel of the Roslin compilation pipeline.

412
00:20:52,240 --> 00:20:54,519
Speaker 2: Yeah, you know what. I found the blog post by

413
00:20:54,519 --> 00:20:57,240
Philip Carter, who was the PM at the time, Yeah,

414
00:20:57,279 --> 00:21:01,359
for the preview of source generators in DAT five.

415
00:21:02,319 --> 00:21:03,200
Speaker 3: Yes, yep.

416
00:21:03,319 --> 00:21:05,279
Speaker 1: And we had talked about them a couple of times.

417
00:21:05,279 --> 00:21:08,240
And one thing I can remember is the verb squirt

418
00:21:09,519 --> 00:21:11,519
you want to just squirt some code in there.

419
00:21:12,400 --> 00:21:14,839
Speaker 3: I'm not going to be using that. I still use

420
00:21:14,920 --> 00:21:15,480
that term.

421
00:21:15,640 --> 00:21:18,680
Speaker 1: Or I laughed at the time too, Richard. I laughed

422
00:21:18,720 --> 00:21:19,920
like Richard's doing right now.

423
00:21:20,319 --> 00:21:22,359
Speaker 2: I'm offering at how uncomfortable Jason is.

424
00:21:22,400 --> 00:21:24,319
Speaker 3: That's what's funny.

425
00:21:24,400 --> 00:21:26,119
Speaker 1: You know, you just want to squirt a little code

426
00:21:26,160 --> 00:21:26,480
in there.

427
00:21:26,839 --> 00:21:28,920
Speaker 2: There really no no code squirting.

428
00:21:30,200 --> 00:21:32,759
Speaker 3: You can use that curl I probably.

429
00:21:32,400 --> 00:21:35,319
Speaker 1: Won't actually picked it up from the Microsoft guests we

430
00:21:35,359 --> 00:21:37,680
were interviewing at the time. I don't remember who it was,

431
00:21:37,720 --> 00:21:41,319
but it wasn't my word. I'm just a messenger.

432
00:21:45,240 --> 00:21:48,039
Speaker 2: But I mean, yeah, so now I can't even see

433
00:21:48,160 --> 00:21:51,119
code injection because it's ruined. Now you've read it, sorry,

434
00:21:51,440 --> 00:21:54,319
like about code injection.

435
00:21:54,559 --> 00:21:57,160
Speaker 1: So I'm taking it that the answer to my question

436
00:21:57,240 --> 00:21:59,079
is now they don't use that term anymore.

437
00:21:59,279 --> 00:22:05,000
Speaker 3: I haven't heard of that related to source generators. And

438
00:22:05,200 --> 00:22:07,799
maybe it was Von Ever and I don't think I

439
00:22:07,839 --> 00:22:10,839
ever would have used that as a way to describe

440
00:22:10,880 --> 00:22:11,720
source generators.

441
00:22:11,720 --> 00:22:14,359
Speaker 1: Maybe it was Eva Lowe that might have been talking

442
00:22:14,400 --> 00:22:16,759
about it. I don't all right, I've I've derailed this

443
00:22:16,839 --> 00:22:21,119
long enough. Let's move on. So the source genera the

444
00:22:21,200 --> 00:22:25,720
source generator in the compiler. Then how do you decide

445
00:22:26,279 --> 00:22:30,480
when and what to uh, you know generate? Is it

446
00:22:30,599 --> 00:22:34,599
something that is just built into the pipeline that you configure,

447
00:22:34,720 --> 00:22:37,240
you know, if this is that, then put this code

448
00:22:37,240 --> 00:22:40,000
in or I don't understand.

449
00:22:40,440 --> 00:22:43,440
Speaker 3: So there's I'll kind of break the answer up into

450
00:22:43,440 --> 00:22:47,000
two parts. There's the kind of the mechanism of what

451
00:22:47,039 --> 00:22:49,519
you do if you're authoring a source generator, and then

452
00:22:49,559 --> 00:22:53,599
maybe why you'd want to do this in the first place. So, okay,

453
00:22:53,960 --> 00:22:57,039
the the what or the how part of it is

454
00:22:57,680 --> 00:23:01,519
you essentially write a class library where you have a

455
00:23:01,519 --> 00:23:06,880
class that implements one interface I incremental generator. There's another one,

456
00:23:07,359 --> 00:23:09,880
but that's considered obsolete and I'm not even going to

457
00:23:09,920 --> 00:23:12,079
bring it up because I don't want anybody to even

458
00:23:12,160 --> 00:23:15,400
use it anymore. That's the c sharp team really wants people.

459
00:23:15,400 --> 00:23:19,519
If you're offering a source generator, use I incremental generator, okay.

460
00:23:20,519 --> 00:23:23,519
And what you do in the implementation of that interface

461
00:23:23,920 --> 00:23:29,640
is you effectively want to trigger your source generation off

462
00:23:29,680 --> 00:23:34,640
of the existence of an attribute. So an attribute exists

463
00:23:34,640 --> 00:23:38,079
somewhere in code, and your source generator is looking for

464
00:23:38,119 --> 00:23:41,559
that attribute, and when it shows up, then you're going

465
00:23:41,640 --> 00:23:44,480
to do whatever you want it to do. And we

466
00:23:44,480 --> 00:23:48,640
can cover some examples later on, but that's really the

467
00:23:48,680 --> 00:23:51,960
trigger point. You see that attribute there, and then you say, okay,

468
00:23:52,440 --> 00:23:54,559
that attribute is maybe on a class, or it's at

469
00:23:54,559 --> 00:23:57,119
the assembly level, or it's defined on a method. And

470
00:23:57,160 --> 00:23:58,559
so now what I'm going to do is I have

471
00:23:59,000 --> 00:24:02,799
all the information of the compilation, the syntax, the semantics,

472
00:24:02,960 --> 00:24:05,759
all that stuff, and so now I can say, well,

473
00:24:06,079 --> 00:24:08,200
this attribute'es on a class. So maybe I want to

474
00:24:08,200 --> 00:24:11,160
look for all the properties on a class and I'll

475
00:24:11,240 --> 00:24:15,039
use the rosal API to find that stuff and potentially

476
00:24:15,119 --> 00:24:18,960
build another class. Or maybe the class is partial, so

477
00:24:19,000 --> 00:24:22,880
I want to extend that class with some other implementation

478
00:24:23,039 --> 00:24:27,200
so that all gets combined up during compilation. So that's

479
00:24:27,240 --> 00:24:30,880
what as an author of a source generator is going

480
00:24:30,920 --> 00:24:34,920
to do. You'll define an attribute, you'll write an implementation

481
00:24:35,000 --> 00:24:39,000
of this interface, and then you'll basically look for that

482
00:24:39,039 --> 00:24:44,200
attribute to exist and generate some code. Now that's some mechanics,

483
00:24:44,279 --> 00:24:46,640
but I think it's also important to discuss why would

484
00:24:46,680 --> 00:24:48,799
you want to do this in the first place. Sure,

485
00:24:49,000 --> 00:24:51,920
what's the benefit of it. There's a couple of things

486
00:24:51,920 --> 00:24:55,960
that go at least for me that when I've written

487
00:24:56,000 --> 00:24:58,640
source generators that I try to keep in mind. One

488
00:24:58,640 --> 00:25:00,880
of them is does this it makes something that a

489
00:25:00,960 --> 00:25:05,279
developer has had to do and take it essentially out

490
00:25:05,279 --> 00:25:08,720
of their hands because it's repetitive. It's something that you

491
00:25:08,759 --> 00:25:13,279
know is very mechanical, mechanistic, and you don't as a developer,

492
00:25:13,839 --> 00:25:16,039
can do it. It's just time consuming and I don't

493
00:25:16,079 --> 00:25:19,759
want to do it. So that's one place where source

494
00:25:19,799 --> 00:25:23,079
generators can be helpful because it takes that out of

495
00:25:23,119 --> 00:25:25,720
your hands. You can just put an attribute somewhere and

496
00:25:25,799 --> 00:25:27,480
the source generator does it all for you.

497
00:25:27,559 --> 00:25:30,039
Speaker 1: So I think what you're getting at is something that

498
00:25:30,079 --> 00:25:33,440
you'd have to do a lot, like duplicate over a

499
00:25:33,519 --> 00:25:34,920
collection or something like that.

500
00:25:35,160 --> 00:25:39,240
Speaker 3: Yeah, and not all the time, but that's definitely something

501
00:25:39,279 --> 00:25:42,079
that if you see you might go that might be

502
00:25:42,160 --> 00:25:44,839
a case to write a source generator so that I

503
00:25:44,880 --> 00:25:48,720
don't have to do exactly that all the time. Another

504
00:25:48,759 --> 00:25:54,839
one is, for example, if I am building an application

505
00:25:55,160 --> 00:25:58,240
and I want to do ahead of time compilation. So

506
00:25:59,000 --> 00:26:01,519
if people know what that is, it's listening to this

507
00:26:01,960 --> 00:26:04,920
ahead of time compilation is essentially saying I've got my code,

508
00:26:05,559 --> 00:26:08,000
but instead of building it so that they're done to assemblies,

509
00:26:08,920 --> 00:26:10,839
I'm going to build it so that it's targeting a

510
00:26:10,880 --> 00:26:15,160
specific run time like Windows or MAC or something like that.

511
00:26:15,839 --> 00:26:19,200
And so it does some things in the AOT compilation

512
00:26:19,359 --> 00:26:23,039
step so that it's specific to that run time.

513
00:26:23,240 --> 00:26:28,160
Speaker 1: But don't the pragma things that you know, the hashtag

514
00:26:28,400 --> 00:26:32,160
if this OS, then do this or if that OS.

515
00:26:32,640 --> 00:26:35,160
Isn't that kind of addressing the same problem.

516
00:26:35,759 --> 00:26:39,519
Speaker 3: It can just for you know, depending on your case,

517
00:26:39,599 --> 00:26:41,880
that you're just trying to say, hey, if I'm running

518
00:26:41,880 --> 00:26:44,039
on a particular run time, I want to do this.

519
00:26:45,240 --> 00:26:48,599
If you're using some of the the types that are

520
00:26:48,640 --> 00:26:51,960
for Cindy instructions that you want to say, well, if

521
00:26:52,119 --> 00:26:54,519
my processor supports it, I need to make that check

522
00:26:54,680 --> 00:26:58,160
before I actually use them. This is saying I want

523
00:26:58,200 --> 00:27:00,880
to have some optimizations done that I know. You know,

524
00:27:00,880 --> 00:27:03,240
I've written my code that's maybe more generalistic and I

525
00:27:03,279 --> 00:27:05,880
don't care about the runtime, but I wanted to run

526
00:27:06,200 --> 00:27:11,559
for these run times, specifically for potential performance benefits. The

527
00:27:11,640 --> 00:27:14,960
thing with source generators that we want to keep in

528
00:27:15,000 --> 00:27:18,279
mind with AOT compilation is that this is all code

529
00:27:18,319 --> 00:27:22,960
that's generated for compilation at compile time. If you've ever

530
00:27:23,000 --> 00:27:26,960
done things with reflection, that's all done at runtime, and

531
00:27:27,119 --> 00:27:30,559
AOT in reflection is like oil and water. They don't mix.

532
00:27:31,960 --> 00:27:37,680
They really become problematic because AOT will see, well, you

533
00:27:37,720 --> 00:27:40,359
have this amount of code that's actually never being touched,

534
00:27:40,480 --> 00:27:42,519
So I'm going to just shake it out of the

535
00:27:42,519 --> 00:27:44,160
tree and get rid of it because I don't need

536
00:27:44,160 --> 00:27:46,279
it anymore. But then your code runs and goes, wait

537
00:27:46,319 --> 00:27:50,640
a minute, I expected this to be here for reflection reasons.

538
00:27:51,400 --> 00:27:55,640
So that's another thing that is nice about source generation

539
00:27:55,839 --> 00:28:00,240
is that you can take those runtime reflection things that

540
00:28:00,279 --> 00:28:04,400
you're doing, make it a compile time process, and then

541
00:28:04,680 --> 00:28:07,559
they'll stick around with AOT as well.

542
00:28:07,839 --> 00:28:10,240
Speaker 1: So it's very cool. Yeah, and all these things I'm

543
00:28:10,279 --> 00:28:14,240
trying to envision, you know, how you would do it

544
00:28:14,279 --> 00:28:19,279
without source generator. It's pretty obvious to see how something

545
00:28:19,319 --> 00:28:23,880
that's repetitive would be you know, impossible, especially if you know,

546
00:28:24,160 --> 00:28:27,559
don't know what those you know, what's in that list

547
00:28:27,720 --> 00:28:30,799
or how many there are, that kind of thing. But

548
00:28:32,000 --> 00:28:33,960
the other one I'm just still trying to wrap my

549
00:28:34,000 --> 00:28:34,519
head around.

550
00:28:34,759 --> 00:28:38,240
Speaker 2: It's a very meta way to think, yes, yeah, I'm

551
00:28:38,279 --> 00:28:41,200
going to generate this code and with some parameters. You know.

552
00:28:41,559 --> 00:28:45,119
This is also it feels like the Java factory model too, right,

553
00:28:45,240 --> 00:28:47,680
that I beat a set of parameters and it spits

554
00:28:47,720 --> 00:28:49,599
out something for me. And this case is instead of

555
00:28:49,599 --> 00:28:52,000
just spitting out a class, is spitting out you know,

556
00:28:52,000 --> 00:28:53,400
potentially all kinds of things different.

557
00:28:53,640 --> 00:28:56,720
Speaker 3: Yeah, and when you said the word meta, I was

558
00:28:56,920 --> 00:28:59,079
fortunate enough to be a co author in a book

559
00:28:59,359 --> 00:29:01,519
I came out like years ago. It's called metaprogramming in

560
00:29:01,599 --> 00:29:05,200
dot net and wrote it with Kevin Hazzard. Really good guy.

561
00:29:05,240 --> 00:29:06,400
Speaker 2: Oh yeah, great guy.

562
00:29:06,519 --> 00:29:09,880
Speaker 3: Yeah yeah, And that was one of the things he

563
00:29:09,920 --> 00:29:12,680
had the first chapter. We split the book in half

564
00:29:12,720 --> 00:29:15,640
and he got the first one, and he did a

565
00:29:15,680 --> 00:29:18,799
really good job at that first chapter, especially because he said,

566
00:29:19,160 --> 00:29:22,759
really everything with meta programming, people think about expression trees

567
00:29:22,799 --> 00:29:26,240
and reflection and aspector of programming and all these terms.

568
00:29:26,279 --> 00:29:28,440
And he said, beta programming is just treating your code

569
00:29:28,440 --> 00:29:28,880
as data.

570
00:29:29,759 --> 00:29:33,160
Speaker 2: Right, that's great thinking. Yeah, it's just another kind of thing.

571
00:29:33,400 --> 00:29:36,440
Speaker 3: And you're just looking at that data. Instead of looking

572
00:29:36,480 --> 00:29:38,640
at his code, you're looking at it probably as a tree,

573
00:29:39,119 --> 00:29:41,759
looking through the tree and saying, this happens here, So

574
00:29:41,799 --> 00:29:44,880
now I want to do something because of the existence

575
00:29:44,880 --> 00:29:45,480
of that data.

576
00:29:45,680 --> 00:29:48,799
Speaker 2: Yeah. Well, and that's you know, that's what compilers do, right,

577
00:29:48,920 --> 00:29:51,279
They treat that code as data to turn into a

578
00:29:51,279 --> 00:29:54,519
set of actions in a machine. And we should take

579
00:29:54,519 --> 00:29:54,920
a break.

580
00:29:55,000 --> 00:29:57,799
Speaker 1: Yeah, let's do that. We'll be right back after these

581
00:29:57,920 --> 00:30:04,079
very important messages. Stick around. Now we're back. It's dot

582
00:30:04,119 --> 00:30:06,839
net Rocks. I'm Carl Franklin. That's my buddy Richard Campbell

583
00:30:07,000 --> 00:30:09,759
either and that's Jason Bach you're listening to. We're talking

584
00:30:09,759 --> 00:30:12,400
about source generators, and I'm wondering, do you know if

585
00:30:12,480 --> 00:30:16,759
Microsoft is using source generators, you know, in their own

586
00:30:16,880 --> 00:30:18,680
code eating their own dog food?

587
00:30:19,000 --> 00:30:22,240
Speaker 3: Yeah, I love I love that phrase. Yeah, eating eating

588
00:30:22,279 --> 00:30:27,000
your own dog food. They are. When source generators first

589
00:30:27,000 --> 00:30:30,279
came out, there wasn't anything in dot net proper, like

590
00:30:30,519 --> 00:30:34,000
a lot of developers like me and others were jumping

591
00:30:34,039 --> 00:30:36,200
on this because well it's so it's a cool thing,

592
00:30:36,400 --> 00:30:39,359
you know, but it was also helpful for certain circumstances.

593
00:30:40,000 --> 00:30:42,519
But it wasn't in as far as I remember, nothing

594
00:30:42,559 --> 00:30:45,359
in the dot need run time that did this. And

595
00:30:45,359 --> 00:30:50,079
now at this point there there are implementations. So for example,

596
00:30:50,160 --> 00:30:53,200
I think one of the most prevalent ones is regular expressions.

597
00:30:54,000 --> 00:30:55,960
So I want to be very clear off the top,

598
00:30:56,400 --> 00:30:58,200
I am not a reg ex expert.

599
00:30:58,680 --> 00:31:02,559
Speaker 1: To nobody is exactly said you where i'd have less

600
00:31:02,599 --> 00:31:03,240
respect for you.

601
00:31:03,319 --> 00:31:07,359
Speaker 2: Yeah. No, there are noble to understand rejects, and one

602
00:31:07,359 --> 00:31:08,759
of them is lying, Yeah.

603
00:31:10,960 --> 00:31:12,640
Speaker 3: There are things I know and there are things I

604
00:31:12,640 --> 00:31:14,559
don't know, and I have no problem talking about what

605
00:31:14,640 --> 00:31:16,480
I don't know and I don't know. If I want

606
00:31:16,480 --> 00:31:19,240
to look up how to parse something. I will go

607
00:31:19,799 --> 00:31:21,599
you know, now these days I'll just say, in copilot,

608
00:31:21,680 --> 00:31:22,960
how do I write it? Rejects for this?

609
00:31:23,160 --> 00:31:25,720
Speaker 2: You know, yeah, you know, we say rejects is the

610
00:31:25,759 --> 00:31:29,640
ultimate cut and paste language. But but now it's clearly,

611
00:31:29,880 --> 00:31:31,240
you know, an ll M language.

612
00:31:31,359 --> 00:31:33,720
Speaker 3: I'm very impressed by people who know it actually, who

613
00:31:33,799 --> 00:31:38,119
know it inside and out. It's it's it's kind of weird,

614
00:31:38,200 --> 00:31:40,400
but it's also very impressive because people can do some

615
00:31:40,680 --> 00:31:42,880
very cool things with it when when needed.

616
00:31:42,720 --> 00:31:45,200
Speaker 2: Without a doubt. Yeah, it's like I feel like it's

617
00:31:45,200 --> 00:31:46,599
like PowerShell too. It's like one of those things. If

618
00:31:46,640 --> 00:31:48,079
you use it every day, it will stick, but if

619
00:31:48,079 --> 00:31:51,200
you don't use it every day, it fades fast. Yeah, yeah,

620
00:31:51,319 --> 00:31:52,640
it's not going to hang around.

621
00:31:52,960 --> 00:31:57,200
Speaker 3: So with ready expressions in NET, they've always been something

622
00:31:57,240 --> 00:32:01,240
that's actually interpreted, compiled, and run time. So if you

623
00:32:01,279 --> 00:32:05,079
write your rejects, nothing happens until somebody wants to do

624
00:32:05,119 --> 00:32:07,400
a match or they want to do something with the rejects,

625
00:32:07,880 --> 00:32:12,279
and that can lead to potentially some performance issues. Sure,

626
00:32:12,480 --> 00:32:17,839
So with rejects in C sharp, now what you can

627
00:32:17,880 --> 00:32:20,920
do is, I think the attribute is called generated rejects,

628
00:32:21,920 --> 00:32:24,079
but you put this attribute in your code, and you

629
00:32:24,119 --> 00:32:27,400
put the rejects string in the code or in the

630
00:32:27,440 --> 00:32:30,680
attribute I should say, and then there's a source generator

631
00:32:30,680 --> 00:32:34,359
that kicks in and will basically show you the implementation

632
00:32:34,519 --> 00:32:36,960
and see sharp of what that rejects will do. It's

633
00:32:37,039 --> 00:32:41,480
actually wha wow. It's really cool because you can use

634
00:32:41,759 --> 00:32:45,039
tools like visual Studio or writer and you can see

635
00:32:45,079 --> 00:32:48,039
what that generated code looks like. So if you really

636
00:32:48,039 --> 00:32:50,599
want to know what it takes to implement a rejex,

637
00:32:51,160 --> 00:32:55,680
the source generator shows you. And I'll even give Microsoft

638
00:32:55,680 --> 00:32:58,079
props on this that they went. I think that small

639
00:32:58,160 --> 00:33:01,839
but nice extra step in that when you have your

640
00:33:01,839 --> 00:33:05,759
rejects source generated to see sharp, they'll put in a

641
00:33:05,880 --> 00:33:09,160
whole bunch of XML comments and also just putting comments

642
00:33:09,160 --> 00:33:11,519
in the code, so if you really are interested in

643
00:33:11,519 --> 00:33:14,960
what it does, you can follow it fairly well. And

644
00:33:15,319 --> 00:33:20,519
it's nice because it puts this header XML comment at

645
00:33:20,559 --> 00:33:23,039
the top of what it's doing, so when you hover

646
00:33:23,160 --> 00:33:26,880
over the attribute, you'll see you know this this rejects

647
00:33:26,920 --> 00:33:28,839
will do the following things, and they will tell you

648
00:33:28,920 --> 00:33:32,039
we're looking for characters zero to nine and then we're

649
00:33:32,039 --> 00:33:35,000
going to skip and do the end it's great, it's amazing.

650
00:33:35,039 --> 00:33:37,880
And again, all this now gets put in your compilation.

651
00:33:38,160 --> 00:33:41,000
Speaker 1: Does it go back the other way? Does if you

652
00:33:41,119 --> 00:33:44,079
change the code, will it update the rejects? Yes?

653
00:33:44,359 --> 00:33:47,240
Speaker 3: And that's also a great thing about source generators is

654
00:33:47,279 --> 00:33:51,960
that when you're writing one, if somebody's changing something underneath

655
00:33:52,000 --> 00:33:56,599
the scenes for you, you genera your code, that generator

656
00:33:56,599 --> 00:33:58,599
code is going to be triggered, and so then you

657
00:33:58,640 --> 00:34:02,240
can now say, well, they change rejects from this to this,

658
00:34:02,880 --> 00:34:06,240
So now I'm going to change my rejex implementation to

659
00:34:06,960 --> 00:34:09,960
what the new state is and you'll see that change

660
00:34:10,400 --> 00:34:12,280
as the thing you're targeting will change.

661
00:34:12,320 --> 00:34:14,239
Speaker 1: That's very cool, n mind blown.

662
00:34:14,679 --> 00:34:17,280
Speaker 2: So yeah, no, and super powerful. And you know, the guy,

663
00:34:17,920 --> 00:34:21,599
the person who wants to look at that code is

664
00:34:21,679 --> 00:34:25,400
really uncomfortable with source generators sort of nondeterministic effects. I

665
00:34:25,480 --> 00:34:28,320
want to see what this thing is doing. Yeah, And

666
00:34:28,360 --> 00:34:30,440
it occurs to me we're living with some really serious

667
00:34:30,519 --> 00:34:32,960
non deterministic code generators these days. We just call them

668
00:34:33,000 --> 00:34:34,599
large language models.

669
00:34:34,519 --> 00:34:40,519
Speaker 3: Right yeah, and with source generators that they're actually very deterministic.

670
00:34:40,599 --> 00:34:43,000
If I put in this rejex, I'm going to get

671
00:34:43,000 --> 00:34:48,239
this output now every time, right now, the implementers of

672
00:34:48,280 --> 00:34:51,880
that source generator may or versions go hey, we can

673
00:34:51,920 --> 00:34:54,159
improve this, or we could change this, and so that

674
00:34:54,239 --> 00:34:57,679
generated code may change underneath the scenes. But me as

675
00:34:57,719 --> 00:35:01,400
the user, I don't care because I just want to

676
00:35:01,639 --> 00:35:03,960
essentially work and if.

677
00:35:03,800 --> 00:35:05,519
Speaker 2: They need to make me as a developer, my care

678
00:35:05,559 --> 00:35:07,599
a bit, but not a whole lot. You should you

679
00:35:07,639 --> 00:35:10,360
expect the same results, Like if it doesn't work the same,

680
00:35:10,480 --> 00:35:11,800
that's a buck yes.

681
00:35:11,679 --> 00:35:15,079
Speaker 3: Yes, exactly. But if it works the same, and maybe

682
00:35:15,079 --> 00:35:17,360
it doesn't allocate as much memory or it works a

683
00:35:17,400 --> 00:35:21,320
little faster because they made improvements, great, I don't. In fact,

684
00:35:21,480 --> 00:35:26,000
typically with source generators, by default they make files, but

685
00:35:26,039 --> 00:35:29,119
they're not really files that exist in your project. That

686
00:35:29,159 --> 00:35:32,159
may sound a little weird, but they're projects that are

687
00:35:31,960 --> 00:35:34,239
there are files that are part of the project. That's

688
00:35:34,239 --> 00:35:36,920
what gets compiled. If you really want to save them

689
00:35:36,920 --> 00:35:38,559
the disc and you want them to be part of

690
00:35:38,599 --> 00:35:42,119
your repository, you can do that. But by default they're

691
00:35:42,159 --> 00:35:45,400
kind of these sort of a few you know, I

692
00:35:45,559 --> 00:35:47,440
can't even say the word right now, but these kind

693
00:35:47,480 --> 00:35:50,880
of ghost files, I'll use that term that they're there.

694
00:35:51,199 --> 00:35:54,000
They do exist, but they're not actually put to disc

695
00:35:54,360 --> 00:35:59,400
If that makes sense, so you're more if you're using

696
00:35:59,440 --> 00:36:03,239
something that as a source generation At least I feel

697
00:36:03,239 --> 00:36:06,119
this way as a developer, I just wanted to do

698
00:36:06,159 --> 00:36:08,800
what it needs to do it does it well? Does

699
00:36:08,840 --> 00:36:11,400
it match my coding style? Does it match any of

700
00:36:11,400 --> 00:36:14,719
that stuff? I really don't care. I personally don't care.

701
00:36:15,039 --> 00:36:17,280
I wanted to actually just do what it needs to

702
00:36:17,320 --> 00:36:21,119
do and do it well. So regular expressions is one

703
00:36:21,159 --> 00:36:24,760
of them. In Microsoft, there's also places with p invokes,

704
00:36:24,800 --> 00:36:28,760
with serialization, logging configuration. You know that they've added in

705
00:36:28,920 --> 00:36:34,199
source generators for various advantageous scenarios.

706
00:36:34,440 --> 00:36:34,880
Speaker 1: That's cool.

707
00:36:34,920 --> 00:36:36,360
Speaker 2: I haven't heard P and voke in a while.

708
00:36:36,519 --> 00:36:39,599
Speaker 3: Yeah, yeah, neither of I. I heard about it and I went, oh,

709
00:36:39,639 --> 00:36:42,000
that's great that they did that, and then it just

710
00:36:42,039 --> 00:36:44,000
went right out of my head because I haven't done

711
00:36:44,000 --> 00:36:45,559
a P and vulcan in decades.

712
00:36:46,119 --> 00:36:48,599
Speaker 1: So can you give me a scenario where a developer

713
00:36:48,639 --> 00:36:53,000
working on a project is facing, you know, something that

714
00:36:53,039 --> 00:36:56,440
they have to do and a code a source generator

715
00:36:56,480 --> 00:36:58,239
would be the solution.

716
00:36:58,679 --> 00:37:02,079
Speaker 3: It's a it's a good quest question because typically at

717
00:37:02,159 --> 00:37:05,400
least what and me as a developer day to day

718
00:37:05,480 --> 00:37:09,000
with the stuff that I do. It's not a common thing,

719
00:37:09,360 --> 00:37:13,159
and I think I want to stress that because while

720
00:37:13,199 --> 00:37:17,480
I think source generators are cool and if the opportunity arises,

721
00:37:17,519 --> 00:37:19,760
people should use them. But I think that's a key

722
00:37:19,800 --> 00:37:23,639
part of this is that if the opportunity arises for

723
00:37:23,760 --> 00:37:26,199
a lot of things that we do as developers, I

724
00:37:26,199 --> 00:37:31,119
shouldn't say a lot, but there's typically even though there's

725
00:37:31,159 --> 00:37:33,719
things that we repeat, that doesn't necessarily mean we should

726
00:37:33,719 --> 00:37:35,480
go run off and do it as a source generator.

727
00:37:35,840 --> 00:37:38,760
Speaker 2: Yeah, don't turn this into a hammer you whack everything.

728
00:37:38,800 --> 00:37:41,239
Speaker 3: Well, yes, exactly. It's a great tool, but it's still

729
00:37:41,280 --> 00:37:44,920
a tool that you don't need to use that tool everywhere.

730
00:37:45,840 --> 00:37:49,239
Speaker 2: It reminds me of aspect orated in general. Right, yeah, yeah,

731
00:37:49,320 --> 00:37:50,239
it's a way of thinking.

732
00:37:50,599 --> 00:37:54,840
Speaker 3: It is it is, and it's also it's also again

733
00:37:54,880 --> 00:37:57,880
because it's part of that compilation pipeline, you have to

734
00:37:57,920 --> 00:38:03,519
be very aware of how fast it runs. If you're

735
00:38:03,559 --> 00:38:05,639
going to do like I've heard some people say, well,

736
00:38:05,760 --> 00:38:08,599
we generate this code because we read from a database. Nope,

737
00:38:08,840 --> 00:38:11,480
source generators don't do that enough, because you're going to

738
00:38:11,559 --> 00:38:15,239
kill performance as it looks in a tool like Visual

739
00:38:15,239 --> 00:38:17,960
Studio Writer. So don't do that at all. You can

740
00:38:18,000 --> 00:38:21,760
build a tool to do that. That's great. Don't use

741
00:38:21,760 --> 00:38:24,440
a source generator for that. You really want to just

742
00:38:24,519 --> 00:38:26,599
look at things that are in code and then generate

743
00:38:26,679 --> 00:38:29,360
new code off of that. So a lot of the

744
00:38:29,360 --> 00:38:32,000
things that you see source generators written for are kind

745
00:38:32,039 --> 00:38:36,159
of these generalistic like patterns or things that people do,

746
00:38:36,280 --> 00:38:40,960
like serialization, like mocking. That's one of the things I

747
00:38:41,000 --> 00:38:44,639
wrote a source generator for, and funnily enough, cold rocks.

748
00:38:44,880 --> 00:38:50,920
So but that one uses source generation, you know. It's

749
00:38:51,039 --> 00:38:53,920
it's things that I think have a more general pattern

750
00:38:54,239 --> 00:38:57,480
that you're going to write a source generator for. It's

751
00:38:57,519 --> 00:39:01,679
not maybe necessarily what you do specifically with things that

752
00:39:01,719 --> 00:39:03,920
are related to your business or whatever you're working on.

753
00:39:04,159 --> 00:39:05,199
Speaker 2: Okay, fair enough.

754
00:39:05,400 --> 00:39:09,000
Speaker 1: Yeah, if you do find yourself in that position where

755
00:39:09,039 --> 00:39:10,920
you know what, I think we need a source generator,

756
00:39:10,960 --> 00:39:14,320
here give us some tips for people when they're writing

757
00:39:14,360 --> 00:39:16,159
their first source generator.

758
00:39:17,199 --> 00:39:19,440
Speaker 3: The first tip is the one I said before, which

759
00:39:19,519 --> 00:39:22,800
is considered not doing it. Yeah, and I know that

760
00:39:23,440 --> 00:39:25,239
I know it well, it's it sounds.

761
00:39:25,039 --> 00:39:28,559
Speaker 2: You almost have to not care about performance, right like well.

762
00:39:28,519 --> 00:39:31,920
Speaker 3: And it's also writing a source generator has kind of

763
00:39:31,920 --> 00:39:34,119
a I don't want to say it has a it's

764
00:39:34,119 --> 00:39:36,840
not an insurmountable cliff you got to come over. But

765
00:39:36,920 --> 00:39:40,320
there is something you do have to understand at least

766
00:39:40,320 --> 00:39:42,559
some parts of Rosmond. You don't have to be a

767
00:39:42,599 --> 00:39:46,079
compilation expert, but you have to understand what a sintexturee is,

768
00:39:46,119 --> 00:39:50,079
what a semantic model is, at least have somewhat of

769
00:39:50,079 --> 00:39:53,280
a high level of that stuff. You have to understand

770
00:39:53,320 --> 00:39:57,320
how to build a source generator, which long story short,

771
00:39:57,760 --> 00:39:59,800
can be a little interesting, especially as you try to

772
00:39:59,800 --> 00:40:03,000
pasckage these things up into nu get packages. There's a

773
00:40:03,519 --> 00:40:07,559
couple of things over time that have been problematic that

774
00:40:07,559 --> 00:40:09,679
the community has kind of rallied around and figured out

775
00:40:09,719 --> 00:40:13,000
what's the best way to write these source generators. So

776
00:40:13,480 --> 00:40:16,199
that's why I don't mean to discourage people. It's just

777
00:40:16,400 --> 00:40:19,559
if you think you want to write one, it might

778
00:40:19,639 --> 00:40:22,639
be a better approach just again, write a command line

779
00:40:22,639 --> 00:40:25,159
tool as a console app, or write a custom MS

780
00:40:25,159 --> 00:40:27,320
build task that might actually be easier.

781
00:40:27,440 --> 00:40:29,639
Speaker 2: There's probably another way to do that. Some question is

782
00:40:29,639 --> 00:40:29,880
is it.

783
00:40:29,880 --> 00:40:33,039
Speaker 1: Better maybe go find a package that's already written and

784
00:40:33,079 --> 00:40:35,559
that's popular, so that you can see how they did.

785
00:40:35,440 --> 00:40:37,599
Speaker 2: It exactly be a good idea. I just said this

786
00:40:37,719 --> 00:40:42,199
horrible chill where it's like I invoke it. I use

787
00:40:42,239 --> 00:40:44,360
a source generator to call to an LLM to spin

788
00:40:44,400 --> 00:40:46,239
out code for me that I ain't started in my application.

789
00:40:46,280 --> 00:40:48,960
I mean, what could go wrong with that?

790
00:40:49,559 --> 00:40:54,079
Speaker 3: A lot wrong with that? You know, Richard, go for it.

791
00:40:54,119 --> 00:40:55,880
That would be awesome, really cool, But.

792
00:40:57,519 --> 00:41:00,559
Speaker 1: That concludes the anti pattern session that rock.

793
00:41:00,679 --> 00:41:01,719
Speaker 2: Yeah the best.

794
00:41:04,480 --> 00:41:08,400
Speaker 3: There's a lot of good resources out there now for people.

795
00:41:08,559 --> 00:41:11,840
There is some sites that actually list like all the

796
00:41:12,000 --> 00:41:17,239
known open source implementations for various source generators out there

797
00:41:17,280 --> 00:41:20,039
and the ones that Microsoft does in the box. There

798
00:41:20,039 --> 00:41:23,840
are some discord servers out there that people from the

799
00:41:23,880 --> 00:41:26,599
c sharp team are on, so if you have questions,

800
00:41:26,719 --> 00:41:30,239
you can go in there and if anybody knows, they

801
00:41:30,280 --> 00:41:35,079
know because they effectively built the features, so they'll they'll

802
00:41:35,079 --> 00:41:35,760
give you tips.

803
00:41:35,800 --> 00:41:40,400
Speaker 2: I really like these, you know, source generators for Jacks,

804
00:41:40,480 --> 00:41:45,280
source generator for p and Vogue, like these rarely used

805
00:41:45,320 --> 00:41:48,440
technologies where sometimes it's a good solution to a problem

806
00:41:48,480 --> 00:41:50,679
and now I can introduce this additional mechanives that gives

807
00:41:50,760 --> 00:41:54,360
me more observability, more understanding of what's happening. Yes, that's

808
00:41:54,400 --> 00:41:56,559
exciting to me. That seems like one of my favorite

809
00:41:56,559 --> 00:41:57,119
cases here.

810
00:41:57,239 --> 00:42:00,920
Speaker 3: Yeah. Yeah. But the other case that I briefly mentioned

811
00:42:01,239 --> 00:42:05,119
is the one with the mocking frameworks. With this one

812
00:42:05,119 --> 00:42:09,320
that I've created, I started it in twenty fifteen, and

813
00:42:09,519 --> 00:42:12,199
it was mostly just because, like I mentioned at the beginning,

814
00:42:12,440 --> 00:42:15,519
when Roslin first came out, it was analyzers co fixes

815
00:42:15,519 --> 00:42:17,599
for factories, and I wanted to sit there. I sat

816
00:42:17,599 --> 00:42:20,679
there and I went, what could I do with Roslin

817
00:42:21,519 --> 00:42:25,559
That isn't one of these things? And so I looked

818
00:42:25,559 --> 00:42:28,880
at mocking frameworks, and I said, instead of using a

819
00:42:28,960 --> 00:42:31,880
way to generate types that run time with like castle

820
00:42:31,960 --> 00:42:35,800
Dynamic or Castle core and all that stuff, could I

821
00:42:35,840 --> 00:42:41,119
do that somewhat with just generating c sharp. So originally

822
00:42:41,199 --> 00:42:44,320
I just generated c sharp in this, and then I

823
00:42:44,480 --> 00:42:46,360
rosin was actually a very small part of it. It

824
00:42:46,440 --> 00:42:47,639
just compiled that c sharp.

825
00:42:48,079 --> 00:42:50,920
Speaker 2: I had a lot about Castle project in ages a

826
00:42:51,360 --> 00:42:52,280
great point.

827
00:42:53,000 --> 00:42:56,480
Speaker 3: But then when source generators came in as a feature,

828
00:42:57,199 --> 00:42:59,360
I went back and I said, okay, take all of

829
00:42:59,360 --> 00:43:02,079
what I did and move that into a source generator.

830
00:43:02,719 --> 00:43:06,599
One other thing, well, one of the things with mentioning

831
00:43:06,679 --> 00:43:08,840
this that I think is also really important is that

832
00:43:09,800 --> 00:43:11,760
with a lot of the mocking frameworks that are out there,

833
00:43:11,800 --> 00:43:14,559
they use and I mentioned this before, the concept of

834
00:43:14,559 --> 00:43:17,760
an expression tree, which expression trees are these great little

835
00:43:17,760 --> 00:43:22,039
things in dot Net or I should say, She's sharp,

836
00:43:22,679 --> 00:43:25,119
but they really haven't been updated in quite a long time,

837
00:43:25,280 --> 00:43:28,239
and in fact, they're not going to be updated. That's

838
00:43:28,280 --> 00:43:29,880
actually been stale.

839
00:43:29,639 --> 00:43:32,480
Speaker 2: Of course twenty seventeen. Dude, that's a long time ago, now, yeah.

840
00:43:32,559 --> 00:43:32,840
Speaker 1: Wow.

841
00:43:33,000 --> 00:43:34,920
Speaker 3: So there are features that have been added in C

842
00:43:35,119 --> 00:43:39,719
sharp that don't exist in an expression tree. And so

843
00:43:40,280 --> 00:43:42,800
the nice thing about writing a source generator is it's

844
00:43:42,840 --> 00:43:45,519
in C sharp. I can generate anything in C sharp,

845
00:43:45,840 --> 00:43:49,480
so there's no limitation as to what I can support.

846
00:43:49,559 --> 00:43:51,599
So for Rocks, one of the things, for example, that

847
00:43:51,639 --> 00:43:56,679
I can do is support restructs spans, which are becoming

848
00:43:56,920 --> 00:44:00,360
more prevalent as time goes on. Other mocking frameworks can't

849
00:44:00,719 --> 00:44:03,599
because they're tied to expression trees and they won't be

850
00:44:03,599 --> 00:44:09,119
able to mock types that have these types within their definition.

851
00:44:09,719 --> 00:44:13,239
So that's another advantage of source generators. It's all c sharp.

852
00:44:13,440 --> 00:44:15,800
Anything you can do in C sharp, you can generate

853
00:44:15,800 --> 00:44:17,280
with a source generator.

854
00:44:16,960 --> 00:44:18,840
Speaker 2: Right, Yeah, And it all comes back to Roslin this

855
00:44:18,960 --> 00:44:23,400
re entrant compiler. Essentially, this compiler is a service where

856
00:44:23,760 --> 00:44:26,639
you can create you can create stuff from that compiler

857
00:44:26,639 --> 00:44:28,199
that you can feed back to that compiler.

858
00:44:28,360 --> 00:44:31,119
Speaker 3: Yeah, I mean I remember, you know, and you probably

859
00:44:31,159 --> 00:44:34,679
remember this too, But way back in PDC days, I

860
00:44:34,719 --> 00:44:37,159
started to hear that the you know, honors would be

861
00:44:37,199 --> 00:44:39,559
on stage with what's in new and C sharp and

862
00:44:39,559 --> 00:44:42,400
then he would hint right at the end this thing

863
00:44:42,599 --> 00:44:45,239
maybe called compilers a service, you know, and you would

864
00:44:45,280 --> 00:44:47,239
only talk about it for a couple of minutes. But

865
00:44:48,360 --> 00:44:51,159
I heard about that and I kind of got hooked.

866
00:44:51,320 --> 00:44:53,920
I was like, what is this, what is this new thing?

867
00:44:54,119 --> 00:44:56,559
And you know, as we found out, it was this

868
00:44:56,639 --> 00:45:00,960
whole rewriting of the compiler. Yeah, and not just rewriting

869
00:45:00,960 --> 00:45:03,360
it in SEA sharp, but making it so they use

870
00:45:03,400 --> 00:45:06,159
a developer could use it. And I personally think it's

871
00:45:06,199 --> 00:45:09,039
one of the one of the best things or Microsoft

872
00:45:09,119 --> 00:45:10,000
ever did with dot.

873
00:45:10,599 --> 00:45:12,280
Speaker 2: So that it was always an argument that they got

874
00:45:12,320 --> 00:45:13,800
to it too late, like it's supposed to be. The

875
00:45:13,800 --> 00:45:15,880
fun of the fundamental metrics of any language is that

876
00:45:15,920 --> 00:45:18,199
you can write the language, and the language they didn't

877
00:45:18,199 --> 00:45:19,119
get to it for a long time.

878
00:45:19,159 --> 00:45:21,239
Speaker 1: I think it's funny that Anders chose to use like

879
00:45:21,400 --> 00:45:23,679
Columbo style to drop that one at the end.

880
00:45:23,800 --> 00:45:27,840
Speaker 2: The one thing, well, and it's the story as I

881
00:45:27,880 --> 00:45:29,519
heard it, and let's face it, I'm the guy who's

882
00:45:29,519 --> 00:45:32,119
been collecking the story for a long time. Is they

883
00:45:32,199 --> 00:45:35,039
hit a point where you had the regular C sharp

884
00:45:35,079 --> 00:45:38,320
compiler and its features, and then you had the compiler

885
00:45:38,360 --> 00:45:41,159
that ran in visual studio to do all the intelligence

886
00:45:41,239 --> 00:45:43,400
for you, and they were having a tough time keeping

887
00:45:43,440 --> 00:45:45,480
those things in sync. It's like this should be the

888
00:45:45,559 --> 00:45:48,480
same thing, Like why are we doing this twice? Yeah,

889
00:45:48,519 --> 00:45:51,400
And that was finally the impetus to spend the sheer

890
00:45:51,440 --> 00:45:53,920
amount of money it took to rewrite that.

891
00:45:54,719 --> 00:45:57,760
Speaker 3: Yeah, I've heard numbers, and it does not sound like

892
00:45:57,800 --> 00:45:59,880
it was cheap, No.

893
00:45:59,440 --> 00:46:01,599
Speaker 2: But it but it was going to get only more expensive.

894
00:46:01,679 --> 00:46:03,760
The other side of this was, and we did this

895
00:46:03,840 --> 00:46:05,719
on the show, was this sort of you know what

896
00:46:05,800 --> 00:46:09,239
really happened, all the C sharp developers, the folks that

897
00:46:09,280 --> 00:46:12,719
were building C sharp became C sharp developers because then

898
00:46:12,760 --> 00:46:15,440
they were C plus plus developers that's how they were

899
00:46:15,480 --> 00:46:18,360
writing C sharp And so suddenly, yeah, good point the

900
00:46:18,440 --> 00:46:23,280
shape of from C sharp six on this it changed

901
00:46:23,679 --> 00:46:26,880
because oh yeah, there was all these remarkable minds working

902
00:46:26,880 --> 00:46:29,320
in c sharp every day and all of that. You know,

903
00:46:29,440 --> 00:46:33,400
I wish I could just I think on the Matt's

904
00:46:33,400 --> 00:46:34,840
targets you were talking to us, says this is a

905
00:46:34,880 --> 00:46:38,559
Cambrian explosion like this, and then look at what's happened,

906
00:46:39,199 --> 00:46:42,719
you know, eight versions later to c sharp. It's just

907
00:46:42,760 --> 00:46:45,760
a different beast now, and I would argue better in

908
00:46:45,760 --> 00:46:46,199
every way.

909
00:46:46,280 --> 00:46:49,239
Speaker 3: Well with also it becoming open source, I think was

910
00:46:49,280 --> 00:46:52,440
a huge part of that too. You look at the

911
00:46:52,519 --> 00:46:56,199
pace and the evolution of c sharp before that and

912
00:46:56,280 --> 00:46:59,480
now after. It's funny because developers that I talked to

913
00:47:00,280 --> 00:47:02,559
sometimes or you'll hear in the community, it's almost like

914
00:47:02,559 --> 00:47:04,679
the pendulum has swung to the point of now they're

915
00:47:04,719 --> 00:47:07,519
complaining about it moving too fast. There's too many features,

916
00:47:07,559 --> 00:47:10,800
there's too many versions, and I can't keep up, and

917
00:47:11,519 --> 00:47:14,400
you know you're going to go, well, which one do

918
00:47:14,480 --> 00:47:17,199
you want? But I think by them moving it to

919
00:47:17,239 --> 00:47:20,480
open source, that was also a big part of it,

920
00:47:20,559 --> 00:47:24,119
because now you know, people like you and me, we're

921
00:47:24,199 --> 00:47:29,119
you know, well maybe you're Richard, but you're not just

922
00:47:29,159 --> 00:47:31,280
going to go into rosalind clone it and say I

923
00:47:31,320 --> 00:47:33,559
want to add a new feature and submit a PR

924
00:47:33,599 --> 00:47:35,519
and it's going to go in. That doesn't happen.

925
00:47:35,559 --> 00:47:38,960
Speaker 2: To be very clear, I am not going to do that. No, no, no, no,

926
00:47:39,000 --> 00:47:43,559
am I okay. And when we've actually had people on

927
00:47:43,599 --> 00:47:48,360
the show that became Microsoft employees because of their contributions

928
00:47:48,400 --> 00:47:51,599
into dot nowt Yes, but it's incredibly rare, like that

929
00:47:51,719 --> 00:47:54,679
is not a career path you should pursue, true kind of,

930
00:47:54,960 --> 00:47:55,320
you know.

931
00:47:55,320 --> 00:47:58,320
Speaker 3: But there have been people that will, not not just

932
00:47:58,440 --> 00:48:01,000
with Roslin, but the Dune on time. They'll go in

933
00:48:01,039 --> 00:48:05,159
and maybe add in a new method to something, or

934
00:48:05,199 --> 00:48:06,960
maybe they'll do a little bit of an improvement. I

935
00:48:07,000 --> 00:48:09,559
think Ben Adams, if his name comes on my head,

936
00:48:09,559 --> 00:48:11,559
he did a lot of stuff underneath the scenes for

937
00:48:11,599 --> 00:48:14,360
a while to help out. Those are just community members

938
00:48:14,400 --> 00:48:17,559
outside of Microsoft that just want to help this open

939
00:48:17,599 --> 00:48:21,559
source effort, and I think that's also really helped things

940
00:48:22,280 --> 00:48:25,440
evolve faster and also better over the years.

941
00:48:25,559 --> 00:48:27,639
Speaker 2: Totally. Yeah, yeah, awesome stuff.

942
00:48:27,719 --> 00:48:28,920
Speaker 1: So what's next for you?

943
00:48:29,000 --> 00:48:29,239
Speaker 2: Man?

944
00:48:29,519 --> 00:48:30,800
Speaker 1: What are you working on? For me?

945
00:48:31,079 --> 00:48:36,679
Speaker 3: Yeah? Well, my day job, which you know this is

946
00:48:36,800 --> 00:48:39,719
all audio, but over my shoulder there I'm pointing. Now,

947
00:48:39,920 --> 00:48:42,960
that's that's my day job, and that's pretty much what

948
00:48:43,000 --> 00:48:47,599
I do. My focus is within Rocket and where I'm

949
00:48:47,639 --> 00:48:50,320
at and the team I'm on. We spend our time

950
00:48:50,360 --> 00:48:53,079
focused on building packages and libraries. You know, my focus

951
00:48:53,119 --> 00:48:55,199
is on dot net, but we also have people that

952
00:48:55,239 --> 00:49:01,400
do stuff with JavaScript. We've also we don't really evolve this,

953
00:49:01,599 --> 00:49:03,519
but there have been some stuff done in PHP that

954
00:49:03,840 --> 00:49:06,360
we inherit. That's the fun of being in a corporation. Sometimes,

955
00:49:06,360 --> 00:49:07,800
sure that gets thrown.

956
00:49:07,519 --> 00:49:10,760
Speaker 2: On you, but that code still makes the company money.

957
00:49:10,800 --> 00:49:12,519
Otherwise it wouldn't be there, exactly.

958
00:49:12,800 --> 00:49:13,000
Speaker 1: Yeah.

959
00:49:13,840 --> 00:49:17,239
Speaker 3: So, but most of my stuff is in dot net

960
00:49:17,320 --> 00:49:19,719
and just building stuff that other teams can use, other

961
00:49:19,760 --> 00:49:22,519
engineers can use to make things so they don't have

962
00:49:22,599 --> 00:49:23,639
to build that stuff.

963
00:49:24,000 --> 00:49:26,679
Speaker 2: The definition of an enterprise architect, my friend, that's what

964
00:49:26,719 --> 00:49:27,280
it sounds like.

965
00:49:27,920 --> 00:49:30,679
Speaker 1: Kinda yeah, so I take it some of that it

966
00:49:30,679 --> 00:49:31,920
has been source generators.

967
00:49:32,800 --> 00:49:35,559
Speaker 3: Not yet, we haven't really found anything yet to do

968
00:49:35,599 --> 00:49:39,559
that internally, but I do keep that. I keep my

969
00:49:40,000 --> 00:49:41,719
eyes open to see if that's ever needed.

970
00:49:42,320 --> 00:49:44,360
Speaker 2: This is a good answer to a particular problem the

971
00:49:44,360 --> 00:49:45,159
company has.

972
00:49:45,480 --> 00:49:50,559
Speaker 3: Yeah, exactly. So that's you know, that's my day job.

973
00:49:50,599 --> 00:49:53,000
But I still go out. I still speak at conferences

974
00:49:53,000 --> 00:49:55,760
when I can and and if I can make that happen,

975
00:49:56,079 --> 00:50:00,199
I do that. Don't write books anymore for lots of reasons.

976
00:50:00,440 --> 00:50:01,960
Speaker 1: I guess I write books anymore.

977
00:50:02,079 --> 00:50:03,000
Speaker 3: Yeah, exactly.

978
00:50:03,519 --> 00:50:05,559
Speaker 2: Writing one book is a good idea. You need to

979
00:50:05,639 --> 00:50:07,639
have that thing in your hand. It's an example of

980
00:50:07,679 --> 00:50:10,679
your effort. Writing more books means you're just not learning, right.

981
00:50:11,559 --> 00:50:13,880
Speaker 3: I was about to say, like, I've been part of

982
00:50:14,000 --> 00:50:16,239
I think six or seven books in my life. Yea.

983
00:50:16,679 --> 00:50:18,920
Speaker 2: Sometimes you have to learn these mistakes over and over again.

984
00:50:19,239 --> 00:50:22,519
Speaker 3: Yeah. Yeah. The last one I wrote was in twenty fifteen.

985
00:50:22,599 --> 00:50:28,280
That was actually for something on Rosalind and I said,

986
00:50:28,639 --> 00:50:32,280
I'll do it if one of the stipulations is I

987
00:50:32,280 --> 00:50:33,199
don't have to pad the.

988
00:50:33,199 --> 00:50:35,360
Speaker 2: Book, right, I just want to stick with the meat.

989
00:50:35,400 --> 00:50:37,000
It doesn't have to be eight hundred pages.

990
00:50:37,360 --> 00:50:39,360
Speaker 3: Yeah, And so they were fine with that, and so

991
00:50:39,400 --> 00:50:41,880
it's like one hundred and fifty pages and like something

992
00:50:41,960 --> 00:50:45,079
like that. And that was great, and I sold tens

993
00:50:45,079 --> 00:50:47,079
of copies and I.

994
00:50:47,519 --> 00:50:50,480
Speaker 2: Both guys, you bought it. Just awesome, Jason time.

995
00:50:50,760 --> 00:50:52,119
Speaker 3: I did have somebody come up to me at a

996
00:50:52,199 --> 00:50:55,199
conference once and say to me, I really want to

997
00:50:55,199 --> 00:50:57,000
thank you for writing that book. Because I was doing

998
00:50:57,039 --> 00:51:00,360
my master's thesis on compilers and I was using C

999
00:51:00,519 --> 00:51:02,480
sharp and I was stuck in your book actually helped

1000
00:51:02,519 --> 00:51:02,960
me and I was.

1001
00:51:02,920 --> 00:51:05,760
Speaker 2: Like, that's awesome, that's cool, that's great, that's cool here.

1002
00:51:05,800 --> 00:51:07,920
You only get so many of those ever. Yeah, yeah,

1003
00:51:08,119 --> 00:51:10,000
once in a while you can affect some people like

1004
00:51:10,079 --> 00:51:11,960
that's a good day. That's why you really make that stuff.

1005
00:51:12,000 --> 00:51:12,199
Speaker 3: Yeah.

1006
00:51:12,400 --> 00:51:13,960
Speaker 2: I thought about this a lot. I would hope you

1007
00:51:14,000 --> 00:51:15,639
don't have to. Here's an approach.

1008
00:51:15,800 --> 00:51:15,920
Speaker 1: Ye.

1009
00:51:16,320 --> 00:51:17,960
Speaker 3: So, but that's the last time I did it, and

1010
00:51:17,960 --> 00:51:19,400
that's probably the last time I'll ever do it.

1011
00:51:19,960 --> 00:51:23,599
Speaker 2: Yeah. Yeah, the world's moved on. Yeah, very good.

1012
00:51:23,639 --> 00:51:26,360
Speaker 1: Well, the website is Jasonbock dot net. You can read

1013
00:51:26,360 --> 00:51:29,000
all about him there. And Jason, thank you very much.

1014
00:51:29,039 --> 00:51:30,639
This has been very informative.

1015
00:51:30,719 --> 00:51:32,320
Speaker 3: Thank you for having me. I appreciate it.

1016
00:51:32,360 --> 00:51:34,360
Speaker 1: Thanks you bet all right, We'll talk to you next

1017
00:51:34,400 --> 00:51:57,960
time on dot net rocks. Dot net rocks is brought

1018
00:51:57,960 --> 00:52:01,840
to you by Franklin's Net use by Pop Studios, a

1019
00:52:01,960 --> 00:52:06,360
full service audio, video and post production facility located physically

1020
00:52:06,400 --> 00:52:09,159
in New London, Connecticut, and of course in the cloud

1021
00:52:09,800 --> 00:52:14,039
online at pwop dot com. Visit our website at d

1022
00:52:14,119 --> 00:52:16,119
O T N E t R O c k S

1023
00:52:16,199 --> 00:52:21,239
dot com for RSS feeds, downloads, mobile apps, comments, and

1024
00:52:21,320 --> 00:52:24,599
access to the full archives going back to show number one,

1025
00:52:24,800 --> 00:52:26,320
recorded in September two.

1026
00:52:26,239 --> 00:52:26,840
Speaker 2: Thousand and two.

1027
00:52:27,440 --> 00:52:29,800
Speaker 1: And make sure you check out our sponsors. They keep

1028
00:52:29,880 --> 00:52:33,039
us in business. Now go write some code, See you

1029
00:52:33,079 --> 00:52:37,039
next time you got javans am

