News for hackers. Stuff that matters.
Re:Don't Be Clever by pphysch on Thursday August 03, 2023 @11:20AM (#36987120)
It's not modifying the generator. The generator may be a proprietary black box. It's wrapping the generator in a bash script that pipes the result through AWK, etc.
Re:Don't Be Clever by xamolxix on Thursday August 03, 2023 @11:39AM (#36987366)
> It's wrapping the generator in a bash script that pipes the result through AWK, etc.

Which is itself a generator

Re:Don't Be Clever by dmoy on Thursday August 03, 2023 @11:39AM (#36987369)
Sure, that's orthogonal. If you wrap the generator in your build system and still always regenerate, it's effectively the same. And also, I think, not what GP was talking about
Re:Don't Be Clever by pphysch on Thursday August 03, 2023 @02:21PM (#36989656)
Pedantic. There's a world of difference between grokking a new code generation DSL+codebase and a shell one-liner that fixes a string that is obviously invalid.

Since the issue is the maintenance of such systems, it is absolutely relevant.

Re:Don't Be Clever by sanderjd on Thursday August 03, 2023 @09:21PM (#36994264)
As other commenters have noted, if the awk script is just a pure function of the output of the black-box generator to a new output, then I would consider this a modification to the generator, and no problemo.

However, if your awk script requires the current state of the generated code as input in addition to the output of the black-box generator, and tries to reconcile a diff between the two things, then yep, I consider that busted.