1
00:00:01,080 --> 00:00:03,400
Welcome to Happy Path 
Programming. 

2
00:00:03,760 --> 00:00:08,800
I'm Bruce Eckel. 
I'm James Ward, welcome to your 

3
00:00:08,800 --> 00:00:11,640
Happy Path programming. 
It's just a beautiful day in 

4
00:00:11,640 --> 00:00:12,520
Crested. 
Beauty and it's. 

5
00:00:12,760 --> 00:00:14,360
Rain. 
August 1st, yeah. 

6
00:00:14,360 --> 00:00:16,920
August 1st, yeah. 
In 2025, yeah. 

7
00:00:16,920 --> 00:00:18,880
We should put the dates on these
things. 

8
00:00:18,880 --> 00:00:20,560
We saw a. 
Beautiful rainbow last night. 

9
00:00:20,560 --> 00:00:23,040
Yes, we did. 
Glad to have some rain, yes? 

10
00:00:23,240 --> 00:00:25,560
We had book night last night. 
Yeah, we were trying to figure 

11
00:00:25,560 --> 00:00:30,880
out all the weird things about 
TypeScript and Oh my gosh, I 

12
00:00:30,880 --> 00:00:33,480
don't know if either of you have
encountered that language 

13
00:00:33,480 --> 00:00:39,440
before, but it is. 
AI want to call it a Mind F but 

14
00:00:40,280 --> 00:00:42,720
it is kind of anyway. 
It comes with some baggage, 

15
00:00:42,880 --> 00:00:44,560
yeah. 
That's probably a better way to 

16
00:00:44,560 --> 00:00:45,640
do it. 
Yeah. 

17
00:00:45,640 --> 00:00:48,800
We should interview and or 
sometime and just get find out 

18
00:00:48,800 --> 00:00:53,920
what's going on. 
So the summer Tech Forum is 

19
00:00:54,000 --> 00:00:57,760
coming up and it's September, 
September 8th, the week of 

20
00:00:57,760 --> 00:00:59,160
September 8th. 
And if you go to 

21
00:00:59,160 --> 00:01:03,040
summertechforum.com, you'll find
the details. 

22
00:01:04,239 --> 00:01:06,800
We, we have a, we have students 
coming. 

23
00:01:06,800 --> 00:01:09,960
We have, we have some people 
haven't been here for quite a 

24
00:01:09,960 --> 00:01:14,120
while. 
Bill Venners of Scala fame is 

25
00:01:16,480 --> 00:01:20,320
threatening to show up, and did.
You know what I'll be working on

26
00:01:20,440 --> 00:01:22,480
and talking about at Summer Tech
Farm? 

27
00:01:22,480 --> 00:01:23,560
No. 
What will you be working? 

28
00:01:23,560 --> 00:01:25,160
On AI of course. 
Oh yeah? 

29
00:01:25,160 --> 00:01:27,160
Well, that's the CP. 
That's the theme of the 

30
00:01:27,160 --> 00:01:28,520
conference. 
Oh great. 

31
00:01:28,800 --> 00:01:31,800
And I said AI, obviously. 
Building some agents but and. 

32
00:01:32,600 --> 00:01:35,680
But of course the the conference
theme doesn't limit us to 

33
00:01:36,320 --> 00:01:38,000
anything. 
We don't have to talk about AI 

34
00:01:38,000 --> 00:01:41,560
at all, but that's what it says 
so makes it easier to sell to 

35
00:01:41,560 --> 00:01:41,840
your. 
Mail. 

36
00:01:41,840 --> 00:01:44,480
So if you're interested in AI, 
great, If you're not, great. 

37
00:01:44,640 --> 00:01:46,560
Yep, Yep, it's all it's all 
good. 

38
00:01:47,640 --> 00:01:52,120
OK, so yes, this week we are 
talking to Aaron Pollack and 

39
00:01:52,120 --> 00:01:57,880
Steven Troxler from Meta. 
Who are the their their focus is

40
00:01:57,960 --> 00:02:00,440
I think your focus is types in 
Python. 

41
00:02:01,120 --> 00:02:01,640
Is it? 
Am I? 

42
00:02:01,760 --> 00:02:04,080
So we're doing another one on on
Python types. 

43
00:02:04,080 --> 00:02:07,320
It just happened that way, 
probably because I was at the 

44
00:02:07,320 --> 00:02:09,520
Python conference and at the 
typing summit. 

45
00:02:09,520 --> 00:02:13,840
And so it's just, it's just 
ended up that way. 

46
00:02:13,840 --> 00:02:16,440
And we're interested in types 
you want to talk. 

47
00:02:16,440 --> 00:02:18,480
Well, and I've certainly 
enjoyed. 

48
00:02:18,880 --> 00:02:20,880
I've been writing a lot of 
Python like I do, yeah. 

49
00:02:20,880 --> 00:02:23,920
And the types make my life so 
much better so. 

50
00:02:24,160 --> 00:02:27,880
They do. 
They do, but apparently not 

51
00:02:27,880 --> 00:02:29,360
everybody's on board with it. 
Yeah. 

52
00:02:29,920 --> 00:02:32,040
So, Eric? 
Yeah, but we love to hear that. 

53
00:02:32,040 --> 00:02:32,840
Yeah. 
Hello. 

54
00:02:32,960 --> 00:02:34,040
Yeah. 
Thanks for having us. 

55
00:02:35,160 --> 00:02:37,120
Yeah, and anything. 
To say about your background, 

56
00:02:37,120 --> 00:02:41,360
what you work on or anything you
want to introduce yourself with.

57
00:02:42,480 --> 00:02:46,720
Well, as you say, we, we are 
from the team that kind of 

58
00:02:46,720 --> 00:02:51,200
focuses on types in Python, I 
guess more properly, we're the 

59
00:02:51,200 --> 00:03:00,760
team that focuses on the IDE and
CI experience, CI and so much as

60
00:03:00,760 --> 00:03:04,240
it's related to static typing. 
So we build the type checker, we

61
00:03:04,280 --> 00:03:09,000
try to make sure that it 
integrates with the editor, and 

62
00:03:09,000 --> 00:03:16,280
we also kind of work with users 
to help get types to the level 

63
00:03:16,280 --> 00:03:19,800
of adoption that they want for 
depending on what kind of system

64
00:03:19,800 --> 00:03:23,280
they're working on, and 
sometimes see if we can add 

65
00:03:23,280 --> 00:03:26,400
types to older code bases that 
may not have types. 

66
00:03:26,840 --> 00:03:29,960
That's kind of what our team 
generally focuses on. 

67
00:03:29,960 --> 00:03:32,800
When did meta start adopting 
types? 

68
00:03:34,880 --> 00:03:39,440
Meta OK, well so this this will 
get into the history of the team

69
00:03:39,520 --> 00:03:43,240
very quickly. 
So types came out. 

70
00:03:43,240 --> 00:03:47,320
I actually don't remember the 
exact year, but it was something

71
00:03:47,320 --> 00:03:53,480
like 2013 or 14. 
I think Pep 484 and my π came 

72
00:03:53,480 --> 00:03:57,200
into existence. 
You actually, you recently had 

73
00:03:57,200 --> 00:04:01,320
Carl Meyer from Ty on and he 
spoke a little bit about this 

74
00:04:02,120 --> 00:04:06,560
Instagram experimented with 
typing with my pie a little bit 

75
00:04:07,240 --> 00:04:10,960
pretty early, I think about 2016
or 17. 

76
00:04:12,440 --> 00:04:15,680
But our team, the origins of our
team are actually in the 

77
00:04:15,680 --> 00:04:21,760
security org because there's a 
history of doing taint analysis 

78
00:04:21,760 --> 00:04:26,320
to try to track the flow of data
that is not controlled by our 

79
00:04:26,320 --> 00:04:28,360
company into any sensitive 
system. 

80
00:04:29,200 --> 00:04:32,680
We've got open source tools that
do this in a few languages. 

81
00:04:33,200 --> 00:04:38,880
And Pyre, which is our older 
type checker, was originally 

82
00:04:38,880 --> 00:04:42,440
conceived as mostly a tool to do
that. 

83
00:04:42,440 --> 00:04:47,080
It had enough type inference to 
be able to analyze method calls,

84
00:04:47,080 --> 00:04:49,200
because if you don't know the 
types of things, you can't 

85
00:04:49,200 --> 00:04:51,800
figure out what functions being 
called when you're trying. 

86
00:04:52,000 --> 00:04:58,520
To do this types in Python. 
No, this was after my PIE, so 

87
00:04:58,520 --> 00:05:02,520
after PEP 484, after it was 
understood what the syntax would

88
00:05:02,520 --> 00:05:04,240
be. 
It was pretty early. 

89
00:05:04,240 --> 00:05:09,920
The project started in I think 
2016. 

90
00:05:09,920 --> 00:05:15,200
Or 17 somewhere around there. 
And it was open sourced in 2018.

91
00:05:15,880 --> 00:05:18,640
OK, and that was Ocaml, right? 
You wrote that in Ocaml. 

92
00:05:18,640 --> 00:05:20,680
Yes, that was Ocaml. 
OK. 

93
00:05:21,640 --> 00:05:28,280
And what was the motivation? 
I mean was it just, did it run 

94
00:05:28,280 --> 00:05:30,760
slow or something? 
What was the motivation to move 

95
00:05:30,760 --> 00:05:33,000
from? 
Cuz I've heard Ocaml is like the

96
00:05:33,920 --> 00:05:37,320
Cadillac for writing compilers, 
it makes it a lot easier or 

97
00:05:37,320 --> 00:05:39,000
something. 
But what was this? 

98
00:05:39,520 --> 00:05:45,840
It's in Russ now, right? 
So Ocaml was pretty well used by

99
00:05:45,840 --> 00:05:48,640
the type checkers. 
If you've heard of Hack, which 

100
00:05:48,640 --> 00:05:54,000
is like PHP with types, that 
team kind of pioneered the use 

101
00:05:54,000 --> 00:05:56,960
of Ocaml with type checkers. 
And then Flow, which is our 

102
00:05:56,960 --> 00:05:58,960
version of TypeScript, also did 
that. 

103
00:05:59,000 --> 00:06:02,200
So a lot of expertise in 
building type checkers was in 

104
00:06:02,200 --> 00:06:04,480
that language. 
And so that's kind of what 

105
00:06:04,480 --> 00:06:11,840
inspired us to start with that. 
Then Fast forward to 2024, the 

106
00:06:11,840 --> 00:06:16,040
end of last year, we knew we 
wanted to basically do a ground 

107
00:06:16,040 --> 00:06:18,320
up rewrite. 
So we had the opportunity to 

108
00:06:18,320 --> 00:06:23,640
pick a new language and I, I can
let Steven get into more of the 

109
00:06:23,640 --> 00:06:27,800
specifics on that, but that's 
where we decided to go with 

110
00:06:27,960 --> 00:06:30,320
Rust. 
That's fascinating, though, the,

111
00:06:30,440 --> 00:06:36,800
the, the origins in some ways 
of, of Pyre, pyre, original Pyre

112
00:06:36,800 --> 00:06:40,520
and then power fly. 
So Pyre was what came out of 

113
00:06:40,520 --> 00:06:44,960
kind of the same ethos as hack 
and flow, which which would make

114
00:06:44,960 --> 00:06:46,520
sense. 
Let's add types everywhere to 

115
00:06:46,520 --> 00:06:49,440
all the languages. 
And so you had some teams doing 

116
00:06:49,440 --> 00:06:55,040
that for for JavaScript and for 
PHP and so doing it for Python 

117
00:06:55,040 --> 00:06:57,640
that that's cool. 
Type all the things. 

118
00:06:58,160 --> 00:07:01,200
Yeah. 
And so, so then what was it a 

119
00:07:01,200 --> 00:07:04,840
year or so ago, the rewrite into
Rust began and it and then 

120
00:07:04,840 --> 00:07:07,640
that's called Pyrfly. 
Is that how that works? 

121
00:07:08,080 --> 00:07:12,240
That's correct. 
So yeah, Pyr had reached a point

122
00:07:12,320 --> 00:07:15,040
where so it's the only type 
checker that can scale to 

123
00:07:15,040 --> 00:07:21,360
Instagram now. 
Pyrfly can, but it started out 

