(Today I Learned)


March 30, 2023

TIL about pico.css - the minimalistic and zero-friction CSS framework for semantic HTML.

It has everything I need to quickly build a data-first site without sacrificing the UX. And I already know it’s going to integrate beautifully with Phoenix LiveView 😈

The origins of big- and little-endian terms

December 14, 2018

TIL that the “big-endian” and “little-endian” terms come from Jonathan Swift’s “Gulliver’s Travels” (1726), where they represent proponents of the two opposing ways of breaking eggs.

erlang:term_to_binary/1 compatibility

December 13, 2018

TIL that Erlang guarantees for the :erlang.term_to_binary/1 format to be compatible accross the span of at least two releases - it is surely going to be possible to decode terms encoded in R18 in R20, but not necessarily in R21.

Its seems to be common knowledge for some, but I couldn’t find any hard sources for this, the closest thing is this SO answer with messed up links. Do let me know if that’s not correct.


January 26, 2018

TIL about yarnbombing, also known as “guerrilla knitting”.

As far as I’m concerned, the names alone make it awesome.


December 16, 2017

TIL about the ncdu tool - the NCurses Disk Usage cli program. It’s like (Win|k)DirStat, only much lighter and more convenient. I’ve been looking for it all my life!

Erlang Dirty Schedulers

December 10, 2017

TIL about Erlang Dirty Schedulers. They seem to be pretty cool if you need to write NIFs.


November 27, 2017

TIL that the Do What the Fuck You Want to Public License has not been approved by the OSI board, not because it was vulgar, but because it wasn’t a license - it was a dedication to the public domain.

Also, if you do want to put your work in public domain, you’re probably better off using the CC0 license.

A 65 byte binary is large

November 15, 2017

I knew that in Erlang/Elixir each of the processes has its own heap and sending messages between processes copies the terms sent, which is why sending large amounts of data might be inefficient. I also knew that “large binaries (strings)” live in a shared heap and processes operate on references to them, so sending those around is cheap.

TIL that any binary longer than 64 bytes is considered a large binary, which was probably a deliberate design choice.

Elixir tuples' AST

November 11, 2017

TIL that the AST of Elixir tuples isn’t entirely consistent - the 2-tuples are literals:

assert {:{}, _line, []} = Code.string_to_quoted!("{}")
assert {:{}, _line, [1]} = Code.string_to_quoted!("{1}")
assert {1, 2} = Code.string_to_quoted!("{1, 2}")
assert {:{}, _line, [1, 2, 3]} = Code.string_to_quoted!("{1, 2, 3}")
assert {:{}, _line, [1, 2, 3, 4]} = Code.string_to_quoted!("{1, 2, 3, 4}")
assert {:{}, _line, [1, 2, 3, 4, 5]} = Code.string_to_quoted!("{1, 2, 3, 4, 5}")

Apparently it is this way to make Keywords literals as well.