1
00:00:01,000 --> 00:00:04,759
How'd you like to listen to dot
net rocks with no ads? Easy?

2
00:00:05,320 --> 00:00:09,880
Become a patron For just five dollars
a month you get access to a private

3
00:00:10,000 --> 00:00:14,400
RSS feed where all the shows have
no ads. Twenty dollars a month will

4
00:00:14,400 --> 00:00:18,800
get you that and a special dot
net Rocks patron mug. Sign up now

5
00:00:18,839 --> 00:00:23,679
at Patreon dot dot net rocks dot
com. Hey Carlin, Richard here.

6
00:00:24,000 --> 00:00:29,199
As you may have heard, NDC
is back offering their incredible in person conferences

7
00:00:29,239 --> 00:00:33,600
around the world, and we'd like
to tell you about them. NDC Copenhagen

8
00:00:33,880 --> 00:00:38,439
is happening August twenty seventh through the
thirty first. The early bird discount for

9
00:00:38,600 --> 00:00:45,039
NDC Copenhagen ends June second. Go
to NDC Copenhagen dot com for more information.

10
00:00:45,799 --> 00:00:50,159
NDC Porto is happening October sixteenth through
the twentieth. The early bird discount

11
00:00:50,159 --> 00:00:55,119
for ADC Porto ends July twenty first. Go to Dcporto dot com to register

12
00:00:55,479 --> 00:01:12,680
and check out the full lineup of
conferences at NDC Conferences dot com. Oops,

13
00:01:12,719 --> 00:01:15,680
I did it again. It's dot
and Rocks. This is Carl Franklin,

14
00:01:15,799 --> 00:01:22,359
and this is Richard Campbell, and
again we're year Britney Spears. Is

15
00:01:22,359 --> 00:01:26,719
that what you're doing now? You
know, I'm so out of jokes it's

16
00:01:26,840 --> 00:01:34,239
not even funny. Please send your
jokes somebody, please. Um. So

17
00:01:34,840 --> 00:01:40,480
we are continuing our pile up of
recordings before the conference season starts. I

18
00:01:40,519 --> 00:01:42,239
think this is the last one.
I think this is the last one.

19
00:01:42,400 --> 00:01:47,159
Yeah. Next time we record will
be at Techo Rama and Antwerp. Yeah.

20
00:01:47,159 --> 00:01:49,959
Wow, that's right. Yeah,
yeah, I'm looking boy man.

21
00:01:49,000 --> 00:01:52,640
We really crushed it in the last
week. We had some fun. Uh,

22
00:01:52,640 --> 00:01:55,040
it's been a while since we've gone. You know, this once a

23
00:01:55,079 --> 00:01:59,920
week thing is so easy for us. Yeah, ridiculous from going from the

24
00:02:00,480 --> 00:02:02,359
back in the times we did three
times a week. Ye. But yeah,

25
00:02:02,400 --> 00:02:06,480
we sort of did that three times
a week feeling schedule to get a

26
00:02:06,519 --> 00:02:09,120
few weeks ahead so we can go
to conferences and be confident that we'll publish

27
00:02:09,159 --> 00:02:14,000
every week no matter what. Right, exactly. No, you won't see

28
00:02:14,000 --> 00:02:16,319
any reruns here on dot net rocks. We don't do that. That's not

29
00:02:16,400 --> 00:02:21,840
what we do. No, there's
always stuff to talk about, including better

30
00:02:21,879 --> 00:02:31,599
no framework. So let's roll the
crazy music, all right, man?

31
00:02:31,639 --> 00:02:35,479
What do you got? What?
God mo, hippo? Than what you

32
00:02:35,560 --> 00:02:39,280
got all right. So this is
an article that came out on the twelfth

33
00:02:39,280 --> 00:02:44,280
of April on The Verge. You've
been reading The Verge lately. I notice

34
00:02:44,479 --> 00:02:46,560
it's got some good stuff. You
know, they report about stuff that you

35
00:02:46,560 --> 00:02:50,759
don't hear anywhere else. That might
mean it's bullcrap, but who knows.

36
00:02:51,560 --> 00:02:55,560
So this story is Microsoft is changing
the print screen key to open its own

37
00:02:55,759 --> 00:03:00,360
snipping tool on Windows eleven. I
think I like this, You do,

38
00:03:00,439 --> 00:03:02,199
yeah, and I'll tell you why
because right now, when you hit print

39
00:03:02,240 --> 00:03:05,360
screen, you don't even know if
you hit print screen. It's true,

40
00:03:05,560 --> 00:03:08,199
right, Like on many keyboards,
the print screen button is bared behind like

41
00:03:08,199 --> 00:03:12,159
a function key or something else,
right, so it's like, did it

42
00:03:12,240 --> 00:03:14,479
hit the prince screen or not?
You got to go check fire up,

43
00:03:14,479 --> 00:03:17,439
paint and check board. Yeah,
as we all do. So the fact

44
00:03:17,439 --> 00:03:21,680
that now you'll know you hit it
because immediately the snipping tool appears. I

45
00:03:21,759 --> 00:03:23,319
kind of like this, Well,
there are other tools that do that,

46
00:03:23,479 --> 00:03:28,599
right, So if you have the
what's the one from Camp Tajia tech smith,

47
00:03:29,199 --> 00:03:31,840
Right, there's a grabber or something
like that that's everybody's been using for

48
00:03:32,000 --> 00:03:36,960
years, for years and years.
So people have these tools that I like

49
00:03:37,080 --> 00:03:40,240
you, Richard, I got used
to you know, opening paint, copying,

50
00:03:40,319 --> 00:03:44,680
cropping, all that stuff, and
it's just my workflow. So right,

51
00:03:45,039 --> 00:03:46,800
you know, I'll give it a
try. Well, it sounds like

52
00:03:46,840 --> 00:03:49,039
you can adjust the setting, so
if you want to use something else,

53
00:03:49,159 --> 00:03:51,599
right, knock yourself out. Okay, you could just set it up so

54
00:03:51,680 --> 00:03:53,960
it goes to paint automatically, just
opens paint. That's pretty cool. So

55
00:03:54,240 --> 00:03:59,719
it is the first time in decades
that the print screen button functionality has changed

56
00:03:59,759 --> 00:04:03,319
and knows. So it's a momentous
occasion, and I will give it a

57
00:04:03,319 --> 00:04:08,879
shot, you know, because change
is fine. As long as I have

58
00:04:09,080 --> 00:04:12,159
a good workflow and I get used
to it, that's great. No,

59
00:04:12,319 --> 00:04:18,279
no, change is good. You
go first, You go first, all

60
00:04:18,360 --> 00:04:20,800
right? Man, who's talking to
us today? Grabbed a comment off a

61
00:04:20,879 --> 00:04:25,600
show eighteen thirty eight, not that
long ago, back in March of twenty

62
00:04:25,639 --> 00:04:29,120
twenty three, when we talked to
one Javier Nelson and Steve Sanderson. We're

63
00:04:29,120 --> 00:04:31,879
talking about Blazer United, because you
know, it's the all WASM show these

64
00:04:31,959 --> 00:04:34,879
days, isn't it. We're not
talking AI, We're talking WASM. By

65
00:04:34,879 --> 00:04:38,800
the way, a preview just came
out that has some of the Blazer United

66
00:04:38,839 --> 00:04:42,680
stuff in it, just a couple
of days ago. Yeah, as usual.

67
00:04:42,839 --> 00:04:46,040
Those guys are crazy smart and that's
awesome cool stuff. So Bear,

68
00:04:46,199 --> 00:04:50,160
and that's the name Bear. Bear
says, I love the work to Microsoft

69
00:04:50,160 --> 00:04:54,279
does on Blazer, and I truly
believe that web assembly or something similar.

70
00:04:54,319 --> 00:04:57,600
I don't think there's anything similar will
be the future. Well, I mean

71
00:04:57,720 --> 00:05:00,600
client development, for sure, there
are other future there's a future involving mars.

72
00:05:00,639 --> 00:05:05,240
I don't think it needs webisely,
it might, right, I hope

73
00:05:05,279 --> 00:05:11,160
it does. Actually, let's talk
to Elon. I would really like to

74
00:05:11,199 --> 00:05:15,079
hear a show about why Microsoft chooses
technology like React in their products instead of

75
00:05:15,160 --> 00:05:19,800
Blazer. And his example that hecites
is the new version of Teams, So

76
00:05:19,959 --> 00:05:26,639
Teams two point zero. They moved
off of Electron and they're now using React,

77
00:05:26,680 --> 00:05:30,040
and Bear says, what are the
reasoning behind such choices? Yeah,

78
00:05:30,120 --> 00:05:31,560
I'd love to hear your thoughts,
Carl. Yeah, Well, my thought

79
00:05:31,639 --> 00:05:38,360
is they like to choose stuff that's
done and used and established, and not