124
00:07:21,360 --> 00:07:25,080
as a batch processor and there 
were just design decisions that 

125
00:07:25,960 --> 00:07:28,480
if you can rebuild it again, 
that you'd want to make. 

126
00:07:28,640 --> 00:07:32,560
I think the other big motivator 
was we knew we wanted to have a 

127
00:07:32,840 --> 00:07:36,320
first class IDE experience and 
you really have to be very 

128
00:07:36,320 --> 00:07:39,000
deliberate about the design of 
your type checker in order to do

129
00:07:39,000 --> 00:07:41,480
that. 
And so these are some principles

130
00:07:41,480 --> 00:07:45,200
that we went into, aside from 
choosing a new language and 

131
00:07:45,200 --> 00:07:47,160
getting to basically start from 
scratch. 

132
00:07:47,680 --> 00:07:52,720
So you were able to bring all 
the learning that you had from 

133
00:07:52,760 --> 00:07:55,800
creating Pyre to to build this? 
Yeah. 

134
00:07:56,080 --> 00:07:57,840
And in some ways new 
requirements like. 

135
00:07:57,840 --> 00:08:01,560
So it sounds like maybe Pyre 
didn't have an LSP or or doesn't

136
00:08:01,680 --> 00:08:05,440
and. 
So Pyre does have an LSP. 

137
00:08:06,480 --> 00:08:12,160
The challenge with it is that 
the architecture was oriented 

138
00:08:12,160 --> 00:08:14,600
around doing a series of map 
reduces. 

139
00:08:14,600 --> 00:08:17,640
It is incremental so it doesn't 
do a full recheck. 

140
00:08:17,960 --> 00:08:22,520
That would be unusable, yeah. 
But the map reduces are still, 

141
00:08:22,520 --> 00:08:25,280
that's a fairly slow way of 
doing updates. 

142
00:08:25,280 --> 00:08:28,800
And it went through many passes 
of map reduces, which kind of 

143
00:08:28,800 --> 00:08:32,760
minimized the amount of work it 
did, but also led to a lot of 

144
00:08:32,760 --> 00:08:36,679
latency because you're waiting 
for the slowest element of each 

145
00:08:36,679 --> 00:08:39,720
phase. 
And a lot of the reason why it 

146
00:08:39,720 --> 00:08:44,000
had that structure, some of it 
is that it originated in this 

147
00:08:44,000 --> 00:08:46,840
kind of static analysis 
framework where MapReduce for 

148
00:08:46,840 --> 00:08:49,720
very long running processes 
makes a lot of sense. 

149
00:08:51,760 --> 00:08:55,560
And some of it's the limitations
of the versions of Ocaml that we

150
00:08:55,560 --> 00:08:57,760
were running on. 
We needed to parallelize. 

151
00:08:58,320 --> 00:09:02,080
And Ocaml, like Python, had 
effectively a global interpreter

152
00:09:02,080 --> 00:09:03,080
lock. 
I mean, it doesn't have an 

153
00:09:03,080 --> 00:09:08,480
interpreter, but the runtime 
until very recently didn't allow

154
00:09:08,600 --> 00:09:11,920
native threading. 
That has actually changed with 

155
00:09:11,920 --> 00:09:18,840
Ocaml 5, but we're kind of 
locked into a an architecture on

156
00:09:18,840 --> 00:09:23,440
Pyre and a way of using the 
library ecosystem that predates 

157
00:09:23,520 --> 00:09:27,440
Ocaml 5 and threads. 
And that affected a lot of the 

158
00:09:27,440 --> 00:09:31,160
decisions we made. 
Whereas Rust has always been, 

159
00:09:31,160 --> 00:09:33,040
you know, threads have always 
been native. 

160
00:09:33,400 --> 00:09:36,080
There was no pull toward that 
sort of architecture. 

161
00:09:36,880 --> 00:09:42,400
And that has made it easier to 
get good latency as well as 

162
00:09:42,400 --> 00:09:43,960
throughput. 
But for the. 

163
00:09:44,280 --> 00:09:48,840
IE no Rust already or did did 
you come up the learning curve 

164
00:09:48,840 --> 00:09:50,160
on that? 
How was that for you? 

165
00:09:53,520 --> 00:09:57,600
There's some learning curve, so 
Oak, Hamel and Rust are similar 

166
00:09:57,600 --> 00:10:02,240
in some ways. 
Rust, you have to deal with a 

167
00:10:02,240 --> 00:10:06,040
lot more details around 
ownership and memory layout, and

168
00:10:06,040 --> 00:10:07,760
there's definitely a learning 
curve there. 

169
00:10:08,920 --> 00:10:15,400
The biggest thing we've had is a
Rust expert helping us, so Neil 

170
00:10:15,400 --> 00:10:19,200
Mitchell, who has worked a lot 
on build systems, including 

171
00:10:19,200 --> 00:10:23,640
Buck, which is our primary build
system, and it's very similar to

172
00:10:23,640 --> 00:10:25,920
Basil for people who are 
familiar with that. 

173
00:10:26,280 --> 00:10:30,360
It's written in Rust, a very 
large REST project, and Neil 

174
00:10:30,360 --> 00:10:32,600
spent years working on that. 
He knows a great deal. 

175
00:10:32,600 --> 00:10:35,680
He's helped our team a lot 
because he helped bootstrap this

176
00:10:35,680 --> 00:10:39,080
project. 
And then coming from O Camel, 

177
00:10:39,080 --> 00:10:43,200
other than things like borrowing
and you know details of memory 

178
00:10:43,200 --> 00:10:47,160
layout, the rest of the REST 
type system is fairly familiar. 

179
00:10:48,880 --> 00:10:52,400
That's interesting to hear that 
that the path from Ocaml to Rust

180
00:10:52,400 --> 00:10:55,600
is is pretty smooth. 
Rust is surprisingly 

181
00:10:55,600 --> 00:10:58,400
sophisticated for a low level. 
I mean, you know, it's not 

182
00:10:58,400 --> 00:11:03,440
really low level except that you
can twiddle bits, you know. 

183
00:11:03,600 --> 00:11:06,880
But but really, when you look at
what you're able to do with 

184
00:11:06,880 --> 00:11:09,640
Rust, it's a pretty brilliant 
design. 

185
00:11:10,320 --> 00:11:12,080
Yeah, you know. 
It's there. 

186
00:11:12,080 --> 00:11:15,080
There are some ties between them
because the early versions of 

187
00:11:15,080 --> 00:11:19,240
the REST compiler were actually 
in O Camel, so the people who 

188
00:11:19,240 --> 00:11:24,400
developed the REST were at least
informed by their knowledge of O

189
00:11:24,400 --> 00:11:28,440
Camel. 
There's some like root language 

190
00:11:29,600 --> 00:11:32,280
model. 
What is it the ML like family of

191
00:11:32,280 --> 00:11:34,920
like they both kind of come out 
of the ML family or? 

192
00:11:34,920 --> 00:11:38,240
Something there's a yeah, 
there's a name, Hindley Milner 

193
00:11:38,240 --> 00:11:41,240
type system, I guess something 
like that. 

194
00:11:41,240 --> 00:11:45,600
Is that right? 
Yes, the family includes Ocaml. 

195
00:11:45,720 --> 00:11:49,400
FML. 
Some newer languages that I 

196
00:11:49,400 --> 00:11:53,000
think I've heard you talk about.
Unison is kind of in that 

197
00:11:53,000 --> 00:11:57,240
family, and also Haskell. 
Rust is actually more like 

198
00:11:57,240 --> 00:12:01,560
Haskell than Ocaml, because Rust
traits behave closer to Haskell 

199
00:12:01,560 --> 00:12:04,520
type classes, but they're still 
all very related. 

200
00:12:05,120 --> 00:12:07,400
And I think Neil had worked on 
Haskell too. 

201
00:12:07,960 --> 00:12:14,000
Yes, he's at least a primary 
maintainer, if not the author of

202
00:12:14,040 --> 00:12:18,400
The Maine Haskell Linter. 
There were definitely some 

203
00:12:18,560 --> 00:12:21,360
conversations late last year. 
We were like, all right, or are 

204
00:12:21,360 --> 00:12:25,160
we our best team now and 
especially coming from O 

205
00:12:25,160 --> 00:12:27,160
Campbell? 
But you can. 

206
00:12:27,800 --> 00:12:29,840
I'm curious for your take, 
Steven, But I feel like people 

207
00:12:29,840 --> 00:12:31,520
have actually started to really 
enjoy it. 

208
00:12:33,880 --> 00:12:38,800
Yes, I think so. 
The the toughest thing about 

209
00:12:38,800 --> 00:12:43,000
Rust really is probably there is
some learning curve, but I don't

210
00:12:43,040 --> 00:12:44,800
feel like that's been a huge 
problem. 

211
00:12:46,120 --> 00:12:50,800
If anything, the compile times 
are maybe the biggest downside. 

212
00:12:50,800 --> 00:12:55,240
I think they're worth it because
you get so much context from 

213
00:12:55,240 --> 00:12:57,480
having a very powerful type 
system. 

214
00:12:58,440 --> 00:13:00,720
As you're writing code, you 
don't need to run it quite as 

215
00:13:00,720 --> 00:13:03,520
often. 
There is a noticeable delay 

216
00:13:03,520 --> 00:13:07,440
sometimes between I finished 
writing the code and the test 

217
00:13:07,440 --> 00:13:10,000
runs, and that to me is the 
biggest downside. 

218
00:13:10,000 --> 00:13:14,080
I noted that you brought up Rock
moving to Zig, and I think they 

219
00:13:14,080 --> 00:13:19,040
were motivated by that, but 
their system is larger than I 

220
00:13:19,040 --> 00:13:22,720
think ours ever will be. 
Yeah, yeah, they're doing a lot 

221
00:13:22,720 --> 00:13:26,960
more than the test checker. 
Yeah, interesting. 

222
00:13:27,080 --> 00:13:29,800
Do you is this is a total 
tangent, but is the Rust 

223
00:13:29,800 --> 00:13:33,400
compiler written in Rust? 
Is it self hosted wonder? 

224
00:13:33,840 --> 00:13:36,640
It is today, yes. 
The early versions were in Oak 

225
00:13:36,640 --> 00:13:39,840
Camel, but it's been 
bootstrapped for many years. 

226
00:13:40,120 --> 00:13:42,920
Which makes a lot of sense. 
Yeah, Yeah, so, so. 

227
00:13:43,200 --> 00:13:45,000
What's the current state of 
Pyrofly? 

228
00:13:45,000 --> 00:13:47,760
Is it released and and people 
using it? 

229
00:13:47,760 --> 00:13:49,000
Where? 
Where are we at with it? 

230
00:13:51,080 --> 00:13:57,800
Yeah, so we announced the alpha 
right around Pycon, and it's 

231
00:13:57,800 --> 00:14:00,840
been exciting to see like lots 
of people leaving issues on our 

232
00:14:00,840 --> 00:14:05,760
GitHub, opening poll requests. 
It's probably still not ready to

233
00:14:05,760 --> 00:14:10,000
be in your CI, but the IDE is 
getting pretty far along. 

234
00:14:10,000 --> 00:14:14,600
And yeah, we're having people 
use it and give us feedback and 

235
00:14:14,800 --> 00:14:16,640
add features. 
Nice. 

236
00:14:17,040 --> 00:14:21,920
Yeah, my plan for my book is to 
test all of them, just to be 

237
00:14:21,920 --> 00:14:23,480
able to compare them and you 
know. 

238
00:14:23,800 --> 00:14:26,960
It'd be great in your build 
process to run them all, and I 

239
00:14:26,960 --> 00:14:28,520
will. 
The differences are, yeah, 

240
00:14:28,800 --> 00:14:30,840
absolutely. 
I guess that's a challenge for 

241
00:14:30,840 --> 00:14:34,920
your book is when you have the 
output of a compiler, I guess 

242
00:14:34,920 --> 00:14:36,280
would be the only place it would
be surfaced. 

243
00:14:36,280 --> 00:14:39,680
It'd be like, oh, this compiler 
depends on which type checker 

244
00:14:39,840 --> 00:14:40,880
you're using. 
I guess not. 

245
00:14:41,000 --> 00:14:42,120
Compiler. 
No, I don't. 

