← Back to context

Comment by userbinator

8 hours ago

To be precise this is 1024 bytes of C, which compiles to a binary many times larger, and implements a very tiny subset of Python.

loops work by jumping backwards and reparsing the source each iteration

This is how the DOS .bat processing works; not sure if Unix-style shells are the same, as I've never had the need to exploit that "feature".

Another comment here has mentioned C4, but another extremely dense (and slightly larger, since it wasn't actually deliberately(!) "code-golfed") interpreter you may want to look at is the J Incunabulum:

https://news.ycombinator.com/item?id=45800777

Bash lines are buffered, so modifying behind the program position doesn't really work, but you can self-append to the file to keep a script going infinitely.