What Erlang/BEAM related stuff are you doing?

This week I’ve been experimenting with using Google Sheets as a data store for a small Gleam web app.

Querying is obviously very limited, but as a zero cost place to store a few thousand rows of data it seems pretty good so far. And it comes with a built in admin and reporting interface! The oauth2 dance to get authenticated is a hassle though.

I was originally inspired by some people using Airtable to do the same, but I was put off by the very low API rate limit.


You might find this from Joe Armstrong interesting @lpil

Databases are basically rectangular tables of cells, where the cells contain very simple types like strings and integers - every time you access a row of an external database this list of cells has to be converted to beam internal data structures - this conversion is extremely expensive.

The best way to persist data is in a process - then no conversion is needed, but this is not fault tolerant - so you need to keep a trail of updates to the data and store this on disk.

Often you don’t need a database for example you might like to have a system where you store all the user data as in the file system with “one file per user” this will scale very nicely - just move the files to a new machine if you need more capacity.

Erlang has two primitives term_to_binary and the inverse binary_to_term that serialise any term and reconstruct it - so storing complex terms on disk is really easy.

I have mixed feelings about databases, they are great for aggregate operations (for example, find all users that have these attributes) but terrible for operations on individual users (where a single file per user is far better).

If I were designing a new system I’d go for ‘one file per user’ as much as possible and try to limit databases for operations over all users.

From: Acceptance of Erlang's 'term_to_binary' and vice versa in Elixir - Chat / Discussions - Elixir Programming Language Forum


Building a browser based implementation of the now defunct Battlemail Kung-Fu game

Where can i buy that cup?


I let it print :wink:
In my old company, each of our team made another cup, with logos from tech that got forbidden by the management. On my cup is RabbitMQ and Erlang, on another cup was kube and gRPC…


Writing a library for pretty printing 32bits and 16bits floats to string for Nx at GitHub - DianaOlympos/ken: Float to string conversion in erlang for ff64, 32 and f16 using Ryu, which is going… well not that well. I have been at it for months and the tests are still kicking my ass due to the pain in the ass of well defining the problem well.

Other than that, i am slowly bringing GitHub - LivewareProblems/hyper: Erlang implementation of HyperLogLog this into shape for the 20s, but i still need to do some work on it.

And i am still trying to think of the best way to cross compile erlang and embed it in a release in the Nixpkgs ecosystem because i want to be able to produce release artefact for both Graviton2 and x86 for AWS. No good solution yet.

Help and PR appreciated ofc


That’s too bad, I would of like to buy that cup to drink my soda while coding. :wink:


What Erlang/BEAM related stuff are you doing?

Reading Erlang syntax. Even if Elixir is enough in its own, maybe one day i may be stuck with an Elixir dependency that has sprinkles of Erl syntax. Wouldn’t hurt to learn it sooner than later.

Also, do we have Erlang version of Dave Thomas’ Exexif Elixir library for extracting exif data from an image?


You’re being modest. KRED sources are up to 1.8MLOC now, so I usually round up to 2MLOC :slight_smile:


Check erlang_exif | Hex

We are using it in production.


Just finished implementing my 404 page.