246
00:14:42,120 --> 00:14:44,640
Yeah, it's the type checker. 
It's all, yeah, it's all 

247
00:14:44,640 --> 00:14:47,160
upfront. 
But yeah, Speaking of which, we 

248
00:14:47,160 --> 00:14:50,640
mentioned before we got started,
it's like I thought there were 

249
00:14:50,640 --> 00:14:54,880
four type checkers and you 
Steven said, oh, there's more 

250
00:14:54,880 --> 00:14:57,400
than that. 
So can you tell me what the 

251
00:14:57,400 --> 00:14:59,560
other ones are that I don't know
about and? 

252
00:15:00,760 --> 00:15:05,440
Honestly, I probably can't list 
them all because there are more 

253
00:15:05,440 --> 00:15:08,480
experimental ones than I even 
know of. 

254
00:15:09,400 --> 00:15:14,480
So the the the original type 
checker, and certainly one of 

255
00:15:14,480 --> 00:15:20,480
the most important to be aware 
of right now is my pie, which is

256
00:15:21,000 --> 00:15:26,680
that was where it began. 
It's written in Python And 

257
00:15:28,440 --> 00:15:34,040
unofficially was kind of defined
how the type system would work 

258
00:15:34,040 --> 00:15:38,040
just by being the original 
implementation for a while until

259
00:15:38,040 --> 00:15:40,400
we evolved how the community 
thinks about things. 

260
00:15:41,920 --> 00:15:48,000
My PIE was very important just 
because it got started with 

261
00:15:48,000 --> 00:15:51,600
typing at all. 
I think many of the early other 

262
00:15:51,600 --> 00:15:56,640
type checkers came out of the 
need to find a more performant 

263
00:15:56,640 --> 00:16:00,240
type checker for very large code
bases because Python we had 

264
00:16:00,760 --> 00:16:05,280
again the Global Interpreter 
Lock and it's not a particularly

265
00:16:05,280 --> 00:16:09,280
fast language, single threaded. 
And when you put those two 

266
00:16:09,280 --> 00:16:13,240
limitations together, my π 
worked very, very well on small 

267
00:16:13,240 --> 00:16:17,080
projects and not very well on 
very large projects. 

268
00:16:17,800 --> 00:16:23,800
So the next most used type 
checker today is probably 

269
00:16:24,080 --> 00:16:30,000
Pyrite, and that came out of 
Eric Trout, who's the author of 

270
00:16:30,000 --> 00:16:34,280
Pyrite, was working on a team 
that had some moderately large 

271
00:16:34,280 --> 00:16:39,840
Python code bases, was finding 
that my pie was too slow, and 

272
00:16:39,840 --> 00:16:45,480
also he really wanted to get a 
first class IDE experience. 

273
00:16:45,480 --> 00:16:49,160
My pie, similar to Pyre that we 
discussed was not really built 

274
00:16:49,160 --> 00:16:52,000
for that in mind. 
At the beginning they added an 

275
00:16:52,000 --> 00:16:55,400
LSP, but it wasn't super 
responsive. 

276
00:16:55,400 --> 00:16:58,960
So Pyrite was really geared 
toward give the best IDE 

277
00:16:58,960 --> 00:17:02,480
experience I can. 
And Eric came from the 

278
00:17:02,520 --> 00:17:07,720
TypeScript team, so, you know, 
when he came to Python And saw 

279
00:17:07,720 --> 00:17:11,440
what the technology was like, 
you know, we want a first class 

280
00:17:11,440 --> 00:17:16,400
ID that integrates with your CI.
So your hover and your types are

281
00:17:16,400 --> 00:17:18,720
the same. 
And so Pyro, it's actually 

282
00:17:18,720 --> 00:17:23,560
written in TypeScript, which is 
convenient for integrating into 

283
00:17:23,560 --> 00:17:25,599
VS Code. 
But yeah, that's kind of the 

284
00:17:25,599 --> 00:17:27,520
connection. 
I guess I did because you have 

285
00:17:27,599 --> 00:17:31,160
to install it using NPM. 
OK, huh. 

286
00:17:31,720 --> 00:17:36,800
That is OK And then that 
integrates well with VS Code. 

287
00:17:38,440 --> 00:17:40,760
Yeah, because you don't protect 
the LSD, OK? 

288
00:17:41,320 --> 00:17:42,480
Yeah, that makes sense. 
Good. 

289
00:17:42,480 --> 00:17:44,360
Yeah. 
But it's so it's. 

290
00:17:44,400 --> 00:17:46,680
Remarkably fast on the command 
line. 

291
00:17:48,280 --> 00:17:51,840
It is quite fast and I think it 
speaks to the careful design. 

292
00:17:52,280 --> 00:17:55,800
And so that's something Eric 
would talk a lot about is the 

293
00:17:55,800 --> 00:17:58,440
design for the type checker 
matters a lot for the 

294
00:17:58,440 --> 00:18:00,640
performance. 
Yeah. 

295
00:18:01,120 --> 00:18:02,920
Yeah, exactly. 
OK. 

296
00:18:02,920 --> 00:18:06,560
And then there's Ty and then any
other ones to to note. 

297
00:18:07,640 --> 00:18:10,080
So recent. 
Oh, sorry, yeah. 

298
00:18:11,200 --> 00:18:14,880
Recently, I don't know if you've
heard of Jedi LSP, but that used

299
00:18:14,880 --> 00:18:18,600
to be the Python LSP basically 
until Pyrite came out. 

300
00:18:19,280 --> 00:18:22,800
That is from a, a person named 
David Halter. 

301
00:18:22,840 --> 00:18:29,240
I believe he just announced 1/3 
type checker for Python based in

302
00:18:29,240 --> 00:18:32,320
Rust. 
And this one is called Zuban or 

303
00:18:32,320 --> 00:18:42,800
Zuban LS. 
It's not open source and it I 

304
00:18:42,800 --> 00:18:45,760
think the, the tagline is a drop
in replacement for my π. 

305
00:18:45,760 --> 00:18:50,040
So I think that's what he's 
going for and I think it's going

306
00:18:50,040 --> 00:18:54,880
to be paid for enterprises. 
So that's probably the newest 1 

307
00:18:54,880 --> 00:18:57,360
and I think the community is 
watching. 

308
00:18:57,680 --> 00:19:04,040
Jedi was a big success and so 
it's exciting to see David come 

309
00:19:04,040 --> 00:19:05,760
out with a new project. 
Yeah. 

310
00:19:06,200 --> 00:19:10,240
What are your thoughts on the 
crowded type checker space in 

311
00:19:10,240 --> 00:19:13,160
the Python world? 
Is it's probably great to 

312
00:19:13,400 --> 00:19:16,680
scatter a lot of seeds and see 
what blooms and there's a bit. 

313
00:19:16,680 --> 00:19:21,080
Of well, and a lot of people 
learning about the that's how to

314
00:19:21,080 --> 00:19:23,160
solve the problem, which is, 
which is good. 

315
00:19:23,240 --> 00:19:26,400
And most of them are open 
source, or I guess except for 

316
00:19:27,040 --> 00:19:28,360
Zuban. 
It's called, yeah. 

317
00:19:30,720 --> 00:19:31,960
Pronounce Zuban. 
I don't actually. 

318
00:19:32,160 --> 00:19:33,240
Know Z. 
UBAN. 

319
00:19:34,000 --> 00:19:39,240
Oh, I see, ZUBANI was thinking. 
Oh, yeah, Python without types 

320
00:19:39,240 --> 00:19:41,600
is such a zoo. 
We're going to ban that. 

321
00:19:42,840 --> 00:19:44,600
That's. 
I like that, Yeah. 

322
00:19:45,640 --> 00:19:50,400
So there's there's the, the 
language design, the Peps, 

323
00:19:50,640 --> 00:19:54,480
Michael Peps side of things. 
And then and then multiple open 

324
00:19:54,480 --> 00:19:58,320
source projects and, and others 
creating the type checkers. 

325
00:19:58,880 --> 00:20:01,840
So there's some kind of 
collaboration through the the 

326
00:20:01,840 --> 00:20:05,240
type check community, type type 
community or whatever it is. 

327
00:20:05,600 --> 00:20:07,000
What was the official name for 
it? 

328
00:20:07,000 --> 00:20:09,200
You said it for council. 
Council. 

329
00:20:09,760 --> 00:20:13,640
Yeah, typing council and then 
different implementations. 

330
00:20:14,040 --> 00:20:19,520
Most funded by large companies, 
or at least there's. 

331
00:20:20,480 --> 00:20:24,440
It doesn't seem like there's. 
Well, my pies, isn't it just one

332
00:20:24,480 --> 00:20:29,240
person? 
So the history of these things 

333
00:20:29,240 --> 00:20:33,680
changes over time depending on 
where companies focus are. 

334
00:20:34,080 --> 00:20:37,400
Early my Π development was 
backed at least partially by 

335
00:20:37,400 --> 00:20:41,000
Dropbox, although it always had 
a large community of developers 

336
00:20:41,000 --> 00:20:43,400
when we got all of them worked 
at Dropbox. 

337
00:20:43,400 --> 00:20:48,160
Yeah, when, when Gita was there,
OK, he started my π bringing 

338
00:20:48,240 --> 00:20:52,680
Yuka on from PhD, who did not 
know, I think came up with the 

339
00:20:52,680 --> 00:20:56,120
prototype. 
OK, Yeah. 

340
00:20:56,120 --> 00:21:00,640
Let me inject a question that I 
that I asked last week as well, 

341
00:21:00,920 --> 00:21:04,160
which is and. 
I don't know if you have any 

342
00:21:04,160 --> 00:21:08,360
insight in this, but it seems 
like to me coming from Scala 

343
00:21:08,680 --> 00:21:13,720
that Python's type system is and
the syntax and everything is 

344
00:21:14,520 --> 00:21:17,080
almost identical. 
I mean the pattern matching and 

345
00:21:17,080 --> 00:21:20,880
everything looks like Scala 
pattern matching to me and all 

346
00:21:20,880 --> 00:21:24,280
this. 
Do you have any insights on 

347
00:21:24,680 --> 00:21:29,680
where the inspirations are from?
I have some when we talk with 

348
00:21:29,680 --> 00:21:34,080
Guido, who has not single 
handedly driven things but has 

349
00:21:34,080 --> 00:21:38,080
often been a guiding force, 
especially in that he sponsored 

350
00:21:38,080 --> 00:21:41,800
many of the Peps. 
He takes the most inspiration 

351
00:21:41,800 --> 00:21:49,720
from TypeScript, partly I think 
because he thinks it's addressed

352
00:21:49,720 --> 00:21:53,840
a similar problem of a highly 
dynamic language trying to adopt

353
00:21:53,840 --> 00:21:57,080
types. 
And in that sense I think it's 

354
00:21:57,080 --> 00:22:00,680
different than Scala, because 
Scala is mostly a statically 

355
00:22:00,680 --> 00:22:03,360
typed language, so the concerns 
are a little different. 

356
00:22:05,720 --> 00:22:09,640
Syntactically, I think it might 
be true that we look a bit more 

357
00:22:09,720 --> 00:22:14,400
like Scala. 
Some of that really has just 

358
00:22:14,400 --> 00:22:18,080
come from the limitations in the
language itself, though. 

359
00:22:18,080 --> 00:22:20,920
For example, everything in 
Python typing basically uses 

360
00:22:20,920 --> 00:22:24,040
square brackets, right? 
That's partly because square 

361
00:22:24,040 --> 00:22:27,400
brackets and the runtime 
semantics of that were well 

362
00:22:27,400 --> 00:22:30,960
defined from the very beginning,
and it's been fairly easy to 

363
00:22:32,120 --> 00:22:35,640
just keep using that in new 
places and then occasionally 

364
00:22:35,640 --> 00:22:38,160
have to make some changes to the
parser or interpreter. 

365
00:22:39,000 --> 00:22:43,280
PEP 695, which adds better 
generic syntax, was a pretty big

366
00:22:43,280 --> 00:22:47,520
change, but I think it was still
simpler using the square 

367
00:22:47,520 --> 00:22:50,040
brackets because all the 
mechanisms were already there. 

