Elixir tips: #1 — Copy last result in IEX

In Ruby you have some tricks in the console. I always use the _ to retrieve the last return value. In Elixir, you have the same approach with v function. Let’s see: iex help for v function As you can see, the function v can get the last value because it’s using the default value -1 or you can use v(line_number) to get the value from a previous one....

March 27, 2021 · 1 min · Erich Kist | tags: elixir, english - Também disponível em 🇧🇷

Tracing and observing your remote node

Today we will continue exploring techniques for debugging and tracing Elixir code that are so important for running and understanding production systems. Important: This post was original published by me in http://blog.plataformatec.com.br/2016/05/tracing-and-observing-your-remote-node/ on May 10, 2016. In the past, we have discussed: how to debug your application how to trace systems with Erlyberly how to use the observer to introspect applications The examples above always connected to systems running locally....

March 27, 2021 · 4 min · Erich Kist | tags: elixir, english - Também disponível em 🇧🇷

How to trace Elixir nodes with Erlyberly

At Plataformatec, we are always learning new techniques to help our clients introspect and monitor their production systems. Last week, we saw debugging techniques in Elixir and now we will see one of many ways to do tracing in Elixir. Important: This post was original published by me in http://blog.plataformatec.com.br/2016/04/how-to-trace-elixir-nodes-with-erlyberly/ on April 14, 2016. For this post, we will use erlyberly ....

March 27, 2021 · 3 min · Erich Kist | tags: elixir, english - Também disponível em 🇧🇷

Debugging techniques in Elixir

It’s common that our first experience with debugging in a new language is by printing values to the terminal. Elixir isn’t different: we can use IO.puts/2 and IO.inspect/2. However, Elixir also provides other approaches to debugging. Important: This post was original published by me in http://blog.plataformatec.com.br/2016/04/debugging-techniques-in-elixir-lang/ on April 07, 2016. In this blog post, we’ll show you other 2 options: IEx.pry/0 and :debugger. IEx.pry The name “pry” is an old friend in the Ruby ecosystem but it has a different behavior in Elixir....

March 27, 2021 · 3 min · Erich Kist | tags: elixir, english - Também disponível em 🇧🇷

Using Gettext to internationalize a Phoenix application

To translate or not to translate? We have been asking ourselves the same question in one of our latest Phoenix projects. Even though internationalizing our application is planned a bit ahead in our roadmap, we have decided to do an initial evaluation of the translation tools in the Elixir ecosystem, and we were pleasantly surprised by what it has to offer. Important: This post was original published by me in http://blog....

March 27, 2021 · 6 min · Erich Kist | tags: elixir, english - Também disponível em 🇧🇷

How to Setup CI to Run Phoenix Projects

Writing tests is an important step in software development and everyone knows the benefits. In our last post, we took a look on how to write acceptance tests in Phoenix and today we will see how to configure CI to run the tests. Important: This post was original published by me in http://blog.plataformatec.com.br/2016/02/how-to-setup-ci-to-run-phoenix-projects/ on February 12, 2016. Install Erlang and Elixir We use Jenkins to run ours builds and Ansible to setup the agents....

March 27, 2021 · 3 min · Erich Kist | tags: elixir, jenkins, english - Também disponível em 🇧🇷