80
00:05:38,399 --> 00:05:42,279
that Blazer isn't done. But it's
still, as you say, I'm moving

81
00:05:42,279 --> 00:05:46,639
target because of what's happening with Blazer
United. They're still innovating, do you

82
00:05:46,720 --> 00:05:47,879
know what I mean? Yeah?
No, I think I think you're you're

83
00:05:47,959 --> 00:05:51,680
right, yeah, yeah. More
importantly, it's like you're only hearing about

84
00:05:51,680 --> 00:05:58,360
the move to react now when they're
finished. How long have they been working

85
00:05:58,360 --> 00:06:02,000
on it? Two years? So
what was Blazer like two years ago?

86
00:06:02,720 --> 00:06:06,120
Right? And like getting to the
other reality that we know very well,

87
00:06:06,120 --> 00:06:10,800
which is Microsoft is not one big
company, right, it's many different groups,

88
00:06:10,800 --> 00:06:14,040
and the team's group gets to make
their own choices, right, and

89
00:06:14,160 --> 00:06:19,399
they support open source, even open
source made by Facebook. So yeah,

90
00:06:19,480 --> 00:06:23,120
I mean I think that choice was
made a long time ago when there weren't

91
00:06:23,120 --> 00:06:26,600
alternative. It's a good choice and
they made a good choice. And it

92
00:06:26,600 --> 00:06:30,480
doesn't mean that they don't change the
stack for teams three point zero because because

93
00:06:30,680 --> 00:06:35,720
what's the alternative, Like they come
out with something that uses what Blazer not

94
00:06:35,759 --> 00:06:41,360
even Blazer six, Right, it
would have been earlier than that. Yeah.

95
00:06:41,399 --> 00:06:45,279
The love affair you have with Blazer
right now is recent. Yeah,

96
00:06:45,959 --> 00:06:49,000
Yeah, we saw the potential long
ago, but when you actually need to

97
00:06:49,120 --> 00:06:56,519
rebuild a product that's used by literally
hundreds of millions of people, you have

98
00:06:56,560 --> 00:06:59,120
to have some pretty good confidence that
that framework is going to do everything you

99
00:06:59,120 --> 00:07:01,600
needed to do. It isn't going
to change and disrupt everything. I think

100
00:07:01,600 --> 00:07:04,759
that's the more important thing, right, I would react totally fair, So

101
00:07:04,759 --> 00:07:08,319
Bart, I hope that addresses your
question. I don't know if there's a

102
00:07:08,360 --> 00:07:11,120
show in there or not, but
I'm not saying I wouldn't do it either,

103
00:07:11,279 --> 00:07:14,240
although I might actually do it.
Over on run as Radio, we're

104
00:07:14,319 --> 00:07:17,079
talk a fair bit more about teams
in the M three sixty five context.

105
00:07:17,720 --> 00:07:24,920
Bart did end is his message with
dot net rocks rocks and we think so

106
00:07:25,040 --> 00:07:28,199
too. Yeah, we do.
And a copy of ustic Code Buy is

107
00:07:28,199 --> 00:07:30,839
on its way to un If you'd
like a copy of music Code by right

108
00:07:30,920 --> 00:07:33,720
a comment on the website at dot
net rocks dot com or on Facebook.

109
00:07:33,800 --> 00:07:38,079
We publish every show there as well, and if I read your comment,

110
00:07:38,199 --> 00:07:41,120
we'll send you copy of music Code
Buy. And you know, you can

111
00:07:41,120 --> 00:07:44,319
follow us on Twitter if you like. That's great. But the real cool

112
00:07:44,600 --> 00:07:48,639
people are over on mastadon, so
follow us there. I'm at Carl Franklin

113
00:07:48,720 --> 00:07:53,720
at tech hub dot social, and
I'm Rich Campbell at mastadon dot social.

114
00:07:53,879 --> 00:07:59,399
Send us a two ruty two two
and let's bring on an old friend of

115
00:07:59,439 --> 00:08:03,079
dot net X. We haven't talked
to Jacob Wow since what twenty sixteen?

116
00:08:03,120 --> 00:08:07,959
I think, Yeah, So this
is going to be all about peach pie

117
00:08:07,959 --> 00:08:11,319
on web assembly, and Jacob Mischik
is a veteran dot net developer. He's

118
00:08:11,319 --> 00:08:15,560
going to tell you all about it. He's a co founder of io level,

119
00:08:15,959 --> 00:08:20,519
where he's working on the peach pie
compiler platform, co founder of dev

120
00:08:20,639 --> 00:08:24,319
sense, where he's providing advanced PHP
development tools for visual Studio and vs code.

121
00:08:24,759 --> 00:08:31,000
He's a sports enthusiast and PhD candidate
in software engineering in the Charles University

122
00:08:31,040 --> 00:08:35,639
in Prague. Welcome back, Hider, Hey, great, great to be

123
00:08:35,759 --> 00:08:39,879
back. I was asking Jacob how
how I pronounced his name and he gave

124
00:08:39,919 --> 00:08:41,559
me this pronunciation and I said,
well, what does your mother call you?

125
00:08:41,600 --> 00:08:48,000
And he says son? So I
almost did it. I love his

126
00:08:48,080 --> 00:08:52,279
son is a veteran dot neet developer. No never, Okay, remind us

127
00:08:52,279 --> 00:08:56,919
what peach pie is, all right. So peach pie is a compiler of

128
00:08:58,240 --> 00:09:03,120
PHP language into the dot neet assembly. So it's actually the same compiler as

129
00:09:03,120 --> 00:09:11,720
a C sharp compiler. It translates
the language into into this managed bytecode MSIL

130
00:09:13,559 --> 00:09:20,840
but it's not just a compiler.
It's also the whole supporting Grundtime library and

131
00:09:20,080 --> 00:09:26,320
all the PHP extensions reimplemented into the
c sharp language. So it's really the

132
00:09:26,480 --> 00:09:35,240
complete PHP language platform, including support
for visuals to do image studio code for

133
00:09:35,480 --> 00:09:39,320
dot Net. So it's completely managed. It is surprising to you as it

134
00:09:39,360 --> 00:09:43,799
is to me, that there isn't
PHP support in Visual Studio and in dot

135
00:09:43,799 --> 00:09:48,679
Net just in the box. Actually
there is like small support and visuals to

136
00:09:48,720 --> 00:09:52,639
do like like text or syntax,
highlighting, syntax, colorization. Actually I

137
00:09:52,679 --> 00:09:58,919
have a second product which fully integrates
the native PHP Intevidual Studio because it's it's

138
00:10:00,159 --> 00:10:03,000
not there yet, okay, And
there's real a lot of people working in

139
00:10:03,039 --> 00:10:09,240
Visual Studio and they just need to
work with PHP as well. So right,

140
00:10:09,440 --> 00:10:11,360
yeah, so that's it, and
we want something a little bit better

141
00:10:11,399 --> 00:10:16,000
than just a text editor. We
want we want to compile right to dot

142
00:10:16,000 --> 00:10:18,799
Net. We have to live in
the studio, right, we have all

143
00:10:18,840 --> 00:10:20,919
our tools at a disposal. Yeah, wow, that's very cool. So

144
00:10:22,000 --> 00:10:28,080
the story now is web assembly support. Yeah? Right? Uh so,

145
00:10:28,080 --> 00:10:33,840
so we did it like a year
ago and then just we didn't to care

146
00:10:33,879 --> 00:10:39,360
about it. But once you once
you once I say your email, I

147
00:10:39,480 --> 00:10:45,039
was surprised, as you'll remember.
Actually it's pretty cool because having a compiler

148
00:10:45,320 --> 00:10:50,960
of some language into dot net is
giving you great opportunities because once you have

149
00:10:50,039 --> 00:10:56,200
a language compile to dot net,
you can do anything without actually doing anything,

150
00:10:56,240 --> 00:11:01,799
because everything is just managed by Microsoft
and all the great people working on

151
00:11:01,840 --> 00:11:05,320
the project. So right, once
you get to I L you're you're smooth

152
00:11:05,360 --> 00:11:09,200
sailing. Yeah, but you have
debugging, you have like performance profiling,

153
00:11:09,720 --> 00:11:16,200
and you have webossimbly as well.
So we just we just actually tried it.

154
00:11:16,600 --> 00:11:22,960
We compiled PHP into msile and we
run it on webostibli, which is

155
00:11:22,960 --> 00:11:26,720
actually like monoun time, right,
it's actually mondoun time hooked into your browser

156
00:11:28,840 --> 00:11:35,159
like interpreting your msile code, and
it magically works with compiled PHP as well.

157
00:11:35,159 --> 00:11:39,960
It didn't even notice it's it's not
C sharp, right. So one

158
00:11:39,000 --> 00:11:43,799
big use case that comes to mind
is you have a Blazer application and then