368
00:22:50,880 --> 00:22:53,680
Adding an angle bracket would be
fairly difficult because the 

369
00:22:53,680 --> 00:22:56,880
current grammar just doesn't 
really leave an opening for 

370
00:22:56,880 --> 00:23:00,000
that. 
And visually, someone once said 

371
00:23:00,000 --> 00:23:04,320
to me, Python's not a pointy 
language, so the angles and 

372
00:23:04,320 --> 00:23:07,600
curlies, no sharp edges. 
Yeah, it gets some friction. 

373
00:23:08,000 --> 00:23:10,600
I'm completely comfortable with 
the square brackets, yeah. 

374
00:23:12,080 --> 00:23:17,240
My take on terms of the actual 
features, I personally think 

375
00:23:17,240 --> 00:23:20,560
that Python is a pretty 
complicated language if you're 

376
00:23:20,560 --> 00:23:24,280
going to use its full power and 
try to type it as best you can, 

377
00:23:24,760 --> 00:23:26,880
which there are limits to how 
far you can go. 

378
00:23:27,520 --> 00:23:31,120
And to me the the fact that it 
feels a little similar to Scala.

379
00:23:31,120 --> 00:23:34,920
I think it's just partly that 
Scala is a very complicated 

380
00:23:34,920 --> 00:23:38,520
language because it chose to be 
and Python typed. 

381
00:23:38,520 --> 00:23:41,880
Python is a moderately 
complicated language because 

382
00:23:42,320 --> 00:23:47,080
it's trying to capture as many 
dynamic patterns that pre exist 

383
00:23:47,080 --> 00:23:52,400
the type system as possible. 
I think of, I don't know, I've 

384
00:23:52,400 --> 00:23:58,120
come to think of Scala as an 
exploration in type systems. 

385
00:23:58,120 --> 00:24:01,920
Some of things, some things 
didn't work out and so Python 

386
00:24:01,920 --> 00:24:05,360
could and other languages could 
kind of cherry pick and go, oh, 

387
00:24:05,400 --> 00:24:07,360
this worked. 
Let's put this in. 

388
00:24:07,880 --> 00:24:11,160
These other things didn't. 
Yeah, I mean it's mostly funded 

389
00:24:11,160 --> 00:24:16,240
out of EPFL, which is a a 
educational. 

390
00:24:16,520 --> 00:24:19,040
Right. 
Right group and yeah, Martin I 

391
00:24:19,040 --> 00:24:24,040
think is always looking at how 
they solve some very challenging

392
00:24:24,040 --> 00:24:29,400
problems around type systems 
right yeah, yeah, yeah. 

393
00:24:29,400 --> 00:24:32,200
So I think there's, there's 
maybe just like a general 

394
00:24:32,200 --> 00:24:37,320
evolution for many of these 
languages in the same like 

395
00:24:37,320 --> 00:24:40,800
gravitational direction or 
something to sure to what they 

396
00:24:40,800 --> 00:24:45,120
support like AD TS or a good 
example where it's like, yeah, 

397
00:24:45,120 --> 00:24:48,600
most of these modern languages 
now have AD TS and it turns out 

398
00:24:48,720 --> 00:24:52,440
AD TS all look kind of similar 
because someone like 50 years 

399
00:24:52,440 --> 00:24:55,200
ago, you know, said what ADT 
should look like. 

400
00:24:57,920 --> 00:25:03,960
So on on the kind of adoption 
side of things, I'm curious to 

401
00:25:03,960 --> 00:25:09,000
your thoughts on how is the 
Python community generally 

402
00:25:09,560 --> 00:25:13,920
feeling about types and the 
ability to add them? 

403
00:25:14,240 --> 00:25:17,560
Is this only for the people who 
really understand types or have 

404
00:25:17,560 --> 00:25:20,880
large code bases? 
Or what do we see on? 

405
00:25:21,520 --> 00:25:25,640
I don't know people that don't 
live in large code bases and and

406
00:25:25,880 --> 00:25:30,160
don't because it doesn't. 
Matter to me the size of program

407
00:25:30,600 --> 00:25:33,160
I'm creating. 
It helps me think about it and I

408
00:25:33,160 --> 00:25:37,400
know that it's more correct, so 
I usually. 

409
00:25:37,400 --> 00:25:40,920
Been doing type for. 
Little scripts, whatever. 

410
00:25:40,920 --> 00:25:43,640
I use them for everything. 
No, not for decades, but not, I 

411
00:25:43,640 --> 00:25:48,120
mean, not like this. 
So like, yeah, what's your All 

412
00:25:48,120 --> 00:25:52,600
the people I interact with are 
big types, fans and want 

413
00:25:52,600 --> 00:25:57,080
everybody to use them and have 
struggles getting people on 

414
00:25:57,080 --> 00:25:59,040
board. 
So like what? 

415
00:25:59,040 --> 00:26:00,920
What has your experience been 
with this? 

416
00:26:02,120 --> 00:26:05,560
You know, I think the tide is 
turning a bit if there's 

417
00:26:06,680 --> 00:26:09,400
something exciting about all 
these new type checkers. 

418
00:26:09,680 --> 00:26:13,040
I saw this on maybe threads or 
some social. 

419
00:26:13,040 --> 00:26:16,840
Someone said 2025 is the year of
type checking and I was pretty 

420
00:26:16,840 --> 00:26:20,680
delighted to see that and. 
You're at the Linux desktop. 

421
00:26:22,960 --> 00:26:29,080
Oh wow, how's? 
Every year I think there's there

422
00:26:29,120 --> 00:26:32,520
is definitely something there 
growing where where people are 

423
00:26:32,520 --> 00:26:36,480
like who maybe have been in 
dynamic languages, There's some 

424
00:26:36,480 --> 00:26:40,080
of them that are beginning to 
embrace types more because the 

425
00:26:40,080 --> 00:26:43,080
tooling has gotten better. 
The types are now in their 

426
00:26:43,080 --> 00:26:46,200
language that they're using. 
Is is that what you're saying? 

427
00:26:47,560 --> 00:26:52,640
So early on and Stevens been in 
Python typing longer than me, so

428
00:26:52,760 --> 00:26:55,640
I'm curious for your take. 
But there's a lot of pushback to

429
00:26:55,640 --> 00:26:57,600
it. 
If you're familiar with the 

430
00:26:57,600 --> 00:26:59,800
uncanny valley, this is 
something we've talked a lot 

431
00:26:59,800 --> 00:27:03,800
about it metaphor. 
PHP moving to hack is at first 

432
00:27:04,160 --> 00:27:08,200
you don't like it, it's slowing 
you down, it's unfamiliar, but 

433
00:27:08,200 --> 00:27:13,040
then eventually you move past 
that and it it's hard to go back

434
00:27:13,200 --> 00:27:17,800
to an untyped language. 
It's hard to say if most of the 

435
00:27:17,800 --> 00:27:20,960
communities there yet. 
I'm kind of skeptical. 

436
00:27:21,360 --> 00:27:25,920
We ran the survey last year and 
it had a very high response 

437
00:27:25,920 --> 00:27:28,080
rate. 
I think like 88% of people said 

438
00:27:28,080 --> 00:27:29,800
they sometimes are always use 
types. 

439
00:27:30,320 --> 00:27:34,320
Now granted it's possible only 
people who care about types took

440
00:27:34,320 --> 00:27:38,360
the survey, so I don't take this
as a a general view of the 

441
00:27:38,680 --> 00:27:42,280
Python population. 
But it does seem like people are

442
00:27:42,280 --> 00:27:46,680
connecting the dots between I 
want better auto complete and go

443
00:27:46,680 --> 00:27:50,880
to death in my IDE. 
I'm working with other people 

444
00:27:50,880 --> 00:27:53,480
and I don't want to deal with 
their bugs. 

445
00:27:53,520 --> 00:27:56,760
So it does feel like the 
conversation's changing. 

446
00:27:56,760 --> 00:27:59,480
OK. 
And did your survey have any 

447
00:27:59,880 --> 00:28:04,960
data on the library adoption of 
types in? 

448
00:28:04,960 --> 00:28:08,600
In my anecdotal experience, most
of the Python libraries that 

449
00:28:08,600 --> 00:28:11,920
I've interacted with seem to 
have good type information in 

450
00:28:11,920 --> 00:28:15,320
them, but but I'm curious if you
have any data on on the library 

451
00:28:15,320 --> 00:28:22,360
ecosystem side of this. 
Not in the survey, but we made 

452
00:28:22,360 --> 00:28:29,080
this script that runs and pulls 
the top like 2000 Pi Pi packages

453
00:28:29,080 --> 00:28:33,160
and then does an analysis to see
the type coverage and then also 

454
00:28:33,160 --> 00:28:36,360
runs pyrites I think verify 
types. 

455
00:28:37,360 --> 00:28:43,320
I can send a link, it's 
python-type-checking.com, but 

456
00:28:43,320 --> 00:28:46,360
the the coverage is surprisingly
high. 

457
00:28:47,600 --> 00:28:53,120
But with some notable exceptions
where some just absolutely have 

458
00:28:53,120 --> 00:28:58,400
no type coverage, like maybe 6 
or S3 transfer. 

459
00:28:58,920 --> 00:29:01,760
Some of these packages are, you 
know, downloaded millions and 

460
00:29:01,760 --> 00:29:04,360
millions of times per day, but 
still don't have types. 

461
00:29:04,760 --> 00:29:12,440
The big ones like Bodo 3 or 
requests with type shed they get

462
00:29:12,440 --> 00:29:14,880
their coverage in the 60s or 
70%. 

463
00:29:16,040 --> 00:29:17,520
Nice. 
What was the type shed? 

464
00:29:17,840 --> 00:29:23,200
What was it type shed? 
Type shed is a centralized 

465
00:29:23,400 --> 00:29:26,720
repository of type information. 
There's really there's two 

466
00:29:26,720 --> 00:29:32,000
things in it, and this is at 
least how I think of it. 

467
00:29:32,000 --> 00:29:37,320
There's a type shed STD Lib. 
That is where that's the 

468
00:29:37,320 --> 00:29:40,360
canonical source of truth. 
It's a community maintained for 

469
00:29:40,360 --> 00:29:43,160
the standard library types. 
The standard library at the 

470
00:29:43,160 --> 00:29:48,320
moment does not have types in 
the actual Python code, partly 

471
00:29:48,320 --> 00:29:52,160
because a lot of it is extremely
complicated and fairly dynamic 

472
00:29:52,160 --> 00:29:56,720
code. 
So the typeshed Ste. 

473
00:29:56,720 --> 00:30:00,480
Lib has the best type 
information we know how to get, 

474
00:30:00,760 --> 00:30:05,160
which in some cases involves 
very complicated overloads for 

475
00:30:05,160 --> 00:30:07,120
those standard library 
functions. 

476
00:30:08,000 --> 00:30:10,560
So typeshed is like the in the 
TypeScript world. 

477
00:30:10,560 --> 00:30:12,720
There's definitely typed or 
whatever it is where people 

478
00:30:12,720 --> 00:30:15,240
started adding the type 
definitions for JavaScript 

479
00:30:15,240 --> 00:30:16,720
libraries. 
So there's something similar in 

480
00:30:16,720 --> 00:30:20,400
the Python space that allows 
this, like external source for 

481
00:30:20,640 --> 00:30:23,040
the type definitions. 
Yeah. 

482
00:30:23,040 --> 00:30:26,440
And then there's another branch 
of typeshed that's community 

483
00:30:26,440 --> 00:30:30,240
maintained stubs for libraries 
that for one reason or another 

484
00:30:30,240 --> 00:30:34,440
don't want to use inline types. 
And those eventually get 

485
00:30:34,440 --> 00:30:39,080
uploaded to π Pi under the name 
of the package dash stubs 

486
00:30:39,080 --> 00:30:43,440
package name. 
So you can pull that down when 

487
00:30:43,440 --> 00:30:45,880
you pull down the package and 
then the type checker will be 

488
00:30:45,880 --> 00:30:48,920
able to see. 
So if I understand this right, 

489
00:30:48,920 --> 00:30:51,920
so you can have a library and 
then you can have this 

490
00:30:51,920 --> 00:30:57,040
additional stubs thing which 
basically provides all of the 

491
00:30:57,080 --> 00:31:01,000
types for that library. 
So that way. 

