3 ms·
when i have an idea for a program i want to build, i struggle to express it in terms of structs, pointers, and C/zig’s language features. but with C, i can ofte
by jpe90 4y ago
when i have an idea for a program i want to build, i struggle to express it in terms of structs, pointers, and C/zig’s language features. but with C, i can often find similar programs and find good examples of how to do what i want.
for example right now i’m working on an SDL/opengl app with an immediate mode gui, and there’s enough code in the wild for me to pour over to understand how and why they structure their programs
but when i started with zig i would often get stuck, unable to really understand the c code i was interfacing with and struggling with the language basics a bit
- kristoff_it 4y agoYeah, that makes sense. We'll try to improve the situation, we just need to get a bit further ahead with the language first.
- smaddox 4y agoOn knowing how to structure low level code, I highly recommend reading Casey Muratori's blog post on Semantic Compression: https://caseymuratori.com/blog_0015 https://caseymuratori.com/blog_0015 And, more generally, watching some of his (free) handmade hero video series: https://handmadehero.org/ https://handmadehero.org/
- jpe90 4y agoWow, that was incredibly helpful. I could read writeups of straightforward code all day. I also love how his ethos extends to the design of the website as well. Thanks so much for sharing.