Tag: erlang
Teaching LFE to Format Itself, Part 2: Someone Already Solved This
Looking for a principled way to decide layout, we found Racket's raco fmt and the 2023 paper beneath it — a provably optimal pretty-printer. It was exactly what we needed, with exactly one problem: it is slowest precisely on the S-expressions a Lisp formatter sees most.
Teaching LFE to Format Itself, Part 1: A Hand-Written Formatter
The origin of LFE's code formatter — the hand-written engine that shipped inside rebar3_lfe, the one genuinely hard BEAM-specific obstacle (comments), and the maintainability wall that taught us we'd been writing the formatting convention as code when it wanted to be data.
LFE Friday - maps:get/3
Reopening LFE Friday with the safe map read: maps:get/3 hands back a default instead of crashing on a missing key — plus the one eager-evaluation gotcha to know.
Graph Theory in LFE: A Knowledge Graph of Erlang Itself
A deep, hands-on tour of graph theory in LFE — built on a real corpus of 1,664 Erlang concept cards, driven by the graffeo library, and unfolded slowly enough to teach the mathematics underneath each query.
LFE Friday - ETS selects, continuations and inserts
LFE Friday - Using ETS select with a limit
LFE Friday - ETS, match_specs and functions
LFE Friday - More ETS data matching (and querying)
LFE Friday - ETS data matching
LFE Friday - ETS Introduction, part 5: keypos, read_concurrency and write_concurrency
LFE Friday - ETS Introduction, part 4: ETS Access Protections
LFE Friday - ETS Introduction, part 3: ETS Table Types
LFE Friday - ETS Introduction, part 2
LFE Friday - ETS Introduction, part 1
LFE Friday - digraph:del_path/3
LFE Friday - digraph:get_cycle/2
LFE Friday - digraph:in_neighbors/2
LFE Friday - digraph:get_path/3
LFE Friday - digraph:add_edge/4