Writing command line programs in Elixir: Vowel Counter

Note: This is a very basic example of mix tool and escript utility. One can skip this post if already have an idea about these tools. Lets write a simple command line program which would take a String as a command line argument and display the number of vowels in it. We’ll use Elixir’s mix build tool and OptionParser to parse command line arguments. Lets start by setting up the application: $ mix new vowel_counter Open mix.exs, you will see something like: We’ll be using Erlang’s escript utility to precompile our app and package our application’s code along with its dependencies(no dependencies in this example app) in…

Trying my hands on Elixir

Recently, I began spending some of my time with Elixir and started following Dave Thomas’ Programming Elixir. Though, I am half way through with the book and still don’t have a very good hold on the language but after reading about processes in Elixir, I thought to write something on my own so I wrote a small ping-pong program: I am pretty sure there is much scope of improvement but this is what I could write as of now. Your comments/suggestions are welcome, kindly add them below.