Tricks.jl is a package that does cool tricks to do more work at compile time.
It does this by generating (@generated
) functions that just return "hardcoded" values, and then trigger the generation when (if) that value changes. This retriggering is done using backedges.
Tricks.jl can for example declare Tim Holy traits that depend on whether or not a method has been defined
Slides
Tricks.jl was made at the JuliaCon 2019 hackathon in Baltimore. Shortly after manual backedges were added to Julia-1.3. But has never been explained at a JuliaCon.
This talk is expressly targeted at advanced Julia users wanting to understand on the internals. Attendee's will learn a bunch about backedges, why they exist and how they work.