anchor.diff:                       (cffi:foreign-free pointer)))
     b)
   
  +;; TODO: size checks
  +
   (defgeneric msg-size-n (msg n))
   (defgeneric msg-size (msg))
   (defgeneric msg-alloc (type n))
   
   (defgeneric msg-put (channel msg))
   (defgeneric msg-get (channel msg &key wait last))
  +
  +(defgeneric msg-aref (msg i))
  +(defgeneric msg-aref (msg i))
  +(defgeneric msg-decode (type pointer))
   
   (defmethod ach::put-object (channel (object msg-buffer))
     (ach:put-pointer channel (msg-buffer-pointer object) (msg-buffer-size object)))
  
positive.code:   (buttons :uint64)
    (axis :double :count 1))
  (def-msg-var msg-joystick axis)
  
  (defun get-foreign-string (pointer max)
    (with-output-to-string (s)
  
negative.code:                 (pointer (foreign-alloc :uint8 :count size)))
             (msg-buffer-initialize (,make-it)
                                    pointer size)))
          (defmethod msg-aref-ptr ((msg ,type) i)
            (let ((base (foreign-slot-pointer (msg-buffer-pointer msg)
                                              '(:struct ,type) ',slot)))
              (mem-aptr base ',slot-type i)))
          (defmethod msg-aref ((msg ,type) i)
            (msg-decode ',type (msg-aref-ptr msg i)))
         )))
  
  
  