Extending an Enum in Zig

For a while now I have been dabbling with zig and as a small test writing a NES-emulator (everyone should have written an 8-bit emulator in their life right?). While doing this I stumbled upon a kind of neat trick that you can do in zig that I thought was worth sharing… with kind of a “anti-climactic” end!

Some background

While writing some debug-tools I decided that I wanted to switch between ppu-palettes when displaying some data. At this time the available palettes were all described with an enum.

Read More

A Zig Diary

As it turned out I happened to help out with fixing a space to host a zig meetup here in Stockholm at the place where I work. However I haven’t written a single line of zig in my life… I felt that it might be worth doing something about that :D

If you don’t know, zig is a new systems programming language!

I have found zig quite intriguing for a while now but I haven’t had the time to look into it so this sounded like an as good excuse as any! I’ll try something new with this post and just write as I go and document my success/failure/reflections, this might make it a bit “rambly” :)

Read More