anchor.diff:                                      Buffer
                                       Window
                                       Tabpage)))
  +(defparameter *socket* NIL)
  +
  +(defun connect (&optional (host #(127 0 0 1)) (port 7777))
  +  "Connect to the nvim process (via TCP socket)."
  +  (setf *socket* (socket-connect host port :element-type '(unsigned-byte 8))))
   
   (defun send-msg (socket msg)
     "Send encoded msg to nvim."
  
positive.code: 
  (defun get-result (socket)
    "Wait for response from nvim."
    (let ((buffer (make-array 0 :element-type 'unsigned-byte :adjustable t :fill-pointer t)))
      (wait-for-input socket)
      (loop with byte
            while (listen (socket-stream socket))
            do (setf byte (read-byte (socket-stream socket)))
            (when (= byte 13)
              (return t))
            (vector-push-extend byte buffer))
      (parse-response buffer)))
  
  (defun command->msg (command &optional args)
    "Encode nvim command and optional args into msgpack packet."
  
negative.code:         finally (force-output (socket-stream socket))))
  
  (defun byte-array->string (arr)
    "Convert array of (unsigned-byte 8) to string."
    (octets-to-string (concatenate '(vector (unsigned-byte 8)) arr) :encoding :utf-8))
  
  (defun parse-response (response)
    "Parse the response received from nvim socket."
      (let* ((msg-id (elt response 1))
             (err (elt response 2))
             (err-str (if err (byte-array->string (elt err 1))))
             (result (elt response 3)))
  