anchor.diff:  % http://www.erlang.org/doc/efficiency_guide/binaryhandling.html
   update(#state{buffer = Buffer} = S) when size(Buffer) =:= 0 ->
       {noreply, S};
  -update(#state{buffer = B,
  +update(#state{task = Task,
  +              buffer = B,
                 parser = P,
                 runtime = RT,
                 worker_send = WS,
                 throttle = T} = S) ->
       case worker_protocol:parse(B, P) of
           {ok, Request, Buffer, PState} ->
  +            proto_log(Task, from, "~p", [Request]),
               S1 = S#state{buffer = Buffer, parser = PState},
               try case worker_runtime:handle(Request, RT) of
                       {ok, Reply, RState} ->
  
positive.code:                stderr_to_stdout,
                 {env, JobEnvs}],
      Port = open_port({spawn, Command}, Options),
      SendPid = spawn_link(fun() -> worker_send(Port) end),
      {noreply, State#state{port = Port, worker_send = SendPid}, ?PID_TIMEOUT}.
  
  
  
negative.code: code_change(_OldVsn, State, _Extra) ->
      {ok, State}.
  
  -spec proto_log(task(), to|from, nonempty_string(), [term()]) -> ok.
  proto_log(T, Dir, Format, Args) ->
      case ?LOG_PROTOCOL of
          true ->
              {#task_spec{jobname = J, stage = S, taskid = Tid}, _} = T,
              D = case Dir of to -> "->"; from -> "<-" end,
              Msg = disco:format(Format, Args),
              error_logger:info_msg("~p:~s:~p ~s ~p", [J, S, Tid, D, Msg]);
          _ ->
              ok
      end.
  
  -spec update(state()) -> {'noreply', state()} | {'stop', shutdown(), state()}.
  % Note that size(Buffer) =:= 0 is here to avoid preventing delayed sub
  % binary optimization in worker_protocol:parse (since we use the
  