• by dsp_person on 8/18/2024, 3:18:19 AM

    > I wish there was a way to get Zig code out of comptime

    I often just take an approach similar to cog [1], but it's simple enough I prefer to roll my own to do whatever code generation I'm wanting. E.g. write a ~100 line python file that reads source file(s), reads special comments with code gen or introspection instructions, and then insert generated code at some designated point(s).

    [1] https://github.com/nedbat/cog

  • by dragonelite on 8/15/2024, 7:50:20 AM

    That was an interesting blog post, hope we will get more intermediate and advance zig usage blog posts and in the future books about zig.