492
00:31:01,120 --> 00:31:04,320
You don't have to, and I think 
there are stub generators, 

493
00:31:04,360 --> 00:31:07,920
right? 
There are high right will 

494
00:31:07,920 --> 00:31:12,240
generate stubs for instance, and
there have been other I think 

495
00:31:12,240 --> 00:31:15,560
one off packages as if there 
weren't enough type checkers. 

496
00:31:15,880 --> 00:31:19,040
Now your types don't even 
necessarily live in the same 

497
00:31:19,040 --> 00:31:22,960
package as your repo, and that 
causes other problems, right? 

498
00:31:22,960 --> 00:31:25,680
Because you'll update your 
version of the package and then 

499
00:31:26,240 --> 00:31:28,600
the version of the stubs has to 
match it. 

500
00:31:28,600 --> 00:31:32,560
And there's CI jobs in typeshed 
that will work for that and 

501
00:31:32,560 --> 00:31:35,640
detect when a function changed 
or the. 

502
00:31:36,160 --> 00:31:38,680
Type seems like a like a 
stepping zone to get where we 

503
00:31:38,680 --> 00:31:40,840
need to be, which is the 
libraries need to have the types

504
00:31:40,880 --> 00:31:41,840
in them. 
But. 

505
00:31:41,920 --> 00:31:44,040
But yeah, it's an incremental 
process. 

506
00:31:44,080 --> 00:31:47,480
It's an incremental process. 
Plus, I can see there could be 

507
00:31:47,480 --> 00:31:52,160
some hesitation because the type
system itself is still kind of 

508
00:31:52,760 --> 00:31:54,440
evolving. 
I mean, it feels like it's 

509
00:31:54,480 --> 00:31:57,240
settling, but there could still 
be changes. 

510
00:31:57,240 --> 00:32:00,880
And you could like, do your 
library and then maybe have to 

511
00:32:00,880 --> 00:32:01,920
do it again. 
Yeah. 

512
00:32:02,800 --> 00:32:06,520
We've actually, we've worked 
with a few community members who

513
00:32:06,680 --> 00:32:09,840
started to move their types back
into their project. 

514
00:32:09,840 --> 00:32:13,360
I think it's you, Jason Lib. 
I'll look that up because I want

515
00:32:13,360 --> 00:32:15,240
to shout them out for doing 
this. 

516
00:32:16,160 --> 00:32:20,880
But if folks are interested, we 
have a spreadsheet and we'd love

517
00:32:20,880 --> 00:32:23,480
help from the community. 
If you want to help, move them 

518
00:32:23,480 --> 00:32:26,920
out of type shed and put them 
into the package so that they 

519
00:32:26,920 --> 00:32:30,360
can stay better In Sync. 
That's a fantastic effort. 

520
00:32:30,360 --> 00:32:33,760
So thank you for helping people 
do that because yeah, just like 

521
00:32:34,200 --> 00:32:36,920
if we can help people move those
externalized types into their 

522
00:32:36,920 --> 00:32:39,320
library, that's beneficial for. 
Everything. 

523
00:32:39,320 --> 00:32:43,920
So on that subject, does pyrefly
or or do you have a separate 

524
00:32:43,920 --> 00:32:50,840
tool that can like insert types 
into your code? 

525
00:32:50,840 --> 00:32:53,320
You know, add automatically add 
types. 

526
00:32:54,000 --> 00:32:56,480
There, there are a number of 
tools that exist. 

527
00:32:56,480 --> 00:33:01,880
We are working on a Powerfly, I 
think it's called auto type, 

528
00:33:01,880 --> 00:33:06,760
yeah, which is it's another 
command within Powerfly that 

529
00:33:06,760 --> 00:33:10,840
will try to take the type 
information that Powerfly. 

530
00:33:10,840 --> 00:33:13,920
For now, it takes whatever 
Powerfly already produces 

531
00:33:13,920 --> 00:33:17,640
through type inference and adds 
that we may be able to add more 

532
00:33:17,640 --> 00:33:19,800
powerful inference to it 
eventually. 

533
00:33:20,360 --> 00:33:24,120
Pyre had a similar tool, Pyre 
Infer, that would try to do 

534
00:33:24,120 --> 00:33:27,840
significantly more aggressive 
inference than the type checker 

535
00:33:27,840 --> 00:33:31,160
would do. 
There are also community 

536
00:33:31,160 --> 00:33:36,000
maintained tools that have 
attempted similar things. 

537
00:33:37,440 --> 00:33:40,960
There have been a few attempts 
to use machine learning to do 

538
00:33:40,960 --> 00:33:44,000
this as well, sometimes with 
feedback. 

539
00:33:45,560 --> 00:33:48,480
There are a couple experiments 
trying to get the newer kinds of

540
00:33:48,480 --> 00:33:52,840
models to do it, but also more 
classical machine learning even,

541
00:33:52,840 --> 00:33:56,800
you know, 5-10 years ago there 
were people trying to use just 

542
00:33:56,800 --> 00:33:59,240
supervised learning or something
like that. 

543
00:33:59,840 --> 00:34:00,560
To. 
Add. 

544
00:34:00,600 --> 00:34:05,840
To really increase the, you 
know, help the adoption if you 

545
00:34:05,840 --> 00:34:08,920
don't have to, you know, 
struggle through if you can just

546
00:34:08,920 --> 00:34:13,480
check the the results rather 
than have to figure them out 

547
00:34:13,480 --> 00:34:15,760
yourself. 
Some of this comes back to the 

548
00:34:15,760 --> 00:34:20,560
actual, like data modeling, 
where if your library models 

549
00:34:20,560 --> 00:34:24,760
data as a dictionary, you 
probably should create a data 

550
00:34:24,760 --> 00:34:28,600
class or whatever instead. 
And so it's not always. 

551
00:34:28,600 --> 00:34:32,159
There's not always a good base 
type to to the could be 

552
00:34:32,159 --> 00:34:34,360
inferred. 
It may just be a dictionary, and

553
00:34:34,520 --> 00:34:35,880
you should add. 
Types. 

554
00:34:37,560 --> 00:34:41,000
Honestly, the the types of 
typing problems that are hard 

555
00:34:41,120 --> 00:34:44,679
for the human are still the ones
that are hard for the inference 

556
00:34:44,679 --> 00:34:48,239
algorithm or LLM. 
Like the easy types, the basic 

557
00:34:48,239 --> 00:34:52,560
returns can usually get done 
fairly easily through automation

558
00:34:52,560 --> 00:34:54,639
like Firefly. 
Auto type does a pretty good 

559
00:34:54,639 --> 00:34:56,639
job. 
Monkey types been around 

560
00:34:56,639 --> 00:34:58,440
forever, does a pretty solid 
job. 

561
00:34:59,240 --> 00:35:02,480
But as you said, it's where you 
probably should refactor your 

562
00:35:02,480 --> 00:35:06,640
code or you're now unioning a 
bunch of things together. 

563
00:35:07,440 --> 00:35:11,480
That's where both the human and,
at least for now, the computer 

564
00:35:11,480 --> 00:35:17,000
is frustrated. 
Yeah, biggest, I think the 

565
00:35:17,000 --> 00:35:20,560
biggest help that I've gotten is
with, even though I've been 

566
00:35:20,560 --> 00:35:28,040
exposed to generic since the C++
committee and it's still like 

567
00:35:28,040 --> 00:35:31,560
some of the tricky ones. 
It's really helpful if you have,

568
00:35:32,200 --> 00:35:35,440
you know, something that can can
write those things for you and 

569
00:35:35,440 --> 00:35:37,560
then you can go, Oh yeah, I see.
That's right. 

570
00:35:37,560 --> 00:35:40,720
But having to come up with them 
yourself is sometimes really 

571
00:35:40,720 --> 00:35:44,200
challenging. 
What are some of the things 

572
00:35:44,200 --> 00:35:47,840
you're hearing on on like this 
topic, like the challenges to 

573
00:35:47,840 --> 00:35:52,320
people adopting types in Python?
Where what is, is there 

574
00:35:52,920 --> 00:35:57,840
resistance because it's hard in 
various ways or yeah, what's the

575
00:35:58,320 --> 00:36:00,760
what's the reasons? 
How do we get more people using 

576
00:36:00,760 --> 00:36:04,480
types? 
I asked about this in the 

577
00:36:04,480 --> 00:36:06,280
survey. 
Let me pull up the question and 

578
00:36:06,320 --> 00:36:09,520
see if I have some direct 
quotes. 

579
00:36:10,200 --> 00:36:14,680
That would be nice yeah, cuz, 
cuz the things I hear like I 

580
00:36:15,000 --> 00:36:18,680
have two friends who manage 
projects and they both go please

581
00:36:19,120 --> 00:36:23,840
write something that will help 
people understand and adopt this

582
00:36:23,840 --> 00:36:27,240
because they can't, you know, 
they have a really hard time 

583
00:36:27,240 --> 00:36:30,840
getting they're they're people 
who are working for them to do 

584
00:36:30,840 --> 00:36:32,760
this and. 
Like the mental model? 

585
00:36:32,760 --> 00:36:37,160
Of the mental model of types I 
guess I mean it is quite a 

586
00:36:37,160 --> 00:36:40,720
departure from just saying, oh 
here's a thing do whatever you 

587
00:36:40,720 --> 00:36:44,320
want with it and but look you 
know the biggest argument is 

588
00:36:44,320 --> 00:36:47,000
well the language doesn't 
require it so why should I do it

589
00:36:47,960 --> 00:36:50,640
that's. 
So, well, well, Aaron's. 

590
00:36:50,640 --> 00:36:53,360
Talking to. 
Quotes which are better than 

591
00:36:53,360 --> 00:36:56,840
anything I can give. 
I can speak to a few things 

592
00:36:56,840 --> 00:37:04,080
we've seen more anecdotally. 1 
is you need fairly advanced type

593
00:37:04,080 --> 00:37:06,960
system features if you're doing 
something like decorators and 

594
00:37:06,960 --> 00:37:09,520
you actually get into 
potentially under specified 

595
00:37:09,520 --> 00:37:15,320
behavior in some cases. 
So libraries that do a lot of 

596
00:37:15,320 --> 00:37:19,160
things like decorators that are 
very dynamic, it's much harder. 

597
00:37:19,640 --> 00:37:22,280
You have to immediately become a
typing expert. 

598
00:37:23,440 --> 00:37:26,160
There are type system features 
to help with that, but they're 

599
00:37:26,160 --> 00:37:30,000
not, you know, the vanilla 
here's an intro to types sort of

600
00:37:30,000 --> 00:37:35,400
thing that's a big barrier to 
cross, and then code bases that 

601
00:37:36,160 --> 00:37:39,600
aren't easily expressed with 
types already. 

602
00:37:39,600 --> 00:37:42,480
So of course you can have just 
dynamically typed code bases 

603
00:37:42,480 --> 00:37:45,760
that use dictionaries. 
Type Dicks might help with that,

604
00:37:45,760 --> 00:37:52,520
but they're tricky to use. 
Or people used to talk a lot 

605
00:37:52,520 --> 00:37:57,400
about how Python is duct typed, 
and the static Python type 

606
00:37:57,400 --> 00:38:00,960
system is not duct typed. 
So in order to express that, you

607
00:38:00,960 --> 00:38:04,040
might need to create a lot of 
protocol classes, which are the 

608
00:38:04,040 --> 00:38:07,680
structural classes. 
That's a lot more than adding 

609
00:38:07,680 --> 00:38:11,560
annotations. 
That's potentially adding a 

610
00:38:11,560 --> 00:38:16,160
whole type system to express 
what your code already did using

611
00:38:16,160 --> 00:38:18,600
duct typing, and I think that's 
another place where you can run 

612
00:38:18,600 --> 00:38:22,080
into challenges. 
So I'll, I'll give you some 

613
00:38:22,080 --> 00:38:27,120
numbers. 30% of a respondents 
responded that they had some 

614
00:38:27,120 --> 00:38:30,440
sort of objection to typing. 
The top one was it's not 

615
00:38:30,440 --> 00:38:33,240
required for my project. 
So I don't want types. 

616
00:38:33,240 --> 00:38:37,680
This is me doing my thing. 
Let me cook. 27% lack of 

