New BEAM There, Done That with Kip Cole on a decade of localization and time work for the BEAM ecosystem.
Two technically relevant points for this community:
Compile-time dispatch at scale. Kip’s localization library (ex_cldr) used Elixir macro-generated function clauses for locale dispatch. This is idiomatic and fast at runtime - but BEAM compile-time optimization goes quadratic above roughly 1,000 clauses. Not a criticism of the BEAM: it’s an unusual case. The fix was moving locale data to runtime lookup, which also simplified the package structure significantly.
Time as intervals. Tempo replaces DateTime as an instant with a half-open interval type: inclusive lower bound, exclusive upper bound. This makes time ranges composable with no overlap ambiguity at any resolution. Layer set operations on top and scheduling - overlapping meetings, cross-timezone availability windows, locale-aware working day definitions - reduces to set intersection. Saudi Arabia’s Friday/Saturday weekend and India’s single weekend day are just different interval expressions of the same concept.
Agenda - the scheduling engine built on these primitives - shipped this week after being announced in 2022.