Remix.run Logo
kristoff_it 2 days ago

For those who want a "packaged" experience doing this same kind of work, there's "Operating System in 1000 Lines of Code" (https://operating-system-in-1000-lines.vercel.app/en/), I followed it a while ago in Zig (which meant translating C code snippets to Zig) and had a good time. I have the code and VODs here: https://github.com/kristoff-it/kristos/

fransje26 a day ago | parent [-]

What would be the level of Zig knowledge needed to do this exercise?

Or, asked differently, with no knowledge of Zig, what would be a realistic approach to trying this out? (Assuming an interest in learning Zig, with a background in C++)

kristoff_it a day ago | parent | next [-]

It's definitely possible to hit the ground running you have some knowledge of systems programming. I would say that the Zig version is much easier to understand than the C version provided by the book because the Zig one uses `packed structs` instead of bit operations in some places, everything else is roughly the same.

ozgrakkurt a day ago | parent | prev [-]

I could easily understand stdlib code of zig after building some stuff for 2 days. Would be different for everyone but it is fairly easy