159
00:11:43,840 --> 00:11:48,279
there's some you know, maybe some
I don't know, scientific or financial or

160
00:11:48,320 --> 00:11:54,159
other kind of academic routines in PHP
that you want to include, and rather

161
00:11:54,679 --> 00:11:58,679
try to convert the source code from
PHP two C sharp and get it running

162
00:11:58,679 --> 00:12:03,000
that way, you can just turn
it into an assembly and it's work.

163
00:12:03,279 --> 00:12:09,320
You can create its own an assembly
class library with it and just add it

164
00:12:09,320 --> 00:12:11,399
to your right project. Right,
you can. You can have it all

165
00:12:11,440 --> 00:12:16,480
in the same directory, your PHP
everything. It can have few project files,

166
00:12:16,519 --> 00:12:20,279
one project file for HR, one
project file for PHP. It gets

167
00:12:20,320 --> 00:12:28,480
linked together, and you can even
like communicate between HP, Php, JavaScript,

168
00:12:28,039 --> 00:12:35,279
everything together. Everything gets like native
marshaled into into dot net, so

169
00:12:35,519 --> 00:12:39,399
so nobody knows what's the other language. Actually, you can now call JavaScript

170
00:12:39,519 --> 00:12:43,600
right from PHB and vice versa,
and really everything together. We can even

171
00:12:43,679 --> 00:12:50,759
have a component in your Blazer website, in your Blazer page which is in

172
00:12:50,840 --> 00:12:54,600
PHB and the rest of the page
is in C sharp. So okay,

173
00:12:54,679 --> 00:13:01,799
So so you've got a page or
a component and you might have inline uh

174
00:13:01,039 --> 00:13:05,879
you know, mark up control statements
at if and all that stuff which is

175
00:13:05,919 --> 00:13:11,440
C sharp or before each or whatever. But then you call in a co

176
00:13:11,559 --> 00:13:16,279
behind file, right, your co
behind file can be in PHP rather than

177
00:13:16,320 --> 00:13:20,120
c sharp, right, you can. You can have either cod behind file

178
00:13:20,240 --> 00:13:24,919
in PHP or like PHP. Developers
are web designers as well. They like

179
00:13:26,000 --> 00:13:28,759
half of the half of the projects, half the PhD projects are front ends

180
00:13:28,960 --> 00:13:35,080
sure, so they have a lot
of front end controllers in PHB like PHP,

181
00:13:35,200 --> 00:13:41,000
slash slash HTML, so you can
you can even have a part of

182
00:13:41,080 --> 00:13:48,679
your Blazer page as a PHB rendered
with PHP, rendered with PHP rather than

183
00:13:48,720 --> 00:13:54,480
the Blazer component model, rather than
YEP. Because because you can create like

184
00:13:54,919 --> 00:14:01,039
small five flying code which represents a
component in Blazer t sharp and incited control.

185
00:14:01,120 --> 00:14:07,240
You can render your PHP using our
peachpi API. Like we can put

186
00:14:07,240 --> 00:14:11,519
it all together and in the end
you don't even know what language you are

187
00:14:11,559 --> 00:14:16,840
actually using. Now I'm baffled because
phpgim was like HP dot net web forms,

188
00:14:16,879 --> 00:14:22,159
like it was a server side technology
that's spat out HTML and then you

189
00:14:22,279 --> 00:14:26,840
posted back to the to the server
to execute more PHP to render something else.

190
00:14:26,919 --> 00:14:31,279
Like all those metaphors involve a trip
to the server, like what happens

191
00:14:31,279 --> 00:14:35,399
when you're living in a client.
There's all the differences actually because like when

192
00:14:35,399 --> 00:14:41,000
you're working with PHPU are you expect
the server? Yeah, and the filesystem

193
00:14:41,039 --> 00:14:48,480
and database and everything. So actually
we don't we don't have to care about

194
00:14:48,480 --> 00:14:52,240
it because there is this dot and
standard library and all the phpcause all the

195
00:14:52,320 --> 00:14:58,000
PHP APIs are translated to something dot
Net in the end. So wow,

196
00:14:58,159 --> 00:15:05,039
if it throws any exceptions like not
supported exception, it just does. We

197
00:15:05,159 --> 00:15:07,759
can't we can't do anything about this
web world. So which is going to

198
00:15:07,879 --> 00:15:11,399
keep running? Right? It just
keeps wrong? Resumed next. Yeah,

199
00:15:11,399 --> 00:15:13,440
but you can. You can implement
almost anything. So if you if you

200
00:15:13,519 --> 00:15:18,799
miss a feature like filesystem or anything, it can just just creates a file

201
00:15:18,840 --> 00:15:22,200
system provider and make happy noises.
It makes happy noises. Yeah, you

202
00:15:22,279 --> 00:15:26,559
can. You can have some virtual
file system behind and it will work.

203
00:15:26,759 --> 00:15:30,399
Right. I mean, now you're
talking about PHP as SPA. That's essentially

204
00:15:30,480 --> 00:15:33,960
what it is, a single plage
application as a single plage application, right

205
00:15:33,039 --> 00:15:37,799
that all of it will be executing
in the browser and then possibly calling what

206
00:15:37,960 --> 00:15:41,399
it thinks are back end components,
but are actually just components in dot Net

207
00:15:41,440 --> 00:15:46,399
that are making the remote called or
fetch data. It's PHP as SPA.

208
00:15:46,679 --> 00:15:50,000
That's right. We should we should
call it. We should call it allid

209
00:15:50,039 --> 00:15:54,200
it, we should call it.
Yeah. Yeah, because when you hear

210
00:15:54,279 --> 00:15:58,559
peach pie, I'm thinking raspberry pie, which is you know, it's still

211
00:15:58,559 --> 00:16:03,320
a fruit in front of the word
I so what pitch? Yeah, I

212
00:16:03,440 --> 00:16:07,679
get it now. Yeah, I
think we were looking for a fruit actually

213
00:16:07,720 --> 00:16:11,879
because everything right that time was through
it so well. In peach Pie has

214
00:16:11,960 --> 00:16:15,399
PHP in it, Like I get
it. I do equate it that way.

215
00:16:15,440 --> 00:16:18,399
I don't know that you can give
up on that brand just yeah,

216
00:16:18,399 --> 00:16:23,759
but this peach Pie spot just amuses
me, right, or because that's effectively

217
00:16:23,799 --> 00:16:27,320
what you're doing, even though it's
not necessarily the same set of metaphors.

218
00:16:27,399 --> 00:16:32,799
It's like, now this would work. It's just weird. It makes sense.

219
00:16:33,039 --> 00:16:37,159
I will use it somewhere because actually, since we have it all managed

220
00:16:37,200 --> 00:16:40,639
and we can like play around and
we have our own run time, we

221
00:16:40,679 --> 00:16:47,159
can do like stuff like for example, PHPs lifts within its request. Once

222
00:16:47,159 --> 00:16:51,799
the request ends, everything you did
in your PHP code, all the memory

223
00:16:51,919 --> 00:16:56,240
or the arriables, everything just dies. Right. But with peach Pie,

224
00:16:56,320 --> 00:17:02,519
we actually don't have this single pro
like multiple process approach. We have multiple

225
00:17:02,799 --> 00:17:08,440
multi threaded approach, so other requests
are threads and we can keep things living

226
00:17:08,680 --> 00:17:14,519
in the process. So for example, with the web assembly, we can

227
00:17:14,640 --> 00:17:21,480
like keep the context of the application
living across more requests, so you can

228
00:17:21,559 --> 00:17:27,720
gain a great performance booths because like
eighty percent of for example, eighty percent

229
00:17:27,799 --> 00:17:34,400
of empty Larva page is just initializing
stuff and loading classes and declarations and everything,

230
00:17:34,440 --> 00:17:37,960
and we can do it just once
and keep it in memories. So

231
00:17:37,319 --> 00:17:45,039
there's a great possibilities, like we
could do it if someone would care.

232
00:17:45,799 --> 00:17:51,400
You know what's interesting about that is
that UM web assembly isn't really fully getting

233
00:17:51,680 --> 00:17:56,599
multi threaded support the plays or web
assembly until that and at eight. But

234
00:17:56,759 --> 00:18:00,759
there's there's like a little preview.
Now you can take a look at it.

235
00:18:00,799 --> 00:18:07,480
But but you're but web assembly obviously
can be multi threaded, so you're

236
00:18:07,480 --> 00:18:11,839
taking advantage of that even before Blazer
does. Yeah, there's a lot of

237
00:18:12,880 --> 00:18:18,599
things related. First, it's not
multi threaded, but it's a sink,

238
00:18:18,799 --> 00:18:23,480
so okay, you can. You
can run small tasks in a row.

239
00:18:26,759 --> 00:18:29,960
But PAHP is not a sink.
So so which when you say it's not

240
00:18:30,079 --> 00:18:34,519
multi threaded, do you mean peach
Pie web assembly or Blazer like web assembly

