News for hackers. Stuff that matters.
Re:Macros on Steroids: How pure C can benefit from metaprogr... by lhorie on Thursday July 22, 2021 @12:54PM (#27921308)
Even those may not be powerful enough. I have a use case where I was trying to read specification files to generate unicode tables. But using something like zig's @embedFile to get a handle to a []u8 in a comptime block doesn't work because I don't want the file to be embedded into the binary; I want something more akin to turing complete code generation. And I don't need it to run it on every compile, as the entire flow involves downloading said files off the internet, but only when a new version of the spec is released. I ended up just using code generation.
Re:Macros on Steroids: How pure C can benefit from metaprogr... by samatman on Thursday July 22, 2021 @03:31PM (#27923155)
Zig is a work in progress, and I bet the community is interested in supporting this sort of use case.

Might be nice to bring it to their attention, if you haven't already, and if you have the time and inclination.

Re:Macros on Steroids: How pure C can benefit from metaprogr... by kaba0 on Friday July 23, 2021 @02:33AM (#27927837)
I think at this point it should rather be part of the build process. No program build itself should download files in an ad hoc manner.