Blog

The Capture Operator

Posted on February 13, 2015 by Clive

The capture operator works a little bit like capture groups in regular expressions, but for function arguments. Use of this allows for shortcutting and making more readable short anonymous functions.   Helper and anonymous functions Because the use of small helper functions is so ubiquitous in…

Strings in Elixir

Posted on February 06, 2015 by Clive

Common features As is common in programming, Elixir has two string formats: single-quoted and double-quoted. These two representations have many things in common: UTF-8 character encoding they can contain escape sequences they allow string interpolation they have a heredoc representation Don't let…

[ ] or Lists

Posted on January 31, 2015 by Clive

Of all the data structures that you might use in Elixir, the one that you will undoubtly use the most is the list. In Elixir a list is a what is commonly referred to in other languages as a linked-list and is used to contain a collection of items of all the same type.   What is a list anyhow? At…

Functions, Functions and more Functions

Posted on November 15, 2014 by Clive

Elixir is a functional programming language, and as such you should expect that it has functions. In fact, like many functional and imperative languages it has two sorts: anonymous and named. Before I go on and discuss functions, I need to cover the concept of arity. The arity of a function is the…

Elixir Types

Posted on November 08, 2014 by Clive

Elixir has many of the types that you would expect from a modern programming language. The following list details these: integers floating-point numbers atoms ranges regular expressions PIDS (process ids) ports tuples lists keyword lists maps binaries structs what may or may not surprise you is…

What is this Elixir anyway?

Posted on November 07, 2014 by Clive

I thought that I should spend some time looking at the basics of Elixir. I will try very hard not to rehash the material that is already out there, but some crossovers might happen. If you are looking for a more indepth/professional job, I would suggest that you read both Programming Elixir or…

Elixir Variables

Posted on November 07, 2014 by Clive

Following on from my previous post: What is this Elixir anyway? you should already have Elixir and Iex installed. In your iex, do the following: There you are, your first Elixir variable. Exciting, isn’t it? At this point, you are fully entitled to ask: ‘Is that it?’ And the answer is kinda yes but…

Using eWebmachine to create a link shortener (part 4)

Posted on October 21, 2014 by Clive

In the previous posts, we have been using the temporary Erlang Term Storage or ETS to store the data. As this is an in-memory store, any data that is stored is lost whenever the application is stopped. In this post, we will look to change this and make the data persist between application restarts…

Elixir Basics

Posted on October 21, 2014 by Clive

I was recently asked to put something together that covered the basics of Elixir but figured that this was already covered pretty well in other places like the Getting Started guide on the Elixir Language website and I didn't want to just regurgitate the content of those texts. There is also the…

Using eWebmachine to create a link shortener (part 3)

Posted on October 12, 2014 by Clive

In the last of these articles on the link shortener, I am going to discuss static assets. There are two ways of serving static assets - through a webserver like Apache (Apache Webserver) or using Webmachine. We'll add some simple static serving capability to the project. First off add the following…
DistortedThinking.Agency
Phone: +44 (0)7815 166434Email: clive@distortedthinking.agency
www.distortedthinking.agency