241
00:18:34,880 --> 00:18:41,559
is uh as I remember as I
remember when I was using it, it's

242
00:18:41,559 --> 00:18:48,039
everything the JavaScript was not multi threaded
because it's not ready for it yet.

243
00:18:48,319 --> 00:18:52,480
You don't have any any critic sections, any monitors, any locks, So

244
00:18:52,519 --> 00:18:56,440
I think it's purely a sin a
sink, so you can, okay,

245
00:18:56,559 --> 00:19:02,160
you can put your small tasks into
the task schedule awaited them and it will

246
00:19:02,200 --> 00:19:10,359
get executed somewhere. Peachbot is multi
tredit, but since we have to behave

247
00:19:10,480 --> 00:19:15,759
like PHP, we we just behave
like we are not multi tredit. So

248
00:19:15,799 --> 00:19:21,319
I'm reading from web Dot dev Slash, web Assembly Dash threads and it says

249
00:19:22,640 --> 00:19:26,200
a web assembly threads support is one
of the most important performance additions to web

250
00:19:26,200 --> 00:19:30,039
assembly, and this is from July
twenty twenty one. It allows you to

251
00:19:30,039 --> 00:19:33,160
either run parts of your code in
parallel or on separate cores, or on

252
00:19:33,200 --> 00:19:38,519
the same code over independent parts of
the input data, scaling it to as

253
00:19:38,559 --> 00:19:44,799
many cores as the user has,
and significantly reducing all overall execution time.

254
00:19:45,160 --> 00:19:48,920
So awesome. I know there is
a like opened issue on on Blazer that

255
00:19:49,000 --> 00:19:53,960
Microsoft should do it. It's r
and there's a framework you know or how's

256
00:19:53,960 --> 00:20:00,440
it called UNO which is multi tredit. Yeah, but PHP is not so

257
00:20:00,240 --> 00:20:06,039
well. It looks like web assembly
has multi threading through this worker's thing from

258
00:20:06,119 --> 00:20:11,279
JavaScript that web assembly does have multi
threading, but a question is can those

259
00:20:11,319 --> 00:20:15,920
workers work like threads? Yeah,
I'm not sure. I'm going to post

260
00:20:15,960 --> 00:20:19,519
this link so Richard can add it. I was actually recently doing a like

261
00:20:21,480 --> 00:20:27,480
extension for wes code running in browser, and I took our extension written in

262
00:20:27,519 --> 00:20:33,279
c sharp in dot net and we
just compiled it to web assembly and running

263
00:20:33,319 --> 00:20:37,440
it in wes code in browser.
Nice, just like that. So we

264
00:20:37,519 --> 00:20:42,279
had a problem with threading because we
just couldn't couldn't start threads. All the

265
00:20:42,319 --> 00:20:49,400
threads were just queuing after each other
and we may have to use the workers

266
00:20:49,440 --> 00:20:55,200
worker constructor to create them. Yeah, but they couldn't talk to each other

267
00:20:55,319 --> 00:20:57,720
very well, so we couldn't share
a memory. We had to we had

268
00:20:57,759 --> 00:21:03,599
to use some kind of Okay,
now I'm reading that there's a shared array

269
00:21:03,680 --> 00:21:07,960
buffer, Yeah, something like that. It's not the threading as we are

270
00:21:07,119 --> 00:21:14,119
used to put a convenient way right
anyways. Anyways, Well, that's good

271
00:21:14,160 --> 00:21:17,880
to know that you're thinking about it
and that you know eventually it'll work itself

272
00:21:17,920 --> 00:21:25,079
out. Yeah, definitely, one
day. It would great. It would

273
00:21:25,119 --> 00:21:30,039
be great for PHP because they're like
trying to get the benefit of threats,

274
00:21:30,960 --> 00:21:34,240
but it's it's not the fullidare yet. Well, yeah, because that whole

275
00:21:34,480 --> 00:21:41,240
worker role thing in the browser has
always been a bit wonky. I don't

276
00:21:41,480 --> 00:21:44,079
I don't know if it's stayed back
now because websembly is pressed against it.

277
00:21:44,119 --> 00:21:47,599
I hope it is. But right, you used to you used to be

278
00:21:47,640 --> 00:21:49,559
able. We always will proposed this
idea of you're gonna be able to call

279
00:21:49,640 --> 00:21:53,880
this worker helper and it's going to
be able to run this thing independently,

280
00:21:53,960 --> 00:21:57,640
but it never seemed to actually work
like that. Yeah, but I think

281
00:21:57,640 --> 00:22:00,680
that's different when you look at the
webs level and you're literally running inside the

282
00:22:00,720 --> 00:22:04,440
context where JavaScript would normally run and
say, hey, I just want to

283
00:22:04,440 --> 00:22:08,240
be able to do these things because
I don't think a PHP is multi threaded

284
00:22:08,279 --> 00:22:11,880
either, right, Like normally you're
going back to a server with a short

285
00:22:11,960 --> 00:22:17,200
lived instance that executes and dies and
so you know, yeah, maybe using

286
00:22:17,279 --> 00:22:19,640
multiple threads, but they've got not
do with each other. Right, There

287
00:22:19,720 --> 00:22:26,000
is no like native support for threads. There's an extension for doing things on

288
00:22:26,039 --> 00:22:30,720
a bag round tread, but again
it's not like we are used to from

289
00:22:30,920 --> 00:22:34,200
HR. But you can share of
variables and do stuff like because we're living

290
00:22:34,200 --> 00:22:37,480
in webland where all of this stuff
is on the server and short lived,

291
00:22:37,640 --> 00:22:42,000
Like, why would you spend the
energy setting up a bunch of threads when

292
00:22:42,000 --> 00:22:45,559
you're going to tear them down in
a few seconds anyway. Ye are there

293
00:22:45,599 --> 00:22:51,759
any other implementations of PHP as a
client only? Uh? System? Actually,

294
00:22:51,759 --> 00:22:59,119
there is a native PHP running as
a web assembly, so I think

295
00:22:59,119 --> 00:23:07,400
they even got through running Droople framework
people in browser with with squill light uh,

296
00:23:07,839 --> 00:23:11,920
and it seems to work. I
haven't noticed like anyone using it actually,

297
00:23:12,000 --> 00:23:17,759
but it's there. The only downside
is it's pretty large. You have

298
00:23:17,799 --> 00:23:22,200
to download like ten twenty makeabytes of
data. You're talking about Droople though,

299
00:23:22,599 --> 00:23:26,160
that's big duple and the PHP run
time itself, because yeah, you have

300
00:23:26,240 --> 00:23:30,119
to download the whole PHP run time. Okay, As a web assembly,

301
00:23:30,319 --> 00:23:34,759
you're just boumbing around GitHub. I
think I've found three web assembly run times

302
00:23:34,759 --> 00:23:40,400
for PHP, so people are experimenting, right. Two of them are dead

303
00:23:40,480 --> 00:23:45,880
already. There's just one one alive
when it's driving. And obviously the performances

304
00:23:47,000 --> 00:23:51,359
of your code is going to increase
when it's running in web assembly versus when

305
00:23:51,400 --> 00:23:56,200
it's on the server. It's not
a system like Blazer where right, where

306
00:23:56,200 --> 00:24:02,160
there's like a yeah, a graph
for every user on the server. And

307
00:24:02,960 --> 00:24:06,599
you know, it's not like Blazer's
server. So I guess when you take

308
00:24:06,680 --> 00:24:10,880
code that you've run on the server
and then now move it to the client.

309
00:24:11,799 --> 00:24:15,640
There's going to be a performance increase
in many many situations, isn't there.

310
00:24:15,839 --> 00:24:19,039
Oh yeah, there will be an
increase because you have the whole PC

311
00:24:19,160 --> 00:24:25,880
dedicated to your request, right,
so the response will be immediate. You

312
00:24:25,960 --> 00:24:27,119
don't have to wait for a network, you don't have to wait for the

313
00:24:27,160 --> 00:24:32,319
server, and the server doesn't have
to process like thousands of users at many

314
00:24:32,359 --> 00:24:37,960
time. But at the same time, there might be a performance decrease because

315
00:24:38,319 --> 00:24:45,039
it's still running on a mono run
time and it's actually not compiled to the

316
00:24:45,079 --> 00:24:48,160
machine code, right, it's interpreted
right as far as I know, because

317
00:24:48,279 --> 00:24:53,200
like, yeah, we are trying
to make it a running, compiled native

318
00:24:53,240 --> 00:24:57,319
ahead of time, which will be
a thin one right. Sure, Yeah,

319
00:24:57,359 --> 00:25:03,200
Now let's star you're bringing this up
um. Web assembly requires that it

320
00:25:03,279 --> 00:25:07,480
downloads well until Blazer United, which
will be great. It requires that it

