Files

34 lines
1.5 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
← [Back to Twitter thread index](../README.md)
---
title: "@mmalex @seflless Many of my forth-like languages worked via nested runtime code"
author: "NOTimothyLottes"
handle: "@NOTimothyLottes"
post_url: "https://x.com/NOTimothyLottes/status/1939170419958816855"
post_id: "1939170419958816855"
timestamp: "2025-06-29 03:53:50"
post_count: 4
reply_count: 0
repost_count: 0
like_count: 2
view_count: 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 <arbitrary python code> */ 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.