diff options
Diffstat (limited to 'bytetunes.py')
-rw-r--r-- | bytetunes.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/bytetunes.py b/bytetunes.py new file mode 100644 index 0000000..1d2a8a7 --- /dev/null +++ b/bytetunes.py @@ -0,0 +1,17 @@ + +from expr import * + +import sys + +def play(s): + machine = parse(preparse(tokenize(s))[0]) + t = 0 + while True: + t += 1 + sys.stdout.write(chr(execute(machine, t) & 0x000000FF)) + +def main(): + play("(t>>6)&(2*t)&(t>>1)") + +if __name__=='__main__': + main() |