321
00:25:07,519 --> 00:25:12,359
downloads all the DLLs in web and
assemblies that it needs before it can run.

322
00:25:14,079 --> 00:25:18,480
And so what is peach pie on
web assembly? How big is that

323
00:25:18,720 --> 00:25:26,279
download? Yeah? We actually we
actually designed it with this in mind because

324
00:25:26,680 --> 00:25:33,200
we wanted to take advantage of assembly
trimming and make the resulting published assemblies as

325
00:25:33,240 --> 00:25:38,319
small as possible. So we are
actually doing a small trick during the compilation,

326
00:25:38,920 --> 00:25:47,920
and we are creating a table of
used classes and methods so the trimming

327
00:25:48,160 --> 00:25:55,039
knows the methods are used and it
won't just cut them off otherwise peach piece

328
00:25:55,079 --> 00:25:59,039
of dynamic language and you never know
what metal to what function will be called.

329
00:25:59,519 --> 00:26:07,039
So we're just annotating and using this
trick to avoid trimming stuff that will

330
00:26:07,079 --> 00:26:12,960
be used, it will be called, and the result you can get everything

331
00:26:14,359 --> 00:26:18,440
trimmed and published to like four to
six megabytes. Wow. And that's on

332
00:26:18,480 --> 00:26:23,240
top of the basic web assemblies including
dot net, including dot neet run time,

333
00:26:23,279 --> 00:26:27,359
oh including Oh okay, so that's
about That's about what it is anyway,

334
00:26:27,400 --> 00:26:30,039
isn't it It's like two two and
a half megabytes right now? Some

335
00:26:30,400 --> 00:26:34,440
Yeah, if it's a small PHB
app just just a few classes and everything,

336
00:26:34,480 --> 00:26:38,079
it's just nothing. Yeah, okay, so nothing to worry about if

337
00:26:38,079 --> 00:26:45,640
you have pdbs embedded so you can
debugging everything, which is awesome because you're

338
00:26:45,720 --> 00:26:49,079
like debugging PHB and the Whisle studio
and we just did it. Doesn't even

339
00:26:49,079 --> 00:26:55,640
know it's PHP. I like it. It's like ten megabytes, which is

340
00:26:56,319 --> 00:27:00,240
which is all right? M So
what happens in the world of plays are

341
00:27:00,279 --> 00:27:06,119
United? When you know there you
can start off with a Blazer server application

342
00:27:06,279 --> 00:27:10,559
and then it will download all the
assemblies in the background. Is there any

343
00:27:10,559 --> 00:27:14,160
way that peach Pie can sort of
ride that bandwagon? I think I'm a

344
00:27:14,200 --> 00:27:18,720
little bit like, I don't know
what's Blazer United yet. Oh okay,

345
00:27:18,799 --> 00:27:22,000
a little bit. We're gonna have
to talk to you later kind about this

346
00:27:22,279 --> 00:27:27,720
because there I think there's an opportunity. I don't know though, I don't

347
00:27:27,759 --> 00:27:33,279
know. I mean, but if
you're basically talking about dot net assemblies just

348
00:27:33,599 --> 00:27:36,160
going from the server to the client, you might be able to hit your

349
00:27:36,200 --> 00:27:38,680
ride on that. So essentially what
it means is if you're familiar with Blazer

350
00:27:40,160 --> 00:27:45,559
Server in Blazer Web assembly in the
two different models, Blazer server uses signal

351
00:27:45,759 --> 00:27:51,119
R as a circuit in the background
too, and it keeps a graph of

352
00:27:51,240 --> 00:27:56,119
the dom for each user in memory. And when there's some code change,

353
00:27:56,240 --> 00:28:00,079
some UI code change, or whatever
you want to call some code, it

354
00:28:00,160 --> 00:28:06,519
happens dynamically through signal R and on
the server the code is executed and then

355
00:28:06,559 --> 00:28:08,839
it looks at a diff of you
know, the dom and what has changed,

356
00:28:08,880 --> 00:28:15,279
and it sends back these really small
binary messages through JavaScript that updates the

357
00:28:15,759 --> 00:28:21,519
browser. So so it's fast,
right, that's how it was before,

358
00:28:21,599 --> 00:28:26,079
right I remember, Yeah, I
remember Blazer is putting IDs in generally it

359
00:28:26,160 --> 00:28:32,319
remembers the dump tree with little i
ds. It just updates the element.

360
00:28:32,559 --> 00:28:36,559
It's like magic the changes. Yeah, and so it's so what happens now

361
00:28:36,880 --> 00:28:40,799
is Blazer web assembly. Of course, you have to wait for everything to

362
00:28:40,799 --> 00:28:45,440
be downloaded. So they have this
automode in Blazer United that you start on

363
00:28:45,519 --> 00:28:49,079
the server and in the background all
the web assembly DLLs get downloaded and when

364
00:28:49,119 --> 00:28:52,519
they come to life, boom,
you're running on the client. And that's

365
00:28:52,559 --> 00:28:56,079
really cool. So and I think
that's going to be the future of Blazer.

366
00:28:56,119 --> 00:28:59,720
It's just going to be called Blazer. There won't be a I mean

367
00:29:00,079 --> 00:29:03,200
is United of course. But all
right, yeah, so wouldn't be cool

368
00:29:03,240 --> 00:29:07,880
if you guys could sort of hit
your ride in that mechanism. So you

369
00:29:07,920 --> 00:29:11,359
should be talking to Steve Sanderson,
all right. I think like a year

370
00:29:11,359 --> 00:29:17,920
ago, we've been working with a
student from our university, Thomas Thomas,

371
00:29:18,079 --> 00:29:22,640
which Thomas was it. It was
that Thomas who suck another another guy and

372
00:29:22,680 --> 00:29:32,880
he was actually building an SDK for
Blazer and PHP and he created a Blazer

373
00:29:32,920 --> 00:29:37,200
control which behaves like an element in
the in this domtree, but it renders

374
00:29:37,240 --> 00:29:41,680
PHP inside it, and it could
do this kind of stuff like it remembers

375
00:29:41,880 --> 00:29:47,599
what was changed and it could send
just the differences. Yeah. I think

376
00:29:48,000 --> 00:29:52,920
this is the peas right that you
sent. That's the one. That's the

377
00:29:52,960 --> 00:29:56,880
one. We still need to update
it to the latest dot net but it's

378
00:29:56,880 --> 00:30:00,480
in dot neet five right now.
Wow. But there's a part time that

379
00:30:00,960 --> 00:30:03,400
we are doing this kind of stuff. Fantastic. This component is really I

380
00:30:03,480 --> 00:30:08,960
think it can change just just the
stuff that was that was changed, and

381
00:30:10,000 --> 00:30:14,799
you can. We can. We
even have an API for for PHP code

382
00:30:14,799 --> 00:30:21,000
itself, so developers can just changed
only the stuff they want to, like

383
00:30:21,079 --> 00:30:23,759
in the reactor or other frameworks.
And gentlemen, I need to interrupt for

384
00:30:23,839 --> 00:30:29,720
one moment for this very important message, and we're back. It's done that

385
00:30:29,839 --> 00:30:32,119
rock. So I'm Richard Campbell.
That's Carl Franklin. Hey, Hey,

386
00:30:32,279 --> 00:30:36,119
talking to our friend Jacob a bit
about PHP and web assembly and I was

387
00:30:36,160 --> 00:30:41,200
just thinking, Wow, we've come
a long way. Since Philanger. They

388
00:30:41,240 --> 00:30:45,559
we talked to Thomas PETRISEC back in
like two thousand and seven. Yeah,

389
00:30:45,640 --> 00:30:51,480
yeah, two thousand and seven,
early those early days. And but of

390
00:30:51,519 --> 00:30:56,400
course that project now I think in
fully an archive, it's become peach Pie,

391
00:30:56,480 --> 00:30:59,720
like it has a direct lineage.
Yeah exactly. Uh, like I

392
00:30:59,799 --> 00:31:07,799
was working on Phalinger like sixteen years
ago with Thomas. Thomas did a great

393
00:31:07,799 --> 00:31:15,279
stuff with silver Ete and implementing like
a lot of a lot of code that

394
00:31:15,839 --> 00:31:19,920
that that amount, that amount of
work. Yeah, and uh, it's

395
00:31:19,960 --> 00:31:27,279
actually pitch Pie is the incarnation of
Phalinger. Because we needed a new new

396
00:31:27,319 --> 00:31:33,119
platform. We needed to use rosalind
compile platform, we needed new dot Net.

397
00:31:33,799 --> 00:31:41,039
We needed to avoid the old system
reflection emit APIs because that's really slow.

398
00:31:41,839 --> 00:31:47,640
And thanks to this change, we
cut the compile time from like on

399
00:31:47,920 --> 00:31:53,200
large projects from two minutes to four
seconds. So Roslin the new dot net,

