← All posts

All posts tagged "elixir"

Conway's Game of Life: A Functional Approach
featured

In this post I describe how to implement Conway's Game of Life using functional programming to be able to transform a set of cells into the next iteration.

Writing an Elixir/Phoenix based multiplayer Minesweeper game
featured

How I wrote the minesweeper game, Mowing, you can play from the games menu.

Rewriting Strange Leaflet in Phoenix and LiveSvelte
featured

Another rewrite of Strange Leaflet? Yes! Still with the power of Svelte but now with Phoenix on the backend.

Rewriting my Protohackers repo as an umbrella app

Commit a8bbfa9 from github.com/sdball/protohackers

Add more OTP implementation of Speed Daemon - sdball/protohackers

Commit dd3e855 from github.com/sdball/protohackers

More OTP solution for Protohackers Problem 5 - sdball/protohackers

Commit 6688ae8 from github.com/sdball/protohackers

Solving Protohackers Problem 6 - sdball/protohackers

Commit aa7b04d from github.com/sdball/protohackers

Add MobInTheMiddleServer - sdball/protohackers

Commit 3a61337 from github.com/sdball/protohackers

Rewrite ChatRoomServer to use active sockets - sdball/protohackers

Commit 83d2c6a from github.com/sdball/protohackers

Add UnusualDatabaseProtocolServer - sdball/protohackers

Commit b5d001b from github.com/sdball/protohackers

Add ChatRoomServer - sdball/protohackers

Commit bdcfbfc from github.com/sdball/protohackers

Reading the Bandit source code: Part 1

Bandit is a new HTTP library that isn't only written in Elixir, but written with readable source code. Let's see what we can learn!

Add AssetPriceServer - sdball/protohackers

Commit 9529786 from github.com/sdball/protohackers

Reduce the complexity of the IsPrimeServer - sdball/protohackers

Commit 2e9fd17 from github.com/sdball/protohackers

Comprehensively redesign IsPrimeServer - sdball/protohackers

Commit a72e300 from github.com/sdball/protohackers

Things I've learned deploying a Phoenix 1.7 app using Bandit to fly.io

Some issues I ran into deploying a Phoenix app using Bandit to fly.io and what I learned from them.

Getting AlpineJS to work with Phoenix 1.7

How to integrate AlpineJS with Phoenix 1.7

GIFs from my 2022 ElixirConf talk: Livebook smart cells are amazing

GIFs I made for my 2022 ElixirConf talk

Strange Leaflet about Elixir - Page 8

Looping without mutable data means recursion

Strange Leaflet about Elixir - Page 7

Pattern matching is awesome

Strange Leaflet about Elixir - Page 6

How a GenServer process manages state

Strange Leaflet about Elixir - Page 5

Immutability and why it's awesome

Strange Leaflet about Elixir - Page 4

Using processes to handle asynchronous work

Strange Leaflet about Elixir - Page 3

How Elixir processes do

Strange Leaflet about Elixir - Page 2

What is the BEAM and why is it so awesome?

Strange Leaflet about Elixir - Page 1
featured

Elixir is a language of independently running processes

Let's query the GitHub GraphQL API from a Livebook smart cell

In which we write a Livebook smart cell to allow querying the Github GraphQL API

Let's write an Elixir Livebook smart cell

The basics of how to write an Elixir Livebook smart cell

Elixir Phoenix and "role postgres does not exist"

Ever hit that error? Let's fix it!

The Problem of State

State is a hard problem to deal with. I say functional languages make it easier to handle because they force you to deal with it deliberately rather than have it happen accidentally.

Shrink your data into bitfields (and out again)
featured

Some applications want to save every byte. Every last byte! Maybe they have memory constraints, maybe they're sending data over the network, maybe they just like saving bytes. This post goes into how bitfields allow us to shink complex data down into very small representations starting from arbitrary JSON and gradually transforming it down into a bitfield.