Writing a Compiler and Interpreter in Rust - Part 1

  Рет қаралды 5,231

Lion

Lion

Ай бұрын

In this series, we write a compiler and interpreter for my stack based language "MCL" (a programming language I designed) in Rust. Originally written in C++, we investigate how it works, rewrite it in Rust, and optimize the hell out of it.
In this episode, we look at the old code, and then get into actually writing some Rust! Exciting.
The codebase will be on GitHub, but in this video we don't produce enough code to push anything yet. The original mcl is at github.com/lionkor/mcl

Пікірлер: 21
@kamertonaudiophileplayer847
@kamertonaudiophileplayer847 28 күн бұрын
Everyone has the idea to create own language, a compiler, an interpreter and so on. Certainly, I did it too. I am glad that someone is willing to share the idea. My way was a bit different, originally my language was written in Java and then I rewrote it in Rust.
@lionkor98
@lionkor98 28 күн бұрын
It's a wonderful challenge, especially when you go more in depth than "just" a stack based language like we do here
@kamertonaudiophileplayer847
@kamertonaudiophileplayer847 27 күн бұрын
@@lionkor98 Sure.
@mathmo
@mathmo 29 күн бұрын
Looks promising! You should create a playlist for these videos.
@lionkor98
@lionkor98 28 күн бұрын
Done!
@aayushashokkashyap
@aayushashokkashyap Ай бұрын
These days my feed has gotten a lot better with people like him appearing.
@eineatombombe
@eineatombombe Ай бұрын
cool stuff
@linkernick5379
@linkernick5379 24 күн бұрын
You've got really appealing ASMR-like voice 🙂‍↔️ But the content is good too, looking forward to see how LLVM works, I hope you'll use it for codegen.
@lionkor98
@lionkor98 24 күн бұрын
Hi, we're probably gonna write our own shitty JIT first to see how far we can go, and then switch to something serious
@slendi9623
@slendi9623 Ай бұрын
hes just like me fr
@vanillarodent
@vanillarodent Ай бұрын
heard we switching to rust
@lionkor98
@lionkor98 Ай бұрын
we have to, its very hip and very cool!
@vectorlua8081
@vectorlua8081 Ай бұрын
I'd honestly rather write stuff in C++, but cargo is simply built different.
@blueghost3649
@blueghost3649 Ай бұрын
Why C++?
@vectorlua8081
@vectorlua8081 Ай бұрын
@@blueghost3649 I just prefer C++, to my monkey brain it just reads easier, and I'm not referring to most C++ 20 features, stuff is living, breathing, nightmare fuel. (specifically std::ranges)
@lionkor98
@lionkor98 Ай бұрын
I agree for the most part, C++ is quite nice and it's still what I mostly write, but rust + cargo are just too easy to not use ;)
@axisaligned9799
@axisaligned9799 Ай бұрын
Why would u want to miss out on traits & algebraic enums? I heavily use them to model language for compilers
@lionkor98
@lionkor98 29 күн бұрын
@@axisaligned9799 exactly
@khanra17
@khanra17 Ай бұрын
Audio quality is wack & over edited
@lionkor98
@lionkor98 Ай бұрын
Hi! I didn't edit the audio at all, I just sound like that. If you mean it cutting out here and there, that's RNNoise noise suppression.
@esiarpze7908
@esiarpze7908 29 күн бұрын
I like the audio, it’s lovely
Writing a Compiler and Interpreter in Rust - Part 2
51:19
Async Rust Is A Bad Language | Prime Reacts
28:46
ThePrimeTime
Рет қаралды 86 М.
I Need Your Help..
00:33
Stokes Twins
Рет қаралды 178 МЛН
IS THIS REAL FOOD OR NOT?🤔 PIKACHU AND SONIC CONFUSE THE CAT! 😺🍫
00:41
Compilers, How They Work, And Writing Them From Scratch
23:53
Adam McDaniel
Рет қаралды 46 М.
So I Made My Own Programming Language...
11:36
Chadderbox
Рет қаралды 79 М.
Learning Rust! | Writing a 16bit Virtual Machine
1:37:34
Tom Marks Talks Code LIVE
Рет қаралды 1,5 М.
Why It (Mostly) Doesn't Matter How You Code In Rust
22:57
Oliver Jumpertz
Рет қаралды 10 М.
Teaching myself C so I can build a particle simulation
11:52
Gradience
Рет қаралды 187 М.
Faster than Rust and C++: the PERFECT hash table
33:52
strager
Рет қаралды 516 М.
C++ vs Rust: which is faster?
21:15
fasterthanlime
Рет қаралды 375 М.
everything is open source if you can reverse engineer (try it RIGHT NOW!)
13:56
Low Level Learning
Рет қаралды 1,2 МЛН
Mojo🔥: a deep dive on ownership with Chris Lattner
48:50
Девушка и AirPods Max 😳
0:59
ОТЛИЧНИКИ
Рет қаралды 15 М.
КОПИМ НА АЙФОН В ТГК АРСЕНИЙ СЭДГАПП🛒
0:59
ВСЕ МОИ ТЕЛЕФОНЫ
14:31
DimaViper Live
Рет қаралды 62 М.