Joshua Deakin


< previous next >

2015.10.14 - Meta-scripting

Skimming the surface of metaprogramming.

A program that can manipulate a program is a metaprogram. The program being manipulated might be the metaprogram itself or another program entirely. There are some really interesting examples of these, like quines which can replicate themselves, but probably the most obvious useful metaprograms are compilers and interpreters.

I didn't really realise it until about half way through, but by making !!Bang!!, I'd written my first metaprogram. The Bang processor itself is written in Python and it interprets Bang scripts executing commands based on their input. So Bang is a meta-script that treats Bang scripts its data.

< previous next >