anchor.diff:  %% ===================================================================
   %% internal functions
   
  +-type hostinfo_line() :: [binary(),...].
  +-type host_info() :: {nonempty_string(), integer()}.
  +-type config() :: [{binary(), [binary(),...]}].
  +
   -spec expand_range(nonempty_string(), nonempty_string()) -> [nonempty_string()].
   expand_range(FirstNode, Max) ->
       Len = string:len(FirstNode),
  
positive.code:     Config = lists:flatten([parse_row(R) || R <- Json]),
      disco_server:update_config_table(Config).
  
  -spec do_get_config_table() -> {'ok', [[binary(), ...]]}.
  do_get_config_table() ->
      case file:read_file(os:getenv("DISCO_MASTER_CONFIG")) of
          {ok, Config} -> ok;
          {error, enoent} ->
              Config = "[]"
      end,
      Json = mochijson2:decode(Config),
      update_config_table(Json),
      {ok, Json}.
  
  -spec do_save_config_table([[binary(), ...]]) -> {'error' | 'ok', binary()}.
  do_save_config_table(Json) ->
      {Nodes, _Cores} = lists:unzip(lists:flatten([parse_row(R) || R <- Json])),
      Sorted = lists:sort(Nodes),
      USorted = lists:usort(Nodes),
      if
          length(Sorted) == length(USorted) ->
              ok = file:write_file(os:getenv("DISCO_MASTER_CONFIG"),
                                   mochijson2:encode(Json)),
              update_config_table(Json),
              {ok, <<"table saved!">>};
          true ->
              {error, <<"duplicate nodes">>}
  
negative.code:     [lists:flatten(io_lib:fwrite(Format, [I])) ||
          I <- lists:seq(MinNum, MaxNum)].
  
  -spec add_nodes([nonempty_string(),...], integer()) ->
      [host_info()] | host_info().
  add_nodes([FirstNode, Max], Instances) ->
      [{N, Instances} || N <- expand_range(FirstNode, Max)];
  add_nodes([Node], Instances) -> {Node, Instances}.
  
  -spec parse_row(hostinfo_line()) -> [host_info()] | host_info().
  parse_row([NodeSpecB, InstancesB]) ->
      NodeSpec = string:strip(binary_to_list(NodeSpecB)),
      Instances = string:strip(binary_to_list(InstancesB)),
  