Elixir 1.5 is out now

New version of young and interesting programming language is available now
25 July 2017   664
Elixir

Dynamic, functional language designed for building scalable and maintainable applications.

Great news for Elixir coders! Finally, new 1.5 version on this language is available.

According to the developers, Elixir v1.5 brings many improvements to the developer experience and quality of life. Many of those are powered by the latest Erlang/OTP 20. This is also the last Elixir release that supports Erlang/OTP 18.

Let's figure out, what new features are available.

UTF-8 atoms, function names and variables

Elixir v1.5 supports non-quoted atoms and variables to be in UTF-8 when using Erlang/OTP 20. For example:

test "こんにちは世界" do
  assert :こんにちは世界
end

Or:

saudação = "Bom dia!"

IEx helpers and breakpoints

IEx got many enhancements to the developer experience.

First of all, the autocompletion system is now capable of autocompleting variables and user imports. 

IEx also got new functions, such as exports/1, for listing all functions and macros in a module, and the new runtime_info/0

Finally, IEx also features a breakpoint system for code debugging when running on Erlang/OTP 20. The following functions have been added to aid debugging:

  • break!/2 - sets up a breakpoint for a given Mod.fun/arity
  • break!/4 - sets up a breakpoint for the given module, function, arity
  • breaks/0 - prints all breakpoints and their ids
  • continue/0 - continues until the next breakpoint in the same process
  • open/0 - opens editor on the current breakpoint
  • remove_breaks/0 - removes all breakpoints in all modules
  • remove_breaks/1 - removes all breakpoints in a given module
  • reset_break/1 - sets the number of stops on the given id to zero
  • reset_break/3 - sets the number of stops on the given module, function, arity to zer
  • respawn/0 - starts a new shell (breakpoints will ask for permission once more)
  • whereami/1 - shows the current location

Exception.blame

Exception.blame/3 is a new function in Elixir that is capable of attaching debug information to certain exceptions. Currently this is used to augment FunctionClauseErrors with a summary of all clauses and which parts of clause match and which ones didn’t.

Since blaming an exception can be expensive, Exception.blame/3 must be used exclusively in debugging situations. It is not advised to apply it to production components such as a Logger. This feature has been integrated into the compiler, the command line, ExUnit and IEx.

Streamlined child specs

Elixir v1.5 streamlines how supervisors are defined and used in Elixir. Elixir now allows child specifications, which specify how a child process is supervised, to be defined in modules.

@impl

This release also allows developers to mark which functions in a given module are an implementation of a callback. 

Calendar improvements

Elixir v1.3 introduced the Calendar module with the underlying TimeDateNaiveDateTimeand Datetime data types. Developers are glad to announce we consider the base Calendar API to be finished in Elixir v1.5. This release includes many enhancements, such as Date.range/2 and the ability to convert between different calendars.

You can have more information at GitHub and Elixir-Lang.

ElixirLangMoscow Meetup #7

Meetup will be held on February 15th, Thursday, in Moscow, Pyatnitsky Lane 2
22 January 2018   256

Club ElixirLangMoscow invites all lovers of Elixir, Erlang and functional programming languages to the next meeting of our club. This time the event was decided to be held in the "Dear, I will call back" bar. Because, what could be better than listening to interesting reports for a glass of beer. And even in the company of friends!

Speakers

We are waiting for two cool reports and a free microphone for those who have something to say.

Dmitry Rubinstein

Topic: “Introduction to Agala

Dmitry Rubinstein
Dmitry Rubinstein

The report will highlight the Agala framework - a platform for real-time interaction with third-party services. Currently, this platform has implemented bots for Telegram and Vk, which are used in the combat environment in our company. Let's analyze the main differences from the known solutions for creating bots on Elixir, consider the internal structure of the platform and learn how to support any necessary third-party service.
 

Dmitry Rubinstein
CTI

Alexandr Shorin 

Topic: “Apache CouchDB: more than a database with HTTP API

Alexandr Shorin
Alexandr Shorin

This will be an introductory report with Apache CouchDB and its ecosystem. Main features and capabilities. Details of the implementation of the replication protocol and why this is important. Forks: Couchbase, Cloudant - what are the differences and why should not they be confused with the original project. The history of clustering, what happened in the end in 2.0 and how it works. What is interesting about the new release and where the project is heading.
 

Alexandr Shorin 
Rambler

As a pleasant chip, the bar will prepare an "Elixir" cocktail especially for us. Admission is free, everyone pays their bill.

The event has an age limit of 18+. Register for free.