Info

In my journey of escaping from the mundane life of JavaScript and WebDev, see Escaping Web Dev, I find myself looking back at the things I learned in term 4 at BCIT. Rust and Elixir!

These languages and their ecosystems are fascinating, for different reasons. They’re so well suited for what they do that I find it exciting to learn about them again. I’m already Learning Rust but I wasn’t sure what or how I could continue exploring Elixir. So here goes.

Web

I know I said I’m escaping web but hear me out. Elixir has an incredible ace up its sleeve in The Phoenix Framework, especially LiveView. Like other ModelViewController frameworks it gets rid of the pain of juggling two separate code bases between the server and client and the headaches that arise from all that, especially state consistency…

LiveView uses Websockets to monitor interactions on the client side and respond blazingly fast. width:400

There are some JS libraries that are lightweight and integrate well allowing for client-side logic where needed. The community are fans of the “PETAL” stack.

Open Telecom Platform (OTP)

This is the groundwork that’s laid underneath Elixir thanks to Erlang. It’s a fault-tolerant framework that’s great for fault-tolerant systems, so good it’s been used in telecom for decades.

Fast API Servers

Elixir’s BEAM concurrency model, supervisors and workers, makes it a great candidate for building high performance, high up-time, API servers. It’s not C# or Rust levels of speed (interpreted) but it’s still very fast and it’s ergonomic and wonderful to type. To me it was like Python but without the bullshit and proper dynamic typing.

Very ideal for turning an idea into a working project fast! The next time I need an API server, this is what I’m considering.

Interactive Coding Books - LiveBook

Think Jupyter notebook but for Elixir code, markdown support, rich text, full runtime, and highly collaborative. My Elixir Livebook presentation.

Embedded Systems with Nerve Project

Come back to this when you are Getting Into Embedded Systems… It basically bundles your apps on the lightweight Erlang VM, bringing the fault-tolerance with it.

Rust and Elixir

Apparently these two love each other! Thanks to Native Implemented Functions NIF and the Rustler library, you can integrate Rust code into the parts of your project that need it. Great for when system-level, on-the-metal fast performance is needed.


References