RSSAmplifier

Blog

Richard Kallos

rkallos.comRSS feed ↗16 posts

Latest posts

ETS Match Specification Pitfall: Maps

During my work, I had a problem where I needed to efficiently write tree-shaped data. I also needed the ability to query ranges of the data. I reached for ETS tables, using the ordered_set table setting, and relied on match specifications to read ranges from the table. ETS tables can have different storage backends. See the documentation for ets:new/2 for details. These backends reside within in a…

Case Study: Using CRDTs to improve a distributed system

At a previous job, I was lucky enough to be faced with the challenge of improving a distributed service’s robustness to network faults. In this post, I share how I attacked the problem using Conflict-free/Convergent Replicated Data Types (CRDTs). A Chronicle of Counters The service was responsible for managing the state of a set of counters. These counters had lifetimes and rules attached to them,…

Generating code with jq

When I first learned about jq, I thought it was a handy tool for extracting from JSON. Little did I know that I was only scratching the surface of what jq can do. jq is a “lightweight and flexible command-line JSON processor”. When I first heard of the tool, I mainly saw it being used for extracting relevant data from large JSON objects. If I had a sequence of large JSON objects, I could pipe them…

What my choices told me about my priorities

This was a useful exercise for me. I think I’ll try and check in again sometime soon. Here were my thoughts from today. I was prioritizing long-term storage When I started using plain text files to store my notes as Org mode files (which I am trying to replace) When I started using TiddlyWiki , which can be opened/reused wherever I have access to a browser that executes Javascript. It doesn’t…

A Bit of Math: Triple Elimination Tournament

A while ago, my father, who is a competitive backgammon player, had a puzzle for me. He wanted to know the fraction of players remaining after a certain number of rounds of play in a triple-elimination tournament. This blog post goes over my work to figure out the answer. A triple-elimination tournament is more-or-less how it sounds. If you lose 3 times, you’re eliminated. Since the problem…

Presentation: Hybrid Logical Clocks @ PWLMTL

This past thursday (2019-10-03), I presented this paper at Papers We Love Montreal. I had a really fun time! Here are my slides .

Imperium in Imperio - A Bridge is Made of Planks; Every Plank is a Bridge

In the previous three installments , I discussed visualizing ideal final states of things, examining the current state of your life, and how to bridge the two. In the final post in this series, I show how these techniques can be applied at any scale; from a daily to-do list to planning the course of your entire life. In the previous post , I showed how how I write Structural Tension charts. The…

Inveniam viam - Building Bridges

If you know where you are and where you want to be, you can start to plot a course between the two points. Following on the ideas presented in the previous two posts, I describe a practice I learned from reading Robert Fritz’s book Your Life as Art. I spent a few years of my life voraciously consuming self-help books. I believe the journey started with Eckhart Tolle’s The Power of Now , and it…

Esse quam videri - Seeing what's in front of you

As humans, we are easily fooled. Our five senses are the primary way we get an idea of what’s happening around us, and it’s been shown time and time again that our senses are unreliable. In this post, I try to explain the importance of ‘seeing’ what’s in front of you, and how to practice it. See this video a classic example of our incredible ability at missing important details. Rembrandt used to…

Memento Mori - Seeing the End

Memento Mori (translated as “remember death”) is a powerful idea and practice. In this post, I make the case that it’s important to think not just about your death, but to clearly define what it means to be finished in whatever you set out to do. We are mites on a marble floating in the endless void. Our lifespans are blinks in cosmic history. Furthermore, for many of us, our contributions are…

In Defense of gen_event

gen_event has drawn ire from Erlang and Elixir developers for a while. Many posts have been written, and more than one conference talk has been given on various alternatives to gen_event. In this post, I make the case that despite its warts and age, gen_event is still a very useful module to know. I also make the case that its core design is ultimately a lot more flexible than many people give it…

Stream<Consciousness>

A very common piece of programming wisdom that gets passed around is to think before you code. My favorite expression of this idea is “Weeks of programming can save you hours of planning”. That being said, not all thinking/planning is equal. In this post, I share a creative writing technique I’ve put into practice to great effect at work; freewriting. The idea is simple; you write down your…

Introducing wrek, a miniature Erlang graph engine

This is a copy of this article , kept for posterity on my blog. I gave a talk about Wrek at Code BEAM SF last month. You can view it here . Wrek is an Erlang library I wrote for concurrently executing task dependency graphs. It’s intended purpose is to run a set of pre-defined tasks that have a partial ordering between them. In this post, I explain why I wrote wrek, what it can be used for, and…

Erlang Debug VMs: What, Why and How

Erlang can load and run C libraries. This can be useful if you want to speed up parts of your code, or if you want to interact with some OS-specific features. These special C libraries are written specially to work with the Erlang VM, and can’t easily be run in isolation without extra code. This makes these libraries difficult to debug. In this post, I introduce Erlang debug VMs, explain how to…

Starting a Blog, Take Two

My attempt at blogging solely with Emacs and Org mode has come to an end. I blame my perfectionist tendencies and my lack of understanding of Org mode internals. I’ve since set up Frog , a static site generator written in Racket . There are some things that I will miss from Org mode, like source blocks and embedded LaTeX, but Frog has some pretty nice features of its own, like integration with…

Static site generation with Org Mode

UPDATE (2017-01-28) : I no longer use Emacs and Org mode for blogging. I’ve since switched to Frog . I’ve kept this post up for shame and to those who may be interested in blogging with Org. Let’s get this out of the way; I love Emacs and Org mode. I’ve been using Emacs as my daily editor for the past several years. I was using Vim before that, but tried Emacs and switched over when I wanted a…