<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>New to Elixir? on Poeticoding</title><link>https://www.poeticoding.com/categories/new-to-elixir/</link><description>Recent content in New to Elixir? on Poeticoding</description><generator>Hugo</generator><language>en</language><lastBuildDate>Sun, 23 Jun 2019 17:53:07 +0000</lastBuildDate><atom:link href="https://www.poeticoding.com/categories/new-to-elixir/index.xml" rel="self" type="application/rss+xml"/><item><title>The Primitives of Elixir Concurrency: a Full Example</title><link>https://www.poeticoding.com/the-primitives-of-elixir-concurrency-full-example/</link><pubDate>Tue, 19 Mar 2019 15:39:08 +0000</pubDate><guid>https://www.poeticoding.com/the-primitives-of-elixir-concurrency-full-example/</guid><description>&lt;p>Previous articles about Concurrency in Elixir:\&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://www.poeticoding.com/spawning-processes-in-elixir-a-gentle-introduction-to-concurrency/">How to spawn an Elixir process&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.poeticoding.com/hey-process-there-is-a-message-for-you/">How to send and receive messages between processes&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>Let’s put in practice what we’ve seen in the last few articles about concurrency. In this article we see how to fully make our &lt;a href="https://www.poeticoding.com/spawning-processes-in-elixir-a-gentle-introduction-to-concurrency/#http_api_requests">initial cryptocurrency example&lt;/a>, using just &lt;a href="https://github.com/edgurgel/httpoison" target="_blank" rel="noopener">HTTPoison&lt;/a> module and &lt;code>spawn&lt;/code>, &lt;a href="https://hexdocs.pm/elixir/Kernel.html#send/2" target="_blank" rel="noopener">send&lt;/a> and &lt;code>receive&lt;/code> to handle concurrency. At the end we will refactor it using &lt;a href="https://hexdocs.pm/elixir/Task.html" target="_blank" rel="noopener">Task&lt;/a>, which makes everything far easier!&lt;/p></description></item><item><title>Hey Process, there is a Message for you!</title><link>https://www.poeticoding.com/hey-process-there-is-a-message-for-you/</link><pubDate>Wed, 13 Mar 2019 16:21:23 +0000</pubDate><guid>https://www.poeticoding.com/hey-process-there-is-a-message-for-you/</guid><description>&lt;p>&lt;a href="https://www.poeticoding.com/spawning-processes-in-elixir-a-gentle-introduction-to-concurrency/">We already saw how to spawn new processes&lt;/a> to run our code concurrently, doing multiple HTTP requests at the same time, getting cryptocurrency prices.&lt;/p>
&lt;p>Without messages and coordination between processes, the only way to see the results was to let each process printing each price once finished.&lt;/p></description></item><item><title>Spawning processes in Elixir, a gentle introduction to concurrency</title><link>https://www.poeticoding.com/spawning-processes-in-elixir-a-gentle-introduction-to-concurrency/</link><pubDate>Wed, 06 Mar 2019 12:35:26 +0000</pubDate><guid>https://www.poeticoding.com/spawning-processes-in-elixir-a-gentle-introduction-to-concurrency/</guid><description>&lt;p>Along with &lt;a href="https://www.poeticoding.com/the-beauty-of-pattern-matching-in-elixir/">pattern matching&lt;/a>, one of the coolest things in Erlang and Elixir is &lt;a href="https://en.wikipedia.org/wiki/Actor_model" target="_blank" rel="noopener">their concurrency implementation based on Actor model&lt;/a>. In this article I introduce concurrency and show how we can start making our code concurrent in Elixir, using processes.&lt;/p>
&lt;h2 id="concurrency">Concurrency&lt;/h2>
&lt;p>We can think of concurrency as dealing with multiple things happening, and progressing, at the same time.&lt;/p></description></item><item><title>The Beauty of Pattern Matching in Elixir</title><link>https://www.poeticoding.com/the-beauty-of-pattern-matching-in-elixir/</link><pubDate>Tue, 19 Feb 2019 12:01:31 +0000</pubDate><guid>https://www.poeticoding.com/the-beauty-of-pattern-matching-in-elixir/</guid><description>&lt;div class="video">&lt;iframe src="https://www.youtube-nocookie.com/embed/jbuSdZH-14w" title="YouTube video" loading="lazy" allow="accelerometer; encrypted-media; gyroscope; picture-in-picture" allowfullscreen referrerpolicy="strict-origin-when-cross-origin">&lt;/iframe>&lt;/div>

&lt;h2 id="transcript">Transcript&lt;/h2>
&lt;p>One of the reasons I fell in love with Elixir is pattern matching and how it can be extensively used all over the code.&lt;/p>
&lt;h2 id="match-operator">Match Operator&lt;/h2>
&lt;p>Let&amp;rsquo;s start the interactive Elixir console, &lt;code>iex&lt;/code> and let&amp;rsquo;s do what is seems to be a normal assignment&lt;/p></description></item><item><title>Running Elixir in Docker Containers</title><link>https://www.poeticoding.com/running-elixir-in-docker-containers/</link><pubDate>Wed, 12 Dec 2018 14:15:00 +0000</pubDate><guid>https://www.poeticoding.com/running-elixir-in-docker-containers/</guid><description>&lt;p>One of the wonderful things about &lt;a href="https://www.docker.com/resources/what-container" target="_blank" rel="noopener">Docker&lt;/a> Containers is that you can easily freeze your environment and application in a Docker Image, and deploy it in production without worrying about installing dependencies on your servers. It just works.
This is also great for debugging. If something doesn&amp;rsquo;t work in production, you can run exactly the same image locally in matter of seconds.
The features and advantages of docker obviously don&amp;rsquo;t stop here.
In this article we see how to use Docker to run our development Elixir environment and to run multiple Elixir Nodes over a Docker bridge network.&lt;/p></description></item></channel></rss>