Last active
November 26, 2024 21:53
-
-
Save karl-zylinski/20b613f3486b39aee02162ecbeb60e0a to your computer and use it in GitHub Desktop.
Upcoming Odin book table of contents
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1: Introduction | |
1.1: Why learn Odin? | |
1.2: Overview | |
1.3: Installing the Odin compiler | |
1.4: If you get stuck | |
1.5: Let's go! | |
2: Hellope! A tiny program | |
2.1: Compile and run the code | |
2.2: Line-by-line | |
2.3: What does the period in odin run . mean? | |
2.4: Compile without running | |
2.5: No need for semicolons | |
2.6: Where is the code inside core:fmt? | |
2.7: Compile a single Odin source file | |
2.8: There's much more! | |
3: Variables and constants | |
3.1: Declaring variables and assigning values | |
3.2: Another variable type and casting | |
3.2.1: Something strange? | |
3.3: Constants | |
3.4: Type inference defaults | |
3.4.1: Constants of explicit type | |
3.4.2: Benefits of Untyped Types | |
3.5: Basic types summary | |
3.6: Untyped Types summary | |
4: Some additional basics | |
4.1: Procedure parameters and return values | |
4.2: If statements | |
4.3: Loops | |
4.4: Fixed arrays | |
4.5: All together | |
5: Making new types | |
5.1: Structs | |
5.1.1: Nested structs | |
5.1.2: using on struct fields | |
5.1.3: using and "parenting" | |
5.1.4: No methods | |
5.2: Enums and switch | |
5.2.1: Switch | |
5.2.2: Explicit enum numbering | |
5.2.3: Backing type | |
5.3: Unions | |
5.3.1: The zero value of a union | |
5.3.2: The union's tag | |
5.3.3: Maybe | |
5.3.4: Raw union: C-style unions | |
5.3.5: Struct variants using unions | |
5.3.6: Using unions for state machines | |
6: Pointers | |
6.1: A procedure that modifies an integer | |
6.2: nil: the zero value of a pointer | |
6.3: A pointer to a struct | |
6.4: Copying a pointer and the address of a pointer | |
6.5: Under the hood: Addressables | |
7: Procedures and scopes | |
7.1: Default parameter values and named arguments | |
7.1.1: Example: Allocator parameter with default value | |
7.2: Multiple return values | |
7.3: Named return values | |
7.4: Nested procedures and captured variables | |
7.5: Parameters are always immutable | |
7.6: Don't use pointer parameters for the sake of optimization | |
7.6.1: Pointer and immutable reference aliasing | |
7.7: Explicit overloading | |
7.8: The scope and the stack | |
7.9: Scopes within scopes | |
7.10: defer: Making things happen at end of scope | |
7.10.1: Don't overuse defer | |
8: Fixed-memory containers | |
8.1: Fixed arrays revisited | |
8.1.1: Where does the memory live? | |
8.1.2: Blowing up the stack | |
8.1.3: Vectors and array programming | |
8.1.4: Passing fixed arrays to procs | |
8.2: Enumerated arrays | |
8.3: Small_Array: A growing fixed-memory array | |
9: Introduction to manual memory management | |
9.1: What is manual memory management? | |
9.2: Dynamic arrays | |
9.2.1: Creating a dynamic array and appending items | |
9.2.2: Deallocating a dynamic array | |
9.2.3: Removing items | |
9.2.4: Preallocated dynamic arrays | |
9.2.5: Under the hood: append and Raw_Dynamic_Array | |
9.2.6: Initializing dynamic arrays with some elements | |
9.2.7: Exercise: Understanding Dynamic Arrays | |
9.3: Dynamically allocated variables | |
9.3.1: Example: Dynamically allocated struct | |
9.3.2: Example: Dynamically allocated fixed array | |
9.4: The default allocator: context.allocator | |
9.4.1: The heap allocator | |
9.4.2: The WASM allocator | |
9.5: The separation of pointer and allocated memory | |
9.6: free and delete | |
9.7: Temporary allocator | |
9.7.1: Placing the free_all | |
9.8: "Scripts" that allocate memory | |
10: More container types | |
10.1: Slices: A window into part of an array | |
10.1.1: Creating a slice | |
10.1.2: Slice internals | |
10.1.3: Slice example: Considering 10 elements at a time | |
10.1.4: Prefer to pass slices | |
10.1.5: Slices with their own memory | |
10.1.6: Slice literals | |
10.2: Maps | |
10.2.1: Creating and destroying maps | |
10.2.2: Maps and allocations | |
10.2.3: Iterating maps | |
10.2.4: When to use maps | |
10.3: Custom iterators | |
11: Strings | |
11.1: String literals | |
11.2: Iterating and indexing strings | |
11.3: Constructing strings using fmt | |
11.4: Construct string using string builder | |
11.5: What's a string internally? | |
11.6: String constants | |
11.7: Why does len(str) and string slices use bytes? | |
12: Implicit context | |
12.1: context.allocator | |
12.1.1: Setting context.allocator vs passing explicit allocators | |
12.2: context.temp_allocator | |
12.3: context.assertion_failure_proc | |
12.4: context.logger | |
12.5: context.random_generator | |
12.6: context.user_ptr and context.user_index | |
12.7: How the context is passed | |
13: Making manual memory management easier | |
13.1: Tracking memory leaks | |
13.1.1: Setting up the tracking allocator | |
13.1.2: How does it work? | |
13.1.3: Making memory leak reports clearer | |
13.2: Arena allocators | |
13.3: Choosing an arena allocator | |
13.3.1: Growing virtual memory arena | |
13.3.2: Static virtual memory arena | |
13.3.3: Fixed buffer arena | |
13.4: Improving your understanding | |
14: Parametric polymorphism: Writing generic code | |
14.1: Procedures with polymorphic parameters | |
14.2: Explicitly passing a type to a procedure | |
14.3: Structs and parametric polymorphism | |
14.4: The unified concept of parametric polymorphism | |
14.5: Specialization | |
14.6: Additional parapoly material | |
15: Bit-related types | |
15.1: Binary representation of integers | |
15.2: Bit sets | |
15.2.1: The bits inside the bit_set | |
15.2.2: bit_set using letters and numbers | |
15.3: Bit fields | |
15.3.1: When to use bit sets and bit fields | |
16: Error handling | |
16.1: Errors using bool | |
16.2: Errors using enum | |
16.3: Errors using union | |
16.4: or_return | |
16.5: #optional_allocator_error | |
16.6: #optional_ok | |
17: Package system and code organization | |
17.1: What is a package? | |
17.2: Compiling your program | |
17.3: Creating a package | |
17.4: The package line at the top of files | |
17.5: Make sure your packages are independent | |
17.6: File and package private | |
18: You don't need a build system | |
18.1: Compiling your program | |
18.2: Importing packages | |
18.3: Importing non-Odin libraries | |
18.3.1: Caveats | |
18.4: Platform specific code | |
18.5: Compiling multiple binaries | |
18.6: Summary | |
19: Reflection and Run-Time Type Information (RTTI) | |
19.1: Case study: Drop down of enum values | |
19.2: When to not use reflection | |
19.3: Learning more about reflection | |
20: Data-oriented design | |
20.1: Avoid doing many small heap allocations | |
20.1.1: Performance differences when iterating | |
20.1.2: How much faster is it? | |
20.1.3: Problem: Pointers get invalidated when array grows | |
20.2: Structure of arrays (SoA) | |
20.2.1: How much faster is SoA? | |
20.2.2: When do I use SoA arrays? | |
20.3: Conclusion and further reading | |
21: Debuggers | |
21.1: VS Code | |
21.2: RemedyBG | |
21.3: RAD Debugger | |
22: Odin features you should avoid | |
22.1: using on variables and parameters | |
22.2: any type | |
23: A tour of the core collection | |
23.1: Reading and writing files core:os | |
23.2: Read and write structs as JSON core:encoding/json | |
23.3: Start a new thread core:thread | |
23.4: Do things periodically core:time | |
23.5: Linear algebra math operations core:math/linalg | |
23.6: Creating random numbers and shuffling arrays core:math/rand | |
23.7: C datatypes and using the C standard library core:c and core:c/libc | |
23.8: Opening a window using the Windows API core:sys/windows | |
23.9: Load symbols from a dynamic library core:dynlib | |
24: More libraries you can check out | |
24.1: Make a game using Raylib vendor:raylib | |
24.2: Write platform-independent rendering code using SOKOL | |
24.3: Write rendering code using vulkan vendor:vulkan | |
25: Things I did not cover | |
25.1: Matrices | |
25.2: Quaternions | |
25.3: Struct tags | |
25.4: WASM | |
25.5: Variadic procedures | |
25.6: deferred_X procedures | |
26: Where to find more Odin resources | |
27: Appendix A: Handle-based array | |
28: Appendix B: Running C code (Foreign Function Interface) | |
28.1: The C library | |
28.2: The Odin bindings | |
28.3: Testing our bindings | |
29: Appendix C: Using only fixed arrays | |
30: Thanks for reading! |
Looks great !
Can't wait!!
Absolutely amazing
Bra jobbat! Looking forward to reading it!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Love it! Looking forward to the book.