Source

Thread

1/ @mmalex

i vibe coded something horrendous and I love it: a python c preprocessor that finds blocks like /* python */ in a .c file, runs the python, and dumps the stdout after the comment, replacing any old block if needed. im using it to precompute tables…

2/ @seflless

@mmalex

There was a python tool for this remember as far back as 2000ish when working on a large c/c++ game codebase. Ah found it, it’s called Cog: https://cog.readthedocs.io/en/latest/

3/ @mmalex

@seflless

ah yes ! I knew it existed - it wasnt an original idea after all, but like a faint memory stirring in my brain - but couldn’t find it. thanks for the link!

4/ @NOTimothyLottes

@mmalex @seflless

Many of my forth-like languages worked via nested runtime code gen, so it was possible to generate+run code to build either code or data, then repeat. The system would bootstrap its own assembler/etc that way.

0 items under this folder.