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
Everything As Code
yosuke_ai
0
120
アプリにAIを正しく組み込むための アーキテクチャ── 国産LLMの現実と実践
kohju
1
250
Strands AgentsとNova 2 SonicでS2Sを実践してみた
yama3133
1
2.1k
Knowledge Work の AI Backend
kworkdev
PRO
0
320
戰略轉變:從建構 AI 代理人到發展可擴展的技能生態系統
appleboy
0
160
『君の名は』と聞く君の名は。 / Your name, you who asks for mine.
nttcom
1
130
業務の煩悩を祓うAI活用術108選 / AI 108 Usages
smartbank
9
17k
MySQLのSpatial(GIS)機能をもっと充実させたい ~ MyNA望年会2025LT
sakaik
0
160
ハッカソンから社内プロダクトへ AIエージェント ko☆shi 開発で学んだ4つの重要要素
leveragestech
0
390
NIKKEI Tech Talk #41: セキュア・バイ・デザインからクラウド管理を考える
sekido
PRO
0
240
Connection-based OAuthから学ぶOAuth for AI Agents
flatt_security
0
450
ハッカソンから社内プロダクトへ AIエージェント「ko☆shi」開発で学んだ4つの重要要素
sonoda_mj
6
1.9k
Featured
See All Featured
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
33
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
51
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
0
3.4k
Raft: Consensus for Rubyists
vanstee
141
7.3k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.4k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
0
32
SEO for Brand Visibility & Recognition
aleyda
0
4.1k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
150
Building Applications with DynamoDB
mza
96
6.9k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Crafting Experiences
bethany
0
24
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