617
00:38:37,680 --> 00:38:40,960
familiarity. 
That's actually something that 

618
00:38:40,960 --> 00:38:43,880
is pretty tractable without a 
PEP or other things and 

619
00:38:43,880 --> 00:38:46,600
something our team's thinking 
about, like how can we make 

620
00:38:46,600 --> 00:38:51,520
documentation better? 
How can we do more interactive 

621
00:38:51,960 --> 00:38:54,640
ways of learning, especially 
with LLMS, it's a great tool to 

622
00:38:54,640 --> 00:38:59,440
help you learn things. 
They're too complex. 23% of 

623
00:38:59,440 --> 00:39:02,840
respondents, I like this quote. 
They're incomplete, leading to 

624
00:39:02,840 --> 00:39:05,280
complexity. 
In many cases, when trying to 

625
00:39:05,280 --> 00:39:08,640
accurately type in, you end up 
with shockingly dense, cryptic 

626
00:39:08,640 --> 00:39:11,760
looking code that makes the 
actual code hard to read. 

627
00:39:11,760 --> 00:39:14,440
See, and that's kind of what 
Steven was talking about before,

628
00:39:14,440 --> 00:39:19,520
is as you're adding more and 
more types, especially for code 

629
00:39:19,520 --> 00:39:22,840
that's untyped, you see this a 
lot in AIML where you're 

630
00:39:22,840 --> 00:39:26,200
unioning many things together 
based on the input value. 

631
00:39:26,800 --> 00:39:30,560
The type now can become like 
many, many more characters than 

632
00:39:30,560 --> 00:39:34,440
the actual code itself. 
And if you're not setting out 

633
00:39:34,440 --> 00:39:37,480
with types from the beginning, 
adding it after the fact can 

634
00:39:37,480 --> 00:39:41,520
actually be pretty challenging. 
Yeah, there's probably a huge 

635
00:39:41,520 --> 00:39:45,520
difference between the existing 
code base and the new code base 

636
00:39:45,520 --> 00:39:49,480
in terms of if you start with 
types, it's probably a lot 

637
00:39:49,480 --> 00:39:54,000
easier than trying to add them 
in later, so that probably makes

638
00:39:54,000 --> 00:39:57,840
a difference too. 
It is, and there are certain 

639
00:39:57,840 --> 00:39:59,600
things like we're. 
We've been studying the 

640
00:39:59,600 --> 00:40:03,320
TypeScript Effect library and 
last night we were trying to 

641
00:40:03,320 --> 00:40:06,320
struggle our way through a 
relatively small piece of code 

642
00:40:06,840 --> 00:40:12,680
and the return type was. 
Well, all of it was intimidating

643
00:40:13,840 --> 00:40:16,440
and yeah. 
It was intimidating to us and 

644
00:40:16,440 --> 00:40:18,840
we're pretty good with types. 
Yeah. 

645
00:40:19,160 --> 00:40:24,120
Well, a lot of that is that it 
uses every dark corner of 

646
00:40:24,480 --> 00:40:28,720
TypeScript, and so we're not 
experts in that yet. 

647
00:40:29,440 --> 00:40:32,200
But I guess I could see there 
being resistance to types in 

648
00:40:32,200 --> 00:40:37,960
general because of the perceived
or real complexity that you may 

649
00:40:37,960 --> 00:40:40,400
be faced. 
With at some point, yeah, you, I

650
00:40:40,440 --> 00:40:45,560
think we haven't really gotten 
that good at pitching the 

651
00:40:45,560 --> 00:40:49,120
benefits enough. 
So if you were to see, for 

652
00:40:49,120 --> 00:40:53,200
example, a complex return value,
you'd you'd be able to go. 

653
00:40:53,200 --> 00:40:57,640
All right, maybe I don't 
understand that, but I know it 

654
00:40:57,640 --> 00:41:03,240
is doing a lot of good by 
narrowing what I could do with 

655
00:41:03,240 --> 00:41:06,000
the result so that I don't get 
myself into trouble. 

656
00:41:06,760 --> 00:41:08,120
But I don't. 
Yeah. 

657
00:41:08,120 --> 00:41:13,840
I mean, until you've had that 
experience, yeah, it's it's hard

658
00:41:13,840 --> 00:41:16,160
thing to to just say, hey, these
are great. 

659
00:41:16,160 --> 00:41:17,440
Trust me. 
Still got. 

660
00:41:17,440 --> 00:41:20,560
More work to do on helping 
people see the value. 

661
00:41:20,560 --> 00:41:24,160
Yeah, yeah, exactly. 
I mean, afraid of, I think I 

662
00:41:24,160 --> 00:41:25,600
was. 
Go ahead. 

663
00:41:25,600 --> 00:41:28,320
I can share some positive quotes
too, so it doesn't have to be 

664
00:41:28,320 --> 00:41:32,320
all doom and gloom. 
Yeah, so amazing auto complete. 

665
00:41:33,520 --> 00:41:35,720
You just can't get the same auto
complete, especially with 

666
00:41:35,720 --> 00:41:38,640
overloads and other things 
without having types. 

667
00:41:38,640 --> 00:41:41,480
And the expectation for 
languages now is you have 

668
00:41:41,480 --> 00:41:44,520
language services running in 
your IDE. 

669
00:41:44,840 --> 00:41:47,280
It finds real bugs. 
I've noticed this myself. 

670
00:41:47,960 --> 00:41:51,040
I hate to admit this to the 
team, but I've started some code

671
00:41:51,040 --> 00:41:54,400
untyped with Python And then 
have gone back and added the 

672
00:41:54,400 --> 00:41:57,960
type checker and it's showing me
real cases. 

673
00:41:57,960 --> 00:42:01,480
Either it's definitely going to 
crash or it's a corner case I 

674
00:42:01,480 --> 00:42:05,680
hadn't thought about. 
And that's a really awesome 

675
00:42:05,680 --> 00:42:08,640
experience to have that tool 
statically tell you there's a 

676
00:42:08,640 --> 00:42:11,880
problem and still flexibility, 
right. 

677
00:42:11,880 --> 00:42:16,760
So if you're if you're writing 
Java and your Java doesn't 

678
00:42:16,760 --> 00:42:23,320
compile like and it's Friday 
evening, sorry, you can't ship 

679
00:42:23,320 --> 00:42:25,320
the code even though you know it
should work. 

680
00:42:25,320 --> 00:42:30,320
Whereas with the gradually type 
languages, you're pretty sure it

681
00:42:30,320 --> 00:42:33,600
works and you want to be able to
at least move on to the next 

682
00:42:33,600 --> 00:42:36,640
phase. 
So you ignore it and you can 

683
00:42:36,640 --> 00:42:38,880
move on. 
And I I think some people still 

684
00:42:38,880 --> 00:42:44,240
appreciate that flexibility. 
That makes me uncomfortable if 

685
00:42:44,240 --> 00:42:48,920
the if the types don't all pass,
I get I'm going no, I can't 

686
00:42:48,920 --> 00:42:53,200
believe that this is right. 
If if it doesn't, if it doesn't 

687
00:42:53,200 --> 00:42:56,760
pass, Yeah, yeah, I. 
Use. 

688
00:42:57,520 --> 00:43:02,720
I use compiler to just give me 
some security that I'm not going

689
00:43:02,720 --> 00:43:05,520
to ship something. 
That was C with my experience 

690
00:43:05,520 --> 00:43:12,840
with C++, because at the time C 
didn't really have much in the 

691
00:43:12,840 --> 00:43:16,360
way of typing. 
And then we moved to C++ and all

692
00:43:16,360 --> 00:43:20,560
of a sudden my first experience 
was, oh, if it compiles, it runs

693
00:43:20,880 --> 00:43:23,680
well. 
You know, the the small things 

694
00:43:23,680 --> 00:43:27,400
that I was doing, that was true 
and obviously can't expect that 

695
00:43:27,400 --> 00:43:30,800
in a large scale, but it was 
such a big step forward. 

696
00:43:31,240 --> 00:43:34,880
And at the time I couldn't 
really distinguish between, oh, 

697
00:43:34,880 --> 00:43:38,320
is this because C++ is object 
oriented? 

698
00:43:38,320 --> 00:43:40,080
Or is it just because it's using
types? 

699
00:43:40,080 --> 00:43:42,240
But yeah, it was definitely the 
types. 

700
00:43:43,720 --> 00:43:46,000
I think it's a challenge and. 
Oh yeah, go. 

701
00:43:47,120 --> 00:43:50,120
Ahead, it's a challenge for 
Python because there are holes 

702
00:43:50,120 --> 00:43:53,520
in the type system and so it's 
hard to know whether it's your 

703
00:43:53,520 --> 00:43:58,840
fault or the type checkers fault
and that Kinder Rd. trust. 

704
00:43:58,880 --> 00:44:02,600
I think one thing we can do is 
plug those gaps and get as good 

705
00:44:02,600 --> 00:44:07,800
as we can at surfacing like 
legitimate problems, and then 

706
00:44:07,800 --> 00:44:13,160
people will trust more and be 
less likely to just ignore it 

707
00:44:13,160 --> 00:44:17,520
and move on. 
Yeah, I've had some experiences 

708
00:44:17,520 --> 00:44:24,440
where it seems like if, if 
something doesn't type in one 

709
00:44:24,440 --> 00:44:28,640
place, it can cause weird errors
to pop up in other places. 

710
00:44:29,240 --> 00:44:31,600
And then when you fix, OK, 
you're nodding. 

711
00:44:31,600 --> 00:44:33,840
So you've you've had this 
experience too. 

712
00:44:33,840 --> 00:44:35,280
It's not just me. 
Because I was going out. 

713
00:44:35,280 --> 00:44:37,280
What's going on here? 
I fixed this thing. 

714
00:44:37,280 --> 00:44:40,840
And then these other errors go 
away, which seemed unrelated. 

715
00:44:40,840 --> 00:44:44,920
And I think maybe it just causes
the type checker to to hiccup. 

716
00:44:45,120 --> 00:44:47,040
But you were going to say 
something, Steven. 

717
00:44:48,000 --> 00:44:54,200
Oh yeah, I think that there is a
debate that is live in the 

718
00:44:54,200 --> 00:44:59,240
community and you can kind of 
see it in the forums we use to 

719
00:44:59,240 --> 00:45:02,120
discuss where we are and 
potential evolution of the 

720
00:45:02,120 --> 00:45:07,960
language between a camp of 
people who really want Python to

721
00:45:07,960 --> 00:45:11,920
turn into a sound language where
if it type checks, it doesn't 

722
00:45:11,920 --> 00:45:14,400
have type errors. 
Doesn't mean it doesn't crash, 

723
00:45:14,400 --> 00:45:17,360
but you shouldn't get type 
errors or name errors basically.

724
00:45:18,200 --> 00:45:24,120
And another camp that I think 
thinks Python kind of is what it

725
00:45:24,120 --> 00:45:30,000
is and we're doing the best we 
can to provide catching a lot of

726
00:45:30,000 --> 00:45:34,120
bugs and IDE services, but we 
don't really expect to get to 

727
00:45:34,120 --> 00:45:37,200
soundness And I, I don't know 
how all that will turn out. 

728
00:45:37,680 --> 00:45:42,160
I do think evolving from where 
we are to a fully sound language

729
00:45:43,240 --> 00:45:46,440
is, I don't know if it's 
possible to evolve it. 

730
00:45:46,520 --> 00:45:51,040
I do think it's possible someday
there will be a kind of fork, 

731
00:45:52,320 --> 00:45:55,240
hopefully not a fork as in two 
separate communities. 

732
00:45:55,640 --> 00:45:58,720
But I could imagine a world 
where, and I don't think this 

733
00:45:58,720 --> 00:46:02,840
will happen in the next 5 years,
There's like a statically typed 

734
00:46:03,040 --> 00:46:06,200
variant of Python that is a 
subset of Python. 

735
00:46:06,200 --> 00:46:11,800
And you can hop out of it, but 
not not easily hop back into 

736
00:46:11,800 --> 00:46:13,760
fully dynamic. 
And that would be a way of 

737
00:46:13,760 --> 00:46:17,280
providing guarantees, but you 
need the whole library ecosystem

