<div dir="ltr"><div><div><div>For those interested, OTP-20 is the first modern release that will <b>not</b> be supported by <a href="https://github.com/ferd/erlang-history/">https://github.com/ferd/erlang-history/</a><br><br></div>The reason for this is this tiny update that goes under the radar:<br><br><pre>  OTP-14409    Application(s): kernel
               Related Id(s): PR-1420

               Added option to store shell_history on disk so that the
               history can be reused between sessions.</pre><br></div>The contents of erlang-history is now officially part of OTP. It is however disabled by default. To turn it on and try it (and report bugs if there are any!), please use the following options in the kernel application:<br><br><dl><dt><strong><span class="gmail-code">shell_history = enabled | disabled </span></strong></dt><dd>
        <p>Specifies whether shell history should be logged to disk
           between usages of <span class="gmail-code">erl</span>.</p>
      </dd><dt><strong><span class="gmail-code">shell_history_drop = [string()]</span></strong></dt><dd>
        <p>Specific log lines that should not be persisted. For
           example <span class="gmail-code">["q().", "init:stop()."]</span> will allow to
           ignore commands that shut the node down. Defaults to
           <span class="gmail-code">[]</span>.</p>
      </dd><dt><strong><span class="gmail-code">shell_history_file_bytes = integer()</span></strong></dt><dd>
        <p>how many bytes the shell should remember. By default, the
           value is set to 512kb, and the minimal value is 50kb.</p>
      </dd><dt><strong><span class="gmail-code">shell_history_path = string()</span></strong></dt><dd>
        <p>Specifies where the shell history files will be stored.
           defaults to the user's cache directory as returned by
           <span class="gmail-code">filename:basedir(user_cache, "erlang-history")</span>.</p>
      </dd></dl><br></div>To turn shell history on, you can therefore do any of the following:<br><ul><li><span style="font-family:monospace,monospace"></span>Pass the arguments to the shell:<span style="font-family:monospace,monospace"> $ erl</span><code><span style="font-family:monospace,monospace"> </span>-kernel shell_history enabled</code></li><li><code><span style="font-family:arial,helvetica,sans-serif">Create a configuration file like</span> </code><code><br>[{kernel,[{shell_history, enabled}]}].</code><br><code></code><code><span style="font-family:arial,helvetica,sans-serif">and pass it to the shell:</span> $ erl -config hist.config</code></li><li><code><span style="font-family:arial,helvetica,sans-serif">You can create an alias for the shell with</span> </code><code>alias erl='erl -kernel shell_history enabled' <span style="font-family:arial,helvetica,sans-serif">in your dotfiles to get it always running</span><br></code></li><li><code><span style="font-family:arial,helvetica,sans-serif">On windows you can create a shortcut to werl.exe and change the shortcut target to '</span>"C:\Program Files\erlang-otp-20\bin\werl.exe" -kernel shell_history enabled<span style="font-family:arial,helvetica,sans-serif"><span class="">'</span> to get it all automatically</span></code><span style="font-family:arial,helvetica,sans-serif"> -- you can do it in the start menu entry if that's the one you use the most by 'opening location' and editing the shortcut there.<br></span></li></ul><p>The following apparently and sadly does not work, which confuses me quite a bit:</p><ul><li>editing $ROOT/lib/kernel-5.3/ebin/kernel.app and add the config directly in there<span style="font-family:monospace,monospace"></span></li><li><span style="font-family:arial,helvetica,sans-serif">Neither does creating a sys.config entry in the root release</span><span style="font-family:monospace,monospace"></span></li></ul><p>Let me know how that goes!</p><p><br></p><p>Also big thanks for the effort with the redesign of docs!<br></p></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 21, 2017 at 8:33 AM, Kenneth Lundin <span dir="ltr"><<a href="mailto:kenneth@erlang.org" target="_blank">kenneth@erlang.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="m_731825281576790054gmail-preview-content">
        <div class="m_731825281576790054gmail-comment-body m_731825281576790054gmail-markdown-body m_731825281576790054gmail-js-preview-body" style="min-height:504.75px"><h1>Erlang/OTP 20.0</h1>
<p>Erlang/OTP 20.0 is a new major release with new features, quite a few
 (characteristics) improvements, as well as a few incompatibilities.</p>
<p>There are only minor changes compared to the second release candidate, one of them listed below:</p>
<ul><li>ERTS:
<ul><li><code><font size="4"><span style="font-family:arial,helvetica,sans-serif">In the release candidates the function</span></font> erlang:term_to_binary/1</code> changed the encoding of all atoms from <code>ATOM_EXT</code> to <code>ATOM_UTF8_EXT</code> and <code>SMALL_ATOM_UTF8_EXT</code>.
 This is now changed so that only atoms actually containing unicode 
