Elixir Transforms (ExTra)

How it started... 🌱

  • Goal: toggle pipelines and map keys
  • Wrote Emacs functions to call IEx
  • Realized Elixir could do everything
  • And the mechanics were extensible

The "Big Idea" 🤯

  1. Select code in editor
  2. Choose a transform to apply
  3. Run associated escript binary
  4. Selection replaced by result

Key Concepts 🧐

  • Self-contained
  • Distributed as binary
  • Text-in and text-out
  • Minimize logic in editor
  • Easy to add transforms
  • Support use invarious contexts

The Challenges ⚠️

  • Out of scope variables
  • Nested structures
  • Escape characters
  • Editor integration
  • Elixir AST nuances

My Process ⚙️

  1. Dream big
  2. Ask for everything
  3. Hone the outcome
  4. Provide context for iteration
  5. Refine, repeat

Demo 💥

Questions❓

https://github.com/jasonmj/ex_tra

deck

By Jason Johnson