Learning IoT: First Steps with Elixir

Recently I have the opportunity to give a conference in the Startup Week in Mexico City. So I decided talk about Internet of things, because I was learning this using an Arduino and a Raspberry Pi. DEMO Connect Everything! The project is create a simple web application for create distribuid music. I was inspired in the Launchpad App and the Smartphone Symphony. I planned make this using Phoenix Framework, and connect an Arduino for play the music.

Continue reading

Process in Elixir: A Simple Example

In the last days I have been learning about Process in Elixir. After doing some exercises and understand some things about it, I can explain how to create a simple example about process. The Process Work with process in Elixir is so common, so, it鈥檚 important know how to use it. For create a process you can use spawn (which takes a function). The process structure is very simple: you have a mailbox, created within a function and by the word receive, and you can manage different messages and do something.

Continue reading

Phoenix Simple App using Web Sockets

Hi! This post is for explain how to create a simple application with Phoenix and Elixir using Web Sockets. Web Sockets The Web Socket protocol based on TCP produce a bidirectional communication between client-server app, and it doesn鈥檛 need to use HTTP protocols. I created a phoenix project without ecto mix phx.new sampler --no-ecto for show a simple connection using web sockets. Create the two-way communication For start, we have to create the communication through the web socket.

Continue reading

Hello Elixir!

Recientemente he estado conociendo el lenguaje Elixir, un lenguaje que aprovecha la m谩quina virtual de Erlang, una plataforma conocida por soportar sistemas en baja latencia, sistemas distribuidos y tolerantes a fallas. Para familiarizarme con el lenguaje he optado por resolver algunos ejercicios, un par de ellos son el Fizz Buzz y Guess My Number. Fizz Buzz // My Fizzbuzz Solution in Swift for i in 1...50 { if i%5==0 && i%3==0 { print("Fizzbuzz 馃嵒 ") } else if i%5 == 0{ print("Buzz") } else if i%3==0{ print("Fizz") } else{ print("\(i)") } } Normalmente suelo resolver este ejercicio con una iteraci贸n, y el siempre confiable y 煤til IF, sin embargo, Elixir al ser un lenguaje funcional obliga a la implementaci贸n de otra soluci贸n bajo t茅rminos funcionales, aqu铆 el primer reto.

Continue reading