aboutsummaryrefslogtreecommitdiffstats
path: root/bytetunes.py
blob: 1d2a8a7cfaa37a6f39d8f8a1115567c25033c5dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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()