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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
860
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
Takumiから考えるSecurity_Maturity_Model.pdf
gessy0129
1
120
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
230
15年目のiOSアプリを1から作り直す技術
teakun
1
600
AIプロダクト時代のQAエンジニアに求められること
imtnd
2
700
Rで始めるML・LLM活用入門
wakamatsu_takumu
0
160
Agent Skills Workshop - AIへの頼み方を仕組み化する
gotalab555
14
7.9k
CSC307 Lecture 13
javiergs
PRO
0
310
new(1.26) ← これすき / kamakura.go #8
utgwkk
0
1.6k
「やめとこ」がなくなった — 1月にZennを始めて22本書いた AI共創開発のリアル
atani14
0
350
Unity6.3 AudioUpdate
cova8bitdots
0
110
Ruby x Terminal
a_matsuda
7
580
どんと来い、データベース信頼性エンジニアリング / Introduction to DBRE
nnaka2992
1
130
Featured
See All Featured
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
140
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
1.9k
sira's awesome portfolio website redesign presentation
elsirapls
0
180
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Leo the Paperboy
mayatellez
4
1.5k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
240
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.3k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
810
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.1k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
79
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
60
42k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
74
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 • ޙऀ͕͍ •
ੜͷςΩετʹ͠ͳ͍ͱ͍͚ͳ͍
ͭ·Γ͜͏
ͭΒ͍
ਲڰͰϑϧεϖοΫ࣮͢Δͷ Ίͱ͜