Files
manual_slop/docs/twitter/1939170419958816855/thread.md
T
ed 3a27b89890 docs(twitter): add 1939170419958816855 corpus (NOTimothyLottes python-as-C-preprocessor + runtime code-gen)
4-post thread with @mmalex + @seflless, June 2025. @mmalex vibed-coded
a python C preprocessor: finds /* python <code> */ in .c, runs the
python, dumps stdout after the comment, replaces old block on change.
@seflless points out Cog (https://cog.readthedocs.io) which did the
same back in 2000ish. NOTimothyLottes: '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 that way.' Precursor to the Jul 2026
micro macro-forth + nasm-bootstrapped 4KiB Linux Forth threads.
2026-07-27 12:53:00 -04:00

1.5 KiB
Raw Blame History

title, author, handle, post_url, post_id, timestamp, post_count, reply_count, repost_count, like_count, view_count
title author handle post_url post_id timestamp post_count reply_count repost_count like_count view_count
@mmalex @seflless Many of my forth-like languages worked via nested runtime code NOTimothyLottes @NOTimothyLottes https://x.com/NOTimothyLottes/status/1939170419958816855 1939170419958816855 2025-06-29 03:53:50 4 0 0 2 253

@NOTimothyLottes — @mmalex @seflless Many of my forth-like languages worked via nested runtime code

Post 1 (2025-06-28 20:01:01)

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...

Post 2 (2025-06-28 21:27:35) — reply to Post 1

@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, its called Cog: https://cog.readthedocs.io/en/latest/

Post 3 (2025-06-28 23:03:41) — reply to Post 2

@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!

Post 4 (2025-06-29 03:53:50) — reply to Post 3

@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.