168 lines
11 KiB
Markdown
168 lines
11 KiB
Markdown
# Resources
|
|
|
|
## Rationale
|
|
|
|
This is a curated list of learning resources because I have been asked "where did you learn X"
|
|
too many times. It's also as a reference for me, so I can re-visit some of the resources in here.
|
|
|
|
I am not affiliated with any of the links/resources, and I either personally use them, used them,
|
|
or would recommend them to a friend.
|
|
|
|
I link/refer to [Krypton](https://git.kyren.codes/kyren223/krypton) a few times, Krypton is the compiler I
|
|
am working on currently, it's in closed beta (such a JBlow move, IK lol),
|
|
If you want access to the repo, just ask me on discord or email me at `<contact@kyren.codes>`.
|
|
|
|
_Also gitea doesn't support footnotes apparently, when u see `[^N]`, go to the bottom to see the footnote._
|
|
|
|
## Recommended order
|
|
|
|
This expects you to know at least one programming language, if u don't, check [boot.dev](https://boot.dev).
|
|
|
|
Resources inside a section try to be ordered from which one to go through first,
|
|
but they are fairly unordered, so go in whatever order you wish.
|
|
|
|
After finishing the C section, I'd recommend mixing these 3 sections:
|
|
|
|
- Get good at using C
|
|
- How to ACTUALLY manage memory (it's easy!)
|
|
- If you are interested in gamedev, then that section
|
|
- If you are interested in compilers, then that seection
|
|
|
|
I also recommend reading this entire page first, and only then starting to go through the resources,
|
|
that way, you have an overview of what's coming up and what order to watch stuff.
|
|
|
|
### Learn C
|
|
|
|
The 7 "pre" episodes of [Handmade Hero by Casey Muratori](https://guide.handmadehero.org) ("Intro to C on Windows") - it's a good but incomplete,
|
|
quick overview of the C language and how memory actually works, but you won't be able to jump into
|
|
programming in C with it.
|
|
|
|
[Boot.dev's C Learn Memory management in C course](https://www.boot.dev/courses/learn-memory-management-c) - it's a good course about the basics of C
|
|
and it shows different techniques for how garbage collectors are implemented.
|
|
But it is NOT a good example of how I'd recommend you manage memory in general (see later sections for that).
|
|
|
|
### Get good at using C
|
|
|
|
[Casey Muratori's BSC 2025 talk](https://www.youtube.com/watch?v=wo84LFzx5nI&t=172s) - Unlearn OOP,
|
|
or more precisely, "compile time hierarchies of encapsulation that match the domain level" (aka inheritance == bad).
|
|
|
|
[Handmade Hero by Casey Muratori](https://guide.handmadehero.org) (first 30-60 episodes) - teaches you to make a game from scratch.
|
|
And actually from scratch, the only thing he uses are OS APIs (which u can't get around[^1]).
|
|
Even if you are not planning to be a game developer, this will teach you a ton, and I highly
|
|
recommend watching it, if you _are_ a game developer, I recommend continuing even after episode 60 (but prioritize other resources first!).
|
|
|
|
[Vjekoslav's BSC 2025 talk](https://www.youtube.com/watch?v=bUOOaXf9qIM&t=2987s) - shows alot of techniques on how to use C in a modern way,
|
|
I found it extremely helpful and practical for architecting my compiler codebase.
|
|
It shows examples for writing your own standard library (base layer), arenas (see memory management section), ditching C-style strings and more.
|
|
|
|
[Semantic Compression by Casey Muratori](https://caseymuratori.com/blog_0015) teaches how to do the "daily plumming" of programmers,
|
|
like extracting and reusing code on a "when needed" rather than premature abstraction, this inspired
|
|
the "Semantic compression over premature abstraction" in the Zen of [Krypton](https://git.kyren.codes/kyren223/krypton).
|
|
|
|
[Ryan Fleury's Realtime debugger architecture BSC 2025 talk](https://www.youtube.com/watch?v=Kvsvd67XUKw) - harder to digest, especially if you are new to this like
|
|
I was when watching it (I would re-watch this again in the future), you may skip this.
|
|
It goes over how to architect a debugger UI, which is especially hard to do, considering cases like
|
|
displaying nested structs, large arrays, strings, image-data etc.
|
|
|
|
[Dennis Gustafsson's Parallelizing the physics solver BSC 2025 talk](https://www.youtube.com/watch?v=Kvsvd67XUKw) - not really about C, but shows
|
|
interesting ways to parallelize things and avoiding mutex contention, would recommend watching this, but not strictly necessary.
|
|
|
|
[Andrew Reece's Assuming as much as possible BSC 2025 talk](https://www.youtube.com/watch?v=i-h95QIGchY&t=2438s) - a ton of things there
|
|
went over my head, and I only watched the first 30m of it, but it's EXTREMELY good,
|
|
and that's where I got "Assume as much as possible" and "Bits are high level" in the Zen of [Krypton](https://git.kyren.codes/kyren223/krypton).
|
|
I'd recommend either skipping it, or rewatching it multiple times, until you fully digest it (and probably watch Ryan's Fleury BSC talk first).
|
|
|
|
### How to ACTUALLY manage memory (it's easy!)
|
|
|
|
First, you have probably been taught the malloc/RAII way of managing memory, which is needlessly hard, throw that stuff away.
|
|
Here is how to actually manage memory in a simple and straightforward way:
|
|
|
|
[How memory works by Kyren223 (me)](https://kyren.codes/blogs/how-computer-memory-actually-works/) - Goes over how your program interacts
|
|
with memory nowadays, knowing about virtual memory and virtual address space would be crucial to
|
|
understand the rest of the resources here.
|
|
|
|
[Enter the Arena by Ryan Fleury](https://www.youtube.com/watch?v=TZ5a3gCCZYo) teaches about arenas, the "magical" allocator (actually it's dead simple and not magical).
|
|
Goes over arenas in general, permanent areans, transient (temporary) arenas, and scratch arenas.
|
|
|
|
[Vjekoslav's BSC 2025 talk](https://www.youtube.com/watch?v=bUOOaXf9qIM&t=2987s) - linking this talk again because
|
|
it shows more practically how to use arenas, scratch arenas, transient arenas, it goes over grouping lifetimes
|
|
into arenas for an actual application.
|
|
|
|
[Memory Allocation Strategies by gingerBill](https://www.gingerbill.org/series/memory-allocation-strategies/) - goes over the implementation details
|
|
for how to write memory allocators such as arenas and pool allocators (and some others!).
|
|
|
|
[Ryan's Fleury blog about arenas](https://www.rfleury.com/p/untangling-lifetimes-the-arena-allocator) - great intro to arenas, similar to the talk he gave,
|
|
I'd recommend both, but if u r short on time (or priortize other resources here), you can choose one,
|
|
and delay/skip the other (personally I went with the talk, and only read part of the blog post).
|
|
|
|
[Podcast with Ryan Fleury](https://www.youtube.com/watch?v=UeJPyuVxL-o) - it goes over arenas,
|
|
specifically what they are, and also about how memory works and a bit about virtual space.
|
|
|
|
For arena implementations, see [Krypton](https://git.kyren.codes/kyren223/krypton) by me, or the [Rad Debugger](https://github.com/EpicGamesExt/raddebugger/blob/master/src/base/base_arena.c) (by Ryan Fleury)
|
|
|
|
[Becoming an N+2 programmer by Casey Muratori, from HMH](https://www.youtube.com/watch?v=xt1KNDmOYqA) explains that thinking
|
|
about individual objects/allocations is REALLY hard, and that grouping allocations makes managing memory REALLY easy.
|
|
And what's a better way of grouping allocations then arenas (one arena per group of objects/lifetimes).
|
|
|
|
### Game Development
|
|
|
|
TODO: this took me very long to make, will add this later (remind me if I forgot!)
|
|
|
|
But tldr; handmade hero, all of it, then u should be able to learn on your own.
|
|
|
|
For math, the [BSC 2025 talk by Ginger Bill](https://www.youtube.com/watch?v=YNtoDGS4uak), and Freya Holmer's [Math for Gamedev](https://www.youtube.com/watch?v=MOYiVLEnhrw&list=PLImQaTpSAdsD88wprTConznD1OY1EfK_V) series are great resources.
|
|
|
|
[This Problem Changes Your Perspective On Game Dev](https://www.youtube.com/watch?v=o5K0uqhxgsE)
|
|
|
|
### Compiler and Language design
|
|
|
|
TODO: this took me very long to make, will add this later (remind me if I forgot!)
|
|
|
|
Crafting interpreters for the basics of tokenizing and parsing, not more than that,
|
|
the book later diverges into what I'd call "bad OOP" (in part 1), and part 2 is mostly about virtual
|
|
machines, I only read the start of part 2, I'd only recommend it if you are making a VM for your language.
|
|
|
|
[Simple but powerful Pratt's Parsing](https://matklad.github.io/2020/04/13/simple-but-powerful-pratt-parsing.html) for how to properly deal with precedence when parsing expressions,
|
|
there is also a "Core Dumped" video covering it on youtube, but I find the blog to be better.
|
|
|
|
Jonathan Blow talks, specifically Jai ones where he shows features like compile time and AST injection.
|
|
|
|
Christopher Lerno blogs (on handmade network), specifically [language design lessons](https://c3.handmade.network/blog/p/8682-some_language_design_lessons_learned).
|
|
|
|
Programming language documentation, specifically the C3 docs, zig docs, odin docs, cakelisp, Nim,
|
|
cppfront and probably some more that I forgot.
|
|
|
|
Also talking with other language designers is great (although beware of advice, see C Lerno's blog),
|
|
feel free to message me, I am always open to language design/implementations discussions.
|
|
|
|
["Boundaries of Language Design" with Andrew Kelley & Ginger Bill](https://www.youtube.com/watch?v=3K8znjWN_Ig)
|
|
|
|
## Resources (unordered)
|
|
|
|
- ALL [Better software conference](https://www.youtube.com/feed/subscriptions/UCYI-TL0LoFRl1gFnnUFwdow) talks, they are all great.
|
|
- [Handmade Hero by Casey Muratori](https://guide.handmadehero.org) AT LEAST the first 60 episodes
|
|
- [Semantic compression by Casey Muratori](https://caseymuratori.com/blog_0015)
|
|
- [On bad advice](https://www.scattered-thoughts.net/writing/on-bad-advice/)
|
|
- [John Carmack on Inlining code](http://number-none.com/blow/john_carmack_on_inlined_code.html)
|
|
- ["Papers I have loved" by Casey Muratori](https://www.youtube.com/watch?v=SDS5gLSiLg0)
|
|
- [Package Managers are Evil by GingerBill](https://www.gingerbill.org/article/2025/09/08/package-managers-are-evil/#fnref:1)
|
|
- [How to address binary compatibility on Linux](https://jangafx.com/insights/linux-binary-compatibility#containers)
|
|
- [Mock Interview with Shawn McGrath](https://www.youtube.com/watch?v=cfyWvJdsDRI&t=5s) - Best way to do interviews
|
|
- [Handmade Network "fishbowls"](https://handmade.network/fishbowl)
|
|
|
|
Blogs:
|
|
|
|
- [Casey Muratori's Blogs](https://caseymuratori.com/)
|
|
- [Matklad's Blogs](https://matklad.github.io)
|
|
- [Ryan Fleury blogs](https://www.rfleury.com/archive?sort=new)
|
|
- [Bill Hall's (gingerBill) Blogs](https://www.gingerbill.org/article/)
|
|
|
|
Data oriented design:
|
|
|
|
- [CppCon 2014: Mike Acton "Data-Oriented Design and C++"](https://www.youtube.com/watch?v=rX0ItVEVjHc)
|
|
- [Andrew Kelley: A Practical Guide to Applying Data Oriented Design (DoD)](https://www.youtube.com/watch?v=IroPQ150F6c)
|
|
|
|
[^1] Unless u write your own OS, but even then, you'd be interfacing with hardware. and I assume you are not going to manufacture your own CPU.
|
|
[^2] Certain CPUs use 52-bit or 56-bit, because of some super computers hitting the 256TB limit (bruh)
|
|
[^3] Some arm CPUs have TBI (top bits ignore), to allow storing metadata in the top 8 bits of a pointer
|