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
Mustache Template 話 2024
Search
karupanerura
February 11, 2024
Programming
0
58
Mustache Template 話 2024
YAYAPC::Hiroshima 2024
Lightning Talk
karupanerura
February 11, 2024
Tweet
Share
More Decks by karupanerura
See All by karupanerura
音を出したい
karupanerura
0
63
Perl Meets \w+ あるいは開発を支えるPerl活用の実例集
karupanerura
0
56
log
karupanerura
1
95
Use Perl as Better Shell Script
karupanerura
0
870
GoでParserを書く
karupanerura
4
1k
マイ隙間家具OSSたちのご紹介
karupanerura
2
280
1つの言語を原点に色々な言語を学ぶということ
karupanerura
4
3.3k
Javaの実装をPerlでテストする
karupanerura
0
1.3k
Go Generics Overview
karupanerura
0
1.4k
Other Decks in Programming
See All in Programming
Fundamentals of Software Engineering In the Age of AI
therealdanvega
1
250
CSC307 Lecture 15
javiergs
PRO
0
240
Angular-Apps smarter machen mit Gen AI: Lokal und offlinefähig - Hands-on Workshop!
christianliebel
PRO
0
110
20260315 AWSなんもわからん🥲
chiilog
1
130
Railsの気持ちを考えながらコントローラとビューを整頓する/tidying-rails-controllers-and-views-as-rails-think
moro
5
390
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
270
RubyとGoでゼロから作る証券システム: 高信頼性が求められるシステムのコードの外側にある設計と運用のリアル
free_world21
0
270
AI Assistants for Your Angular Solutions
manfredsteyer
PRO
0
140
ふつうのRubyist、ちいさなデバイス、大きな一年 / Ordinary Rubyists, Tiny Devices, Big Year
chobishiba
1
430
Go Conference mini in Sendai 2026 : Goに新機能を提案し実装されるまでのフロー徹底解説
yamatoya
0
570
AIとペアプロして処理時間を97%削減した話 #pyconshizu
kashewnuts
1
220
TipKitTips
ktcryomm
0
160
Featured
See All Featured
The World Runs on Bad Software
bkeepers
PRO
72
12k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
820
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.9k
We Are The Robots
honzajavorek
0
200
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
210
Making Projects Easy
brettharned
120
6.6k
Building Adaptive Systems
keathley
44
3k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
Designing Powerful Visuals for Engaging Learning
tmiket
0
270
Exploring anti-patterns in Rails
aemeredith
2
290
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
150
Transcript
Mustache Template 2024 YAYAPC::Hiroshima 2024 Lightning Talk @karupanerura
Mustache Template?
Hello {{name}}
YAPC::{{{country}}} {{#tiny}}::Tiny{{/tiny}} {{year}}
͜͏͍͏ͭ
ࢮ͵΄Ͳ͍ΖΜͳݴޠͰ࣮͞Ε͍ͯΔ
Logic-less templates Β͍͠
࣮spec͋Δ
Speci fi cation
Speci fi cation
Speci fi cation
ςετέʔεͱ༷ͯ͠Λهड़
comments.yaml
comments.yaml
͜͏͍͏ͷ͕ͨ͘͞Μ͋Δ
ϚχϡΞϧ͋Δ
ϚχϡΞϧ
͜͜ͰϚχϡΞϧΛνϥݟ͢Δ https://mustache.github.io/mustache.5.html
ຊ
࣮ϑϧεΫϥον࣮ͭ͘Γ·ͨ͠
ਲڰͰϑϧεϖοΫ࣮ࡁ
Speci fi cationͷςετέʔε ͯ͢PASS
Mustache Templateͷ༷ ͕͜͜Ϝζ͍
ίϯςΩετ
ίϯςΩετ • ʢPerlͷίϯςΩετͰͳ͍ʣ • ςϯϓϨʔτʹ͢ͷ͜ͱΛίϯςΩετͱݺͿ • ͨͱ͑ "Hello, {{name}}" ʹରͯ͠
{ name => "papix" } ͩͱͯ͠ • { name => "papix" } શମ͕ίϯςΩετ
ίϯςΩετͷ͍͠ϙΠϯτ • ܧঝ
ϗϫΠτεϖʔεͷѻ͍
֤specʹࡏ
֤specʹࡏ
ΠϯϥΠϯ͔ͦ͏͡Όͳ͍͔ͷ۠ผ
ΠϯϥΠϯ͔ͦ͏͡Όͳ͍͔ͷ۠ผ
ܧঝςϯϓϨʔτ
࠶ؼ͕Ͱ͖Δ
ͬͺΓείʔϓΛܧঝ͢Δ
ϥϜμ
ϥϜμ
ϥϜμ
ϥϜμ
ϠόΆ͍Μͱ • Lambdaͷѻ͍͕2छྨ͋Δ • ςϯϓϨʔτʹຒΊࠐΉͱͯ͠ͷLambda • ηΫγϣϯͷதͷςΩετΛςϯϓϨʔτʹ͢ΔLambda • ޙऀ͕͍ •
ੜͷςΩετʹ͠ͳ͍ͱ͍͚ͳ͍
ͭ·Γ͜͏
ͭΒ͍
ਲڰͰϑϧεϖοΫ࣮͢Δͷ Ίͱ͜