how does source become code?

  Рет қаралды 102,720

Low Level

Low Level

Күн бұрын

Пікірлер: 136
@LowLevelTV
@LowLevelTV Жыл бұрын
Don't forget to check out my limited time merch at lowlevel.store/
@me5ng3
@me5ng3 Жыл бұрын
As a compiler engineer I have a few problems with this video 😬 I do understand that it tries to be as simple and comprehensible as possible, but there are a few things I'd change, for example I'd remove the part where "instructions correspond to transistors" and maybe I'd rework on the AST part. Also, you could continue the video for an extra minute or two talking about how the kernel handles interrupts in programs, how it saves the state and loads it again at a later point, etc.
@0xhhhhff
@0xhhhhff Жыл бұрын
Link some resources for the same please.
@sesu6743
@sesu6743 Жыл бұрын
@@0xhhhhff Whats google?
@0xhhhhff
@0xhhhhff Жыл бұрын
@@sesu6743 your mom
@sesu6743
@sesu6743 Жыл бұрын
@@0xhhhhff Link some resources for the same please.
@0xhhhhff
@0xhhhhff Жыл бұрын
@@sesu6743 can't. She left you when you were born
@richardericlope3341
@richardericlope3341 Жыл бұрын
Writing a programming language was one of the most fun projects I did(almost as fun as writing games in a handheld). Lots of rewrites and lots of grammar changes.
@hashimoto128
@hashimoto128 Жыл бұрын
Hey there, The example in @2:50 is technically not detected at lexer stage, it is at the parsing stage. The lexer, usually*, only tokenizes the source file (separates into tokens, shown around @3:13). So there should be an invalid token to cause an error there (I think '1x' is an example for the C language). The parsing stage "joins" the tokens to build a AST (Abstract Syntax Tree, mentioned around @3:15). The Grammar of the Language gives rules on how to build the AST. The grammar/parser says that "int x x;" doesn't make sense (that's my interpretation, hopefully accurate, on the meaning of "Syntax Error"). "Syntax Error" is closely related to parsing and AST. It was a nice overview on the steps from source code to running the program. *usually because sometimes people join the meaning of lexer and parser into "Lexing" or "Parsing"
@ΝίκοςΙστοσελίδα
@ΝίκοςΙστοσελίδα Жыл бұрын
You are absolutely correct. At least on the compiler my team wrote that is exactly how it works, and to be fair, I don't think anyone would implement grammar into the lexer. In fact, if we consider the lexer to be a Finite Automaton (pretty sound assumption), the lexer cannot even comprehend the grammar.
@viddeshk8020
@viddeshk8020 Жыл бұрын
Are you working on any open-source?
@weiSane
@weiSane Жыл бұрын
We wanna see you write some code exactly like NASA does . Following their blue prints and rules . That would be interesting. I loved that NASA code video
@WoolleyWoolf
@WoolleyWoolf 4 ай бұрын
You remind me of one of my best friends - super chill, friendly, funny, caring, passionate, outgoing, real, loving. Cheers dude!
@dakata2416
@dakata2416 Жыл бұрын
The best way to become a better software engineer is to try and write lexer, parser and interpreter/compiler. Great video ❤
@stachowi
@stachowi Жыл бұрын
This is the type of content i subscribed for! amazing
@anon_y_mousse
@anon_y_mousse Жыл бұрын
Next step, writing your own compiler. Would make for a fun video series. I'm writing one for my own language, and trust me, it is fun.
@DeanHorak
@DeanHorak Жыл бұрын
You left out the step between compiler and executing- the linker step (not to be confused with the dynamic linker you did mention). The output of the compiler is in object format, with external references unresolved. The linker resolves those references and produces the execution (elf) file.
@jordixboy
@jordixboy Жыл бұрын
as a self taught software engineer, I really love this topics!
@cheako91155
@cheako91155 Жыл бұрын
2:00 I know you were going for simplicity, but I don't think it's been true for a long time that x86 assembly code corresponds to transistors. My understanding is that there is a RISC interpreter translating the x86 code, part of the CPU firmware blob.
@jokasthejokas
@jokasthejokas Жыл бұрын
1:50 "We can write the binary by hand, but no one in their right mind would do it" My uncle had to compile the assembly code he wrote, for his graduation, by hand, because the memory of the hardware he was working on was insufficient for the assembly compiler & the code (he was designing a printer software, and it was the 1970's / 1980's)
@ჰარიეტისაუკეთესოა
@ჰარიეტისაუკეთესოა Жыл бұрын
how much did he get paid for the the job
@jordixboy
@jordixboy Жыл бұрын
ive written binary code for some virtual machines. Its really not that hard
@jokasthejokas
@jokasthejokas Жыл бұрын
@@jordixboy it's not that it was hard, but really time consuming, and he didn't had many resources to ease up the workload
@orterves
@orterves Жыл бұрын
The clock on the sponsor message is a nice touch
@CC1.unposted
@CC1.unposted Жыл бұрын
It's fascinating I was just working on my own programming language
@OGTennyson
@OGTennyson 2 ай бұрын
@@CC1.unposted please respond... How's the journey been going dawg?
@CC1.unposted
@CC1.unposted 2 ай бұрын
@@OGTennyson bad, I made a language so that creating my language is easier But then my Study was going down so I'm still trying to increase my study and get the top 3 position in grades, until I do that I can't program, I get only 30 mins a day to rest only. Although it's half finished it's convertion to CPP it supports high-level types where it automatically detects the type on compile time, I was trying to convert the language into lamda calculus or something but it's too complicated I Wana simplify it to make less intensive or optimize the code using math, after that the compiler is done, although the custom language I use is Converted in a js code (the actual compiler) node & Web js I got the following cool features apart from other languages (it's compiled language) Sec keyword to switch between Santax and language Sec Cpp{ The is cpp code inside } There's assembly (any) , cpp, and a custom Santax I call cjs supported I do Wana support the more lower level languages if posible So it's full controll It supports condition, loops, functions, Classes, high level types (you can specify types or it will automatically fine on compile time or run time), Goto statement I have idea for eval but it's complex because than I need the entire compiler and executer packaged in the translated code
@shneor.e
@shneor.e Жыл бұрын
Dude please make a course on low level stuff (bits, bytes, byte-code, machine-code, interpreted langs vs compiled langs, etc.)
@Sami_K99
@Sami_K99 Жыл бұрын
Please do a series on this, it's very interesting
@modolief
@modolief Жыл бұрын
Dynamic linking at runtime!
@simonegiuliani4913
@simonegiuliani4913 Жыл бұрын
Binary code represents assembler instructions. The CPU interprets assembler instructions and it's internally made of combinational circuits which are made out of transistors.
@Stoupy51
@Stoupy51 Жыл бұрын
Feedback : your videos audio are lower than other KZbin videos, please increase it for the next ones!
@CallousCoder
@CallousCoder Жыл бұрын
So the HVAC would shut off again when temperature is 70? I hope it can cool fast enough ;) I've never written a compiler, I wrote an interpreter and an assembler but that was enough of that. The latter was also more for myself because in college we had to do Z80 machine language. So we typed opcodes etc on a small uProfessor board, I have a video on the luxurious MFP-1. So I wrote an assembler to generate the opcodes and operands, just to speed up the assignment. So I could stream it from my tiny Atari Portfolio, the one John Conner used to hack the ATM, also wrote that in assembly and streamed it out of the serial interface using a MAX232 to convert RS232 to TTL level. That made it really easy for me to do that Spartan assignment. Even something as seemingly trivial as a washing machine that needs to control a motor, a pump, temperature (69F online ;) ) is a hassle in machine code. Yet trivial in assembly.
@elijahdecalmer613
@elijahdecalmer613 Жыл бұрын
I'm an undergrad, and I'm starting with a space company. One of the guys says the first thing he teaches people who are inexperienced is how a compiler works. He also says that one of the first things he asks experienced people is how a compiler works. Just my 2c. I'm on the learning end of this all
@chicoern
@chicoern Жыл бұрын
And all of this is very similar in windows as well, of course the file is different, and there are extra steps between asking the OS for process creation, and the syscall. Very nice video! Thanks!
@blaze9872
@blaze9872 Жыл бұрын
Fantastic Video! Now I have to step through this process with my own programs!
@brady9737
@brady9737 Жыл бұрын
definitely not first
@vetuform5780
@vetuform5780 Жыл бұрын
correct
@mayank8387
@mayank8387 Жыл бұрын
But you're the first in my heart bro 😄🫶
@kermitdafrog8
@kermitdafrog8 Жыл бұрын
Definitely not last
@vetuform5780
@vetuform5780 Жыл бұрын
@@Proferk you are an absolute beast bro. neo of this world
@aupaca
@aupaca Жыл бұрын
Frame of Essence *cOuGH
@sobanejaz123
@sobanejaz123 Жыл бұрын
2:02 got me laughing🤣😆
@QmVuamFtaW4
@QmVuamFtaW4 Жыл бұрын
This is amazing, no one could have explained this easier than you.
@Timm2003
@Timm2003 Жыл бұрын
Wow, when i saw that the video was just 8mins i thought it couldnt get into that much detail without skipping stuff, but u smh made it! + its nice that things are explained on linux as example, i use debian btw
@LowLevelTV
@LowLevelTV Жыл бұрын
Glad you enjoyed!
@cristiconstantin452
@cristiconstantin452 Жыл бұрын
There's some misleading information: at 7:40 it's stated that "the kernel brings in a program called the dynamic linker that runs alongside your program when it starts". Later, at 7:56 it's stated that "... the dynamic linker that comes with your program ...". This is contradictory information and it's not clear whether the kernel or the program provide the "dynamic linker" part. Also, at 7:27 it's not clear what exactly the "loader for your program" means or does, as it is only mentioned and later discarded. It would be great if you can clarify these points but I like your channel anyway. Cheers!
@Gooberpatrol66
@Gooberpatrol66 Жыл бұрын
I can't answer your question because youtube thinks my comment contains a URL and deletes it. This is really an abysmal platform for educational discussion.
@aravindhemachandran
@aravindhemachandran Жыл бұрын
Really well explained the complete process! Thanks a ton for this video😊
@GeekyMino
@GeekyMino Жыл бұрын
It's amazing how good this video is!
@piesek7489
@piesek7489 Жыл бұрын
sup! thanks for the vid, always get excited when new vid comes, god bless
@damn_right_man8606
@damn_right_man8606 Жыл бұрын
Amazing. Keep on.
@LowLevelTV
@LowLevelTV Жыл бұрын
We will!
@AceofSpades5757
@AceofSpades5757 Жыл бұрын
This was a fantastic and clear explanation. Thank you!
@eliasgvinp2141
@eliasgvinp2141 Жыл бұрын
I am destroyed... I learned more during this 8 and a half minute vide than during a couple of semesters in my university
@Trucho1996
@Trucho1996 Жыл бұрын
As a JavaScript developer i would like to write an operating system in JavaScript and the ui in react. Minimum memory required 64gb
@paulmundt3990
@paulmundt3990 Жыл бұрын
While the compiler is free to choose between bss and data, your uninitalized_memory global will ordinarily be placed in bss and initalized to 0. Explicitly initializing to 0 could have the unintended consequence of shifting it to .data, but most compilers are smart enough to position it in .bss anyways. GCC at least has flags to control this, -fzero-initialized-in-bss/-fno-zero-initialized-in-bss, with the former being the default.
@Veptis
@Veptis 5 ай бұрын
I am doing a TA job for a parsing class. but in theoretical linguistics. And some of the stuff we teach is helpful for the stuff I am working on. But using tree sitter and it's matching language - is still difficult
@KaidenBird
@KaidenBird Жыл бұрын
You don’t want to upset people who write assembly, there’s at least 6 of us.
@深夜-l9f
@深夜-l9f Жыл бұрын
thanks for making us better developers, sincerely
@SirusStarTV
@SirusStarTV Ай бұрын
4:16 uninitialized_memory that is initialized with zeroes, it takes space in your exe or elf file instead of just storing the size of memory that needs to be allocated at runtime. If you want uninitialized variable just don't write any value to it with = sign.
@TechnicalHeavenSM
@TechnicalHeavenSM Жыл бұрын
What a co incidence.. I was literally reading many articles about this same topic, then I got the notification😅😅
@MorningStarChrist
@MorningStarChrist Жыл бұрын
I once contemplated building an object code keyboard
@saviofernandes5263
@saviofernandes5263 Жыл бұрын
At 0:35, why are there floppy disks on that programmer's desk?
@tmahad5447
@tmahad5447 Жыл бұрын
4:21 Low Level Learing: Uninitialized memory. C: Initialized variable as {0, 0, 0, 0 .... 60 more zeros}
@johnmaguire3608
@johnmaguire3608 Жыл бұрын
I can't wait to get my elf parsed.
@BenEehayeh
@BenEehayeh Жыл бұрын
How to extract the Abstract Syntax Tree and visualize it in Constellation or other data Viz app. With LLVM? How would the same program written in different languages appear in the Abstract Syntax Tree?
@mr.togrul--9383
@mr.togrul--9383 Жыл бұрын
I read the message of binary in @0:21, I got rick rolled, "Never gonna give you up Never gonna let you down". Nice one
@LowLevelTV
@LowLevelTV Жыл бұрын
FIRST ONE TO NOTICE :D
@esrx7a
@esrx7a Жыл бұрын
Simply awesome 🎉
@mdski95
@mdski95 Жыл бұрын
2:24 👽 my respecc good sir
@pitpotputpet
@pitpotputpet Жыл бұрын
Yep. This is what I'm here for
@arkadiusz6688
@arkadiusz6688 Жыл бұрын
I love love love your videos I just wonder where can I learn more about software development ad how?
@jemo_hack
@jemo_hack Жыл бұрын
Really cool, but you kind of left us half way there… there us a cool video that complements this from David Smith that might be work looking into, it’s a hand made executable (elf) hello world for Linux X856.
@nixlq
@nixlq Жыл бұрын
More like that!
@cloey_b
@cloey_b Жыл бұрын
Man, I just found this channel and it's definitely sent by God, because I'M INTERESTED IN EVERY SINGLE VIDEO.❤
@LowLevelTV
@LowLevelTV Жыл бұрын
Welcome aboard!
@speedTurtle
@speedTurtle Жыл бұрын
These type videos attract the backseat driving "I would have done it this way" type guys like moths to a flame. Scrolling the comments just to see how many nitpickers who've never made their own compiler video tell this guy how to do his.
@durikke2
@durikke2 Жыл бұрын
What font is used in the "coming up" intro part?`
@kvelez
@kvelez Жыл бұрын
Awesome.
@sim0ne_pl_
@sim0ne_pl_ Жыл бұрын
Where to learn C? My hobby is programming and learning how computers works but I learned everything by my own and I started from high level languages like C#, python, js and idk where to learn C in most efficient way and understand things like handles, memory leaks, making code less vulnerable but without repeating everything like "This is variable. Variable is ... " over and over. And how is C compared to C++. Is It worth to learning C and then next C++ or just take everything at once ( Cherno has awesome tutorial about C++ but I decided to first learn C. Maybe I'm wrong ). I thought raw C is good starter for rust which is language i would like to learn in future. So finnaly, where to learn C for mid averange programmer ( mostly with high level languages ) and is It worth to learn C and C++ separatly or just learn C++ right away? Thanks for every help.
@maxmuster7003
@maxmuster7003 Жыл бұрын
I use the assembly programming language.
@Murderbot2000
@Murderbot2000 Жыл бұрын
Compilers do kind of blow my mind. Is there a source (like a book, not a program) that would illustrate compiler design? I’m trained as an electrical engineer and am proficient in assembly. I only mention this as something to provide context, if anyone would answer this.
@Gooberpatrol66
@Gooberpatrol66 Жыл бұрын
Try "crafting interpreters"
@Murderbot2000
@Murderbot2000 Жыл бұрын
@@Gooberpatrol66 my guess would be that an interpreter would be a tougher job. I’ve been distracted from this , lately.
@makee28
@makee28 Жыл бұрын
Hello man
@ac3_train3r_blak34
@ac3_train3r_blak34 Жыл бұрын
You know you've made it when you got that Brilliant money 😂
@whamer100
@whamer100 Жыл бұрын
lmao missing spotted at the beginning
@parallellinesmeetatinfinity
@parallellinesmeetatinfinity Жыл бұрын
KZbin recommended me while watching Javascript tutorial 🤡🤡
@MH_VOID
@MH_VOID Жыл бұрын
it knows just how fed up you get with JS
@Oldiesyoungies
@Oldiesyoungies Жыл бұрын
yes
@esra_erimez
@esra_erimez Жыл бұрын
Fun fact: The Intel iAPX 432 was a CPU designed to be programmed in high-level language
@smorrow
@smorrow 5 ай бұрын
AT&T CRISP, used in the Apple Pippin
@otesunki
@otesunki Жыл бұрын
its the magic smoke obviously
@Johnsmith-yv8tx
@Johnsmith-yv8tx 4 ай бұрын
I am swimming but I don know if I am drinking coffee or not :D
@user-td5gy2fh3p
@user-td5gy2fh3p 11 ай бұрын
what's that vim theme?
@KangJangkrik
@KangJangkrik Жыл бұрын
Why we need loader for EACH segment? That doesn't make any sense
@itsKOTU
@itsKOTU Жыл бұрын
Notification gang 😈💻💯
@echoptic775
@echoptic775 Жыл бұрын
We love casting spells😈
@williamdrum9899
@williamdrum9899 Жыл бұрын
So riddle me this: what makes compilers not AI? It seems like they basically write assembly code for you based on vague suggestions
@judgeomega
@judgeomega Жыл бұрын
well one, who said they arent ai? and two, programming languages are hardly 'vague'
@OneMilian
@OneMilian Жыл бұрын
Compilers don't learn and improve, like AI does
@PatrioticGestalt
@PatrioticGestalt Жыл бұрын
Ok. Next topic. Your program in a microcontroller. Go.
@nicolaskeroack7860
@nicolaskeroack7860 Жыл бұрын
its kinda what chat gpt does *clickbait* title lol
@sreejishnair5922
@sreejishnair5922 Жыл бұрын
Hence proved we live in a matrix
@ArgumentShow
@ArgumentShow Жыл бұрын
Who is this guy @1:55 . i have alway wanted to try and program in binary
@ragnarock811
@ragnarock811 Жыл бұрын
Just a random guy on internet~
@capthehacker9985
@capthehacker9985 Жыл бұрын
I think that's Linus Torvalds. I'm not sure tho.
@ishaangupte3336
@ishaangupte3336 Жыл бұрын
@@capthehacker9985 yep its him -- creator of the linux kernel
@ragnarock811
@ragnarock811 Жыл бұрын
Lol it was meant a sarcasm
@smorrow
@smorrow 5 ай бұрын
The joke is *he really did* program in machine code. *Because he didn't know there was such a thing as an assembler.*
@fus3n
@fus3n Жыл бұрын
bruh
@openwaysociety
@openwaysociety Жыл бұрын
Doesn’t answer the question when everyone keeps personifying computers
@joshuavincent7884
@joshuavincent7884 Жыл бұрын
audio too low
@GTA_FIRST_PERSON
@GTA_FIRST_PERSON Жыл бұрын
sound too quiet
@float_3.14
@float_3.14 Жыл бұрын
Ok.
@CC1.unposted
@CC1.unposted Жыл бұрын
Second
@superduper6090
@superduper6090 8 ай бұрын
3:07
@SaudiHacker
@SaudiHacker Жыл бұрын
There's a slapping sound in the background that's annoying and distracting
@GustavoPinho89
@GustavoPinho89 Жыл бұрын
Bro, this Brilliant blocky cody thingy is sooooo infantilising. Their other courses are amazing, though. But, again, if you're not using the keyboard, you're not programming
@doezage
@doezage Жыл бұрын
Definitely not last
@astric32dll
@astric32dll Жыл бұрын
j
@Gh0_-st
@Gh0_-st Жыл бұрын
i love pineapples on pizza
@simonfarre4907
@simonfarre4907 Жыл бұрын
Also, It's not just the .text section that gets mapped in, into that program segment that you talked about, although you called it the ".text segment". Other executable sections also get mapped in there, like .init, .fini, and .plt - it's really arbitrary, but it is executable code that ends up in that segment (because it has the executable flag set 'X'). So you're confusing the .text *section* with "segment". A segment is a combination of multiple *sections*. So it's the "text section" that it's called, not the text segment.
arrays are weird
6:57
Low Level
Рет қаралды 114 М.
using numbers in your code is bad
14:33
Low Level
Рет қаралды 144 М.
كم بصير عمركم عام ٢٠٢٥😍 #shorts #hasanandnour
00:27
hasan and nour shorts
Рет қаралды 10 МЛН
Как Я Брата ОБМАНУЛ (смешное видео, прикол, юмор, поржать)
00:59
Натурал Альбертович
Рет қаралды 3,9 МЛН
1, 2, 3, 4, 5, 6, 7, 8, 9 🙈⚽️
00:46
Celine Dept
Рет қаралды 113 МЛН
I Reverse Engineered this Program Automatically.
16:53
Low Level
Рет қаралды 77 М.
the truth about ChatGPT generated code
10:35
Low Level
Рет қаралды 232 М.
why are switch statements so HECKIN fast?
11:03
Low Level
Рет қаралды 428 М.
How A Steam Bug Deleted Someone’s Entire PC
11:49
Kevin Fang
Рет қаралды 1 МЛН
How do computers read code?
12:01
Frame of Essence
Рет қаралды 3,1 МЛН
computers suck at division (a painful discovery)
5:09
Low Level
Рет қаралды 1,7 МЛН
How does Computer Memory Work? 💻🛠
35:33
Branch Education
Рет қаралды 4,1 МЛН
how Google writes gorgeous C++
7:40
Low Level
Рет қаралды 952 М.
كم بصير عمركم عام ٢٠٢٥😍 #shorts #hasanandnour
00:27
hasan and nour shorts
Рет қаралды 10 МЛН