Threw this together to show an example of computed goto. Computed goto is a handy tool for building little interpreters. #include #define NEXT goto **ip++ int main() { int fact = 6, fact_b0 = 16; void* program[] = { &&push, (void*)5, &&call, (void*)fact, &&printi, &&end, &&beq0, (void*)fact_b0, &&dup, &&push, (void*)1, &&sub, &&call, (void*)fact, &&mult, &&ret, …
Monthly Archives: June 2012
Bookmarklet for 404’s
After encountering yet another 404 error, tired of manually copy-pasting URLs, I finally took a few seconds to make a bookmarklet to search archive.org for a backup. Archive-it bookmarklet