It's been while since I last posted a blog post. Actually it's been 4.5 months but whatever.
I recently started learning Elixir. If you don't know, Elixir is a dynamic and functional programming language that, runs on BEAM virtual machine, which used to implement Erlang. Apart from being functional, Elixir also focuses on concurrent and distributed programming and provide abstractions for building the applications that are concurrent and distribute.
I got introduced to Elixir when I asked around the TPH server. It was introduced to me by kibb#4205, who is an Elixir enthusiast ~~and also an Elixir missionary~~. He introduced me to Elixir by saying it's easier than Haskell and provide easier abstractions to concurrent programming than Go.
I got also attracted to cute community logo elixir got. I mean who doesn't love this
Less talk about how I got convinced into learning Elixir and more about Elixir
Elixir's syntax is similar to Ruby and the developer (José) used features of Erlang, Ruby and Clojure. Since it is built upon Erlang's virtual machine BEAM, so we can easily interface Elixir with libraries of Erlang, which has good ecosystem of libraries.
Elixir can be used both as compile time language and scripting language. Most elixir distribution, ships with Mix, a package manager for Elixir. With help of Mix, we can develop applications more easily and project management got simpler while developing with Elixir, also Mix is an example of how Elixir can be used as a scripting language.
Elixir is mostly used in telecommunications and Fin-techs companies.
It's also used by Discord, change.org, Heroku and many other companies. Elixir Companies is a community maintained site, which lists out the companies that uses Elixir.
Since it's kinda my first venture into functional programming languages. It was a new experience after 1.5 years of programming in imperative and procedural languages. The thing about everything is a function and no mutation of variables is kinda new to me.
Elixir being dynamic was kinda a turn-off for me, since I like static typically typed languages more, which is also why I started using typescript instead of javascript.
But that turn-off was predated by concurrent and distributed programming. After learning I can spawn thousands of processes, for doing same task. I tried multi-threading once and sweared to myself that I never try multi-threading again. After learning about processes, I kinda want to get into multi-threading.
I did simple static http server project on Elixir, where I used process to accept multiple clients. I would've surely struggled, if I had tried the same using threads. The process kinda increased my time to finish the feature of accepting multiple clients.
That's all for today's post. If you want to get into Elixir check out the tutorial by Elixir itself and Joy of Elixir book by Ryann Bigg.
I hope and try to post another post in December and not delay another 4 months.