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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
karupanerura
February 11, 2024
Programming
0
55
Mustache Template 話 2024
YAYAPC::Hiroshima 2024
Lightning Talk
karupanerura
February 11, 2024
Tweet
Share
More Decks by karupanerura
See All by karupanerura
音を出したい
karupanerura
0
53
Perl Meets \w+ あるいは開発を支えるPerl活用の実例集
karupanerura
0
55
log
karupanerura
1
91
Use Perl as Better Shell Script
karupanerura
0
860
GoでParserを書く
karupanerura
4
1k
マイ隙間家具OSSたちのご紹介
karupanerura
2
280
1つの言語を原点に色々な言語を学ぶということ
karupanerura
4
3.2k
Javaの実装をPerlでテストする
karupanerura
0
1.3k
Go Generics Overview
karupanerura
0
1.4k
Other Decks in Programming
See All in Programming
朝日新聞のデジタル版を支えるGoバックエンド ー価値ある情報をいち早く確実にお届けするために
junkiishida
1
160
Claude Codeと2つの巻き戻し戦略 / Two Rewind Strategies with Claude Code
fruitriin
0
170
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
370
AIコーディングの理想と現実 2026 | AI Coding: Expectations vs. Reality 2026
tomohisa
0
190
Raku Raku Notion 20260128
hareyakayuruyaka
0
410
Rails Girls Tokyo 18th GMO Pepabo Sponsor Talk
yutokyokutyo
0
140
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
250
15年目のiOSアプリを1から作り直す技術
teakun
0
390
AI時代のキャリアプラン「技術の引力」からの脱出と「問い」へのいざない / tech-gravity
minodriven
22
7.8k
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
150
AI & Enginnering
codelynx
0
140
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
270
Featured
See All Featured
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
280
HDC tutorial
michielstock
1
420
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.6k
Designing for Timeless Needs
cassininazir
0
140
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
840
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.8k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
How to Talk to Developers About Accessibility
jct
2
140
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
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 • ޙऀ͕͍ •
ੜͷςΩετʹ͠ͳ͍ͱ͍͚ͳ͍
ͭ·Γ͜͏
ͭΒ͍
ਲڰͰϑϧεϖοΫ࣮͢Δͷ Ίͱ͜