Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Lispy Elixir
Search
Patrick Gombert
May 16, 2014
Technology
1
140
Lispy Elixir
Patrick Gombert
May 16, 2014
Tweet
Share
More Decks by Patrick Gombert
See All by Patrick Gombert
Introduction to Erlang (8LU)
patrickgombert
3
170
Other Decks in Technology
See All in Technology
NewSQLや分散データベースを支えるRaftの仕組み - 仕組みを理解して知る得意不得意
hacomono
PRO
3
220
助けて! XからWaylandに移行しないと新しいGNOMEが使えなくなっちゃう 2025-07-12
nobutomurata
2
130
american airlines®️ USA Contact Numbers: Complete 2025 Support Guide
supportflight
1
120
QuickSight SPICE の効果的な運用戦略~S3 + Athena 構成での実践ノウハウ~/quicksight-spice-s3-athena-best-practices
emiki
0
250
Reach American Airlines®️ Instantly: 19 Calling Methods for Fast Support in the USA
flyamerican
1
180
How Do I Contact HP Printer Support? [Full 2025 Guide for U.S. Businesses]
harrry1211
0
130
United Airlines Customer Service– Call 1-833-341-3142 Now!
airhelp
0
170
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
54
22k
サイバーエージェントグループのSRE10年の歩みとAI時代の生存戦略
shotatsuge
4
730
【LT会登壇資料】TROCCO新コネクタ「スマレジ」を活用した直営店データの分析
kazari0425
1
140
2025-07-06 QGIS初級ハンズオン「はじめてのQGIS」
kou_kita
0
180
20250708オープンエンドな探索と知識発見
sakana_ai
PRO
4
660
Featured
See All Featured
The Cult of Friendly URLs
andyhume
79
6.5k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Code Review Best Practice
trishagee
69
19k
Designing Experiences People Love
moore
142
24k
Automating Front-end Workflow
addyosmani
1370
200k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2.1k
The Language of Interfaces
destraynor
158
25k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
281
13k
How to train your dragon (web standard)
notwaldorf
96
6.1k
Unsuck your backbone
ammeep
671
58k
Transcript
Lispy Elixir @PatrickGombert
Lisp crash course (LISt Processing) () ; data structure (f)
; data structure and executable code (1 2 3) ; data structure without executable code ! ; closure definition ! ; program returning 4
Composability ; Higher order function ! ; Function returning a
function ! ; equivalent to !
Elixir is composable ; Higher order function ! ; Function
returning a function ! equivalent to
Homoiconicity - Code is represented as data (everything is a
list in lisp) - The resulting structure is a form of Abstract Syntax Tree (+ ; Root Node (+ ; Child of Root 1 ; Leaf Node 2) ; Leaf Node (+ ; Child of Root 3 ; Leaf Node 4)) ; Leaf Node !
Elixir is homocionic… ?
Look past syntax, you must
Quote This doesn’t print hello world, but why?
I heard you like programs in your programs
Elixir allows you to program while you program!
Homoiconic AST function arguments
Not quite as elegant… vs.
ISMETA (http://xkcd.com/917/) = =
! Erlang’s Parse-Transform http://www.erlang.org/doc/apps/erts/absform.html
… or lisp style macros! - Compile time (like parse-transform)
! - Homoiconic AST manipulation (like parse-transform) ! - Consistent AST (!!!)
defmacro ! ! - all at compile time - quoted
arguments - returning ASTs for the evaluation in the current module
None
None
None
List Comprehensions
And without the commas
It’s macros (almost) all the way down Turtle = Macro
Erm… umm…
! So of course…
None
Slow down cowboy It’s a context switch between compile &
run times
Macro bootstrap step https://github.com/elixir-lang/elixir/blob/master/lib/elixir/ src/elixir_bootstrap.erl
Splicing
Hygiene Note: Elixir is immutable so the rebinding is in
the local scope
Thanks! @PatrickGombert