<div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace">The example is power_shell:eval(dist_util, gen_challenge, []).</div><div class="gmail_default" style="font-family:monospace,monospace">With the arguments being Module, Function, Arguments, why is</div><div class="gmail_default" style="font-family:monospace,monospace">it not called power_shell:apply/3?</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">Since I'm currently trying to learn PowerShell, I was initially</div><div class="gmail_default" style="font-family:monospace,monospace">confused by the module name.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 19 Sep 2019 at 16:02, Maxim Fedorov <<a href="mailto:maximfca@gmail.com">maximfca@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">power_shell is an application providing a convenient way to evaluate<br>
functions extracted from compiled *.beam file, or read from *.erl<br>
source.<br>
<br>
How do we use it at WhatsApp?<br>
<br>
Debugging on production machines: evaluating functions that are not<br>
exported. For example, dist_util.erl contains gen_challenge/0, but it<br>
is not accessible without making a change to OTP kernel application.<br>
Using power_shell:eval(dist_util, gen_challenge, []) yields the<br>
desired result.<br>
<br>
Common Tests: testing functions that are not exported. We want to test<br>
against production build, providing production API.<br>
<br>
Development: changing *.erl file and immediately evaluating functions<br>
directly from *.erl file (no need to c(mymodule) to compile and load<br>
updated code).<br>
<br>
Package is available on hex:<br>
<a href="https://hex.pm/packages/power_shell" rel="noreferrer" target="_blank">https://hex.pm/packages/power_shell</a><br>
<br>
Source code is available on GitHub:<br>
<a href="https://github.com/WhatsApp/power_shell" rel="noreferrer" target="_blank">https://github.com/WhatsApp/power_shell</a><br>
<br>
Enjoy!<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div>