400
00:31:55,200 --> 00:32:00,160
new dotnet and Roslyn actually because we
can just emit code in parallel and

401
00:32:00,720 --> 00:32:07,200
without calling into the native system native
system stuff. So it was a great

402
00:32:07,279 --> 00:32:14,160
change. And I feel like with
about Somebody is also the reincarnation of silver

403
00:32:14,240 --> 00:32:19,759
Light. And this in functionality,
yes, it has the possibility at least.

404
00:32:20,480 --> 00:32:23,920
Yeah, you don't get Zammal for
free, right like, thank God,

405
00:32:23,960 --> 00:32:32,799
though thank God should die. Yeah, I you know, Billy,

406
00:32:32,880 --> 00:32:37,240
I love Billy, Billy love Samal. It doesn't mean I have to love

407
00:32:37,279 --> 00:32:42,119
sam And not a lot of m
VVM in your life either, right Like,

408
00:32:42,119 --> 00:32:44,000
But I think that's what I think
about. What I think abouts silver

409
00:32:44,079 --> 00:32:47,319
Light is well, yeah, VM
in Zammal with C sharp. Yeah,

410
00:32:47,359 --> 00:32:52,759
MVM is kind of required when you
use Samal and when you use Blazer.

411
00:32:52,319 --> 00:32:57,599
The consensus is it isn't really all
that important. There are other ways,

412
00:32:57,880 --> 00:33:00,200
yeah, yeah, and you can
you can do the same stuff like Thomas

413
00:33:00,960 --> 00:33:06,519
thirteen fourteen years ago, he did
a game in silver Light using PHP this

414
00:33:06,680 --> 00:33:13,119
helicopter. He was shooting stones or
something, and we actually achieved to make

415
00:33:13,160 --> 00:33:16,640
a game intimbly using PHP and Blazer
as well. So you can do that.

416
00:33:16,799 --> 00:33:21,400
Actually, wow, very cool.
And you're calling into the canvas for

417
00:33:21,480 --> 00:33:24,759
that. We are not rendering it. We are actually manipulating with HTM elements

418
00:33:25,880 --> 00:33:30,160
amazing PHP, so you can crazy. That's the other thing you can.

419
00:33:30,319 --> 00:33:37,200
You can call JavaScript right from your
PHP comer. PHP became a client cyclanguage,

420
00:33:37,640 --> 00:33:42,960
yeah, which I'm still just wrestling
with Yeah, it's an interesting way

421
00:33:42,960 --> 00:33:45,799
to think. You know, I
think I cut you off or change the

422
00:33:45,839 --> 00:33:51,960
subject when you just when you were
mentioning the AOT compilation ahead of time compilation

423
00:33:52,720 --> 00:33:57,599
feature of web assembly and Blazer in
particular, what were you going to say

424
00:33:57,599 --> 00:34:02,400
about that in the context of PHP. Yeah, it's it's a nightmare.

425
00:34:06,480 --> 00:34:10,679
No, because because in theory,
in theory, you cannot we cannot use

426
00:34:10,719 --> 00:34:17,199
it because PHP is a dynamic language
and you never know what API you will

427
00:34:17,239 --> 00:34:22,480
need to use. You never know
what functions will be called. So we

428
00:34:22,559 --> 00:34:25,679
have this switch in a compiler where
we can tell, Okay, if you

429
00:34:25,760 --> 00:34:30,719
are really sure our compiler discovered all
the functions that will be called, just

430
00:34:30,840 --> 00:34:38,119
go ahead. But in most cases
I would it's it's it's just just test

431
00:34:38,159 --> 00:34:43,920
it. Just do a lot of
tests otherwise. Otherwise, of course,

432
00:34:43,920 --> 00:34:45,840
in dynamic language you just never you
never know, you never know. We

433
00:34:46,159 --> 00:34:52,599
have we have some compiler options to
exclude, to exclude references to libraries like

434
00:34:53,599 --> 00:35:00,079
my ESQUL, microscl bosgress and so
on, so you can manually exclude references

435
00:35:00,119 --> 00:35:07,000
to those to those assemblies, which
helps server side things. Yeah, scripting,

436
00:35:07,039 --> 00:35:12,440
for example, we have the whole
dynamic compilation, so so you can

437
00:35:12,760 --> 00:35:17,559
do evil. It is it pronounced
evil like evil? I don't know.

438
00:35:19,280 --> 00:35:24,760
Ye. For us it's evil,
we call it evil. So you can

439
00:35:24,760 --> 00:35:29,800
turn it off to to make it
smaller, because without evil, you don't

440
00:35:30,000 --> 00:35:34,800
need the whole compiler, right,
sure, so it makes it smaller,

441
00:35:35,280 --> 00:35:38,840
and so and so on. So
if you are sure you are statically linking

442
00:35:39,000 --> 00:35:44,719
all the stuff you need, you
can you can turn the native head of

443
00:35:44,760 --> 00:35:49,519
time compilation on it and then it
works. We have some issues by people

444
00:35:49,519 --> 00:35:53,559
who tried it. Actually I wasn't
brave enough to try it with phpyet.

445
00:35:53,920 --> 00:36:00,119
Okay, I'm just reading those issues
and answering things like thank you for the

446
00:36:00,159 --> 00:36:07,320
issue. I hope you know what
you are doing? Um, yeah,

447
00:36:07,559 --> 00:36:10,320
that should be a great error message, right, or at least a warning.

448
00:36:10,400 --> 00:36:15,039
I hope you know what you're doing. It's your foot, Yeah,

449
00:36:14,079 --> 00:36:19,000
yeah, it should be. It
should be a warning message, although it's

450
00:36:19,000 --> 00:36:22,480
almost implied with every of the one
of those warnings. Yeah. We we

451
00:36:22,480 --> 00:36:28,639
have a similar warning in there for
for finalizers right in PHP, because in

452
00:36:28,679 --> 00:36:35,079
PHP you have this deterministic garbage collection, but in dotnet it's not deterministic.

453
00:36:35,159 --> 00:36:38,519
You never know when it happens,
and it happens on another threat. But

454
00:36:38,760 --> 00:36:44,440
in PHP it's always happening deterministically,
like at the end of the function or

455
00:36:44,559 --> 00:36:47,599
somewhere. You can expect it because
there is a reference counting implemented. So

456
00:36:47,880 --> 00:36:52,119
if anyone has a finalizer in their
PHP code, we just pop up a

457
00:36:52,199 --> 00:36:58,719
warning during the compilation time you have
a finalizer, it's it's not like it

458
00:36:58,840 --> 00:37:02,840
won't work, it just would work. Can you implement I disposable? You

459
00:37:02,880 --> 00:37:08,960
can implement it, but you have
to call it explicitly. Sure, well,

460
00:37:09,000 --> 00:37:14,199
I mean that's that's the indication,
right. Anytime I create an object,

461
00:37:14,280 --> 00:37:15,440
I look to see if it has
a disposed method, and if it

462
00:37:15,480 --> 00:37:19,800
does, I call it. That's
just something we've gotten used to. It's

463
00:37:19,840 --> 00:37:23,000
not net developers. That would be
nice. Yeah, uh, it's it's

464
00:37:23,000 --> 00:37:27,480
not there in PHP. Okay,
um, all right, I know what

465
00:37:27,519 --> 00:37:30,320
you're gonna say, Richard. Are
you sure? Yeah? I think so,

466
00:37:30,760 --> 00:37:34,159
go ahead, word press. Yeah, that's exactly where I was going.

467
00:37:35,719 --> 00:37:38,639
I mean, when you talk about
PHP, it's one of the largest

468
00:37:38,639 --> 00:37:43,360
applications of the world. It's the
most popular CMS in the world. It's

469
00:37:43,519 --> 00:37:47,960
bloody everywhere, and the PHP is
the back end of it. But now

470
00:37:49,000 --> 00:37:52,360
you could be running it in the
front end. This is not a good

471
00:37:52,400 --> 00:37:55,719
idea, but boy would be a
fun thought experiment, Like what would that

472
00:37:55,800 --> 00:38:00,960
even look like? All right?
So uh yeah, we have some discussion

473
00:38:00,079 --> 00:38:07,519
with community about it. I think
some people actually tried it. They ported

474
00:38:07,559 --> 00:38:13,679
it a lot of it already,
which is the biggest business framework for PHP.

475
00:38:14,159 --> 00:38:16,400
Right, But WordPress is something like
you just put it on the server

476
00:38:16,519 --> 00:38:21,440
and it works, yes, and
or more a saently you buy it for

477
00:38:21,519 --> 00:38:24,639
three bucks a month from a provider
somewhere, right. You don't even need

478
00:38:24,639 --> 00:38:29,880
to install it anymore really, and
you just you just download your plugins and

479
00:38:30,000 --> 00:38:34,599
themes from the dashboard. So right, it's totally different approach than than dot

