Building Blocks

Elixir in Action: Chapter 2

The nitty gritty of getting started:

  • IEx
  • Variables
  • Code Organization
  • Data types
  • Operators, and
  • Runtime

I finally clicked on the use of & in lambdas. The syntax always looked foreign to me. The following are equivalent:

lambda = fn a, b, x -> a + b - c
lambda = &(&1 + &2 - &3)

Notable Notes and Quotes

[Read More]

Overview of Erlang/Benefits of Elixir

Elixir in Action: Chapter 1

The book opens with a high level overview of the technologies on which Elixir is built: Erlang and the BEAM.

I’ve always benefitted from being familiar with the level below where I was programming. In Python, I’d look at the AST and bytecode; in Pascal, the p-code; in C, the assembly code, and in assembly code I had hardware emulators (and Soft-ICE back in the day).

One focus is a review of how you can use the Elixir/Erlang/BEAM environment to create self-contained server-side systems that include web server, background jobs, caches, crash recovery, etc.

Notable Notes and Quotes

[Read More]

Shiny Thing #001: Macros

Wherein I'm distracted by Saša Jurić's 2014 Erlangelist Series

Spent the week reading through Saša Jurić’s six-part Understanding macros on The Erlangelist. I’ve previously managed to wend my way through a macro in one of the Programming Elixir exercises but didn’t really get a handle on it. Saša’s explanation of quote and unquote was clear and understandable.

Notable Notes and Quotes

[Read More]

Restarting...

Wow, almost a year since my last post.

I learned three things from my first attempt to learn Elixir.

  1. Cool language!

  2. Cool community!

  3. Old brain can no longer jump between a major Python project and a new language.

But there’s no longer any need to jump!

[Read More]

Ecto

Decided to switch from (A)Mnesia to Ecto with SQLite3 for my NVD (CVE) caching application.

  1. The historic NVD data is over 1GB which means I’m already starting to run into limitations.
  2. The planned database is extremely simple (two tables?).
  3. Experience with Ecto is more important in the long term for planned projects.

Useful and interesting links:

[Read More]