characters are encoded with the UTF8 tags while other atoms are encoded <code>ATOM_EXT</code> just as before.</li></ul>
</li></ul>
<p>Here are some of the most important news in OTP 20:</p>
<h2>Potential Incompatibilities</h2>
<ul><li>
<p>ERTS:</p>
<ul><li>The non SMP Erlang VM is deprecated and not built by default</li><li>Remove deprecated <code>erlang:hash/2</code></li><li>erlang:statistics/1 with scheduler_wall_time now also includes info about dirty CPU schedulers.</li><li>The new purge strategy introduced in OTP 19.1 is mandatory and slightly incompatible for processes holding funs<br>
see <code>erlang:check_process_code/3</code>.</li><li>The NIF library reload is not supported anymore.</li><li>Atoms can now contain arbitrary unicode characters which means that the <code>DFLAG_UTF8_ATOMS</code>
 capability in the distribution protocol must be supported if an OTP 20 
node should accept the connection with another node or library. Third 
party libraries which uses the distribution protocol need to be updated 
with this.</li></ul>
</li><li>
<p>Asn1: Deprecated module and functions removed (<code>asn1rt</code>, <code>asn1ct:encode/3</code> and <code>decode/3</code>)</p>
</li><li>
<p>Ssh: client only option in a call to start a daemon will now fail</p>
</li></ul>
<h2>Highlights</h2>
<h3>Erts:</h3>
<ul><li>Dirty schedulers enabled and supported on VM with SMP support.</li><li>support for “dirty” BIFs and “dirty” GC.</li><li>erlang:garbage_collect/2 for control of minor or major GC</li><li>Erlang literals are no longer copied when sending messages.</li><li>Improved performance for large ETS tables, >256 entries (except ordered_set)</li><li>erlang:system_info/1 atom_count and atom_limit</li><li>Reduced memory pressure by converting sub-binaries to heap-binaries during GC</li><li>enif_select, map an external event to message</li><li>Improvements of timers internally in the VM resulting in reduced memory consumption and more efficient administration for timers</li></ul>
<h3>Compiler:</h3>
<ul><li>Code generation for complicated guards is improved.</li><li>Warnings for repeated identical map keys. <code>#{'a'=>1, 'b'=>2, 'a'=>3}</code> will warn for the repeated key <code>a</code>.</li><li>By default there is now a warning when <code>export_all</code> is used. Can be disabled</li><li>Pattern matching for maps is optimized</li><li>New option <code>deterministic</code> to omit path to source + options info the BEAM file.</li><li>Atoms may now contain arbitrary unicode characters.</li><li><code>compile:file/2</code> has an option to include extra chunks in the BEAM file.</li></ul>
<h3>Misc other applications</h3>
<ul><li>Significantly updated <code>string</code> module with unicode support and many new functions</li><li>crypto now supports OpenSSL 1.1</li><li>Unnamed ets tables optimized</li><li><code>gen_fsm</code> is deprecated and replaced by <code>gen_statem</code></li><li>A new event manager to handle a subset of OS signals in Erlang</li><li>Optimized sets add_element, del_element and union</li><li>Added <code>rand:jump/0-1</code></li><li>When a <code>gen_server</code> crashes, the stacktrace for the client will be printed to facilitate debugging.</li><li><code>take/2</code> has been added to <code>dict</code>, <code>orddict</code>, and <code>gb_trees</code>.</li><li><code>take_any/2</code> has been added to <code>gb_trees</code></li><li><code>erl_tar</code> support for long path names and new file formats</li><li><code>asn1</code>: the new <code>maps</code> option changes the representation of <code>SEQUENCE</code> to be maps instead of records</li><li>A TLS client will by default call <code>public_key:pkix_verify_<wbr>hostname/2</code> to verify the hostname</li><li><code>ssl</code>: DTLS documented in the API, experimental</li><li><code>ssh</code>: improving security, removing and adding algorithms</li><li>New  <code>math:fmod/2</code></li></ul>
<p>For more details see<br>
<a href="http://erlang.org/download/otp_src_20.0.readme" target="_blank">http://erlang.org/download/<wbr>otp_src_20.0.readme</a></p>
<p>Per built versions for Windows can be fetched here:<br>
<a href="http://erlang.org/download/otp_win32_20.0.exe" target="_blank">http://erlang.org/download/<wbr>otp_win32_20.0.exe</a><br>
<a href="http://erlang.org/download/otp_win64_20.0.exe" target="_blank">http://erlang.org/download/<wbr>otp_win64_20.0.exe</a></p>
<p>On line documentation can be browsed here:<br>
<a href="http://www.erlang.org/doc/" target="_blank">www.erlang.org/doc/</a></p>
<p>Thanks to all contributors.</p></div>
      </div></div>
<br>______________________________<wbr>_________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/<wbr>listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>