{"id":286348,"date":"2017-05-15T13:45:03","date_gmt":"2017-05-15T09:45:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=286348"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=286348","title":{"rendered":"\u041a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u044b \u0432 Elixir"},"content":{"rendered":"<p>\u0412 \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u043c\u044b \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Erlang, \u043d\u043e \u0447\u0430\u0441\u0442\u043e \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u0434\u0440\u0443\u0433\u0438\u0435 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u044f\u0437\u044b\u043a\u0438 \u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u044b \u0434\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430.<\/p>\n<p>  <\/p>\n<p><a href=\"http:\/\/elixir-lang.org\/\">Elixir<\/a> \u2013 \u044d\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0431\u0449\u0435\u0433\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 BeamVM. \u041e\u0442 Erlang \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u043e\u043c, \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0445\u043e\u0436\u0438\u043c \u043d\u0430 Ruby, \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u043c\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u043c\u0435\u0442\u0430\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<p>\u0412 Elixir \u0442\u0430\u043a\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0434\u043b\u044f \u043f\u043e\u043b\u0438\u043c\u043e\u0440\u0444\u0438\u0437\u043c\u0430 \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <a href=\"http:\/\/elixir-lang.org\/getting-started\/protocols.html\">Protocols<\/a>, \u043d\u043e \u0432 Erlang \u043d\u0435\u0442 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0434\u0438\u0441\u043f\u0435\u0442\u0447\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u0434\u043b\u044f \u0438\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p>  <\/p>\n<p>\u0422\u043e\u0433\u0434\u0430 \u043a\u0430\u043a \u0436\u0435 \u043e\u043d\u0438 \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u0432\u043d\u0443\u0442\u0440\u0438? \u041a\u0430\u043a\u043e\u0439 overhead \u0434\u0430\u0435\u0442 \u043a\u043e\u0434 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432? \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/web\/843\/b2e\/cc9\/843b2ecc941746bda0cb17e37262e76b.jpg\"\/><\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p>\u0415\u0441\u0442\u044c \u0434\u0432\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432\u043d\u0443\u0442\u0440\u0438:<\/p>\n<p>  <\/p>\n<p>\u2013 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u0442\u0435\u043c, \u043a\u0430\u043a Elixir Compiler <a href=\"https:\/\/github.com\/elixir-lang\/elixir\/blob\/147c39e3bb281b87786fc2ce94fe6db71375683e\/lib\/elixir\/lib\/protocol.ex\">\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442<\/a> \u043a\u043e\u0434 \u0434\u043b\u044f BeamVM,<br \/>  \u2013 \u0434\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c beam-\u0444\u0430\u0439\u043b\u044b \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0447\u0442\u043e \u0436\u0435 \u0432 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c.<\/p>\n<p>  <\/p>\n<p>\u0412\u0442\u043e\u0440\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0449\u0435, \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0438\u043c.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442.<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">mix new proto cd proto<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b <code>lib\/proto.ex<\/code> \u043d\u0430 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440.<\/p>\n<p>  <\/p>\n<pre><code>defprotocol Double do   def double(input) end  defimpl Double, for: Integer do   def double(int) do     int * 2   end end  defimpl Double, for: List do   def double(list) do     list ++ list   end end<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0443\u0442 \u043c\u044b \u043e\u0431\u044a\u044f\u0432\u0438\u043b\u0438 \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b <code>Double<\/code> \u0441 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c <code>double\/1<\/code> \u0438 \u0434\u0432\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 \u0434\u043b\u044f <code>Integer<\/code> \u0438 <code>List<\/code>.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c:<\/p>\n<p>  <\/p>\n<pre><code>iex(1)&gt; Double.double(2) 4  iex(2)&gt; Double.double([1,2,3]) [1, 2, 3, 1, 2, 3]  iex(3)&gt; Double.double(:atom)   ** (Protocol.UndefinedError) protocol Double not implemented for :atom     (proto) lib\/proto.ex:1: Double.impl_for!\/1     (proto) lib\/proto.ex:2: Double.double\/1 <\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432.<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ tree _build\/dev\/ _build\/dev\/ \u251c\u2500\u2500 consolidated \u2502   \u251c\u2500\u2500 Elixir.Collectable.beam \u2502   \u251c\u2500\u2500 Elixir.Double.beam \u2502   \u251c\u2500\u2500 Elixir.Enumerable.beam \u2502   \u251c\u2500\u2500 Elixir.IEx.Info.beam \u2502   \u251c\u2500\u2500 Elixir.Inspect.beam \u2502   \u251c\u2500\u2500 Elixir.List.Chars.beam \u2502   \u2514\u2500\u2500 Elixir.String.Chars.beam \u2514\u2500\u2500 lib     \u2514\u2500\u2500 proto         \u2514\u2500\u2500 ebin             \u251c\u2500\u2500 Elixir.Double.beam             \u251c\u2500\u2500 Elixir.Double.Integer.beam             \u251c\u2500\u2500 Elixir.Double.List.beam             \u2514\u2500\u2500 proto.app<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u0431\u0440\u043e\u0441\u0430\u0435\u0442\u0441\u044f \u0432 \u0433\u043b\u0430\u0437\u0430 \u2013 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c\u0438 \u0438\u043c\u0435\u043d\u0430\u043c\u0438 \u0432 consolidated- \u0438 lib\/proto\/ebin-\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u0445. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0438\u0445 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 beam-\u0444\u0430\u0439\u043b\u044b \u043d\u0443\u0436\u043d\u043e \u0434\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c escript-\u0444\u0430\u0439\u043b <code>beam_to_erl<\/code><\/p>\n<p>  <\/p>\n<pre><code class=\"erlang\">#!\/usr\/bin\/env escript  main([BeamFile]) -&gt;     {ok,{_,[{abstract_code,{_,AC}}]}} = beam_lib:chunks(BeamFile,[abstract_code]),     io:fwrite(&quot;~s~n&quot;, [erl_prettypr:format(erl_syntax:form_list(AC))]).<\/code><\/pre>\n<p>  <\/p>\n<p>\u0438 \u043f\u0440\u043e\u0431\u0435\u0436\u0438\u043c\u0441\u044f \u0438\u043c \u043f\u043e \u0432\u0441\u0435\u043c beam-\u0444\u0430\u0439\u043b\u0430\u043c.<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ for f in $(find _build\/ -name &quot;*.beam&quot;); do .\/beam_to_erl $f &gt; &quot;${f%.beam}.erl&quot;; done<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\">$ tree _build\/dev\/ | grep -v &quot;.beam&quot; _build\/dev\/ \u251c\u2500\u2500 consolidated \u2502   \u251c\u2500\u2500 Elixir.Collectable.erl \u2502   \u251c\u2500\u2500 Elixir.Double.erl \u2502   \u251c\u2500\u2500 Elixir.Enumerable.erl \u2502   \u251c\u2500\u2500 Elixir.IEx.Info.erl \u2502   \u251c\u2500\u2500 Elixir.Inspect.erl \u2502   \u251c\u2500\u2500 Elixir.List.Chars.erl \u2502   \u2514\u2500\u2500 Elixir.String.Chars.erl \u2514\u2500\u2500 lib     \u2514\u2500\u2500 proto         \u2514\u2500\u2500 ebin             \u251c\u2500\u2500 Elixir.Double.erl             \u251c\u2500\u2500 Elixir.Double.Integer.erl             \u251c\u2500\u2500 Elixir.Double.List.erl             \u2514\u2500\u2500 proto.app<\/code><\/pre>\n<p>  <\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 <code>lib\/proto\/ebin\/Elixir.Double.erl<\/code>.<\/p>\n<p>  <\/p>\n<pre><code class=\"erlang\">-compile(no_auto_import).  -file(&quot;lib\/proto.ex&quot;, 1).  -module('Elixir.Double').  -compile(debug_info).  -compile({inline,       [{any_impl_for, 0}, {struct_impl_for, 1},        {'impl_for?', 1}]}).  -protocol([{fallback_to_any, false}]).  -export_type([t\/0]).  -type t() :: term().  -spec '__protocol__'('consolidated?') -&gt; boolean();             (functions) -&gt; [{double, 1}, ...];             (module) -&gt; 'Elixir.Double'.  -spec impl_for(term()) -&gt; atom() | nil.  -spec 'impl_for!'(term()) -&gt; atom() | no_return().  -callback double(t()) -&gt; term().  -export(['__info__'\/1, '__protocol__'\/1, double\/1,      impl_for\/1, 'impl_for!'\/1]).  -spec '__info__'(attributes | compile | exports |          functions | macros | md5 | module |          native_addresses) -&gt; atom() |                       [{atom(), any()} |                        {atom(), byte(), integer()}].  '__info__'(functions) -&gt;     [{'__protocol__', 1}, {double, 1}, {impl_for, 1},      {'impl_for!', 1}]; '__info__'(macros) -&gt; []; '__info__'(info) -&gt;     erlang:get_module_info('Elixir.Double', info).  '__protocol__'(module) -&gt; 'Elixir.Double'; '__protocol__'(functions) -&gt; [{double, 1}]; '__protocol__'('consolidated?') -&gt; false.  any_impl_for() -&gt; nil.  double(_@1) -&gt; ('impl_for!'(_@1)):double(_@1).  impl_for(#{'__struct__' := _@1})     when erlang:is_atom(_@1) -&gt;     struct_impl_for(_@1); impl_for(_@1) when erlang:is_tuple(_@1) -&gt;     case 'impl_for?'('Elixir.Double.Tuple') of       true -&gt; 'Elixir.Double.Tuple':'__impl__'(target);       false -&gt; any_impl_for()     end; impl_for(_@1) when erlang:is_atom(_@1) -&gt;     case 'impl_for?'('Elixir.Double.Atom') of       true -&gt; 'Elixir.Double.Atom':'__impl__'(target);       false -&gt; any_impl_for()     end; impl_for(_@1) when erlang:is_list(_@1) -&gt;     case 'impl_for?'('Elixir.Double.List') of       true -&gt; 'Elixir.Double.List':'__impl__'(target);       false -&gt; any_impl_for()     end; impl_for(_@1) when erlang:is_map(_@1) -&gt;     case 'impl_for?'('Elixir.Double.Map') of       true -&gt; 'Elixir.Double.Map':'__impl__'(target);       false -&gt; any_impl_for()     end; impl_for(_@1) when erlang:is_bitstring(_@1) -&gt;     case 'impl_for?'('Elixir.Double.BitString') of       true -&gt; 'Elixir.Double.BitString':'__impl__'(target);       false -&gt; any_impl_for()     end; impl_for(_@1) when erlang:is_integer(_@1) -&gt;     case 'impl_for?'('Elixir.Double.Integer') of       true -&gt; 'Elixir.Double.Integer':'__impl__'(target);       false -&gt; any_impl_for()     end; impl_for(_@1) when erlang:is_float(_@1) -&gt;     case 'impl_for?'('Elixir.Double.Float') of       true -&gt; 'Elixir.Double.Float':'__impl__'(target);       false -&gt; any_impl_for()     end; impl_for(_@1) when erlang:is_function(_@1) -&gt;     case 'impl_for?'('Elixir.Double.Function') of       true -&gt; 'Elixir.Double.Function':'__impl__'(target);       false -&gt; any_impl_for()     end; impl_for(_@1) when erlang:is_pid(_@1) -&gt;     case 'impl_for?'('Elixir.Double.PID') of       true -&gt; 'Elixir.Double.PID':'__impl__'(target);       false -&gt; any_impl_for()     end; impl_for(_@1) when erlang:is_port(_@1) -&gt;     case 'impl_for?'('Elixir.Double.Port') of       true -&gt; 'Elixir.Double.Port':'__impl__'(target);       false -&gt; any_impl_for()     end; impl_for(_@1) when erlang:is_reference(_@1) -&gt;     case 'impl_for?'('Elixir.Double.Reference') of       true -&gt; 'Elixir.Double.Reference':'__impl__'(target);       false -&gt; any_impl_for()     end; impl_for(_) -&gt; any_impl_for().  'impl_for!'(_@1) -&gt;     case impl_for(_@1) of       _@2 when (_@2 =:= nil) or (_@2 =:= false) -&gt;       erlang:error('Elixir.Protocol.UndefinedError':exception([{protocol,                                     'Elixir.Double'},                                    {value,                                     _@1}]));       _@3 -&gt; _@3     end.  'impl_for?'(_@1) -&gt;     case 'Elixir.Code':'ensure_compiled?'(_@1) of       true -&gt;       'Elixir.Kernel':'function_exported?'(_@1, '__impl__',                            1);       false -&gt; false;       _@2 -&gt; erlang:error({badbool, 'and', _@2})     end.  struct_impl_for(_@1) -&gt;     _@2 = 'Elixir.Module':concat('Elixir.Double', _@1),     case 'impl_for?'(_@2) of       true -&gt; _@2:'__impl__'(target);       false -&gt; any_impl_for()     end.<\/code><\/pre>\n<p>  <\/p>\n<p>\u0410 \u0432\u043e\u0442 \u0438 \u0432\u0441\u044f \u043c\u0430\u0433\u0438\u044f. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u0437\u0433\u043b\u044f\u043d\u0435\u043c \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>double\/1<\/code>.<\/p>\n<p>  <\/p>\n<pre><code class=\"erlang\">double(_@1) -&gt; ('impl_for!'(_@1)):double(_@1).<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u043d\u0430 \u0438\u0449\u0435\u0442 \u043c\u043e\u0434\u0443\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430, \u0447\u0435\u0440\u0435\u0437 <code>impl_for\/1<\/code> \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0435\u0433\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e.<\/p>\n<p>  <\/p>\n<p>\u0410 \u043a\u0430\u043a \u043d\u0430\u0439\u0442\u0438 \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430? \u041e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e: <\/p>\n<p>  <\/p>\n<p>\u2013 \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432 \u0438\u043b\u0438 bif-\u0442\u0438\u043f, \u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0449\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u044c \u0441 \u0438\u043c\u0435\u043d\u0435\u043c &#8216;Elixir.{ProtocolName}.{TypeName}&#8217;, \u0433\u0434\u0435 ProtocolName \u2013 \u0438\u043c\u044f \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430, TypeName \u2013 \u0438\u043c\u044f \u0442\u0438\u043f\u0430. \u041f\u043e\u0434\u0433\u0440\u0443\u0436\u0435\u043c \u0435\u0433\u043e, \u0435\u0441\u043b\u0438 \u0435\u0449\u0435 \u043d\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d, \u0447\u0435\u0440\u0435\u0437 <code>'Elixir.Code':'ensure_compiled?'\/1<\/code>. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u043c\u043e\u0434\u0443\u043b\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 \u0447\u0435\u0440\u0435\u0437 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>'__impl__'\/1<\/code>, \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 <code>'__impl__'(target)<\/code>,<br \/>  \u2013 \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430, \u0442\u043e \u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u043e\u0435 \u043f\u043e\u043b\u0435 <code>__struct__<\/code> \u0438 \u0442\u0430\u043a\u0438\u043c \u0436\u0435 \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0438\u0449\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u044c &#8216;Elixir.{ProtocolName}.{StructName}&#8217;,<br \/>  \u2013 \u0435\u0441\u043b\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u0430, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u043b\u044f any-\u0442\u0438\u043f\u0430 \u0438\u043b\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443.<\/p>\n<p>  <\/p>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 \u0436\u0435 \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432 \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: <code>'Elixir.Double.Integer'<\/code>.<\/p>\n<p>  <\/p>\n<pre><code class=\"erlang\">-compile(no_auto_import).  -file(&quot;lib\/proto.ex&quot;, 5).  -module('Elixir.Double.Integer').  -behaviour('Elixir.Double').  -impl([{protocol, 'Elixir.Double'},        {for, 'Elixir.Integer'}]).  -spec '__impl__'(protocol) -&gt; 'Elixir.Double';         (target) -&gt; 'Elixir.Double.Integer';         (for) -&gt; 'Elixir.Integer'.  -export(['__impl__'\/1, '__info__'\/1, double\/1]).  -spec '__info__'(attributes | compile | exports |          functions | macros | md5 | module |          native_addresses) -&gt; atom() |                       [{atom(), any()} |                        {atom(), byte(), integer()}].  '__info__'(functions) -&gt; [{'__impl__', 1}, {double, 1}]; '__info__'(macros) -&gt; []; '__info__'(info) -&gt;     erlang:get_module_info('Elixir.Double.Integer', info).  '__impl__'(for) -&gt; 'Elixir.Integer'; '__impl__'(target) -&gt; 'Elixir.Double.Integer'; '__impl__'(protocol) -&gt; 'Elixir.Double'.  double(int@1) -&gt; int@1 * 2.<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0432\u0441\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0434\u0438\u0441\u043f\u0435\u0442\u0447\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a \u043f\u043e\u0438\u0441\u043a\u0443 \u043c\u043e\u0434\u0443\u043b\u044f \u043f\u043e \u0438\u043c\u0435\u043d\u0438, \u0437\u043d\u0430\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u043c\u0435\u043d\u0438 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430. \u0423 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0435\u0441\u0442\u044c \u043e\u0434\u0438\u043d \u043d\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043c\u0438\u043d\u0443\u0441 \u2013 \u0432\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0438 \u0442\u043e\u0433\u043e \u0436\u0435 \u0442\u0438\u043f\u0430.<\/p>\n<p>  <\/p>\n<p>Overhead \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0435 \u0442\u0430\u043a\u0438\u043c \u0443\u0436 \u0438 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u043c, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u0432\u044b\u0441\u043e\u043a\u043e\u043d\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c. \u0414\u0435\u043b\u043e \u0432 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044f \u0432 runtime.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0443\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0430 \u0431\u044b\u043b\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u00ab\u0437\u0430\u0448\u0438\u0442\u044c\u00bb \u0440\u043e\u0443\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0434\u0438\u0441\u043f\u0435\u0442\u0447\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438 <code>impl_for\/1<\/code><br \/>  \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <a href=\"http:\/\/elixir-lang.org\/getting-started\/protocols.html#protocol-consolidation\">consolidated protocols<\/a> \u0438 \u0441 Elixir v1.2 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0440\u0435\u043b\u0438\u0437\u0430 \u0447\u0435\u0440\u0435\u0437 mix.<\/p>\n<p>  <\/p>\n<p>\u0412\u0437\u0433\u043b\u044f\u043d\u0435\u043c \u043d\u0430 <code>consolidated\/Elixir.Double.erl<\/code>.<\/p>\n<p>  <\/p>\n<pre><code class=\"erlang\">-compile(no_auto_import).  -file(&quot;lib\/proto.ex&quot;, 1).  -module('Elixir.Double').  -compile(debug_info).  -compile({inline,       [{any_impl_for, 0}, {struct_impl_for, 1},        {'impl_for?', 1}]}).  -protocol([{fallback_to_any, false}]).  -export_type([t\/0]).  -type t() :: term().  -spec '__protocol__'('consolidated?') -&gt; boolean();             (functions) -&gt; [{double, 1}, ...];             (module) -&gt; 'Elixir.Double'.  -spec impl_for(term()) -&gt; atom() | nil.  -spec 'impl_for!'(term()) -&gt; atom() | no_return().  -callback double(t()) -&gt; term().  -export(['__info__'\/1, '__protocol__'\/1, double\/1,      impl_for\/1, 'impl_for!'\/1]).  -spec '__info__'(attributes | compile | exports |          functions | macros | md5 | module |          native_addresses) -&gt; atom() |                       [{atom(), any()} |                        {atom(), byte(), integer()}].  '__info__'(functions) -&gt;     [{'__protocol__', 1}, {double, 1}, {impl_for, 1},      {'impl_for!', 1}]; '__info__'(macros) -&gt; []; '__info__'(info) -&gt;     erlang:get_module_info('Elixir.Double', info).  '__protocol__'(module) -&gt; 'Elixir.Double'; '__protocol__'(functions) -&gt; [{double, 1}]; '__protocol__'('consolidated?') -&gt; true.  any_impl_for() -&gt; nil.  double(_@1) -&gt; ('impl_for!'(_@1)):double(_@1).  impl_for(#{'__struct__' := x}) when erlang:is_atom(x) -&gt;     struct_impl_for(x); impl_for(x) when erlang:is_list(x) -&gt;     'Elixir.Double.List'; impl_for(x) when erlang:is_integer(x) -&gt;     'Elixir.Double.Integer'; impl_for(_) -&gt; nil.  'impl_for!'(_@1) -&gt;     case impl_for(_@1) of       _@2 when (_@2 =:= nil) or (_@2 =:= false) -&gt;       erlang:error('Elixir.Protocol.UndefinedError':exception([{protocol,                                     'Elixir.Double'},                                    {value,                                     _@1}]));       _@3 -&gt; _@3     end.  'impl_for?'(_@1) -&gt;     case 'Elixir.Code':'ensure_compiled?'(_@1) of       true -&gt;       'Elixir.Kernel':'function_exported?'(_@1, '__impl__',                            1);       false -&gt; false;       _@2 -&gt; erlang:error({badbool, 'and', _@2})     end.  struct_impl_for(_) -&gt; nil.<\/code><\/pre>\n<p>  <\/p>\n<p>\u041a\u043e\u0434 \u043c\u043e\u0434\u0443\u043b\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0430 \u0438, \u0447\u0442\u043e \u043d\u0435\u043c\u0430\u043b\u043e\u0432\u0430\u0436\u043d\u043e, <code>impl_for<\/code> \u043e\u0442\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0432 \u043e\u0434\u0438\u043d \u0448\u0430\u0433 \u0431\u0435\u0437 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044f.<\/p>\n<p>  <\/p>\n<h3 id=\"itogo\">\u0418\u0442\u043e\u0433\u043e<\/h3>\n<p>  <\/p>\n<p>\u0418\u043d\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0432\u0437\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u0438\u0437\u043d\u0443\u0442\u0440\u0438 \u043d\u0430 \u0442\u043e, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442. \u042d\u0442\u043e \u0434\u0430\u0435\u0442 \u043d\u0430\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043d\u044f\u0442\u044c \u0435\u0433\u043e \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438.<\/p>\n<p>  <\/p>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 \u0436\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u0430 \u0438 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 consolidated protocols \u0434\u0430\u0435\u0442 \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 overhead, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0445\u043e\u0440\u043e\u0448\u0443\u044e \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u044e \u043d\u0430\u0434 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438 \u0432 Erlang, \u043d\u043e \u044d\u0442\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0440\u0443\u0447\u043d\u043e\u0433\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0434\u0438\u0441\u043f\u0435\u0442\u0447\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p>  <\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Elixir \u0438\u043b\u0438 \u043d\u0435\u0442 \u2013 \u0432\u044b\u0431\u043e\u0440 \u0437\u0430 \u0432\u0430\u043c\u0438. \u041d\u043e \u043c\u044b \u043f\u043e\u043a\u0430 \u043e\u0441\u0442\u0430\u0435\u043c\u0441\u044f \u043d\u0430 Erlang.<\/p>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/328528\/\"> https:\/\/habrahabr.ru\/post\/328528\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0412 \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u043c\u044b \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Erlang, \u043d\u043e \u0447\u0430\u0441\u0442\u043e \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u0434\u0440\u0443\u0433\u0438\u0435 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u044f\u0437\u044b\u043a\u0438 \u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u044b \u0434\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430.<\/p>\n<p>  <\/p>\n<p><a href=\"http:\/\/elixir-lang.org\/\">Elixir<\/a> \u2013 \u044d\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0431\u0449\u0435\u0433\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 BeamVM. \u041e\u0442 Erlang \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u043e\u043c, \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0445\u043e\u0436\u0438\u043c \u043d\u0430 Ruby, \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u043c\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u043c\u0435\u0442\u0430\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<p>\u0412 Elixir \u0442\u0430\u043a\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0434\u043b\u044f \u043f\u043e\u043b\u0438\u043c\u043e\u0440\u0444\u0438\u0437\u043c\u0430 \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <a href=\"http:\/\/elixir-lang.org\/getting-started\/protocols.html\">Protocols<\/a>, \u043d\u043e \u0432 Erlang \u043d\u0435\u0442 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0434\u0438\u0441\u043f\u0435\u0442\u0447\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u0434\u043b\u044f \u0438\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p>  <\/p>\n<p>\u0422\u043e\u0433\u0434\u0430 \u043a\u0430\u043a \u0436\u0435 \u043e\u043d\u0438 \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u0432\u043d\u0443\u0442\u0440\u0438? \u041a\u0430\u043a\u043e\u0439 overhead \u0434\u0430\u0435\u0442 \u043a\u043e\u0434 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432? \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/web\/843\/b2e\/cc9\/843b2ecc941746bda0cb17e37262e76b.jpg\"\/><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-286348","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/286348","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=286348"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/286348\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=286348"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=286348"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=286348"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}