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
AkarengaLT vol.38
Search
hashimoto-kei
October 19, 2025
Programming
1
110
AkarengaLT vol.38
AkarengaLT vol.38 に登壇した際の資料です。
https://engineercafe.connpass.com/event/370316/
hashimoto-kei
October 19, 2025
Tweet
Share
More Decks by hashimoto-kei
See All by hashimoto-kei
AkarengaLT vol.37
hashimoto_kei
0
64
AkarengaLT vol.36
hashimoto_kei
0
64
AkarengaLT vol.35
hashimoto_kei
0
170
Boast Code Party | RubyKaigi 2025 After Event
hashimoto_kei
2
260
Other Decks in Programming
See All in Programming
理論と実務のギャップを超える
eycjur
0
170
はじめてのDSPy - 言語モデルを『プロンプト』ではなく『プログラミング』するための仕組み
masahiro_nishimi
3
930
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
340
デミカツ切り抜きで面倒くさいことはPythonにやらせよう
aokswork3
0
250
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
350
3年ぶりにコードを書いた元CTOが Claude Codeと30分でMVPを作った話
maikokojima
0
600
テーブル定義書の構造化抽出して、生成AIでDWH分析を試してみた / devio2025tokyo
kasacchiful
0
230
CSC305 Lecture 05
javiergs
PRO
0
230
TFLintカスタムプラグインで始める Terraformコード品質管理
bells17
2
330
コードとあなたと私の距離 / The Distance Between Code, You, and I
hiro_y
0
190
Le côté obscur des IA génératives
pascallemerrer
0
150
Go言語の特性を活かした公式MCP SDKの設計
hond0413
1
380
Featured
See All Featured
How to Ace a Technical Interview
jacobian
280
24k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
190
55k
Typedesign – Prime Four
hannesfritz
42
2.8k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3k
Code Reviewing Like a Champion
maltzj
526
40k
A Tale of Four Properties
chriscoyier
161
23k
Designing for humans not robots
tammielis
254
26k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.4k
The Language of Interfaces
destraynor
162
25k
Become a Pro
speakerdeck
PRO
29
5.6k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Transcript
2025/10/19 hashimoto-kei AkarengaLT Vol. 38
ࣗݾհ Let me introduce myself.
໊લɿhashimoto-kei name: hashimoto-kei
ग़ɿԬ birthplace: Fukuoka City
ॴଐɿελʔτΞοϓ@Ԭ belong_to: startup at Fukuoka
ݞॻɿݚڀһ position: researcher
ࣄɿΤϯδχΞ work: engineer
ٕज़ελοΫɿPython, AWS technology stack: Python, AWS
͖ͳຊɿNand2Tetris favorite book: Nand2Tetris
None
ࠓͷςʔϚ Today’s theme
͘͠Έ.py
⚙.🐍
Python ͷΈ How Python works
CPython
Python͕ϓϩάϥϜΛ࣮ߦ͢ΔྲྀΕɺ࠷ޙʹʮόΠτίʔυʯ͕ੜ͞ΕΔ https://xtech.nikkei.com/ a tcl/nxt/column/18/02585/092000003/?SS=imgview&FD=1420927604
CRuby
Rubyͷதͷ༧උࣝ_RubyK a igiͷલʹΓୄʂ_ެ։༻ https://docs.google.com/present a tion/d/1oFvP4W3Ox8uiGXsW a 3ibyDg a 1cpLguVZhwCjpD46hFU/
mobilepresent?slide=id.g3389fccf211_0_100
4 components
None
Hands-on
Version
https://www.python.org/downlo a ds/
None
લఏࣝ Background
Modules
Python Language Services
https://docs.python.org/3.13/libr a ry/l a ngu a ge.html
🐍
ࣈ۟ղੳث Lexical Analyzer
None
લఏࣝ Background
ࣈ۟ lexeme
ϓϩάϥϜΛߏ͢Δ࠷খ୯Ґ Minimum unit for program
ࣗવݴޠͷʮ୯ޠʯ Like word in natural language
τʔΫϯ token
จ๏ͷߏ୯Ґ unit for grammar
ࣗવݴޠͷʮࢺʮจܕཁૉʯ Like grammatical element in natural language
ࣈ۟ղੳ Lexical Analysis
ίʔυΛτʔΫϯʹม Convert source code into tokens
https://docs.python.org/3.13/gloss a ry.html#term-token
https://docs.python.org/3.13/gloss a ry.html#term-lexic a l- a n a lyzer
Hands-on
https://docs.python.org/3.13/libr a ry/tokenize.html
None
ߏจղੳث Parser
None
લఏࣝ Background
நߏจ Abstract Syntax Tree
จ๏ߏΛʮʯͰදݱ Represent syntax as tree
ߏจղੳ Parsing
จ๏ϧʔϧΛͱʹ τʔΫϯྻΛ AST ʹม Convert tokens into AST with grammar
Hands-on
https://docs.python.org/3.13/libr a ry/ a st.html
None
None
ίϯύΠϥ Compiler
None
લఏࣝ Background
όΠτίʔυ bytecode
VM ͕࣮ߦͰ͖Δதؒදݱ IR run by Python’s VM
https://docs.python.org/3.13/gloss a ry.html#term-bytecode
Hands-on
https://docs.python.org/3.13/libr a ry/dis.html
None
ԾϚγϯ VM
None
લఏࣝ Background
ԾϚγϯ VM
தؒදݱΛղऍ࣮ͯ͠ߦ͢Δ Execute IR
https://docs.python.org/3.13/gloss a ry.html#term-virtu a l-m a chine
Let’s try !
⚠
1 + 2 * 3
NUMBER (1) PLUS (‘+’) NUMBER (2) MULT (‘*’) NUMBER (3)
EOF (‘’)
จ๏ϧʔϧΛͱʹ τʔΫϯྻΛ AST ʹม Convert tokens into AST with grammar
όοΧεɾφΞه๏ BNF
จ๏Λهड़͢ΔͨΊͷه๏ Notation to define grammar
None
ύʔαδΣωϨʔλ Parser Generator
จ๏ϑΝΠϧΛೖྗ͢Δͱ ύʔαʔΛੜ͢Δ Generate parser with grammar file
LALR (1) Parser
None
None
ਂ͞༏ઌ୳ࡧ/ؼΓ͕͚ॱ DFS / post-order
PUSH 1 PUSH 2 PUSH 3 MULT PLUS POP
ελοΫϚγϯ Stack Machine
PUSH 1 PUSH 2 PUSH 3 MULT PLUS POP =>
PUSH 1 PUSH 2 PUSH 3 MULT PLUS POP =>
1
PUSH 1 PUSH 2 PUSH 3 MULT PLUS POP =>
1 2
PUSH 1 PUSH 2 PUSH 3 MULT PLUS POP =>
1 2 3
PUSH 1 PUSH 2 PUSH 3 MULT PLUS POP =>
1 6
PUSH 1 PUSH 2 PUSH 3 MULT PLUS POP =>
7
PUSH 1 PUSH 2 PUSH 3 MULT PLUS POP =>
1 + 2 * 3
End ...?
None
None
Thank you for listening!