unlock the lowest levels of coding
Vložit
- čas přidán 25. 05. 2024
- People hop on stream all the time and ask me, what is the fastest way to learn about the lowest level? How do I learn about how computers work. Check out this video to find out.
Code: pastebin.com/raw/TpHbB91G
🏫 COURSES 🏫 Learn to code in C at lowlevel.academy
📰 NEWSLETTER 📰 Sign up for our newsletter at mailchi.mp/lowlevel/the-low-down
🛒 GREAT BOOKS FOR THE LOWEST LEVEL🛒
Blue Fox: Arm Assembly Internals and Reverse Engineering: amzn.to/4394t87
Practical Reverse Engineering: x86, x64, ARM, Windows Kernel, Reversing Tools, and Obfuscation : amzn.to/3C1z4sk
Practical Malware Analysis: The Hands-On Guide to Dissecting Malicious Software : amzn.to/3C1daFy
The Ghidra Book: The Definitive Guide: amzn.to/3WC2Vkg
🔥🔥🔥 SOCIALS 🔥🔥🔥
Low Level Merch!: lowlevel.store/
Follow me on Twitter: / lowleveltweets
Follow me on Twitch: / lowlevellearning
Join me on Discord!: / discord - Věda a technologie
0:10 “My name is Low Level Learning”
Your parents have an odd way of picking baby names.
ynah, was thinking on same context "my name is ..." oh lol
How dare you spit on the age-old traditions of the house of Level Learning! For shame!
L³ = L Cube? 😅
Hahaha 😆😂
Nominative determinism for sure
I think to learn the lowest level, the first thing you learn is how to identify copper ore. More practically, maybe nandgame.
acquire rock. shoot lightning into rock. make rock think. observe
If you are not assembling the copper atoms by hand from subatomic particles is it even low level?
@@LowLevelLearning i did not expect to see you here
he is too deep
Copper? Copper is nothing except being constructed above silicone. Master silicone, master computers.
C program teaches you that with great powers comes great responsibilities
C is the super programming language, or as i read in my college, C is God's programming language
@@melficexd Holy C the goat/TempleOS😂
@@melficexdclearly your college needs more LISP
God only had 6 days, he didn't have time to debug seg faults.
very nicely said
and big fuck ups -- which is how we learn
1- code in low level
2- Learn an Assembly variant
3 Learn Reverse Engineering
4- Pick up a board to learn write C on it
5- code in python
6 - go for web career
7 - You may now code in scratch
8- Change the field and learn Biology. You have wasted much of your life on a screen. 😂
You mean 0,1,2,3. That's a top 3 remember
"We tricked rocks into thinking." I love this.
🤯
@@EdWestfieldJr 🤯
Highest Level Programmer/Hacker: "I only do my programming and hacking on the highest level, social engineering. I don't even touch the keyboard anymore. I just manipulate people and have them do that task for me."
You work in the 'news'?
Haha😂 So true, love this comment
This is what is known as a "Software manager", or possibly, "Senior Developer" who spend 70% of their time reviewing other people's code and 30% of their time in meetings.
Ah yes. Thats what Linus Torvalds taught me back in 2007
no need to use a fancy tool if you just call them up, pretend you're their district manager, and ask for their password
I learned ASM6502 (assembly) for NES game programming - one of the best things I've ever done. Any time someone talks about registers, the stack, bit shifting, etc... I feel like I (at a minimum) broadly understand what they're talking about, regardless of the programming language.
If C is not low level, Python is raw English
It all depends on what you compare with haha. Back in early 80s C was for sure considered pretty high level
Absolutely spot on! I'm retired after 45 years in my career that started first in hardware (Data General Nova and Eclipse), assembly programming on the same. I learned C from the first edition of K&R C Programming language writing network software for bridging the minicomputers to Novell PC based networks. Knowing the internal register architecture was key to understanding every processor I've used since. I can't quantify how many hours I spent in CodeView hybrid view where the C code was shown in assembly for debugging. I spend most days even now in C on the various microcontrollers enjoying embedded programming. The ties between hardware understanding and programming is essential.
Hey I wanted to ask if K&R is the best for a completely new programmer, don't know anything.
Will it take me from 0 or does it expect me to be at 30 to take me to 99?
@@aayamgiri The K&R book was a reference for us when the C language was new. Now there are so many resources available, even for free, on the net that I wouldn't start with K&R. Even small platforms like the Arduino are excellent to learn C programming and the number of example programs is astronomical (and with the Arduino/ESP platforms you can extend your learning into Python easily as well.)
Great place to start,
I tried to write a blinker led example in assembly before for an Arduino nano before and it was challenging and teaches a lot of stuff, so seeing you releasing a video about that topic exactly made feel more confident that i'm in right way
Wheeew - simply couldn't agree more. I've been coding casually, but also to a degree professionally (Think DevOps as opposed to developer) for nigh on 20 years. A few years ago I started to pick up, essentially, what this video says - I dipped my toe into Reverse Engineering, I started playing with C, and I started writing embedded software for STM32 devices (and now Raspberry Pico) in C & now Rust. Without a doubt, I've learnt more in 2 years of those projects than in the preceeding 18 despite having a vast list of succesful projects under my belt. Modern software just abstracts SO much - honestly, I would say I didn't even really, truly, understand arrays and lists until I learnt C. And then you start writing embedded and realise there is no memory allocater, and THEN it gets interesting all over again. I just wish I'd picked this stuff up 20 years ago.
As someone in the automotive industry for 30 years I am looking into embedded c & misra c variants. Every night I'm learning the c language and the concepts arrays, pointers, recursion, etc etc. What path, data structure, and/or syntax would you say is the best to concentrate more on?
@@GL0697 If you are following MISRA, then you really should just read the document. It instructs you on the do and don't with the reason why.
@@YandiBanyu I guess I'm looking for practice problems/projects that I can do to learn. So far it's just scouring the internet.
This video came at the right time for me. I'm a backend engineer working primarily in Python, but I've been feeling an urge to start tinkering with something lower level. I want to start datamining games but I have no idea how to do it given the files are encrypted. I found your channel because I was looking for stuff on reverse engineering.
Learning Cryptography may help
INP: "a"
Base 8: 141 | Octal
Base 10: 97
Base 16: 61 | Hexadecimal
B Stack | 001000 => 512
this great advice. this was a really interesting video, so packed with information that I watch it twice (because i usually watch doing the dishes, and I missed some of the information. )
Get a uC like any Atmel ATMega.
Code with C, later use ASM and toggle some outputs, control a motor, led, pumps etc. and create a small project like an automatic water pump that pours water on a plant when it's getting too dry (measure impedance between two nails).
I like your mindset, teaching people low level as we move into more abstract and advanced tech. You're doing gods work.
Thank you for guiding me. I always enjoy learning about how computer stuff works. Thanks for your amazing content!
Was waiting for you to suggest Machine Code. (I knew someone who was teaching themselves to program with this on a ZX Spectrum 128k back in the 80's...)
I'd love LOVE love to see a video about the best practices for rewriting a high level lang to low, I can interpret x86 asm perfectly and vice versa but when I'm RE'ing I tend to create something that's only good enough to run.
Great video fren
I love Your work. Your knowledge spreading and enthusiasm is contagious!
Keep on being like that.
Lowest level programming is one of my favorite CZcams channels ever. When I first got into tech I was pushed more towards front and engineering which is all fine and dandy but I found that I wanted to learn how the hardware interacts with the software. A lot of people seem to think that that is not needed anymore but I came to find out that a lot of people who have those skills are retiring or literally dying off.
So I predict that there is going to be a high need for people that understand very low level code - even if there are not as many job openings as say JavaScript Developers, companies will have a hard time finding people for low level jobs.
great message at the end man, great message
0:00 🎓 Focus on learning low-level concepts such as C programming language.
2:49 🧠 Understanding an assembly variant provides insights into CPU behavior and aids in code optimization.
3:56 🔍 Learning reverse engineering basics enhances understanding of code functionality and aids in debugging.
5:18 💡 Exploring embedded systems with boards like STM32 and writing C code for them enriches low-level understanding and practical skills.
Wow your closing statement is something I have thought about before. Especially since today almost any developer job is mostly using dependencies and working in the higher level which ofcoure is fine because it's more time and quality efficient but I have questioned whether with time developers will forget how the lower level works.
Turing complete on steam teaches you how a computer work from the very beginning in a very pedagogical way, it's very nice.
Spot on with technological advancement abstracting us away from the metal.
There's a lot of focus on how your cpu does things, and honestly there's a lot I personally could learn there but I think the one topic you might be overlooking is how memory access and caching works. I spent a few months reading and learning about efficient use of cpu caching (and as a result efficient multicore programming) and it blew my mind what a difference it made. I recommend the paper What Every Programmer Should Know About Memory by Ulrich Drepper.
What an incredible idea for a channel. Instant sub.
Very lovely sentiments at 6:00
I've been looking at your videos, and I really think that they're of great value for any programmer, especially those who learned through high level languages. I'm really impressed. Great job.! I'd recommend your channel to anyone.
Btw, would you recommend any particular assembler for the arm64 architecture? I'd like to build up a forth system from scratch.
“Or… God forbid… Javascript…” Yup, very accurate! 😂😂😂
Is js bad?
@@TheVirtualArena24 not necessarily. It just shouldn't be used for everything. It's just a bit of a meme due to its weird behavior and funky ecosystem.
@@multivitamin7 ohh ok
I remember trying to learn JS after first learning C and Python, some of the behavior in that language blows my mind that it's as widespread as it is
@@moistnar true but the same can kinda be said for python as well. Python is also super quirky.
Hey, recently came across your channel and really like your approach to programming content. I’m currently learning C and dipping my fingers into graphics programming. Do you have a curated playlist for all your C videos? Can really use all the help to learn it well 😊
Years ago I stumbled upon Ben Eater and followed along with his 8-bit breadboard computer.
I understand how logic operates on the physical level but I didn't know any code.
So I went the complete polar opposite and learned Python.
Now I'm learning C++ and working my way back down.
It's cool because in my head when I'm thinking about a problem I weigh the time/effort of soldering components vs coding it up.
Master Wizard. You have edified us.
I've been making small steps into 6502 assembly recently and I don't even know C that much, but I love hardware 😁
C is a layer directly on top of assembler, and is best approached on this basis.
Love that last part about tricking rocks to think. My own personal definition of magic is "the ability to manipulate reality with consciousness". When it comes to computers I think we do just that, which is part of what makes it so cool.
I tried it with chatgpt, but it creates to much error.
Getting a better understanding of low level is underrated for developers who are used to work with high level languages. I myself sort of stumbled into getting familiar with reverse engineering and assembly through retro game modding and it dramatically enriched the way I think about software. Luckily some c++ experience had me used to the idea of looking at memory directly, that's another one I think is very underrated. It's that extra bit of context that completes the picture.
Do you recommend new "low level students" to create a compiler from scratch as one of their first exercises? Like, just by studying how a compiler works and start making one just by searching how to implement each small part of it?
I really want to make one to improve my knowledge and reasoning, but I don't know how difficult it is
Please bring back low level review. I have a great project for your channel
I feel like I learn alot of what you talked about in my university degree, I'm not a master but I have a great foundation to learn from.
The best advice in my opinion is to learn Delphi. With the Pascal language and inline assembly, you have maximal low level abilities, but get to produce a useful, tractable Win32 native app with a GUI form editor and very useful RTL which is way cleaner than Cpp STL.
Get a bunch of datasheets online and learn to understand flight times in devices like logic, programmable logic, common microcontrollers, and overview of the interfaces/buses your code is working with. Go through the pain of doing a bit a math for a little while and not only will you become a sniper for particularly difficult groups of bugs to reproduce/fix you'll also be much less likely to code something like that in production. Coding snippets that "break" silicon and then heal it *magically* are sort of fun to do and frequently you even end up finding an actual silicon or microcode bug of your own; exercising code should be something you do often while learning to instrument your debug versions, and in doing so you'll find quirks (every system has some somewhere in it) and "fix them in software".
Having coded for Motorola 6809E and some 68k back in the 90s, the one thing that I've noticed over the last few decades is that people in our technical field have lost the ability to troubleshoot. Learning by making mistakes also seems to be stigmatised somewhat. It's by going through this process and stumbling and failing, then being able to find your bugs that you learn. The ability to leverage internet searches at your fingertips and the collective knowledge of peers is incredible today compared to 30 years ago. And of course "Digital Intelligence"(AI) has also spoiled us. Learning the low level is great but not everyone necessarily appreciates it significance. Do modern curriculums at university even teach it anymore? Or is it merely that the amount of compute at our fingertips spoils us? Loving your videos and thank goodness for people like you. 👍
I follow this channel a lot, and I really like C/kernels and low-level programming in general. Would you say for someone who's not a beginner but not an expert either to learn concepts from a book first, lets say operating system internals/kernels and then apply those concepts/implementation? I've been trying to learn and understand all things low-level and hopefully someday land a job in this niche field but I only have experience in high-level web/mobile development.
This channel is a gold mine
Writing OS from scratch was the best learning experience for me. It didn't have userspace or scheduler, but it gave me the basic idea of how computers work.
3:08 I think the problem with that is that modern compilers perform so many optimizations that it's mostly not possible to guess what a given piece of code will compile to unless it's a trivial case. Absolutely agree that you should know how a CPU works, but imo actually going to the assembly level only becomes relevant when you're writing high performance code or want to know some specific detail about your code
To further discuss about C being low level, defining low level language will depend on what are you doing. If you are doing C programming and use a framework, can it still be called low level? Or is it like dialect where the language is the same (C) but how you use it can vary with framework to framework? Arduino framework literally abstract away a lot of things but still give you access to hw if you need to. But yeah, all things considered, C language has a compiler for most architecture so it's still quite universal while being able to do low level stuff.
This is good. The libraries out there today can get you to blink a light in literally 10 seconds flat. Writing the entire program that does this without said libraries is MUCH MUCH harder and will require you pull out datasheets and will force a much deeper level of understanding.
@@LiveType yep. But it's sad to see that simpler architecture is being abandoned. Atmega is not being used on the newer Arduino model IIRC. I forgot the replacement but it was really more complex so I don't think it will be suitable for beginner learning.
Lmao, I opened your website from the description and my antivirus immediately flagged it as a malware.
LoL it's funny as I learned assembly before I even learned C! Turbo Pascal was a great low level language back in the early 90's as you could write whatever you needed in it but could easily embed assembler inside your Pascal code without needing external files.
In fact, when the x86 made the jump from 16-bit registers to 32-bit. The current assembler in Turbo Pascal didn't know how to use them so we'd have to embed machine code nemonics inside our inline assembly code to use 32-bit instructions. If I recall correctly it was something like:
db 0x66;
Machine Language < Assembly Language < C/C++
Getting the bug recently to learn either c or zig. Did c in college but now I feel like I could understand it much better
It is absolutely important to understand the lower level sw .... There are very few kernel , firmware , system software engineers.
Loved the Skyrim reference with the greybeards comment! I still play it to this day. That was Todd Howard's true "magnum opus."
I learned basic then assembly on an Atari 1200xl back in the early 80s'. Once we started using Apple II computers in junior high school, I learned Pascal and C on it. Since then I've read countless books on various architectures and I can't tell you how learning assembly and C has made my life so much easier. I didn't have the Internet back then, so computer magazines like Antic, Analog, PC Magazine and others, and later bulletin board systems, were my main source of learning how other people wrote code. I reverse engineered numerous programs to learn how professional programmers wrote programs, and I learned a lot of tricks from that back then. The last 30 years as a Software Engineer have been so much easier and fun because of learning the basics of how various processors and architectures work, and how to get them to do what you want using assembly and C. Sure, C++ and C# are my daily drivers for Windows applications; but for fast routines, I still rely on C and assembly.
Come here after the stream.
I’m BMDaemon, I asked about what book should you recommend to learn low level from ground up.
I love your stream, thanks you so much. 😊
Thank you brother for the video ^^
Using C, you can not create big things but you can apply your knowledge on small and outdated things. Using object oriented concept, you can create complex but efficient architecture.
I wished you’d provide excellent links. There’s a lot of trash online and helping people find good sources will make them work out what’s a good source and what’s trash.
One thing that might help a beginner is game development in asm, I found it to be really useful developing simple games for the Atari 2600 on the 6502 processor
I implemented my own scripting language interpreter/vm in c and then in rust to get an understanding how compilers work.
I never learned C, but assembly first on C64 and later x86 assembly on intel 80286 starting with DOS Debug, but without internet. Today we can download intel developer manuals for x86 CPU and documents from AMD too.
In the last time i used batch files as an open source container to put x86 assembly instructions inside to build a routine to create tiny executable files for the Dosbox emulator. I made some videos(no speech) to show how it works and to share the batch files. Have fun.😊
You can learn C in less than a week, but pointers might take a lifetime. FWIW, C is my favorite language. It's fast. It's very well debugged. It also has unintelligible error messages, and its libraries have unstandardized APIs, e.g. malloc takes one argument, calloc two. Both simply allocate memory.
It may be a good idea to learn assembly for a 6502 or 6510. It's very basic (no pun intended) and it helps you learn the basics with minimal registers, and a very limited instruction set. I think you may be able to find a C64 emulator with an assembler.
I feel assembly poor now. But really agree about the micro-controllers, they taught me so much
As an embedded developer, I couldn't agree more.
The only thing that is quite alien to me and will likely always be is X86 assembly. I dabbled into it way back when Real Mode was the only mode you'd use, but when I look at 64-bits code, I don't understand a thing. But then again, I hardly program anything for the PC - mostly just tools for my actual work, and those tools often are written in Python. But I do understand ARM assembly to some degree, and I worked a lot in assembly on different 8-bit MCUs. There was a time when I even knew most of the 8051 opcodes and could basically read a hex dump as if it were an assembler listing.... 😅
And when it comes to STM32 - while their idea of generating a lot of code for you is nice, the code is usually pretty terrible. As is their Eclipse-based IDE (ugh), but fortunately you don't have to use it.
I'm really late to this and really "new" to low level programming (still a student) but I think playing the game Turing Complete is a really fun way to learn about computer engineering (from logic gates to the instruction set and writing some assembly).
I've done the exact steps but backwards. started on an Atmel chip (before Arduino was cool), then reverse engineering, learned assembly along the way and recently I wrote a lot of C. And I still somehow don't hate javascript.
I'm at work, at a Service Desk. I finished an application in Python recently (my first app). My career is heading towards Network automation / Cloud. After this project-and after seeing a lot of your videos-I want to learn C to do socket programming. I don't have time at home because I'm studying networking. Do you think it is possible to learn C at work using only the internet (no books)?
In my opinion, the best way to learn low-level stuff is to write a compiler back end from scratch.
Interpreters and emulators are quite good for this too, and are good stepping stones before compiler.
@@PushyPixels Is it easier to make an emulator than to make a compiler? I thought it was the opposite
@@trots4940 it's not that hard to make emulator that just works but way more harder to make it run fast and not consume too much memory
@@user-hg4ni3kr6f It makes sense. I really want to make some simple games in assembly too, I think it's a good way to learn it
@@trots4940 I mean, it depends on what you are emulating. If it's an old virtual machine like Chip-8, it's pretty damn easy, if you are already a programmer it can be done over a weekend, and I'd expect a student to be able to do it in a couple weeks. Real hardware stuff is definitely trickier, and sometimes you have to deal with things you might not realize on otherwise simple systems. Like when I started making an Atari 2600 emulator, the CPU and memory emulation portions were quite simple, but so much of that system is dependent on NTSC emulation as all the timings come from the TV for that system, and so I didn't get graphics up and running nearly as easily as I thought I would. NES is actually not tooooo bad if you are focused on just the simplest mapper (emulating Donkey Kong) though I haven't actually done that one myself yet (it's next on my list). I haven't explored Intellivision but it might actually be a really good candidate for emulation practice as well, as it's a bit more advanced than Atari but still not super complicated hardware-wise.
Make a playlist on C. We really wanna learn C on this iconic Channel, Please.
Sounds great. When are you going to have your own complete course that covers all these topics? Starting with the basics and then working up. 😂
C was the first language I learned. I was in highschool doing a bridge program to the local community college
The next semester I took a programming in c++ class that had the c class as a prerequisite
Great tips. 🙂🌞
@lowlevellearning I taught myself how to program in ASM for the Parallax Propeller micro controller series. IMHO it's a good one to learn because it's 8-core and comes with native instructions that allow you to write self-modifying code. Have you ever played around with one?
I believe that C is considerably enough low level since it allows memory manipulation. I know it's not Assembly, nor binary, but it is reasonably deep enough so a learner can understand the intricacies of low level coding. Great suggestion.
Thank! Tell us a little bit about how did you transition from web dev to the low level stuff? You used to be a web dev, right?
6:00 - definitely agree here. And... for that reason, I heartily recommend Ben Eater's channel. Build your own 8-bit CPU on a breadboard, and you'll learn so much! Then take it up a notch with the 6502-based computer, too, if you want something _a little_ closer to modern. :)
I'm a little curious about why you don't recommend the use of Matt Godbolt's compiler explorer. I've only recently started watching your videos, but I've never seen you use it, and a lot of the things you do seem like they would fit in very well there.
Awesome content!!
Thank you very much
I wanted to make my channel a Python one, but C is the king no matter what, you are super right on everything!
Hey man, love your videos btw! I just recently completed my piscine and you helped me a lot.
@imprlanass are you talking about the 42 piscine ? I also just completed it in November and will be starting the core in May
@@AEONIC_MUSIC eyy congrats bro! Yes I’m talking about the 42 piscine, hope I’ll get accepted as well
@imprlanass I hope you do aswell it took a month or 2 before I was told anything
The distinction might be lost on people now since we take it for granted, but the essence of a high level language is that it removes the need for necessary pointers. It is nice not to have to write them everywhere since they're redundant, and it also allowed languages to be accurate without the need to specify a processor width or add other similar low level schemes.
I once wrote a http server In intercal
The fact it occasionally returned something RFC compliant was a win.
First Rust will never supersede C if that case it might be Zig. But I think C will never be superseded just because of the sheer quantity of C code that will never be rewritten because it would be a waste of capital. There’s far less COBOL and we still have cobol running and still seeking developers to maintain it.
Master quantum physics than you’ll approximate understanding as to how electrons behave in silicon.
But I agree with your list. Sane must I push on people.
What is the difference between writing c for your pc/linux/mac, versus a microcontroller?
Other than the obvious hardware constraints?
I would like to tackle this little stepping stone for myself, I know C programming on its basics and a bit intermediate, but most of my knowledge is in data structures and stupid leetcode type exercises ive done. When i go and check out some C projects in github im mindblown because even some simple programs are done with a lot of variables, libraries or functions i have never ever heard of. How can i start to get into more professional (& secure i suppose) C programming?
I feel liek C doesn't do the "forces you to write bulletproof". It will absolutely let you shoot your foot with little concern. Rust FORCES you to write bulletproof, since. itwill just refuse to compile.
Maybe it’s also good to get some hardware level insight. I do believe improving skills in software and hardware support each other.
Great content!
0:47 "God forbid Javascript." LOL!
Great, you finally answered my question that I have asked you in twitter message 😂
I go pretty low - I've got a couple of X86 instructions that are mine and I arranged the gates behind those instructions. However I work with people who arrange the atoms that make up the gates, so they go a lot lower.
Programming at a low level is pretty easy. In my youth, after I learned BASIC I start programming 6502 assembly on my school's Apple IIe. Programming in a modern language and knowing how the memory models work is where the challenge is.
there is more to it than that
@@efdbjon2114Actually there really isn't. Sure if you are reverse engineering compiled code, you have to know how registers and the stack are used for calling functions, but there is nothing mysterious about assembly.
I joined computer science because I always wondered how it actually works under the hood but ended up in Android Development 😂. 😢
I don't like developing at such a high level but sometimes...
nice vid!
thank you :)
THANK YOU.
AWESOME!
will you explain in more detail why developing a HTTP server is such a good exercise? thanks!
It's pretty easy to copy past JavaScript into C, mostly you end up changing 'const', 'let' and 'var' into the C types. If you use typescript convert the type definitions into structs and for the last trick convert the function defs into C style functions.
For all the JS haters, the syntax is designed to be close to C.
Is your last name really Faag-uilar?
The beauty of this approach is it's as degenerate as JavaScript itself and also at the same time is as degenerate as writing C in 2024. Happy coding!
Best description I've heard for a computer "We literally tricked rocks into thinking"
When you’re running a VM, do you run windows or Linux? Thanks for the content.
Was ein cooles Video, mega wilder Job. Würde ich vielleicht mir mal so als Plan D aufschreiben