738
00:46:17,280 --> 00:46:20,760
to support that. 
And that's a long road if it's. 

739
00:46:20,760 --> 00:46:23,680
Yeah. 
Although maybe the experiment 

740
00:46:23,680 --> 00:46:30,200
that we're doing with the Gill 
free version that is now, you 

741
00:46:30,200 --> 00:46:32,840
know, I guess you can just now 
get that instead. 

742
00:46:32,880 --> 00:46:34,840
I'm I'm very skeptical about 
that. 

743
00:46:34,880 --> 00:46:40,440
I if everybody goes, Oh yeah, 
we're free now of the Gill and 

744
00:46:40,440 --> 00:46:42,680
everything will be great and 
it's like, yeah, I don't think 

745
00:46:42,680 --> 00:46:45,040
you. 
Have it's gonna be a Python 

746
00:46:45,040 --> 00:46:47,200
Enterprise edition that's gill 
free. 

747
00:46:47,200 --> 00:46:49,680
No, there is statically type. 
No, you can get it now. 

748
00:46:49,840 --> 00:46:53,840
You can get the. 
Supported in 314 and 

749
00:46:53,920 --> 00:46:56,560
experimental in 3/13. 
But you have tried it. 

750
00:46:56,960 --> 00:47:02,040
It's it's a separate build. 
And so you go, OK, I wanna, I 

751
00:47:02,040 --> 00:47:07,880
wanna go into the world of, of 
free threading and screw around 

752
00:47:07,880 --> 00:47:11,200
with that and go good luck. 
Okay, maybe. 

753
00:47:11,560 --> 00:47:15,840
I guess there is prior art to do
this sort of thing in a totally 

754
00:47:15,840 --> 00:47:19,360
different realm, but I was 
recently learning about formal 

755
00:47:19,360 --> 00:47:24,520
verification languages like Lean
and and I, I found that someone 

756
00:47:24,520 --> 00:47:28,760
had taken Scala and then reduced
it to a subset of Scala that 

757
00:47:28,760 --> 00:47:31,040
could be used for formal 
verification and be formally 

758
00:47:31,040 --> 00:47:34,440
verified. 
So that was a fascinating place 

759
00:47:34,440 --> 00:47:38,600
of like, OK, you there are 
places of subsets that that 

760
00:47:38,600 --> 00:47:44,040
really add a bunch of 
restrictions and if you if what 

761
00:47:44,040 --> 00:47:46,520
you need fits within those 
restrictions and it's. 

762
00:47:46,680 --> 00:47:51,800
Probably a great option our. 
Sister and say our sister team 

763
00:47:51,960 --> 00:47:56,560
at Meta actually is working on 
free threaded Python or no Gill,

764
00:47:56,880 --> 00:47:59,640
but another project they had 
been working on and I think it's

765
00:47:59,640 --> 00:48:02,360
open source is called static 
Python. 

766
00:48:02,560 --> 00:48:06,200
And that's where you can 
actually use the types now for 

767
00:48:06,200 --> 00:48:10,280
runtime. 
And I think that might be a big 

768
00:48:10,280 --> 00:48:14,200
enough motivator to go into this
fork that Steven was talking 

769
00:48:14,200 --> 00:48:17,800
about, because you really need 
to have an incentive in order to

770
00:48:18,240 --> 00:48:20,600
make the type system even 
stricter. 

771
00:48:21,000 --> 00:48:24,960
And that could be the motivator 
where people say, OK, yeah, if I

772
00:48:24,960 --> 00:48:28,880
can get actual runtime 
guarantees runtime performance, 

773
00:48:28,880 --> 00:48:33,880
then I will take on the burden 
of really using a much stronger 

774
00:48:33,880 --> 00:48:35,520
type system. 
Yeah. 

775
00:48:35,520 --> 00:48:39,120
And the way that works is kind 
of how I would hope a fork could

776
00:48:39,120 --> 00:48:42,040
work. 
Where it's, it's a fork in the 

777
00:48:42,040 --> 00:48:46,080
sense that the module is marked 
as static, but you're still in 

778
00:48:46,080 --> 00:48:48,200
the same runtime. 
You're not having to fork the 

779
00:48:48,200 --> 00:48:52,520
whole ecosystem. 
Like it's just that this module 

780
00:48:52,520 --> 00:48:56,080
says it's static. 
It can JIT compile in a way that

781
00:48:56,080 --> 00:49:01,360
uses types. 
It's not currently something we 

782
00:49:01,360 --> 00:49:06,120
know how to do in a super user 
friendly way, but it's the the 

783
00:49:06,120 --> 00:49:09,800
spirit of it is very similar to 
Cython, but instead of using 

784
00:49:10,440 --> 00:49:13,800
this other language that looks 
like Python, it actually just 

785
00:49:13,800 --> 00:49:18,240
uses Python, but a very strict 
subset of it to do roughly the 

786
00:49:18,240 --> 00:49:24,000
same kind of thing. 
I think that it will be scaling 

787
00:49:24,120 --> 00:49:29,000
that drives us to this. 
I mean, because years ago people

788
00:49:29,000 --> 00:49:33,320
go, Oh, well, Python, it's a toy
language for small things. 

789
00:49:33,880 --> 00:49:37,920
And then people started building
bigger and bigger things with it

790
00:49:37,920 --> 00:49:39,600
and started running into these 
problems. 

791
00:49:39,600 --> 00:49:46,000
And I think what types do 
especially is if you have chunks

792
00:49:46,000 --> 00:49:49,560
of code, you can plug them 
together a lot more easily and 

793
00:49:49,560 --> 00:49:53,960
safely if they're a fully typed.
And so when you're building 

794
00:49:53,960 --> 00:49:56,920
bigger and bigger systems, 
that's where I think people will

795
00:49:56,920 --> 00:50:02,360
be compelled to adopt types. 
Composition. 

796
00:50:02,920 --> 00:50:07,960
Yes, composition it is. 
Yes, we won't say the I word. 

797
00:50:09,840 --> 00:50:12,840
So I don't know, give me a 
little pitch on Pyrfly. 

798
00:50:12,840 --> 00:50:15,360
Why should I use Pyrfly? 
What's great about it? 

799
00:50:17,880 --> 00:50:23,160
So my favorite feature is 
definitely container inference. 

800
00:50:23,680 --> 00:50:28,320
So you can create an empty 
container, throw some items into

801
00:50:28,320 --> 00:50:33,080
it, and see the types in real 
time using inlay hints get added

802
00:50:33,080 --> 00:50:38,040
to that inlay hint. 
Currently the behavior is you 

803
00:50:38,040 --> 00:50:42,600
can initialize an empty 
container, append a few items of

804
00:50:42,600 --> 00:50:45,320
the same type, and then later on
in your code, if you try to 

805
00:50:45,320 --> 00:50:47,760
append a new type, it'll throw 
an error. 

806
00:50:48,240 --> 00:50:51,600
That's pretty neat and I think. 
There's more done through 

807
00:50:51,840 --> 00:50:57,520
inference, not through a a 
actual type being specified on 

808
00:50:57,560 --> 00:50:59,400
the container or. 
Like. 

809
00:50:59,800 --> 00:51:01,680
Saying. 
So instead of saying list of 

810
00:51:01,680 --> 00:51:05,000
string, you just create a list 
and start throwing strings in. 

811
00:51:05,000 --> 00:51:08,960
And then the pyrefly inference 
says oh you're putting strings 

812
00:51:08,960 --> 00:51:11,480
in and then later you try to put
an int in. 

813
00:51:11,480 --> 00:51:14,160
It's like, Nope. 
But where is the line that you 

814
00:51:14,160 --> 00:51:15,760
draw? 
Where? 

815
00:51:15,800 --> 00:51:19,560
First, use. 
OK, so the first thing you put 

816
00:51:19,560 --> 00:51:22,200
in it, we infer that's what you 
wanted. 

817
00:51:22,440 --> 00:51:24,680
And if you wanted something 
else, you do need a type 

818
00:51:24,680 --> 00:51:28,240
annotation to say what you 
actually wanted, because we 

819
00:51:28,240 --> 00:51:31,720
looked at constraint solving 
over the whole function, which 

820
00:51:32,280 --> 00:51:35,440
has some desirable properties. 
But then if you do anything by 

821
00:51:35,440 --> 00:51:38,120
accident, we'll just say, oh, 
you meant to do that too. 

822
00:51:38,120 --> 00:51:44,480
So, and that's something the 
Flow team in particular did a 

823
00:51:44,480 --> 00:51:49,000
lot of user research on in, in 
kind of the JavaScript world. 

824
00:51:49,360 --> 00:51:53,160
As functions get big, users 
really don't like that behavior 

825
00:51:53,360 --> 00:51:59,080
of doing accepting whatever they
provide, because the function 

826
00:51:59,080 --> 00:52:02,000
can get so big that they made a 
mistake, but the type checker 

827
00:52:02,000 --> 00:52:05,600
just accepts it as valid and 
they might not get a type error 

828
00:52:05,600 --> 00:52:07,920
where they actually wanted one. 
Yeah. 

829
00:52:08,040 --> 00:52:11,320
And I think the first use is all
too easier to think about. 

830
00:52:12,280 --> 00:52:15,560
It's just, yeah, the mental 
model is, is much simpler. 

831
00:52:15,560 --> 00:52:17,440
Yeah. 
OK, that makes a, that makes a 

832
00:52:17,440 --> 00:52:18,360
ton of sense. 
Yeah. 

833
00:52:19,960 --> 00:52:24,680
Different approaches to 
inference and and I'm sure that 

834
00:52:24,760 --> 00:52:28,320
this may be one of the biggest 
places where different static 

835
00:52:28,440 --> 00:52:32,520
languages, statically typed 
languages vary is on how they do

836
00:52:32,520 --> 00:52:35,640
inference. 
So in this particular example in

837
00:52:35,640 --> 00:52:38,960
Scala, you can create a list 
without, you know, type 

838
00:52:38,960 --> 00:52:41,200
definition. 
And then if you put a string in 

839
00:52:41,200 --> 00:52:45,200
and then you put an int in in 
Scala 3, that actually gets 

840
00:52:45,200 --> 00:52:49,280
inferred to a list of string or 
int with a with a union. 

841
00:52:50,560 --> 00:52:54,640
And I, I don't know if that's 
the best way to do inference, 

842
00:52:54,640 --> 00:52:58,200
but it it just sounds like a 
different way than than first 

843
00:52:58,200 --> 00:52:59,960
use. 
So yeah, I'd be interested to 

844
00:53:00,440 --> 00:53:04,000
hear more from people on like in
is this all dependent on your 

845
00:53:04,240 --> 00:53:07,920
language that you're using or is
there really a golden standard 

846
00:53:07,920 --> 00:53:11,160
for these inference decisions? 
I think you really do have to 

847
00:53:11,160 --> 00:53:15,720
keep in mind to that, well, like
our experience trying to figure 

848
00:53:15,720 --> 00:53:19,320
out TypeScript, What's the 
difference between a constant 

849
00:53:19,320 --> 00:53:22,000
and a read only I, you know, 
stuff like that. 

850
00:53:22,200 --> 00:53:26,760
You're the more that the the 
user has to hold in their head, 

851
00:53:27,280 --> 00:53:31,680
the harder it's going to be. 
So I, I think the even even 

852
00:53:31,680 --> 00:53:34,680
though I can see the argument 
for going, oh, well, if you just

853
00:53:34,680 --> 00:53:37,960
keep putting things in, we'll 
keep adding to the to our or 

854
00:53:38,640 --> 00:53:41,520
first use just is a lot easier 
to understand. 

855
00:53:41,640 --> 00:53:44,880
And then if you do something 
else, you go, I have to be 

856
00:53:44,880 --> 00:53:47,480
explicit about the type here 
that I don't know. 

857
00:53:47,640 --> 00:53:52,400
That just sounds right to me. 
Yeah, and we'd love for people 

858
00:53:52,400 --> 00:53:54,640
to use it and give us feedback 
on it. 

859
00:53:55,440 --> 00:53:58,840
But I like the trade off 
personally and it's something 

860
00:53:58,840 --> 00:54:03,480
that other checkers can't do, 
but we'd love feedback from the 

861
00:54:03,480 --> 00:54:07,280
community. 
So the return inference I love. 

