More flags than UNHQ
Yesterday I refactored my code according to the flag specifications in this documentation:
It simplified my parsing a lot and it’s helping me iron out the bugs better.
This is the best documentation on printf's flags that I’ve found so far
and I wished I would have found it earlier.
The community is helping out too and I’m managing to piece together.
I found this amazing article about how Discord used Rust to extend Elixir and optimize their notification system:
Their goal was to only send notifications to online users, and needed a data structure that could be easily store the current status of every user in a channel. This structure had to be optimized for insertions (to easily flip the user’s status) and searches (to quickly get all online users).
They benchmarked some of Elixir’s and Erlang’s built-in structures, but they
were all far too slow for their requirements.
They settled on implementing Skip Lists in Rust and compiling them with BEAM
(Erlang’s virtual machine) as their target.
They used a Rust library called rustler to bridge Rust with BEAM.
This got me really excited about learning Elixir since it seems easily extendable with Rust code.
Today I’ll continue working on printf. The restructuring of the flag parser and int printer is a work in progress: but it’s already passing on half the tests.