480
00:38:34,599 --> 00:38:39,239
net. But in theory it works. We have it compiled in a normal

481
00:38:39,280 --> 00:38:45,400
way without the possembly and like twenty
megabytes so compiled. It's not that I

482
00:38:45,440 --> 00:38:47,440
would thought you would be bigger than
that. That's that's surprising. It's just

483
00:38:49,000 --> 00:38:54,880
it's a small project. Well,
but it's very file system based, so

484
00:38:55,079 --> 00:39:00,000
now you have the whole problem of
where do you put all the file Yeah?

485
00:39:00,159 --> 00:39:06,440
Uh, thankfully we have all the
filesystem APIs we have re implemented in

486
00:39:06,519 --> 00:39:10,039
c sharp, but we can do
whatever we want. So internally, internally

487
00:39:10,039 --> 00:39:16,440
we have this filesystem provider, and
just in case for just in the context

488
00:39:16,480 --> 00:39:21,960
of web assembly, we can just
reimplement it to behave like something else.

489
00:39:22,599 --> 00:39:28,559
Sure we uh, I'm sure web
assembly has or embrowser you can. You

490
00:39:28,559 --> 00:39:34,320
can have storage embrowsers so you can
upload your your files. Yeah you have.

491
00:39:34,559 --> 00:39:37,159
Yeah, it's a little little limited. I would also think like quick

492
00:39:37,239 --> 00:39:42,960
over SMB, which is sort of
the most bare metal way to communicate over

493
00:39:43,000 --> 00:39:46,480
the Internet safely for files, would
be pretty impressive, although if you still

494
00:39:46,519 --> 00:39:52,519
get the latencies in web assembly.
You have access to files within your local

495
00:39:53,239 --> 00:39:59,280
Webrew kind of thing, but it
isn't anything that you can really really access

496
00:39:59,320 --> 00:40:05,440
in use. But you do have, of course local storage right in session

497
00:40:05,480 --> 00:40:09,000
storage. Local storage. You get
five megabytes per per URL for whatever,

498
00:40:09,519 --> 00:40:13,400
and you could certainly use that.
But it isn't like you can just reach

499
00:40:13,440 --> 00:40:16,840
out and open a file and the
documents folder or that kind of or write

500
00:40:16,880 --> 00:40:20,760
a file in the system. Yeah, yeah, we could. We could

501
00:40:21,159 --> 00:40:24,719
bend the WordPress a little bit so
it wouldn't be that excessive with the file

502
00:40:24,800 --> 00:40:30,280
system access. But let's be clear, WordPress is already bent right, Like,

503
00:40:30,280 --> 00:40:31,920
it's not that. It's not a
stretch. People do crazy things that

504
00:40:32,000 --> 00:40:37,920
word pressed all the time. You
can do anything. There are extension points

505
00:40:37,960 --> 00:40:42,440
everywhere in the code. You can
really change everything. So so in this

506
00:40:42,519 --> 00:40:46,159
way, we could just disable some
functionalities to make it smaller and lighter.

507
00:40:46,800 --> 00:40:52,239
We could make something like a virtual
file system, so your files could be

508
00:40:52,280 --> 00:40:58,440
on some cloud provider. Maybe other
files would be behaving like they are because

509
00:40:58,440 --> 00:41:02,760
WordPress is touching all the files all
the time. It's it's just just calling

510
00:41:02,920 --> 00:41:09,039
file exists for for many things to
just check it's there, right, So

511
00:41:09,039 --> 00:41:14,280
we can just return like true true
is there is there? Now? Don't

512
00:41:14,280 --> 00:41:19,400
bother me with that. Here's an
even more ridiculous thought experiment. Um,

513
00:41:19,519 --> 00:41:24,119
last time I checked, Facebook still
uses PHP. Could they be shipping some

514
00:41:24,159 --> 00:41:29,280
stuff down the web assembly? Woll
would they? Does that even make sense?

515
00:41:29,960 --> 00:41:37,480
Client side Facebook even faster? That's
what that will have? Like two

516
00:41:37,519 --> 00:41:43,760
gigabytes right, easy? Be massive. I think they moved to h h

517
00:41:43,840 --> 00:41:47,000
VM right, and no portion of
the code is written in all the other

518
00:41:47,079 --> 00:41:52,719
languages. I think we spoke to
to some guys from Facebook and they are

519
00:41:52,880 --> 00:41:58,960
using all kinds of languages. PHP
is just a small portion of their of

520
00:41:59,000 --> 00:42:04,480
their codes that they which you expect
just because you started in one places,

521
00:42:04,480 --> 00:42:07,400
I mean you change. You know, once upon a time Twitter was written

522
00:42:07,400 --> 00:42:12,480
in ruby. There are still pieces
of ruby, right, and yeah,

523
00:42:12,480 --> 00:42:16,360
I think so, but but it's
any off the rails. Saying Facebook is

524
00:42:16,400 --> 00:42:21,840
PHP is any more correct than saying
Twitters and Ruby right, like the Yeah,

525
00:42:21,880 --> 00:42:24,960
that's where they started, but things
have changed several lists Twitter would be

526
00:42:25,039 --> 00:42:30,400
yes, well I thought you said
leaderless Twitter, but I wasn't going to

527
00:42:30,480 --> 00:42:35,320
say that. I like how Rich
Campbell has come around to my way of

528
00:42:35,360 --> 00:42:43,119
thinking about the crazy person in charge
of Twitter. Yeah, so at least

529
00:42:43,159 --> 00:42:46,119
at least it's fun. It is
fun. Um. So on the list

530
00:42:46,159 --> 00:42:51,159
of gotcha's, are there any we
we talked about sort of the threading and

531
00:42:51,199 --> 00:42:55,760
asynchronous stuff and some libraries that might
not be ready for the browser because they

532
00:42:55,800 --> 00:43:01,199
access serviicide things. Is there anything
else that is a gotcha that you're still

533
00:43:01,239 --> 00:43:08,840
battling with? Well, the database
is a question because the database libraries are

534
00:43:08,840 --> 00:43:14,719
working in the browser, but you
would have to you would have to call

535
00:43:14,760 --> 00:43:19,480
your database on the server, right, So it's a question about security and

536
00:43:20,000 --> 00:43:30,199
also performance because you frameworks like For
example, WordPress are making tons of escot

537
00:43:30,280 --> 00:43:35,480
queries within the samele requests, so
that would be slow, I guess.

538
00:43:36,639 --> 00:43:43,559
But you can bundle escal light sure. I think you can fit it into

539
00:43:43,599 --> 00:43:47,920
those few megabytes of storage, so
nice. You could access indextb, which

540
00:43:47,920 --> 00:43:52,000
would be I think better than sq
light. Esk light doesn't persist as it.

541
00:43:52,400 --> 00:43:57,559
I don't know. Yeah, I
don't think it does, but I

542
00:43:57,559 --> 00:44:00,400
could. I could be wrong.
Really. I think there's a just file

543
00:44:00,480 --> 00:44:02,679
and it can it can modify,
but it would it wouldn't Pursis this too,

544
00:44:02,960 --> 00:44:07,559
Yes, yeah, but it isn't
gonna It isn't gonna stay like a

545
00:44:07,639 --> 00:44:12,199
database stays, you know, probably
not to know. You have to if

546
00:44:12,199 --> 00:44:15,639
you want you can use it like
but then you have to sort of persist

547
00:44:15,679 --> 00:44:19,360
it with some other mechanism. Um. But an XTB would be good for

548
00:44:19,400 --> 00:44:22,039
a local database. But I think
that you know, there's there's lots of

549
00:44:22,079 --> 00:44:30,000
tech out there that's available in in
C sharp and you know Blazer that already

550
00:44:30,000 --> 00:44:32,880
does this. The problem is solved. So if you essentially hook hook into

551
00:44:32,920 --> 00:44:37,039
those things, then you can call
your APIs and you can call you know

552
00:44:37,119 --> 00:44:44,079
whatever using all the frameworks that are
already there and Blazer, but that's if

553
00:44:44,119 --> 00:44:47,159
you have a Blazer app that's calling
PHP. If you have a pure PHP

554
00:44:47,320 --> 00:44:53,239
app, maybe you can add the
Blazer components to you know, do your

555
00:44:53,320 --> 00:44:59,760
data management for your API stuff.
That sounds yeah, yeah, good luck

556
00:44:59,800 --> 00:45:06,960
with tell me good list. This
project part of your PhD thesis, well

557
00:45:07,199 --> 00:45:10,079
partially really. I mean you are
a PhD candidate, which I find fascinating

558
00:45:10,079 --> 00:45:15,480
because that means you're on the path
to actually be a computer scientist. You're

559
00:45:15,519 --> 00:45:21,280
clearly enamored of language and different operating
operating constructs there, So yeah, I

560
00:45:21,320 --> 00:45:28,119
think I started. I started my
PhD in the context of the other work