862
00:54:08,560 --> 00:54:12,920
We're getting a pretty robust 
set of IDE features now. 

863
00:54:12,920 --> 00:54:17,560
So you can do find all 
references that took a while to 

864
00:54:17,560 --> 00:54:21,880
build, but we're pretty happy 
with the implementation and 

865
00:54:21,880 --> 00:54:26,920
we're just now optimizing. 
I would say we're past 

866
00:54:26,920 --> 00:54:28,960
optimization. 
Basically, you can run go to def

867
00:54:28,960 --> 00:54:33,240
on any size code base. 
If it can work on Instagram, it 

868
00:54:33,240 --> 00:54:35,880
probably can work on any code 
base out there. 

869
00:54:35,880 --> 00:54:40,560
So I think the code NAV is the 
thing beyond the inference that 

870
00:54:40,560 --> 00:54:43,920
I like the most. 
And you keep mentioning IDE. 

871
00:54:43,920 --> 00:54:48,880
Is this a particular ID that 
you're using or working with? 

872
00:54:48,880 --> 00:54:56,000
Or is this just the LSPLSP? 
So we're just implementing the 

873
00:54:56,160 --> 00:55:00,400
Language Server protocol from 
Power Flight itself. 

874
00:55:01,160 --> 00:55:05,440
Most of our focus just making 
sure it all works is is on 

875
00:55:05,440 --> 00:55:09,800
Visual Studio Code since that's 
the most used externally and we 

876
00:55:09,800 --> 00:55:13,920
also use that internally as our 
primary tool. 

877
00:55:14,320 --> 00:55:21,360
There are people who are using 
Powerfly with Neovim and Emacs, 

878
00:55:21,360 --> 00:55:25,160
both of which have language 
server plug in providers and you

879
00:55:25,160 --> 00:55:27,920
can kind of hook into pretty 
much the same functionality. 

880
00:55:27,920 --> 00:55:28,960
What about? 
Pychar. 

881
00:55:29,480 --> 00:55:33,080
Does it work with pychar? 
It does. 

882
00:55:33,080 --> 00:55:37,320
There's an unofficial version 
sub community created. 

883
00:55:38,600 --> 00:55:40,600
I tested it a while ago and it 
works. 

884
00:55:41,120 --> 00:55:44,160
I have. 
We don't officially support it, 

885
00:55:44,160 --> 00:55:48,160
but someone else does. 
And there's an extension for Zed

886
00:55:48,160 --> 00:55:51,880
now too, that's also provided by
someone in the community, not 

887
00:55:51,880 --> 00:55:52,800
us. 
I see. 

888
00:55:53,240 --> 00:55:57,520
And it's in Open VSX, so if 
you're using like Cursor or 

889
00:55:57,520 --> 00:56:01,920
Windsor for any of those VS Code
derivatives, you can install it 

890
00:56:01,920 --> 00:56:04,960
there too. 
I don't know if you can say 

891
00:56:04,960 --> 00:56:10,480
this, but do you know what 
percentage of people at Meta use

892
00:56:10,960 --> 00:56:13,320
or what percentage of the 
company is using Python? 

893
00:56:17,600 --> 00:56:21,760
Let me find the stat that was 
approved for Pycon OK. 

894
00:56:22,440 --> 00:56:25,680
It is the most. 
Yeah, it is the most used 

895
00:56:25,680 --> 00:56:31,360
language at Meta now. 
Wow Yes, and especially if you 

896
00:56:31,360 --> 00:56:34,800
look at a monthly active, it's 
by far and away the most used 

897
00:56:34,800 --> 00:56:39,320
language. 
Let me see if I can pull it up. 

898
00:56:40,080 --> 00:56:41,440
But yeah, it is widely used. 
Wow. 

899
00:56:42,960 --> 00:56:48,400
So it's that in TypeScript hack?
Hack's probably the next 

900
00:56:48,400 --> 00:56:51,720
biggest, yeah, the so the the 
back end to the main. 

901
00:56:52,920 --> 00:57:00,240
A lot of the web server type 
logic is in Hack and that's 

902
00:57:01,040 --> 00:57:03,760
quite heavily used. 
And Flow is used for the front 

903
00:57:03,760 --> 00:57:08,000
end, which is similar to 
TypeScript but not TypeScript. 

904
00:57:08,760 --> 00:57:16,680
It stays closer to JavaScript. 
Well, at least there are lots of

905
00:57:16,680 --> 00:57:19,960
types at meta. 
Yeah, I I think that's a good 

906
00:57:19,960 --> 00:57:20,640
thing. 
Oh yeah? 

907
00:57:20,720 --> 00:57:23,280
Well. 
But again, I think it's a 

908
00:57:23,280 --> 00:57:25,600
scaling issue. 
It's like you get something that

909
00:57:25,600 --> 00:57:29,840
big and how do you manage it if 
you're not, if you don't have 

910
00:57:29,840 --> 00:57:34,520
types? 
Yeah, Aaron, you're Did you come

911
00:57:34,520 --> 00:57:36,680
up with something? 
I'm looking for the. 

912
00:57:37,920 --> 00:57:40,120
Well, anyway, the most used 
language. 

913
00:57:40,120 --> 00:57:43,920
We could put in. 
It is the most used, like 

914
00:57:44,400 --> 00:57:46,640
thousands of developers per day.
Wow. 

915
00:57:47,160 --> 00:57:51,240
OK, Yeah. 
Awesome. 

916
00:57:51,240 --> 00:57:55,040
Anything else about power fly 
that's that's highlight or 

917
00:57:55,040 --> 00:57:59,840
that's coming up maybe of note? 
I think the auto typing is going

918
00:57:59,840 --> 00:58:01,320
to be big. 
Yeah. 

919
00:58:02,640 --> 00:58:07,360
We saw someone on this is not 
related to auto typing, but 

920
00:58:08,400 --> 00:58:13,840
someone created an MCP server 
with Firefly and the idea there 

921
00:58:13,840 --> 00:58:19,040
was to addict the LLM to adding 
types to a code base by using 

922
00:58:19,040 --> 00:58:21,800
lollipops. 
So it was both like an 

923
00:58:21,800 --> 00:58:28,480
experiment with adding types, 
but also like a weird psychology

924
00:58:28,480 --> 00:58:33,920
study on how to addict, like 
quote addict LLMS to doing 

925
00:58:33,920 --> 00:58:36,720
something. 
Using lollipops did you say? 

926
00:58:37,480 --> 00:58:39,160
Yeah, it's worth a doing. 
It's pretty. 

927
00:58:39,160 --> 00:58:43,720
I wonder what a lollipop is? 
It's if I recall the way it 

928
00:58:43,720 --> 00:58:47,400
works is they just tell the LLM 
you love lollipops, you need to 

929
00:58:47,400 --> 00:58:50,840
get lollipops and we'll give you
a lollipop if you add a correct 

930
00:58:50,840 --> 00:58:53,840
type to the code base and they 
just keep repeating. 

931
00:58:55,040 --> 00:58:57,400
This wow. 
OK, this is new. 

932
00:58:57,400 --> 00:58:59,840
Now we know LMS are motivated by
lollipops. 

933
00:58:59,880 --> 00:59:02,400
Well, no. 
You tell them that that is their

934
00:59:02,400 --> 00:59:04,600
goal. 
OK, This is this is the way that

935
00:59:04,600 --> 00:59:08,160
we keep the AIS from turning us 
all into paper clips, right as 

936
00:59:08,160 --> 00:59:11,200
we just say no, you don't like, 
you like lollipop. 

937
00:59:11,200 --> 00:59:13,240
Well, then they'll turn us all 
into lollipops. 

938
00:59:15,600 --> 00:59:18,600
That's a fascinating experiment.
Let's. 

939
00:59:18,640 --> 00:59:22,200
Not do that experiment. 
Well, not that one, but I do 

940
00:59:22,200 --> 00:59:26,120
love the idea of getting the LLM
with an MCP server that has 

941
00:59:26,120 --> 00:59:30,160
knowledge of the types to 
actually start being helpful to 

942
00:59:30,160 --> 00:59:31,200
you. 
So you that's a. 

943
00:59:31,240 --> 00:59:37,440
So you've given it this this 
mythical objective. 

944
00:59:38,760 --> 00:59:40,680
That's lollipops. 
OK, that's crazy. 

945
00:59:41,320 --> 00:59:42,800
We'll have to. 
We'll put that, but it's a. 

946
00:59:42,840 --> 00:59:46,880
Feedback with kids too. 
It is worth a Google because 

947
00:59:46,880 --> 00:59:51,520
this person had found like 
different personas that they 

948
00:59:51,600 --> 00:59:57,120
gave to the LLM based on I think
it was you're an achiever or I 

949
00:59:57,120 --> 01:00:01,720
forget the other one. 
But typing aside, just as a 

950
01:00:03,160 --> 01:00:05,480
psychological experiment, it was
pretty fascinating. 

951
01:00:05,840 --> 01:00:07,720
Yes, incentivizing it with 
lollipops. 

952
01:00:08,080 --> 01:00:11,880
Well, and it sounds like that 
used Pyrofly to drive the the 

953
01:00:12,160 --> 01:00:16,680
MCP logic for for what it would 
have knowledge of in terms of 

954
01:00:16,680 --> 01:00:18,080
the type. 
So that's cool, yeah. 

955
01:00:19,280 --> 01:00:22,960
One thing I'd like to do with 
the MCP is maybe the auto typing

956
01:00:22,960 --> 01:00:27,880
feature one day, so you can now 
have the LLM call the tool that 

957
01:00:27,880 --> 01:00:31,320
automatically adds types to your
code via specialized for that. 

958
01:00:31,320 --> 01:00:33,280
I think that could be really 
powerful, yeah. 

959
01:00:33,720 --> 01:00:36,840
Yeah, and then agentic loop and 
validate that it works. 

960
01:00:38,560 --> 01:00:43,000
Yeah, yeah. 
Well, I will be exploring 

961
01:00:43,000 --> 01:00:48,400
Powerfly in the future, so I 
will, I'll give you feedback if 

962
01:00:48,400 --> 01:00:50,640
I, if I have any. 
Yeah. 

963
01:00:50,640 --> 01:00:56,400
And and we the community 
appreciates all of your efforts 

964
01:00:56,480 --> 01:01:03,080
and bringing typing on yeah. 
What's so I use UV for my builds

965
01:01:03,080 --> 01:01:07,440
with Python if I want to get 
pyrfly running in my build, but 

966
01:01:07,640 --> 01:01:12,400
do I just add some stuff into my
pyroject and done? 

967
01:01:12,440 --> 01:01:17,360
What's the process? 
Just do UVX pyrfly check and 

968
01:01:17,360 --> 01:01:22,800
that should automatically run it
or UV add pyrfly and then we 

969
01:01:22,800 --> 01:01:26,160
have an init command which will 
actually copy over your mypy or 

970
01:01:26,160 --> 01:01:32,160
pyrite configs as best we can 
and then yeah, from there run 

971
01:01:32,160 --> 01:01:34,720
pyrfly check and give it a try 
right I'll. 

972
01:01:34,960 --> 01:01:38,120
Have to give it a try. 
Oh yeah. 

973
01:01:38,760 --> 01:01:39,880
Sure. 
And yeah, please do leave 

974
01:01:39,880 --> 01:01:43,760
feedback. 
Our Discord is on our website in

975
01:01:43,760 --> 01:01:47,760
this preview phase. 
Like we want feedback, we want 

976
01:01:47,760 --> 01:01:50,640
to see the direction the 
community wants us to take it, 

977
01:01:50,640 --> 01:01:53,720
and we'd love for people to get 
involved. 

978
01:01:54,680 --> 01:01:56,480
Yes. 
Right. 

979
01:01:56,840 --> 01:01:58,040
Great. 
Well, thank you all. 

980
01:01:58,200 --> 01:02:00,840
That was awesome to hear about 
all your great work on that. 

981
01:02:00,840 --> 01:02:03,040
So thank you. 
Thank you. 

982
01:02:03,080 --> 01:02:04,440
Thanks James and Bruce, this is 
fun. 

983
01:02:04,880 --> 01:02:05,560
All right. 
Thank you. 

984
01:02:05,560 --> 01:02:05,640
Bye.
