All language subtitles for 004 Inside the Engine_en

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French Download
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranî)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:01,100 --> 00:00:01,940 Welcome back. 2 00:00:02,240 --> 00:00:08,450 So we know that this thing called the JavaScript engine takes our written JavaScript code and does some 3 00:00:08,450 --> 00:00:12,320 magic to tell the computer to do what we want it to do. 4 00:00:13,020 --> 00:00:15,630 So what's happening inside of this engine? 5 00:00:16,079 --> 00:00:17,700 And here's the tricky part. 6 00:00:18,000 --> 00:00:21,090 As we know, this engine can be built by anybody. 7 00:00:21,360 --> 00:00:26,490 Yes, that means you can build your own JavaScript engine, but it's a lot of work. 8 00:00:26,490 --> 00:00:29,820 And at the end of the day, it's just a program. 9 00:00:30,120 --> 00:00:35,970 And the V8 engine, which is the most popular, most common, and some would say the fastest JavaScript 10 00:00:35,970 --> 00:00:41,910 engine that the Chrome browser and Node.js uses, which we'll talk about later on. 11 00:00:42,270 --> 00:00:46,920 This engine is written in C++, a low level programming language. 12 00:00:47,280 --> 00:00:50,130 But let's see what's actually happening inside here. 13 00:00:50,580 --> 00:00:54,540 Inside this engine, it looks something like this. 14 00:00:55,460 --> 00:00:58,100 We give it a JavaScript file. 15 00:00:58,960 --> 00:01:06,220 And first, as does something called lexical analysis, which breaks the code into something called 16 00:01:06,220 --> 00:01:11,260 tokens to identify their meaning so that we know what the code is trying to do. 17 00:01:11,990 --> 00:01:16,880 And these tokens are formed into what we call an AST. 18 00:01:16,970 --> 00:01:19,910 That is an abstract syntax tree. 19 00:01:19,940 --> 00:01:28,730 So we parse the code that is, we try and figure out how the text is divided up based on key words from 20 00:01:28,730 --> 00:01:34,520 JavaScript, and it gets formed into this tree like structure called abstract syntax tree. 21 00:01:35,000 --> 00:01:38,750 And this is a fun little tool online that you can use to demo this. 22 00:01:39,290 --> 00:01:46,880 If we go to ASD Explorer dot net, I'll show you how this abstract syntax tree looks like. 23 00:01:48,020 --> 00:01:50,870 And you have a bit of code here. 24 00:01:50,870 --> 00:01:55,730 And as you can see, you can look at it in JSON format or you can use it the tree. 25 00:01:56,500 --> 00:02:00,370 And it breaks down the program into different things that are happening. 26 00:02:00,610 --> 00:02:03,040 We have a variable declaration. 27 00:02:05,480 --> 00:02:06,620 A decorator. 28 00:02:06,920 --> 00:02:13,850 And although this may look like gibberish right now to you, this allows the engine to understand what's 29 00:02:13,850 --> 00:02:18,290 going on in the program or at least break things down one by one. 30 00:02:21,660 --> 00:02:26,730 And once ends this form, it goes through something called an interpreter. 31 00:02:27,620 --> 00:02:33,170 Profiler compiler and we get some sort of code which we're going to talk about later on. 32 00:02:33,410 --> 00:02:42,860 And this whole engine is going to spit out some code that our CPU on our computers is going to understand 33 00:02:42,860 --> 00:02:44,510 to give it instructions. 34 00:02:45,370 --> 00:02:51,220 And you can think of this whole process again, which we're going to talk about in more detail coming 35 00:02:51,220 --> 00:02:53,230 up as something like this. 36 00:02:53,620 --> 00:02:57,340 We can create our own JavaScript engine by saying function. 37 00:02:58,470 --> 00:03:03,450 And let's say Jay's engine function that takes him some code. 38 00:03:03,510 --> 00:03:06,450 And this code is going to return for us. 39 00:03:06,480 --> 00:03:09,270 Let's say code dot split. 40 00:03:10,450 --> 00:03:13,840 And we'll use some regex here just to split up our code. 41 00:03:16,930 --> 00:03:23,650 And now if I write some code here, let's say JJ's engine and we give it our code, which will be a 42 00:03:23,650 --> 00:03:28,060 string that says variable A equals to five. 43 00:03:30,170 --> 00:03:30,740 Look at that. 44 00:03:30,740 --> 00:03:32,840 We've created a simple engine. 45 00:03:32,840 --> 00:03:37,820 I know, I know there's a lot more complexities to it than that, but that's what it's doing. 46 00:03:37,820 --> 00:03:42,860 We're giving it a piece of code which just gets string ified. 47 00:03:43,490 --> 00:03:50,720 And then it tries and breaks things down into different parts so that maybe in this function we can 48 00:03:50,720 --> 00:03:57,410 say if you see variable keyword, that means whatever comes after it is a variable that we're going 49 00:03:57,410 --> 00:03:59,900 to assign and so on and so forth. 50 00:04:01,090 --> 00:04:04,210 But you might see a problem here. 4991

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.