561
00:45:28,159 --> 00:45:30,639
I'm doing, which is the language
integration for a visual studio, where I'm

562
00:45:30,679 --> 00:45:37,039
doing a lot of like PHP control
flow analysis and data analysis and all the

563
00:45:37,079 --> 00:45:44,320
other stuff. So partially as because
the compiler is actually an analysis tool.

564
00:45:45,199 --> 00:45:50,760
It is. So I did a
lot of a lot of papers and presentations

565
00:45:50,800 --> 00:45:59,280
about code analysis and performance and maybe
like twenty percent of pitch pot is code

566
00:45:59,280 --> 00:46:05,159
analysis, so right, it is
a part of PhD. I had some

567
00:46:05,199 --> 00:46:12,679
papers about Phialinger, and I was
working with some other students on some academic

568
00:46:12,719 --> 00:46:16,280
papers on peach Pie as well.
So it is a part. Part of

569
00:46:16,280 --> 00:46:22,000
it is uh major part is my
other work where I'm doing like code diagnostics

570
00:46:22,079 --> 00:46:28,599
for for visuals to do. That's
connected. They talk about a PhD thesis

571
00:46:28,639 --> 00:46:34,239
as contributing to the art. So
you mean you're helping our industry grow.

572
00:46:34,280 --> 00:46:40,760
It's thinking around compilers. That's not
to make it too heavy. That's the

573
00:46:40,840 --> 00:46:45,239
gig, right, Yeah, so
maybe I should finish it right. And

574
00:46:45,360 --> 00:46:52,280
there's that too. I mean Neil's
bores PhD thesis was the atomic model,

575
00:46:52,360 --> 00:46:57,840
the idea that protons and neutrons are
in a nucleus surrounded by electrons. Like

576
00:46:58,400 --> 00:47:01,840
it's a lie we tell children and
adults, but it was a useful lie.

577
00:47:01,920 --> 00:47:05,639
And that literally, you know,
he contributed to the art, like

578
00:47:05,800 --> 00:47:08,159
I always think in those terms.
I talked to some of the working out

579
00:47:08,159 --> 00:47:13,199
a PhD. It's like, this
is your contribution to our body of knowledge.

580
00:47:13,280 --> 00:47:15,960
Of course, Yeah, that's that's
why I'm doing it. Yeah,

581
00:47:15,199 --> 00:47:20,840
sure, okay. He's awfully sarcastic, you know, and very humble.

582
00:47:21,000 --> 00:47:27,920
Never I'm not I know what it
means. Anyway, I'm I'm excited for

583
00:47:28,000 --> 00:47:30,360
you. It's it's fun to see
which you, which you group of you

584
00:47:30,440 --> 00:47:35,159
have pulled together here. Just you
know, it speaks to the power of

585
00:47:35,159 --> 00:47:37,960
web assembly once again, as if
we didn't think it was powerful enough already,

586
00:47:38,480 --> 00:47:44,880
that it is possible to take this
these tools and through your past work,

587
00:47:45,039 --> 00:47:47,360
not knowing this would ever be possible, be able to implement it into

588
00:47:47,519 --> 00:47:51,599
into the context of browser. Yeah, it's it's all thanks to the dotnut.

589
00:47:51,639 --> 00:47:54,719
It's it's really great. Yeah,
Like I saw the work of native

590
00:47:54,760 --> 00:48:01,000
PHP guys doing all the all the
work making assembly possible, but we just

591
00:48:01,400 --> 00:48:07,880
didn't have to do anything. We
just worked happy quickly. Yeah. Yeah,

592
00:48:07,079 --> 00:48:14,039
who's on the righteous path now?
So what's in your inbox? What's

593
00:48:14,079 --> 00:48:19,239
next for you? For me?
Yeah, in context of web assembly or

594
00:48:19,280 --> 00:48:24,360
whatever whatever. Actually, most of
the time I'm working on the PHB language

595
00:48:24,360 --> 00:48:30,320
integration for we just we just do
a code where we have tons of feedbacks

596
00:48:30,400 --> 00:48:39,760
and suggestions, so we are may
improving code analysis and actually we are doing

597
00:48:39,920 --> 00:48:46,039
AI completion like something like get up
compiled and stuff. But we are we

598
00:48:46,119 --> 00:48:50,840
have a deeper knowledge of PHB and
we have a lot of a lot of

599
00:48:50,840 --> 00:48:54,639
source coding PHB, so we can
make it a little bit smarter. So

600
00:48:54,719 --> 00:49:00,400
we are working on AI right now. Nice and preferments a lot of performance

601
00:49:00,480 --> 00:49:07,880
because PHP projects are huge. It's
really thousands and thousands of files, and

602
00:49:08,119 --> 00:49:15,760
people for some reason expect the language
integration for labors to the code won't eat

603
00:49:15,840 --> 00:49:21,519
up all day in memory and it
will be super fast and things like that.

604
00:49:21,599 --> 00:49:29,119
So we are using various tweaks and
uh like knowledge about dot net to

605
00:49:29,199 --> 00:49:35,360
make it super fast. And it's
like most of my work because we have

606
00:49:36,039 --> 00:49:40,000
people complaining all the times we are
improving this kind of work. Okay,

607
00:49:40,039 --> 00:49:45,079
so these are phptwols or visual studio
and visual studio code, yes for just

608
00:49:45,559 --> 00:49:50,400
and we just did a code right
which is fun because we uh we started

609
00:49:50,840 --> 00:49:55,039
PHP twols for resal studio like ten
something years ago, which is actually a

610
00:49:55,119 --> 00:50:00,320
part we just we just took a
part of the compiler from philaner MM and

611
00:50:00,559 --> 00:50:06,639
use it and use it for for
this intelligence for revision studio, and then

612
00:50:06,800 --> 00:50:12,800
then we update it to dot Net
standard, created newgate packages from it,

613
00:50:13,800 --> 00:50:19,719
and used compilation to native code and
made it an extension for regis to the

614
00:50:19,800 --> 00:50:23,000
code out of the box awesome.
So we didn't have to rewrite it to

615
00:50:23,559 --> 00:50:29,079
to type script to JavaScript or because
we just did the code is in JavaScript.

616
00:50:29,320 --> 00:50:32,360
Nice, and we just took C
sharp and move it just like that

617
00:50:32,760 --> 00:50:37,960
and boom we we had intelligence.
What also means you can maintain it between

618
00:50:37,960 --> 00:50:40,960
the two code base it's one code
base, yeah, exactly. We have

619
00:50:42,039 --> 00:50:45,599
one set of tests. We have
one code base and one place going to

620
00:50:45,599 --> 00:50:50,199
show up in the other. Right, Yeah, that's that's great about it.

621
00:50:50,480 --> 00:50:53,480
And then we have third integration for
regis to the code in browser,

622
00:50:54,320 --> 00:51:00,679
which is all those things compiled as
a web assembly. Jeez, that's crazy.

623
00:51:00,800 --> 00:51:05,239
That's awesome. So we really we
really have just one code base and

624
00:51:05,280 --> 00:51:10,119
it's running everywhere my coos Linux,
Windows, which studio code everywhere. And

625
00:51:10,159 --> 00:51:14,880
this is because dot net. Yeah, it's because I'm dot net. Yeah,

626
00:51:15,079 --> 00:51:17,119
it's because we are working with dot
net since version one point. Oh

627
00:51:19,199 --> 00:51:23,719
and we just know know some stuff. Yeah, it gives us that portability.

628
00:51:24,280 --> 00:51:28,119
Great story, yeah, great story, regulations on all this work.

629
00:51:28,119 --> 00:51:30,719
It's awesome. Absolutely. Oh,
thank you very much, and thank you

630
00:51:30,840 --> 00:51:32,920
for spending this hour with us.
It's been amazing. Oh, it's been

631
00:51:32,960 --> 00:51:37,360
pleasure anytime. Okay, we'll take
you up on that and we'll talk to

632
00:51:37,400 --> 00:52:02,360
you, dear listener next time.
I'm dot net Rocks dot net Rocks is

633
00:52:02,400 --> 00:52:07,360
brought to you by Franklin's Net and
produced by Pop Studios, a full service

634
00:52:07,400 --> 00:52:13,519
audio, video and post production facility
located physically in New London, Connecticut,

635
00:52:13,559 --> 00:52:19,480
and of course in the cloud online
at pwop dot com. Visit our website

636
00:52:19,480 --> 00:52:24,480
at dt n et r ocks dot
com for RSS feeds, downloads, mobile

637
00:52:24,480 --> 00:52:29,760
apps, comments, and access to
the full archives going back to show number

638
00:52:29,760 --> 00:52:34,000
one, recorded in September two thousand
and two. And make sure you check

639
00:52:34,039 --> 00:52:37,920
out our sponsors. They keep us
in business. Now go write some code

640
00:52:37,440 --> 00:52:39,360
CE next time we got
