Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:01,389 --> 00:00:06,559
[Music]
2
00:00:04,400 --> 00:00:08,400
welcome to visual studio 2022 for
3
00:00:06,559 --> 00:00:09,679
siebel's plus developers my name is sai
4
00:00:08,400 --> 00:00:11,199
brand i'm the team siebel's plus
5
00:00:09,679 --> 00:00:12,960
developer advocate and today i'm going
6
00:00:11,199 --> 00:00:14,879
to show you why you should upgrade if
7
00:00:12,960 --> 00:00:16,640
you're a cbox plus developer
8
00:00:14,880 --> 00:00:18,800
now before i get started the mission of
9
00:00:16,640 --> 00:00:20,719
the c-plus plus team here is to make the
10
00:00:18,800 --> 00:00:22,640
lives of all cbos plus developers on the
11
00:00:20,719 --> 00:00:24,719
planet better and that comes with a
12
00:00:22,640 --> 00:00:26,800
bunch of different facets to it we
13
00:00:24,719 --> 00:00:28,799
participate in the standards we drive
14
00:00:26,800 --> 00:00:32,320
our own proposals we help others with
15
00:00:28,800 --> 00:00:35,120
theirs we prototype proposals
16
00:00:32,320 --> 00:00:36,640
we invest in our toolchain our compiler
17
00:00:35,119 --> 00:00:38,718
and libraries we bring them up to the
18
00:00:36,640 --> 00:00:40,079
latest standard we
19
00:00:38,719 --> 00:00:41,840
improve their performance and their
20
00:00:40,079 --> 00:00:44,480
security
21
00:00:41,840 --> 00:00:46,320
we simplify dependency management with
22
00:00:44,479 --> 00:00:48,078
vc package which is an open source
23
00:00:46,320 --> 00:00:50,159
package manager
24
00:00:48,079 --> 00:00:51,920
we improved the visual studio ide to
25
00:00:50,159 --> 00:00:54,640
make it the most
26
00:00:51,920 --> 00:00:56,559
productive experience that we can
27
00:00:54,640 --> 00:00:58,480
and then we continue to enhance the cbs
28
00:00:56,558 --> 00:00:59,439
plus experience for visual studio code
29
00:00:58,479 --> 00:01:01,119
as well
30
00:00:59,439 --> 00:01:04,478
but today we're going to focus on two
31
00:01:01,119 --> 00:01:06,478
and four our tool chain and the ide
32
00:01:04,478 --> 00:01:08,719
and on the ide front one thing you might
33
00:01:06,478 --> 00:01:12,400
have heard a lot today is visual studio
34
00:01:08,719 --> 00:01:15,118
2022 is 64 bit and the cpus plus team
35
00:01:12,400 --> 00:01:17,118
have made sure that this transition can
36
00:01:15,118 --> 00:01:18,719
be as smooth as possible
37
00:01:17,118 --> 00:01:20,640
so a few things you'll notice is the new
38
00:01:18,719 --> 00:01:21,759
projects are going to target 64-bit by
39
00:01:20,640 --> 00:01:23,599
default
40
00:01:21,759 --> 00:01:25,040
and if you have these kind of huge
41
00:01:23,599 --> 00:01:27,118
projects which previously you might have
42
00:01:25,040 --> 00:01:29,360
struggled with memory usage should be
43
00:01:27,118 --> 00:01:31,118
less of a problem now
44
00:01:29,359 --> 00:01:34,239
and we do want to make that upgrade as
45
00:01:31,118 --> 00:01:37,599
pain free as possible so you can install
46
00:01:34,239 --> 00:01:39,759
the 2015 17 and 19 tool sets directly
47
00:01:37,599 --> 00:01:41,599
from the installer in 2022 just by
48
00:01:39,759 --> 00:01:42,959
clicking those buttons
49
00:01:41,599 --> 00:01:45,359
you can even
50
00:01:42,959 --> 00:01:46,959
install miner toolsets side by side as
51
00:01:45,359 --> 00:01:49,280
well
52
00:01:46,959 --> 00:01:51,359
if you have binary dependencies which
53
00:01:49,280 --> 00:01:53,680
you can't necessarily recompile we are
54
00:01:51,359 --> 00:01:56,239
guaranteeing binary compatibility back
55
00:01:53,680 --> 00:01:58,000
to 2015 so if you have those
56
00:01:56,239 --> 00:02:00,239
dependencies you can still upgrade to
57
00:01:58,000 --> 00:02:02,239
the latest tool set
58
00:02:00,239 --> 00:02:03,679
if you have open source dependencies
59
00:02:02,239 --> 00:02:06,478
then you could potentially use vc
60
00:02:03,680 --> 00:02:09,118
package to to upgrade to the new toolset
61
00:02:06,478 --> 00:02:11,280
for those if you'd like to know more
62
00:02:09,118 --> 00:02:14,719
about porting and upgrading specifically
63
00:02:11,280 --> 00:02:16,560
you can check out aka dot ms slash cpp
64
00:02:14,719 --> 00:02:17,919
upgrade
65
00:02:16,560 --> 00:02:19,039
now a few other reasons you might want
66
00:02:17,919 --> 00:02:22,159
to upgrade
67
00:02:19,039 --> 00:02:24,079
hot reload is a new feature in 2022 and
68
00:02:22,159 --> 00:02:26,479
has support for cbs plus
69
00:02:24,080 --> 00:02:28,640
so this lets you apply code changes
70
00:02:26,479 --> 00:02:31,119
without stopping a breakpoint or
71
00:02:28,639 --> 00:02:32,719
restarting your application
72
00:02:31,120 --> 00:02:34,878
it injects your changes into the app
73
00:02:32,719 --> 00:02:36,878
dynamically and doesn't trigger a full
74
00:02:34,878 --> 00:02:38,318
rebuild of your project this is super
75
00:02:36,878 --> 00:02:40,878
useful if you're developing an
76
00:02:38,318 --> 00:02:42,799
interactive application like an uh a
77
00:02:40,878 --> 00:02:44,560
video game for example where you might
78
00:02:42,800 --> 00:02:46,480
want to make a change and immediately
79
00:02:44,560 --> 00:02:48,959
see this reflected in the running
80
00:02:46,479 --> 00:02:50,719
program without having to to stop or
81
00:02:48,959 --> 00:02:51,920
recompile
82
00:02:50,719 --> 00:02:53,359
you can even
83
00:02:51,919 --> 00:02:54,479
click this little button on the right
84
00:02:53,360 --> 00:02:57,280
here to
85
00:02:54,479 --> 00:02:58,878
to hot reload on file save
86
00:02:57,280 --> 00:03:01,199
if you want to know more about hot
87
00:02:58,878 --> 00:03:04,719
reload you can check out aka dot ms
88
00:03:01,199 --> 00:03:07,039
slash hot reload cpp we also want to
89
00:03:04,719 --> 00:03:08,639
make sure that visual studio is the best
90
00:03:07,039 --> 00:03:10,799
choice for if you're developing on
91
00:03:08,639 --> 00:03:13,598
windows but targeting any platform not
92
00:03:10,800 --> 00:03:15,680
just windows and part of that is wsl 2
93
00:03:13,598 --> 00:03:17,679
support
94
00:03:15,680 --> 00:03:20,319
so this allows you to build and debug
95
00:03:17,680 --> 00:03:22,800
cbs plus code on wsl 2 distributions
96
00:03:20,318 --> 00:03:24,238
without having to set up an ssh
97
00:03:22,800 --> 00:03:26,560
connection
98
00:03:24,239 --> 00:03:28,719
and it has support for both cmake and ms
99
00:03:26,560 --> 00:03:31,199
build we would recommend cmake if you're
100
00:03:28,719 --> 00:03:33,280
doing open source development but ms
101
00:03:31,199 --> 00:03:34,798
build support is there as well
102
00:03:33,280 --> 00:03:36,799
and if you'd like to know more details
103
00:03:34,799 --> 00:03:40,159
you can check out cbp
104
00:03:36,799 --> 00:03:40,159
hyphen wsl2
105
00:03:40,560 --> 00:03:45,680
and then we also have experimental
106
00:03:42,719 --> 00:03:48,560
support for lib fuzzer lib fuzzer is an
107
00:03:45,680 --> 00:03:51,519
in-process coverage guided evolutionary
108
00:03:48,560 --> 00:03:53,680
fuzzing engine from the llvm project
109
00:03:51,519 --> 00:03:56,080
so if you're wanting to fuzz your um
110
00:03:53,680 --> 00:03:58,719
your apis in order to
111
00:03:56,080 --> 00:04:00,560
guarantee their correctness and security
112
00:03:58,719 --> 00:04:02,318
then you can use this it's now available
113
00:04:00,560 --> 00:04:05,438
in vs 2022
114
00:04:02,318 --> 00:04:06,560
and you pass f sanitize equals buzzer if
115
00:04:05,438 --> 00:04:11,280
you'd like to know more you can check
116
00:04:06,560 --> 00:04:12,799
out aka.ness cpp lib fuzzer
117
00:04:11,280 --> 00:04:14,479
now if you can
118
00:04:12,799 --> 00:04:15,280
upgrade your
119
00:04:14,479 --> 00:04:17,358
um
120
00:04:15,280 --> 00:04:19,279
your ide that's great if you can upgrade
121
00:04:17,358 --> 00:04:21,198
your standard of siebel's plus as well
122
00:04:19,279 --> 00:04:23,039
that's even better
123
00:04:21,199 --> 00:04:25,439
so where we are with siebel's plus
124
00:04:23,040 --> 00:04:28,080
conformance right now is all stable
125
00:04:25,439 --> 00:04:31,519
sequence plus 20 features have been
126
00:04:28,079 --> 00:04:34,079
completed there are a few defect reports
127
00:04:31,519 --> 00:04:35,918
which um came in late they're kind of
128
00:04:34,079 --> 00:04:37,519
like bug reports to the standard they
129
00:04:35,918 --> 00:04:39,359
came in late in the process so we're
130
00:04:37,519 --> 00:04:41,519
still dealing with those but all stables
131
00:04:39,360 --> 00:04:44,160
plus 20 features are now available
132
00:04:41,519 --> 00:04:47,198
understood sequels plus 20 switch so we
133
00:04:44,160 --> 00:04:49,680
guarantee that these are api stable and
134
00:04:47,199 --> 00:04:51,040
their performance at their um production
135
00:04:49,680 --> 00:04:54,000
ready
136
00:04:51,040 --> 00:04:55,520
we also have some sequels 23 features um
137
00:04:54,000 --> 00:04:57,199
all of which have actually being
138
00:04:55,519 --> 00:04:59,120
contributed by
139
00:04:57,199 --> 00:05:01,520
all of you folks to our open source
140
00:04:59,120 --> 00:05:03,519
standard library so that's great
141
00:05:01,519 --> 00:05:05,120
coming next we are focusing a lot on
142
00:05:03,519 --> 00:05:06,959
standard library modules and core
143
00:05:05,120 --> 00:05:09,120
routines both the proposals going
144
00:05:06,959 --> 00:05:11,680
through the standard and implementing
145
00:05:09,120 --> 00:05:15,759
them in our tools
146
00:05:11,680 --> 00:05:18,400
um on the stl specifically we have 115
147
00:05:15,759 --> 00:05:19,759
sql 20 features completed
148
00:05:18,399 --> 00:05:21,918
and a bunch of those have been
149
00:05:19,759 --> 00:05:23,840
contributed by you so thank you so much
150
00:05:21,918 --> 00:05:26,319
for all of that you can see the graph
151
00:05:23,839 --> 00:05:28,319
here for c plus 20 features you can see
152
00:05:26,319 --> 00:05:30,079
the little bump at the end as is those
153
00:05:28,319 --> 00:05:31,519
defect reports coming in
154
00:05:30,079 --> 00:05:33,758
um but we're starting to get all of
155
00:05:31,519 --> 00:05:35,439
these back down again
156
00:05:33,759 --> 00:05:37,600
you can check out the the most recent
157
00:05:35,439 --> 00:05:40,399
data at microsoft dot github dot
158
00:05:37,600 --> 00:05:42,879
slash stl
159
00:05:40,399 --> 00:05:45,439
now i'm going to demonstrate the four
160
00:05:42,879 --> 00:05:47,519
main features of c plus 20 all working
161
00:05:45,439 --> 00:05:48,800
together in tandem
162
00:05:47,519 --> 00:05:49,758
okay so i'm going to create a new
163
00:05:48,800 --> 00:05:52,400
project
164
00:05:49,759 --> 00:05:54,000
an ms build application and i'll call it
165
00:05:52,399 --> 00:05:56,560
launch
166
00:05:54,000 --> 00:05:59,519
so this gives me a new project i want to
167
00:05:56,560 --> 00:06:01,839
show ranges modules coroutines and
168
00:05:59,519 --> 00:06:03,680
concepts all working together
169
00:06:01,839 --> 00:06:06,159
so i'm going to show a little random
170
00:06:03,680 --> 00:06:10,160
number generation example so i'm going
171
00:06:06,160 --> 00:06:12,240
to get a bunch of random numbers random
172
00:06:10,160 --> 00:06:13,439
numbers helps if i can type
173
00:06:12,240 --> 00:06:16,079
and i'm going to get these from
174
00:06:13,439 --> 00:06:18,079
something called launch xor shift
175
00:06:16,079 --> 00:06:19,839
x or shift is a specific random number
176
00:06:18,079 --> 00:06:21,439
generation algorithm which is
177
00:06:19,839 --> 00:06:22,318
implementable in about five lines of
178
00:06:21,439 --> 00:06:24,240
code
179
00:06:22,319 --> 00:06:25,680
and actually generates pretty decent
180
00:06:24,240 --> 00:06:27,360
random numbers
181
00:06:25,680 --> 00:06:30,160
of course we need to seed it with some
182
00:06:27,360 --> 00:06:32,840
high quality c like four
183
00:06:30,160 --> 00:06:34,400
and then we can say loop through all of
184
00:06:32,839 --> 00:06:36,560
them
185
00:06:34,399 --> 00:06:39,599
random numbers
186
00:06:36,560 --> 00:06:39,600
and print them all out
187
00:06:40,720 --> 00:06:44,080
with a new line
188
00:06:42,000 --> 00:06:46,000
okay so this is what basic usage is
189
00:06:44,079 --> 00:06:48,959
going to look like and now we can think
190
00:06:46,000 --> 00:06:51,120
about how to actually implement this now
191
00:06:48,959 --> 00:06:53,198
i want to use modules and curatings for
192
00:06:51,120 --> 00:06:55,439
this so the first thing i need to do is
193
00:06:53,199 --> 00:06:56,960
go into my project properties
194
00:06:55,439 --> 00:07:00,800
go to general
195
00:06:56,959 --> 00:07:03,680
and language standard flip this from 14
196
00:07:00,800 --> 00:07:04,639
to sequester latest
197
00:07:03,680 --> 00:07:07,038
okay
198
00:07:04,639 --> 00:07:09,840
now i'm going to create a new module
199
00:07:07,038 --> 00:07:12,159
add to my source files a new module
200
00:07:09,839 --> 00:07:14,399
this will create a cpus module interface
201
00:07:12,160 --> 00:07:17,360
unit which you can see has the extension
202
00:07:14,399 --> 00:07:18,638
ixx and we could call gonna call it x or
203
00:07:17,360 --> 00:07:19,840
shift
204
00:07:18,639 --> 00:07:22,319
all right this gives us a couple of
205
00:07:19,839 --> 00:07:24,478
lines we have module x or shift which
206
00:07:22,319 --> 00:07:27,840
says from here down everything belongs
207
00:07:24,478 --> 00:07:29,839
to the module xor shift additionally
208
00:07:27,839 --> 00:07:31,598
export this and make it available to
209
00:07:29,839 --> 00:07:33,598
external code
210
00:07:31,598 --> 00:07:34,719
then we have a single function called
211
00:07:33,598 --> 00:07:36,719
myfunk
212
00:07:34,720 --> 00:07:38,639
which is also exported
213
00:07:36,720 --> 00:07:40,720
if we got rid of this then myfunk would
214
00:07:38,639 --> 00:07:42,960
not be visible to external code this is
215
00:07:40,720 --> 00:07:45,680
one of the benefits of modules apart
216
00:07:42,959 --> 00:07:48,399
from improvements on build times
217
00:07:45,680 --> 00:07:50,959
you can hide implementation details of
218
00:07:48,399 --> 00:07:53,918
your code without having them leak into
219
00:07:50,959 --> 00:07:55,359
contexts that you don't want them
220
00:07:53,918 --> 00:07:58,240
but we don't want this we wanted
221
00:07:55,360 --> 00:07:59,759
namespace launch
222
00:07:58,240 --> 00:08:03,199
and if we want to export everything in
223
00:07:59,759 --> 00:08:04,720
here we can just say export
224
00:08:03,199 --> 00:08:07,199
okay so now we can think about
225
00:08:04,720 --> 00:08:10,319
implementing xor shift
226
00:08:07,199 --> 00:08:10,319
we want this
227
00:08:10,399 --> 00:08:13,679
to be an infinite stream of random
228
00:08:12,319 --> 00:08:15,840
numbers
229
00:08:13,680 --> 00:08:18,400
uh but for now let's just implement it
230
00:08:15,839 --> 00:08:21,679
as a single iteration of the algorithm
231
00:08:18,399 --> 00:08:23,198
so we'll return a state unit
232
00:08:21,680 --> 00:08:25,280
64 t
233
00:08:23,199 --> 00:08:28,080
our function will be called x or shift
234
00:08:25,279 --> 00:08:31,679
and we will take a unit
235
00:08:28,079 --> 00:08:34,319
64 t as an argument
236
00:08:31,680 --> 00:08:37,839
so unit 64 t is
237
00:08:34,320 --> 00:08:40,320
in the ceased int header
238
00:08:37,839 --> 00:08:42,320
just to show you something first say i
239
00:08:40,320 --> 00:08:44,080
put it here
240
00:08:42,320 --> 00:08:47,040
um
241
00:08:44,080 --> 00:08:48,800
this might look fine but
242
00:08:47,039 --> 00:08:50,958
remember i said that modulex or shift
243
00:08:48,799 --> 00:08:52,719
means everything below here belongs to
244
00:08:50,958 --> 00:08:54,479
this module
245
00:08:52,720 --> 00:08:56,160
hash include means just take everything
246
00:08:54,480 --> 00:08:58,720
from this header and dump it into this
247
00:08:56,159 --> 00:09:01,919
file so we're saying that everything in
248
00:08:58,720 --> 00:09:03,519
here is going to get module linkage and
249
00:09:01,919 --> 00:09:05,679
we're going to get some build issues
250
00:09:03,519 --> 00:09:08,879
with that so this is actually wrong like
251
00:09:05,679 --> 00:09:10,879
if we had an uh import of some module
252
00:09:08,879 --> 00:09:13,600
here then this would all be fine modules
253
00:09:10,879 --> 00:09:16,000
are dealt are designed to handle that
254
00:09:13,600 --> 00:09:18,399
but for regular hash includes we want to
255
00:09:16,000 --> 00:09:20,080
stick them up in what's called the the
256
00:09:18,399 --> 00:09:22,399
global module fragment which we
257
00:09:20,080 --> 00:09:24,959
introduced like this just something to
258
00:09:22,399 --> 00:09:27,120
be aware of okay so
259
00:09:24,958 --> 00:09:28,559
the intellisense found this and we're
260
00:09:27,120 --> 00:09:30,159
all good to go
261
00:09:28,559 --> 00:09:32,319
so we can implement
262
00:09:30,159 --> 00:09:34,958
xor shift like so we take our seed we
263
00:09:32,320 --> 00:09:36,399
xor it with the result of right shifting
264
00:09:34,958 --> 00:09:40,719
by thirteen
265
00:09:36,399 --> 00:09:43,679
then left shifting by seventeen and then
266
00:09:40,720 --> 00:09:44,560
right shifting by seven
267
00:09:43,679 --> 00:09:46,879
uh
268
00:09:44,559 --> 00:09:48,079
the very definition of ra of uh magic
269
00:09:46,879 --> 00:09:50,000
numbers
270
00:09:48,080 --> 00:09:51,839
don't ask me how they got these and then
271
00:09:50,000 --> 00:09:54,480
we return the seed okay so this is a
272
00:09:51,839 --> 00:09:56,000
single iteration of the exoshift
273
00:09:54,480 --> 00:09:58,560
algorithm
274
00:09:56,000 --> 00:10:00,799
but we wanted this to be infinite uh
275
00:09:58,559 --> 00:10:02,399
unfortunately i don't have infinite
276
00:10:00,799 --> 00:10:04,240
memory on this laptop so we're gonna
277
00:10:02,399 --> 00:10:05,839
have to generate these on the fly and
278
00:10:04,240 --> 00:10:06,879
one way we can do that is using core
279
00:10:05,839 --> 00:10:08,959
routines
280
00:10:06,879 --> 00:10:11,278
so coroutines are essentially a
281
00:10:08,958 --> 00:10:14,239
generalization of a subroutine or
282
00:10:11,278 --> 00:10:16,399
regular function a subroutine will enter
283
00:10:14,240 --> 00:10:18,399
up here at the top it will exit at
284
00:10:16,399 --> 00:10:20,399
return statements or
285
00:10:18,399 --> 00:10:22,159
flowing off the end of control flow
286
00:10:20,399 --> 00:10:24,320
one entry
287
00:10:22,159 --> 00:10:26,559
some exit point
288
00:10:24,320 --> 00:10:29,360
a core routine instead can
289
00:10:26,559 --> 00:10:31,439
pause or suspend during execution and
290
00:10:29,360 --> 00:10:33,360
then be resumed later
291
00:10:31,440 --> 00:10:36,560
and one of the ways to do that is using
292
00:10:33,360 --> 00:10:39,759
co yield which generally means
293
00:10:36,559 --> 00:10:39,759
pause execution
294
00:10:39,839 --> 00:10:45,600
send this back to the caller
295
00:10:42,639 --> 00:10:47,278
and then we can be resumed later
296
00:10:45,600 --> 00:10:49,839
so we're going to stick this in an
297
00:10:47,278 --> 00:10:49,838
infinite loop
298
00:10:51,200 --> 00:10:55,440
and now we're getting build errors
299
00:10:53,120 --> 00:10:57,120
because we haven't included creatine
300
00:10:55,440 --> 00:10:57,920
traits
301
00:10:57,120 --> 00:10:59,679
but
302
00:10:57,919 --> 00:11:01,199
there's something more here core yield
303
00:10:59,679 --> 00:11:03,120
doesn't actually have built-in behavior
304
00:11:01,200 --> 00:11:05,839
you have to kind of tell the compiler
305
00:11:03,120 --> 00:11:07,519
what could mean for this specific core
306
00:11:05,839 --> 00:11:10,000
routine and the way you do that is
307
00:11:07,519 --> 00:11:12,078
customizing the return type here so we
308
00:11:10,000 --> 00:11:15,039
want like a kind of python style
309
00:11:12,078 --> 00:11:16,799
generator here unfortunately there's no
310
00:11:15,039 --> 00:11:18,799
generator type in the standard library
311
00:11:16,799 --> 00:11:20,958
for c plus plus 20. uh there should be
312
00:11:18,799 --> 00:11:23,278
in c 23
313
00:11:20,958 --> 00:11:25,759
but we could use a an open source
314
00:11:23,278 --> 00:11:26,838
implementation i have one myself called
315
00:11:25,759 --> 00:11:29,200
tl
316
00:11:26,839 --> 00:11:30,640
generator but if we try this we get
317
00:11:29,200 --> 00:11:33,040
build errors because i don't have tl
318
00:11:30,639 --> 00:11:35,519
generator installed it's open source so
319
00:11:33,039 --> 00:11:37,519
i could use vc package for it
320
00:11:35,519 --> 00:11:39,120
i do have vc package installed on this
321
00:11:37,519 --> 00:11:41,120
system
322
00:11:39,120 --> 00:11:42,799
so i could just install tl generator
323
00:11:41,120 --> 00:11:43,519
from the command line but i want to show
324
00:11:42,799 --> 00:11:45,679
you
325
00:11:43,519 --> 00:11:47,679
manifest files
326
00:11:45,679 --> 00:11:49,439
so manifest file
327
00:11:47,679 --> 00:11:51,759
is kind of similar to like if you've
328
00:11:49,440 --> 00:11:55,360
used npm for javascript or cargo for
329
00:11:51,759 --> 00:11:57,600
rust where we declaratively
330
00:11:55,360 --> 00:12:00,159
say things about our dependencies and
331
00:11:57,600 --> 00:12:02,320
our package so we have a name i'm going
332
00:12:00,159 --> 00:12:03,439
to call it launch we have a version
333
00:12:02,320 --> 00:12:07,120
string
334
00:12:03,440 --> 00:12:07,120
i'm going to do 1.0
335
00:12:07,360 --> 00:12:12,800
and then we have dependencies and this
336
00:12:10,958 --> 00:12:14,559
is a list of dependencies you could
337
00:12:12,799 --> 00:12:16,399
actually put versions here or minimum
338
00:12:14,559 --> 00:12:17,679
versions there's a bunch you can do but
339
00:12:16,399 --> 00:12:20,559
for now i'm just going to say tl
340
00:12:17,679 --> 00:12:23,519
generator and there's a package or a
341
00:12:20,559 --> 00:12:25,759
port in vc package which tells it how to
342
00:12:23,519 --> 00:12:27,039
download and build and install this
343
00:12:25,759 --> 00:12:30,000
library
344
00:12:27,039 --> 00:12:31,278
so if i save this to
345
00:12:30,000 --> 00:12:33,600
the root of my directory in
346
00:12:31,278 --> 00:12:35,200
vcpackage.json
347
00:12:33,600 --> 00:12:37,120
and the last thing i need to do to get
348
00:12:35,200 --> 00:12:38,959
this to work is to go to my project
349
00:12:37,120 --> 00:12:42,560
properties
350
00:12:38,958 --> 00:12:45,278
configuration vc package use vc package
351
00:12:42,559 --> 00:12:48,239
manifest yes this will tell the build
352
00:12:45,278 --> 00:12:51,039
system to pick up the manifest part
353
00:12:48,240 --> 00:12:52,639
so now if i build my solution we should
354
00:12:51,039 --> 00:12:55,278
see this happening and the first thing
355
00:12:52,639 --> 00:12:57,360
which happens before bc package is ms
356
00:12:55,278 --> 00:12:59,519
build scans the sources for module
357
00:12:57,360 --> 00:13:02,159
dependencies so you do not have to tell
358
00:12:59,519 --> 00:13:04,399
ms build the order in which your modules
359
00:13:02,159 --> 00:13:07,120
have to be built it will work it out by
360
00:13:04,399 --> 00:13:08,399
itself uh we don't have this for cmake
361
00:13:07,120 --> 00:13:10,078
yet but we are working on it with
362
00:13:08,399 --> 00:13:11,839
kitware
363
00:13:10,078 --> 00:13:14,078
so after
364
00:13:11,839 --> 00:13:16,880
the module dependencies were scanned
365
00:13:14,078 --> 00:13:18,638
then vc package ran and you can see the
366
00:13:16,879 --> 00:13:20,240
install tl generator
367
00:13:18,639 --> 00:13:21,919
it will also installed a couple of
368
00:13:20,240 --> 00:13:23,759
transitive dependencies which tl
369
00:13:21,919 --> 00:13:26,559
generator has
370
00:13:23,759 --> 00:13:29,120
and even used some cache binary packages
371
00:13:26,559 --> 00:13:31,359
which i already had on my system
372
00:13:29,120 --> 00:13:33,278
which is pretty handy it told us you
373
00:13:31,360 --> 00:13:35,360
know if we're using cmake then we could
374
00:13:33,278 --> 00:13:37,919
just copy paste these in edit them
375
00:13:35,360 --> 00:13:39,839
slightly and then we got a bunch of
376
00:13:37,919 --> 00:13:40,958
build errors because we haven't finished
377
00:13:39,839 --> 00:13:42,320
yet
378
00:13:40,958 --> 00:13:44,719
but that should be enough to come up
379
00:13:42,320 --> 00:13:46,879
here and say include tl
380
00:13:44,720 --> 00:13:48,720
and it found the installation this is a
381
00:13:46,879 --> 00:13:51,600
local installation this is not going to
382
00:13:48,720 --> 00:13:53,440
affect any other projects in our system
383
00:13:51,600 --> 00:13:55,759
tl generator
384
00:13:53,440 --> 00:13:58,560
and intelsense found
385
00:13:55,759 --> 00:14:02,399
the file great
386
00:13:58,559 --> 00:14:02,399
um so now we can go to launch
387
00:14:02,480 --> 00:14:08,159
include that and then import
388
00:14:05,198 --> 00:14:10,159
and there we go and uh intellisense
389
00:14:08,159 --> 00:14:11,600
there found x or shift because it's
390
00:14:10,159 --> 00:14:14,078
scanned for the dependencies it knows
391
00:14:11,600 --> 00:14:18,320
what file it's in
392
00:14:14,078 --> 00:14:21,198
so we can import x or shift and now
393
00:14:18,320 --> 00:14:22,800
uh intellisense worked out this type and
394
00:14:21,198 --> 00:14:25,039
everything's fine
395
00:14:22,799 --> 00:14:27,599
so
396
00:14:25,039 --> 00:14:31,278
we could run this it would give us an
397
00:14:27,600 --> 00:14:32,720
infinite stream of random numbers um
398
00:14:31,278 --> 00:14:34,639
let's say we want to
399
00:14:32,720 --> 00:14:37,278
reduce this infinite stream of random
400
00:14:34,639 --> 00:14:40,399
numbers a little bit say we want
401
00:14:37,278 --> 00:14:42,000
them to be in the range of 0 to 100 how
402
00:14:40,399 --> 00:14:45,839
could we do that
403
00:14:42,000 --> 00:14:48,078
well one way would be with ranges
404
00:14:45,839 --> 00:14:49,920
so we could say hash include ranges and
405
00:14:48,078 --> 00:14:53,278
ranges are a way of essentially building
406
00:14:49,919 --> 00:14:54,240
up a pipeline of operations on ranges of
407
00:14:53,278 --> 00:14:56,399
data
408
00:14:54,240 --> 00:14:58,959
one way we can do that is saying
409
00:14:56,399 --> 00:15:02,240
uh pipe this this is kind of like a unix
410
00:14:58,958 --> 00:15:04,879
pipe like a bash style pipe
411
00:15:02,240 --> 00:15:05,759
pipe this into stood views colon colon
412
00:15:04,879 --> 00:15:07,519
and
413
00:15:05,759 --> 00:15:09,439
now we get a list of all of the view
414
00:15:07,519 --> 00:15:11,039
adapters in the standard library which
415
00:15:09,440 --> 00:15:13,040
are available to us and you could use
416
00:15:11,039 --> 00:15:14,319
your own or other ones which were open
417
00:15:13,039 --> 00:15:16,240
source
418
00:15:14,320 --> 00:15:19,360
uh one thing to note is
419
00:15:16,240 --> 00:15:21,759
um if you used range v3 the precursor to
420
00:15:19,360 --> 00:15:23,839
all of this and an older version of vs
421
00:15:21,759 --> 00:15:25,439
then you probably find that intellisense
422
00:15:23,839 --> 00:15:27,279
really really struggled we've done a lot
423
00:15:25,440 --> 00:15:29,680
of work on this you saw that that was
424
00:15:27,278 --> 00:15:31,838
pretty much instantaneous so if i say i
425
00:15:29,679 --> 00:15:35,838
want to transform it then intellisense
426
00:15:31,839 --> 00:15:38,560
works says okay you need a function here
427
00:15:35,839 --> 00:15:40,560
um so we're gonna pass it
428
00:15:38,559 --> 00:15:41,679
a lambda
429
00:15:40,559 --> 00:15:43,119
which
430
00:15:41,679 --> 00:15:46,078
returns i
431
00:15:43,120 --> 00:15:47,278
mod 100 let's see
432
00:15:46,078 --> 00:15:49,278
okay
433
00:15:47,278 --> 00:15:51,838
so
434
00:15:49,278 --> 00:15:54,559
now we can try running this and we
435
00:15:51,839 --> 00:15:55,920
should get out an infinite stream of
436
00:15:54,559 --> 00:15:58,879
random numbers
437
00:15:55,919 --> 00:15:59,679
here we go from 1 to 100
438
00:15:58,879 --> 00:16:01,838
great
439
00:15:59,679 --> 00:16:03,439
now say we actually want to
440
00:16:01,839 --> 00:16:05,680
change this slightly
441
00:16:03,440 --> 00:16:08,000
and see it update in real time i talked
442
00:16:05,679 --> 00:16:11,278
about hot reload earlier i have hot
443
00:16:08,000 --> 00:16:13,679
reload on file save turned on so if i go
444
00:16:11,278 --> 00:16:14,639
and change this to a larger number and
445
00:16:13,679 --> 00:16:16,719
save
446
00:16:14,639 --> 00:16:18,959
then it will recompile while it's
447
00:16:16,720 --> 00:16:21,120
running and
448
00:16:18,958 --> 00:16:23,039
we see the change immediately it's kind
449
00:16:21,120 --> 00:16:24,078
of cool
450
00:16:23,039 --> 00:16:25,599
but say
451
00:16:24,078 --> 00:16:26,879
we don't want this to be infinite we
452
00:16:25,600 --> 00:16:30,159
want this to be
453
00:16:26,879 --> 00:16:33,679
to be bounded we could instead say pipe
454
00:16:30,159 --> 00:16:36,480
this again into stood views take and
455
00:16:33,679 --> 00:16:37,599
take the first five for instance
456
00:16:36,480 --> 00:16:39,360
uh
457
00:16:37,600 --> 00:16:41,680
and this
458
00:16:39,360 --> 00:16:43,680
should print out there we go five random
459
00:16:41,679 --> 00:16:46,239
numbers
460
00:16:43,679 --> 00:16:47,278
uh a couple last things
461
00:16:46,240 --> 00:16:49,680
um
462
00:16:47,278 --> 00:16:51,838
the usual kind of navigation experience
463
00:16:49,679 --> 00:16:53,439
you might expect for modules is all
464
00:16:51,839 --> 00:16:56,160
there so if i
465
00:16:53,440 --> 00:16:59,279
control click on the module the name
466
00:16:56,159 --> 00:17:00,958
then it goes to the definition
467
00:16:59,278 --> 00:17:02,559
let's say i want to stick a breakpoint
468
00:17:00,958 --> 00:17:03,919
in here
469
00:17:02,559 --> 00:17:05,838
this is a core routine so there's a
470
00:17:03,919 --> 00:17:08,000
bunch of compiler magic which is going
471
00:17:05,838 --> 00:17:10,720
on here like this is kind of changed
472
00:17:08,000 --> 00:17:12,318
into a state machine and split up into
473
00:17:10,720 --> 00:17:15,519
different functions
474
00:17:12,318 --> 00:17:17,359
um but we make it all look like
475
00:17:15,519 --> 00:17:19,119
it's just regular code so if we step
476
00:17:17,359 --> 00:17:21,038
over this code yield
477
00:17:19,119 --> 00:17:22,958
like in this time the
478
00:17:21,038 --> 00:17:25,199
this co routine has been suspended and
479
00:17:22,959 --> 00:17:26,240
then resumed but we make it look like
480
00:17:25,199 --> 00:17:28,079
it's just
481
00:17:26,240 --> 00:17:31,519
going on um
482
00:17:28,078 --> 00:17:33,279
like a regular function we even have a
483
00:17:31,519 --> 00:17:34,879
co-routine frame
484
00:17:33,279 --> 00:17:37,279
visualizer in case you're writing your
485
00:17:34,880 --> 00:17:39,679
own code routines so to recap we saw
486
00:17:37,279 --> 00:17:42,000
modules with build system support and go
487
00:17:39,679 --> 00:17:44,400
to modules we saw coroutines with
488
00:17:42,000 --> 00:17:47,119
debugging support we saw ranges with
489
00:17:44,400 --> 00:17:48,640
intellisense all working and we kind of
490
00:17:47,119 --> 00:17:50,879
solve concepts concepts are what
491
00:17:48,640 --> 00:17:52,480
underlie ranges so that's how we saw
492
00:17:50,880 --> 00:17:54,960
those working
493
00:17:52,480 --> 00:17:56,240
um to reiterate our the mission of our
494
00:17:54,960 --> 00:17:58,480
team is to make the lives of all
495
00:17:56,240 --> 00:18:00,960
siblings developers on the planet better
496
00:17:58,480 --> 00:18:04,400
through standards through our tool chain
497
00:18:00,960 --> 00:18:06,240
through vc package through our vs ide
498
00:18:04,400 --> 00:18:07,679
and through the visual studio code
499
00:18:06,240 --> 00:18:09,038
experience
500
00:18:07,679 --> 00:18:10,960
if you'd like to know more about some of
501
00:18:09,038 --> 00:18:13,839
these we do have a couple other talks
502
00:18:10,960 --> 00:18:15,519
today one on game development and one on
503
00:18:13,839 --> 00:18:17,839
cross-platform development so please do
504
00:18:15,519 --> 00:18:20,079
check those out and other than that i do
505
00:18:17,839 --> 00:18:22,720
hope you will go away and upgrade to vs
506
00:18:20,079 --> 00:18:25,759
2022 and let us know what you think
507
00:18:22,720 --> 00:18:25,759
thank you very much
35138
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.