[erlang-questions] OTP 20.0 has been released

Fred Hebert mononcqc@REDACTED
Wed Jun 21 16:51:28 CEST 2017


For those interested, OTP-20 is the first modern release that will *not* be
supported by https://github.com/ferd/erlang-history/

The reason for this is this tiny update that goes under the radar:

  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.


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:

*shell_history = enabled | disabled *

Specifies whether shell history should be logged to disk between usages of
erl.
*shell_history_drop = [string()]*

Specific log lines that should not be persisted. For example ["q().",
"init:stop()."] will allow to ignore commands that shut the node down.
Defaults to [].
*shell_history_file_bytes = integer()*

how many bytes the shell should remember. By default, the value is set to
512kb, and the minimal value is 50kb.
*shell_history_path = string()*

Specifies where the shell history files will be stored. defaults to the
user's cache directory as returned by filename:basedir(user_cache,
"erlang-history").

To turn shell history on, you can therefore do any of the following:

   - Pass the arguments to the shell: $ erl -kernel shell_history enabled
   - Create a configuration file like
   [{kernel,[{shell_history, enabled}]}].
   and pass it to the shell: $ erl -config hist.config
   - You can create an alias for the shell with alias erl='erl -kernel
   shell_history enabled' in your dotfiles to get it always running
   - On windows you can create a shortcut to werl.exe and change the
   shortcut target to '"C:\Program Files\erlang-otp-20\bin\werl.exe"
   -kernel shell_history enabled' to get it all automatically -- 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.

The following apparently and sadly does not work, which confuses me quite a
bit:

   - editing $ROOT/lib/kernel-5.3/ebin/kernel.app and add the config
   directly in there
   - Neither does creating a sys.config entry in the root release

Let me know how that goes!


Also big thanks for the effort with the redesign of docs!

On Wed, Jun 21, 2017 at 8:33 AM, Kenneth Lundin <kenneth@REDACTED> wrote:

> Erlang/OTP 20.0
>
> Erlang/OTP 20.0 is a new major release with new features, quite a few
> (characteristics) improvements, as well as a few incompatibilities.
>
> There are only minor changes compared to the second release candidate, one
> of them listed below:
>
>    - ERTS:
>       - In the release candidates the function erlang:term_to_binary/1
>       changed the encoding of all atoms from ATOM_EXT to ATOM_UTF8_EXT
>       and SMALL_ATOM_UTF8_EXT. This is now changed so that only atoms
>       actually containing unicode characters are encoded with the UTF8 tags while
>       other atoms are encoded ATOM_EXT just as before.
>
> Here are some of the most important news in OTP 20:
> Potential Incompatibilities
>
>    -
>
>    ERTS:
>    - The non SMP Erlang VM is deprecated and not built by default
>       - Remove deprecated erlang:hash/2
>       - erlang:statistics/1 with scheduler_wall_time now also includes
>       info about dirty CPU schedulers.
>       - The new purge strategy introduced in OTP 19.1 is mandatory and
>       slightly incompatible for processes holding funs
>       see erlang:check_process_code/3.
>       - The NIF library reload is not supported anymore.
>       - Atoms can now contain arbitrary unicode characters which means
>       that the DFLAG_UTF8_ATOMS 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.
>    -
>
>    Asn1: Deprecated module and functions removed (asn1rt, asn1ct:encode/3
>    and decode/3)
>    -
>
>    Ssh: client only option in a call to start a daemon will now fail
>
> Highlights Erts:
>
>    - Dirty schedulers enabled and supported on VM with SMP support.
>    - support for “dirty” BIFs and “dirty” GC.
>    - erlang:garbage_collect/2 for control of minor or major GC
>    - Erlang literals are no longer copied when sending messages.
>    - Improved performance for large ETS tables, >256 entries (except
>    ordered_set)
>    - erlang:system_info/1 atom_count and atom_limit
>    - Reduced memory pressure by converting sub-binaries to heap-binaries
>    during GC
>    - enif_select, map an external event to message
>    - Improvements of timers internally in the VM resulting in reduced
>    memory consumption and more efficient administration for timers
>
> Compiler:
>
>    - Code generation for complicated guards is improved.
>    - Warnings for repeated identical map keys. #{'a'=>1, 'b'=>2, 'a'=>3}
>    will warn for the repeated key a.
>    - By default there is now a warning when export_all is used. Can be
>    disabled
>    - Pattern matching for maps is optimized
>    - New option deterministic to omit path to source + options info the
>    BEAM file.
>    - Atoms may now contain arbitrary unicode characters.
>    - compile:file/2 has an option to include extra chunks in the BEAM
>    file.
>
> Misc other applications
>
>    - Significantly updated string module with unicode support and many
>    new functions
>    - crypto now supports OpenSSL 1.1
>    - Unnamed ets tables optimized
>    - gen_fsm is deprecated and replaced by gen_statem
>    - A new event manager to handle a subset of OS signals in Erlang
>    - Optimized sets add_element, del_element and union
>    - Added rand:jump/0-1
>    - When a gen_server crashes, the stacktrace for the client will be
>    printed to facilitate debugging.
>    - take/2 has been added to dict, orddict, and gb_trees.
>    - take_any/2 has been added to gb_trees
>    - erl_tar support for long path names and new file formats
>    - asn1: the new maps option changes the representation of SEQUENCE to
>    be maps instead of records
>    - A TLS client will by default call public_key:pkix_verify_hostname/2
>    to verify the hostname
>    - ssl: DTLS documented in the API, experimental
>    - ssh: improving security, removing and adding algorithms
>    - New math:fmod/2
>
> For more details see
> http://erlang.org/download/otp_src_20.0.readme
>
> Per built versions for Windows can be fetched here:
> http://erlang.org/download/otp_win32_20.0.exe
> http://erlang.org/download/otp_win64_20.0.exe
>
> On line documentation can be browsed here:
> www.erlang.org/doc/
>
> Thanks to all contributors.
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20170621/7a175523/attachment.htm>


More information about the erlang-questions mailing list