I always wondered; are compilers typically written in C/C++? For some reason I expected it to be done in Assembly. Also, have you thought about trying it out in Rust?
It really depends. The biggest compiler backend, LLVM, is written in C++. The v8 engine which runs a lot of the worlds JavaScript (while not a compiler, but an interpreter) is also written in C++. A lot of big languages, e.g. Go, write their compiler first in C/C++, then re-write it in their own language. I'm not too sure the trade-offs made or why the creators chose these. Assembly would take forever to write :)
Consider emitting machine code in an ELF executable directly instead of piping assembly to GNU assembler. It's actually not that much harder to do and then you have an "actual" end-to-end compiler.
I really like this idea. I've been wanting to learn about the structure of executables. I'd just need to see how much complexity is introduced with syscalls, it's nice to emit just 'call printf'
@@louisb0-yt On linux, it's actually easier in my opinion to directly emit syscall instructions (move syscall number + argument registers + 0F 05) than populate the symbol table for libc functions like printf. Once you are below libc, you can actually innovate (e.g. GoLang's goroutines). Please don't make yet another llvm wrapper with a standard library that wraps libc. The world has enough of those.
I've been using i3 for most of this year. I've found I only need to remember about 3-4 different keybinds total. It takes a bit of getting used to though :)
@@louisb0-yt yes, i also experienced some friction while remembering i3 keybindings, btw i will encourage you to continue uploading such raw videos, they are good and helpful for many.