Plaster

common-lisp
BEWARE-OF-THE-PIPELINE> (parse-toplevel '(define (player (prog program) (t tape) (a animal) (pos pos) (s score)) partial-step (let* ((read (and t pos)) (any-lit? (/= read 0)) (index (++ a any-lit?)) (transition (of (>> prog (* index 4)) 3 0))) (record :tape (or (if (of transition 0) pos 0) (and t (not pos))) :animal (of transition 2 1) :position (if (of transition 3) (rotate-right pos) (rotate-left pos)) :point (/= any-lit? (of transition 0)))))) #.(RECORD ((:TAPE . #.(PRIMOP OR (#.(PRIMOP IF (#.(PRIMOP OF (#1=#.(PRIMOP OF (#.(PRIMOP >> (#.(INPUT PROG) #.(PRIMOP * (#.(PRIMOP ++ (#.(INPUT A) #2=#.(PRIMOP /= (#.(PRIMOP AND (#3=#.(INPUT T) #4=#.(INPUT POS))) #.(INT 0))))) #.(INT 4))))) #.(INT 3) #.(INT 0))) #.(INT 0))) #4# #.(INT 0))) #.(PRIMOP AND (#3# #.(PRIMOP NOT (#4#))))))) (:ANIMAL . #.(PRIMOP OF (#1# #.(INT 2) #.(INT 1)))) (:POSITION . #.(PRIMOP IF (#.(PRIMOP OF (#1# #.(INT 3))) #.(PRIMOP ROTATE-RIGHT (#4#)) #.(PRIMOP ROTATE-LEFT (#4#))))) (:POINT . #.(PRIMOP /= (#2# #.(PRIMOP OF (#1# #.(INT 0))))))))